text
stringlengths
25
2.19k
embedding
listlengths
768
768
def dealwithwebform ( self, form ) : # parse form incident _ entry _ df = self. incidentwrapper. parseincidentfromwebform ( form ) print ( incident _ entry _ df ) # deal with form id = self. deal ( incident _ entry _ df ) self. inform ('[ main ] : dealwithwebform ( ) : form was dealt - with!') return id
[ 0.4967626631259918, -0.25533175468444824, 0.45041948556900024, 0.648351788520813, 0.5549136996269226, -0.06815879791975021, 0.7475932836532593, 0.36436668038368225, 0.27217522263526917, -1.2654829025268555, -0.27000856399536133, -1.0351135730743408, -0.6266957521438599, 0.47580230236053467...
def test _ attributes ( ) : ver = _ version. version ( " 1. 2. 3. 4. foo ", true, 5 ) assert ver. major = = 1 assert ver. minor = = 2 assert ver. patch = = 3 assert ver. revision = = 5 assert ver. is _ dev ver = _ version. version ( " 2. 3. 4. 5. foo ", false, 6 ) assert ver. major = = 2 assert ver. minor = = 3 assert ...
[ -0.5077294707298279, -0.6234877705574036, 0.403231680393219, 0.005275708623230457, -0.06329606473445892, 0.6572625041007996, 0.3037843704223633, 0.3091139793395996, 0.07414054125547409, 0.24959833920001984, -1.254018783569336, -0.6356576085090637, -0.0771946832537651, -0.3063446581363678, ...
def setvsamplitude ( state ) : return none
[ 0.7386316657066345, -0.8235642313957214, 0.14410369098186493, 0.31601598858833313, -0.19430863857269287, -0.11413082480430603, 0.37322354316711426, 0.17581771314144135, 1.5570999383926392, 0.647939920425415, -0.8902629017829895, 0.243917778134346, -0.3725561797618866, -0.036149848252534866...
def post _ tests _ message ( self ) : # once the tests are complete this post tests message is displayed. question = " " " \ nmos controller test suite complete! please press the'next'button to exit the tests. " " " try : self. _ invoke _ testing _ facade ( question, [ ], test _ type = " action " ) except testingfacade...
[ 0.3316076099872589, 0.22775617241859436, 0.3335209786891937, 0.4103950560092926, 0.5837689638137817, -0.022216832265257835, 1.2504407167434692, -0.5624222755432129, -0.14948496222496033, -0.09435649961233139, 0.02781718410551548, -0.3960549235343933, -1.651235818862915, 0.8514988422393799,...
def myinfoupdated ( self, view ) : self. _ main. send ( " myinfoupdated ", [ str ( view. name ) ] ) pass
[ -0.20900917053222656, -1.205843210220337, 0.3670314848423004, -0.18177063763141632, -0.8449832797050476, -0.006303983274847269, 0.1713113784790039, -0.4625111520290375, -0.12514027953147888, -0.7494935989379883, -0.6708492040634155, 0.7574234008789062, 0.2211618423461914, -0.20109930634498...
def run _ experiment ( n _ mod = 1000, duration = 5000, inter _ conn = inter _ connectivity, inter _ scaling = inter _ scaling _ factor, save _ output = false, with _ tms = false, with _ thalamus = false, thalamus _ modulation = 1. 0, poisson _ input = true, tms _ time = tms _ stimulus _ time, verbose = false ) : # see...
[ 0.23156681656837463, -0.11205966770648956, 0.9435861110687256, 0.6897451877593994, 0.38097140192985535, -0.2993536591529846, 0.6942535042762756, 0.6961150169372559, 0.11897289007902145, 0.7468386292457581, 0.07946456968784332, -0.1389600783586502, -0.24474266171455383, 0.18688006699085236,...
def test _ simple _ closure ( a, b ) : def f ( ) : return a + 1. 0 def g ( ) : return b + 2. 0 return f ( ) * g ( )
[ 0.37804147601127625, 0.03732576593756676, 0.4897235631942749, 0.3714224696159363, -0.5337662696838379, 0.1554477959871292, 0.9116033911705017, -0.32911938428878784, 0.29380175471305847, -0.9519404172897339, 0.38811373710632324, -0.1219506710767746, -0.1356191337108612, -0.9956895709037781,...
def is _ service _ enabled ( context, target _ language ) : return _ type = clientresult ( context, bool ( ) ) binding _ type = translationjob ( context, target _ language ) qry = serviceoperationquery ( binding _ type, " isserviceenabled ", none, none, none, return _ type ) context. add _ query ( qry ) return return _...
[ -0.47280576825141907, 0.664607584476471, 0.5732412338256836, 0.19153974950313568, -0.6129977703094482, -0.23681792616844177, -0.7384231090545654, -0.06761422753334045, 0.1137295663356781, 0.21032749116420746, -0.6661376357078552, -0.07439081370830536, -1.0973505973815918, 0.081218220293521...
def plot _ sample _ data ( dataset : pd. dataframe ) : for i in range ( 16 ) : index = random. randint ( 0, dataset. shape [ 0 ] ) subplot = plt. subplot ( 4, 4, i + 1 ) data = dataset. iloc [ index ] subplot. set _ title ( data. label ) subplot. imshow ( data [ 1 : ]. values. reshape ( ( 28, 28 ) ), cmap ='gray') plt....
[ 0.039595190435647964, 1.3561662435531616, 0.5120728611946106, -0.9568079710006714, -0.34024950861930847, 0.32228708267211914, 0.4171542227268219, -0.08097454160451889, 0.8421328067779541, -0.5115410089492798, 0.525699257850647, 0.8387946486473083, 0.23132629692554474, -0.17454372346401215,...
def test _ read _ class ( self ) : response = self. client. get ( self. url ) self. assertequal ( 200, response. status _ code )
[ -0.542547345161438, -0.5782420039176941, 0.5803926587104797, 0.14988383650779724, 0.7645623683929443, 1.0414173603057861, -0.5000990033149719, 0.3278922140598297, 0.028901925310492516, -1.2848868370056152, 0.5212740302085876, 0.21572625637054443, 0.35439959168434143, -0.5247638821601868, ...
def test _ srv _ inner _ product _ elastic ( self ) : tangent _ vec _ a = gs. random. rand ( self. n _ sampling _ points, 3 ) tangent _ vec _ b = gs. random. rand ( self. n _ sampling _ points, 3 ) result = self. srv _ metric _ r3. inner _ product ( tangent _ vec _ a, tangent _ vec _ b, self. curve _ a ) r3 = euclidean...
[ 0.08378827571868896, 0.2992537319660187, 0.9706358909606934, -0.15782907605171204, -0.16646809875965118, 0.7282983064651489, 0.6951574087142944, -0.49952319264411926, 0.3961818516254425, 0.06296699494123459, 0.18779774010181427, -0.21999773383140564, -0.8361604809761047, -1.212087154388427...
def testkeyerror ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) acc. reload ( ) with self. assertraises ( keyerror ) : acc. tensors ( " s1 " )
[ 0.2496372014284134, 0.8504257798194885, 0.35284462571144104, 0.09137275815010071, -0.23739959299564362, 0.1797049194574356, 1.165016770362854, -0.5471035242080688, -0.4910534620285034, -0.5188601016998291, -0.163258358836174, 0.36513766646385193, 0.9129711389541626, -0.31635582447052, 0....
def eval _ gradient _ old ( self, x, surrogate _ grad _ params ) : x _ train = surrogate _ grad _ params [ 0 ] x = x. reshape ( 1, - 1 ) kernel _ matrix = self. kernel _ function ( x, x _ train ) length _ scale = self. kernel _ function. length _ scale n, m = kernel _ matrix. shape [ 0 ], kernel _ matrix. shape [ 1 ] d...
[ -0.5909528136253357, 0.43324601650238037, 0.9218722581863403, -0.8477112054824829, -0.4934370517730713, 0.040700480341911316, -0.3948460817337036, 0.5797417163848877, -0.8954424262046814, 0.8035494089126587, 0.003195446450263262, 0.5699353218078613, -0.2793968915939331, 0.852043628692627, ...
def resolve ( self, definitions ) : debug = self. debug verbose = self. verbose def infer ( ) : changed = 0 for ( name, info ) in definitions. items ( ) : if info [ " mixed " ] : continue other = info. get ( " base ", info. get ( " subs ", none ) ) if other : otherbare = other. split ( " : ", 1 ) [ - 1 ] otherinfo = de...
[ -0.5333853363990784, -0.10116056352853775, 0.881671130657196, 0.3147455155849457, 0.502800703048706, -0.6873071789741516, -0.02387869544327259, -0.018181487917900085, -0.5278792977333069, -0.532925546169281, -0.5942926406860352, 0.45013561844825745, -0.20858748257160187, 1.3082960844039917...
def format _ code ( text ) : from yapf. yapflib. yapf _ api import formatcode return formatcode ( text, style _ config ='facebook') [ 0 ]
[ 0.9558490514755249, -0.9434623718261719, 0.315402090549469, 0.37590107321739197, -0.20328105986118317, -0.9085389375686646, 0.46800684928894043, -0.03427409380674362, 0.7609610557556152, -0.37057551741600037, 0.8100293278694153, 0.16430556774139404, -0.1815967857837677, 1.123324990272522, ...
def fail ( self, exit _ status ) : log. info ( " action run % s failed with exit status % r ", self. id, exit _ status ) self. state = action _ run _ failed self. exit _ status = exit _ status self. end _ time = timeutils. current _ time ( ) self. complete _ callback ( ) self. state _ callback ( )
[ -0.12331251055002213, -1.0332326889038086, 0.2433837503194809, 0.5446494221687317, 0.41912806034088135, 0.031611863523721695, -0.15686340630054474, 0.07950684428215027, -0.5048705339431763, 0.5896342992782593, -0.8654032945632935, -0.08029688894748688, 0.531592607498169, 0.6549595594406128...
def getclient ( servicewsdl ) : client = none try : websession = websession ( ) websession. auth = httpbasicauth ('soap ', " " ) transport = transport ( timeout = 10, session = websession ) client = zeep. client ( wsdl = servicewsdl, transport = transport ) print ('client successfully created') except exception as e : ...
[ 0.08941405266523361, -0.47214439511299133, 0.5374857783317566, -0.4693371057510376, -0.12689992785453796, 0.49790215492248535, 0.22755050659179688, -0.5754978656768799, 0.6091031432151794, -0.8158210515975952, 0.04990046098828316, 0.7394439578056335, -0.26772841811180115, -0.47591146826744...
def test _ pass _ data _ frequency _ based _ on _ bundle _ config ( self, mock _ download _ bundle _ file ) : def _ mock _ download _ bundle _ file ( code, f, * args, * * kwargs ) : prices = pd. concat ( dict ( close = pd. dataframe ( dict ( fi12345 = [ 48. 90, 49. 40, 55. 49, 56. 78 ], fi23456 = [ 59. 5, 59. 59, 59. 3...
[ -0.14123883843421936, 0.39588892459869385, 1.0129567384719849, 0.4002456068992615, 0.723371684551239, -0.32331135869026184, 0.9627645015716553, -0.05155414715409279, -0.7234129309654236, -0.1197381243109703, -0.4884802997112274, -0.385735422372818, 0.13018812239170074, 0.5352981686592102, ...
def _ report _ task _ info ( task _ id, task _ result, task _ status ) : # setup fields, or defaults if missing values task _ failures = task _ result. get ('failures ', [ ] ) task _ successes = task _ result. get ('successes ', [ ] ) result _ details = task _ result. get ('details ', {'messagelist': [ ] } ) result _ s...
[ -0.34148141741752625, -0.2333998680114746, 0.5482572317123413, -0.6357986927032471, 0.2753618359565735, -0.43699827790260315, -0.052835993468761444, 0.4255766272544861, -1.1251914501190186, 0.04975840821862221, -0.8907275199890137, 0.02902834117412567, 0.8943108320236206, 0.684531390666961...
def test _ review _ to _ pure _ activity ( self, * _ ) : status = models. review. objects. create ( name = " review's name ", content = " test content ", rating = 3. 0, user = self. local _ user, book = self. book, ) activity = status. to _ activity ( pure = true ) self. assertequal ( activity [ " id " ], status. remot...
[ -0.32043081521987915, -0.7403340935707092, 0.4590247571468353, -0.4667149484157562, 0.02620217576622963, 0.655031144618988, -0.15963982045650482, -0.03326879441738129, 0.4459803104400635, 0.07031616568565369, -0.47133150696754456, -0.08574384450912476, -0.25962331891059875, -0.797846734523...
def waitforacquisition ( ) : return none
[ 0.2737179100513458, -0.8219887614250183, 0.21898329257965088, -0.05843817815184593, 0.18102484941482544, -0.08834630995988846, 0.7159731984138489, 0.06183229759335518, 0.026402661576867104, -0.739947497844696, 0.3958296477794647, -0.3439936637878418, 0.24695342779159546, -0.567141473293304...
def get _ pcp ( self ) : return ( self. get _ byte ( 2 ) & 0xe0 ) > > 5
[ 0.9016153216362, -0.4366004168987274, 0.5163295865058899, 0.05008115619421005, -0.2546118497848511, 0.12423473596572876, 0.3335798382759094, -0.9030670523643494, 0.44768476486206055, 0.395781010389328, -0.03323151543736458, -0.6431883573532104, -1.4665769338607788, -0.21672208607196808, ...
def execute _ singleton0 ( self, sql : str, * params ) - > any : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, * params ) rows = cursor. fetchall ( ) cursor. close ( ) n = len ( rows ) if n = = 1 : return rows [ 0 ] [ 0 ] elif n = = 0 : return none else : raise resultexception ('0 or 1 ', n, sql )
[ -0.18395116925239563, 0.6138080358505249, 0.7617480158805847, 0.9768871665000916, 0.6526869535446167, -0.5149622559547424, -0.034376271069049835, -0.27645906805992126, -0.013431117869913578, -0.32363757491111755, 0.844802975654602, 0.4350457191467285, -0.8121267557144165, 0.892698585987091...
def _ persistentvarget ( self, svar ) : sfull = self. _ _ persistentvarcalcname ( svar ) ; if not os. path. exists ( sfull ) : return none ; try : ofile = open ( sfull,'r') ; svalue = ofile. read ( ). decode ('utf - 8') ; ofile. close ( ) ; except : reporter. errorxcpt ('error creating " % s "'% ( sfull, ) ) ; return n...
[ 0.25585952401161194, -0.9951080083847046, 0.4501436650753021, -0.285422146320343, -1.048344612121582, -0.5442283749580383, 0.11943185329437256, -1.3062280416488647, 0.19465851783752441, -0.4597245454788208, 0.4540426731109619, -0.34068620204925537, -0.37664473056793213, -0.9798799157142639...
def extract _ pattern ( expr, engine, context ) : if isinstance ( expr, expressions. binaryoperator ) : ops = ('> ','< ','> = ','< =') if expr. operator in ops : op _ index = ops. index ( expr. operator ) if is _ dollar ( expr. args [ 0 ] ) : constant = evaluate _ constant ( expr. args [ 1 ], engine, context ) if const...
[ -1.1254829168319702, 0.32817286252975464, 1.0547497272491455, -0.33130350708961487, -1.1372618675231934, -0.7044367790222168, -0.0932793915271759, 0.030190151184797287, 0.08336034417152405, 0.8003616333007812, -0.775361955165863, 0.07600179314613342, 0.2897585332393646, -0.2999612689018249...
def _ _ str _ _ ( self ) : return json. dumps ( { " name " : self. name, " url " : self. url, " image " : self. image, " ingredients " : self. ingredients, " is _ beef _ receipe " : self. is _ receipe ( " beef " ), } )
[ -1.2598929405212402, -1.1977167129516602, 0.5434905886650085, -0.5863973498344421, -0.10186105221509933, -0.9298650026321411, -0.7284972667694092, -0.6537397503852844, -0.2798710763454437, 0.6050565242767334, -1.333225965499878, 1.1331329345703125, 0.2932080030441284, 0.20769836008548737, ...
def uncheck _ node ( self, * path, * * kwargs ) : return self. check _ uncheck _ node ( false, * path, * * kwargs )
[ -1.2069097757339478, 0.1973179578781128, 0.35845184326171875, 0.43248292803764343, 0.16387151181697845, -0.3618306815624237, 0.9461767673492432, 0.7776413559913635, -0.9754144549369812, 0.2249421775341034, 0.04443321004509926, 0.4471622109413147, -0.9971644878387451, -0.7394726276397705, ...
def run _ gitleaks ( ) - > none : # git remote get - url - - all origin # so far nothing works... as if current repo is corrupt cwd = os. getcwd ( ) command _ text = " gitleaks - - repo - path = { } - - report = / tmp / { }. csv ". format ( cwd, project _ name ). strip ( ) inform ( command _ text ) command = shlex. spl...
[ 0.5253642797470093, -0.1214459091424942, 0.5755587220191956, -0.06152398884296417, 0.6563085317611694, 0.7991457581520081, 0.2252454161643982, 0.390255331993103, -0.8359248042106628, -0.38996291160583496, 0.574073851108551, 0.6739609837532043, -0.3108198344707489, 0.7628481984138489, -0....
def preprocess ( self, methodinvokelist ) : pattern = " (. * ) - - - > (. * ) " for line in methodinvokelist : li = re. search ( pattern, line ). groups ( ) # if the recursion exists, the detect loop will not be end if li [ 0 ] = = li [ 1 ] : continue m0 = li [ 1 ]. split ( " ^ " ) [ 0 ] m1 = li [ 1 ]. split ( " ^ " ) ...
[ -0.05360586196184158, -0.8862520456314087, 0.9646469354629517, 0.45366784930229187, 0.4094862639904022, -0.360805481672287, 0.5835238695144653, 0.9446970224380493, 0.11965128779411316, -0.22455312311649323, 0.08301777392625809, 0.6085870862007141, -0.5869556665420532, 1.598779320716858, ...
def test _ 3 _ delete _ balise _ html ( ) : result = delete _ balise _ html ( " bonjour. & # 160 ; " ) assert result = = " bonjour. "
[ 1.0945202112197876, 0.5516327619552612, 0.35445648431777954, 0.15548686683177948, -0.4838995635509491, 0.4553031921386719, -0.4010869264602661, 0.33623600006103516, 0.330298513174057, -0.20598934590816498, -0.1588105857372284, 0.5724911689758301, -0.4497513175010681, -0.42815926671028137, ...
def _ add _ to _ game _ queue ( self, message ) : if not self. game : return with self. game. event _ list _ lock : self. game. event _ list. append ( message )
[ -0.1911698877811432, 0.25546637177467346, 0.913421630859375, -0.0833505243062973, 1.06136953830719, 0.40714943408966064, -0.8304722905158997, -0.7958133816719055, 0.17269538342952728, 0.7501004338264465, -0.414781391620636, 0.5372210741043091, -0.5083920955657959, 0.7981542348861694, 0.0...
def obtener _ n _ siguientes ( self, n _ canciones ) : if self. lista _ canciones. esta _ vacia ( ) : return none lista = [ ] for i in range ( n _ canciones ) : try : lista. append ( self. lista _ canciones. get _ elemento ( self. actual + 1 + i ) ) except indexerror : return lista return lista
[ -0.833827555179596, -0.5857305526733398, 0.4655456840991974, 1.8222767114639282, 0.24513249099254608, -0.26884934306144714, -0.44902747869491577, -0.18292157351970673, -0.0418204665184021, 0.1840219348669052, -0.47856706380844116, -0.6021180748939514, -0.8966884613037109, 0.449205607175827...
def test _ srv _ norm ( self ) : curves _ ab = self. l2 _ metric _ s2. geodesic ( self. curve _ a, self. curve _ b ) curves _ ab = curves _ ab ( self. times ) srvs _ ab = self. srv _ metric _ r3. srv _ transform ( curves _ ab ) result = self. srv _ metric _ r3. l2 _ metric. norm ( srvs _ ab ) products = srvs _ ab * srv...
[ -0.29852986335754395, -0.39771127700805664, 0.5802821516990662, 0.23611600697040558, -0.10080920904874802, 0.46338263154029846, 0.2999943792819977, -0.5448832511901855, 0.6697431802749634, 0.0001418566971551627, -0.29361891746520996, 0.314647912979126, 0.1646730601787567, -0.31678077578544...
def lane ( self, z = 70, w = 3. 7, h = 0 ) : focalx, focaly = self. focal _ length ('xy') # focal length ( pixels ) centerx, centery = self. get _ center ( ) # optical axis ( pixels ) width, height = self. get _ size ( ) # image dimensions ( pixels ) # distance from camera to sol over the ground, direction of ahead as ...
[ 0.01047873217612505, -0.8744122385978699, 0.6905826926231384, -0.0006335651269182563, -0.045993871986866, -0.0537494532763958, 0.2663189470767975, 0.23349079489707947, 0.6064930558204651, 0.19506095349788666, -0.04078404977917671, -0.2480006217956543, -0.2986546456813812, 0.723590850830078...
def test _ submit _ config ( self ) : body = parameters ( ) response = self. client. open ('/ cpsc490 / scheduler / 1. 0. 0 / configure ', method ='post ', data = json. dumps ( body ), content _ type ='application / json') self. assert200 ( response,'response body is :'+ response. data. decode ('utf - 8') )
[ -0.8132833242416382, 0.24225106835365295, 0.5624565482139587, 0.7694651484489441, 0.019020073115825653, 0.3737247586250305, -0.055854085832834244, -0.02496301382780075, -0.6168598532676697, 0.10964582860469818, -1.7105679512023926, 0.15758055448532104, -1.0128602981567383, 1.31133818626403...
def format _ directive ( package _ type, package, project ) : directive = '.. doxygen % s : : % s \ n'% ( package _ type, package ) if project : directive + =': project : % s \ n'% project return directive
[ 0.17355109751224518, -0.2889433801174164, 0.4697989225387573, -0.28015998005867004, 0.5196978449821472, 1.010276436805725, -0.6608865261077881, 0.2454514354467392, -0.9649176597595215, 0.029347719624638557, 1.256501317024231, 0.721346378326416, 0.19614502787590027, -0.48610326647758484, ...
def compare ( first, second ) : return delta ( second, first )
[ 0.2560589015483856, -1.0107365846633911, 0.6494053602218628, 0.34736353158950806, -0.5985677242279053, 0.3663676381111145, -1.1567374467849731, -1.5469738245010376, -1.4712109565734863, -0.7707788944244385, -0.06748544424772263, 0.15656016767024994, 0.08179043233394623, -0.1305058449506759...
def attributes _ count ( self ) : return len ( self. attributes )
[ 0.30501845479011536, 0.1278512328863144, 0.1029815673828125, -0.9168012142181396, 0.2878222167491913, 0.9520667195320129, -0.031256478279829025, 1.2449309825897217, 0.13282708823680878, -0.7114649415016174, -0.06566474586725235, -0.18059881031513214, -0.029663793742656708, -0.1630963683128...
def discardunknownfields ( self, * args, * * kwargs ) : # real signature unknown pass
[ 0.3673764765262604, -0.1430983692407608, 0.37635934352874756, -0.3551516830921173, 0.546455979347229, 0.7252194285392761, 0.697871744632721, 0.1512821614742279, -0.512216329574585, -0.4677680730819702, -1.5706331729888916, -0.0531308613717556, -0.42905551195144653, -0.14241227507591248, ...
def connectportipdb ( ) : global portable _ ip _ db portable _ ip _ db = client ['portableip'] if portable _ ip _ db. exists ( ) : print " connection to portableip database made " else : print " database does not exist "
[ -0.8814598917961121, -0.21055257320404053, 0.47542890906333923, -0.31327444314956665, -0.0306626558303833, 1.0268385410308838, -0.6014180779457092, 0.5112165808677673, -0.6161938309669495, 1.0467078685760498, 0.3356492221355438, -0.8811073303222656, -1.438031792640686, -1.1480090618133545,...
def main ( ) : # create a game for 2 players. prog _ quiz = quiz ( 2,'triviaquestionschap11. txt') # run the game. prog _ quiz. run ( ) # print the results. prog _ quiz. print _ results ( )
[ 0.18135999143123627, -0.41316747665405273, 0.5202575325965881, 0.6835663914680481, 0.7613446116447449, 0.8084487915039062, 0.29155290126800537, 0.3253747820854187, -0.5360226035118103, -0.04838741570711136, -0.22708597779273987, 0.342778742313385, -0.11375308781862259, -0.8160611391067505,...
def test _ authorization ( self ) : http _ post _ data = { } def _ http _ post ( self, * args, * * kwargs ) : http _ post _ data ['args'] = args http _ post _ data ['kwargs'] = kwargs return json. dumps ( {'private _ token':'abc123'} ), { } self. service _ class. _ http _ post = _ http _ post account = hostingserviceac...
[ -0.19266533851623535, 0.7395997047424316, 0.6293625235557556, 0.5981589555740356, -0.2005976289510727, -0.12115176767110825, -0.1176854744553566, 0.263323575258255, 0.08347932994365692, -0.6082811951637268, -0.7834447622299194, 0.8470231294631958, -0.26048529148101807, 0.29618680477142334,...
def test _ search ( ) : list _ size = 5 mylist = create _ int _ list ( list _ size ) assert mylist. get _ size ( ) = = list _ size assert mylist. search ( 4 )! = none assert mylist. search ( " hello " ) is none
[ -0.41228392720222473, 0.9201318025588989, 0.1482500284910202, -0.13920940458774567, 0.6506216526031494, 0.03424989804625511, -0.31947314739227295, -0.005242401733994484, 0.2490786463022232, -0.7600024938583374, -1.4663327932357788, -1.1610887050628662, -1.6610705852508545, 0.41737186908721...
def update _ none ( row ) : return none
[ -1.0218006372451782, -0.9658999443054199, 0.352548748254776, -0.25720277428627014, -0.010225513949990273, -0.9661768078804016, -0.03473272547125816, -0.5663257837295532, 0.7352315187454224, -0.24855609238147736, -0.04196040704846382, -0.2643459141254425, -0.444089412689209, -0.695531368255...
def crawl _ all ( ) : sites = [ ] failed = { } hosts = parse _ config ( hosts = true ) for url in hosts : sites. append ( url ['url'] ) # do some multi crawl on them all requests = multi _ get ( sites, timeout = 25. 5 ) for url, data in requests : failed _ data = [ ] for host in hosts : if host ['url'] = = url : html =...
[ -0.9050857424736023, 0.43975403904914856, 0.627616822719574, -0.2613856792449951, -0.08273574709892273, 0.24519599974155426, -0.05942738428711891, 0.5319145321846008, -1.0485544204711914, -0.3309779763221741, -1.2399598360061646, 0.2880358397960663, 0.34986844658851624, 0.9894551038742065,...
def _ _ init _ _ ( self ) : self. val = " head " self. children = [ ] self. childlist = [ ] self. parent = none
[ -0.1314726620912552, 0.33834007382392883, 0.38823115825653076, 0.32536372542381287, -0.06884116679430008, -0.03448726236820221, -0.04536294564604759, -0.3039153218269348, 0.2590545415878296, -0.3894200921058655, -1.500757098197937, -0.32862886786460876, 0.008203231729567051, 1.367577672004...
def alt ( self ) : if self. accidental = = c. tone _ sharp : n = self. up _ half ( ) n. set _ accidental ( c. tone _ flat ) return n elif self. accidental = = c. tone _ flat : n = self. down _ half ( ) n. set _ accidental ( c. tone _ sharp ) return n return self
[ 0.15542788803577423, -0.512844979763031, 0.5977352261543274, -0.08153796941041946, -0.3361792266368866, 0.39088982343673706, 1.0746625661849976, -1.1210782527923584, 0.2459481656551361, -0.4472324550151825, -0.05095502361655235, 0.7220150828361511, -0.11021635681390762, 0.3175353407859802,...
def test _ create _ loss _ stage ( self ) : loss _ stage = self. long _ future. create _ loss _ stage ( ) self. method _ test _ create _ stage ( stage = loss _ stage, name ='loss ', expression ='{ current _ price } < { price _ a } ', detail = {'price _ a': 480. 00,'amount _ a': 0. 0,'price _ b': 0. 0,'amount _ b': 0. 0...
[ -0.5217913389205933, -0.6083170771598816, 0.6292011737823486, -0.3093852698802948, -0.09822050482034683, 0.3897519111633301, -0.11495213210582733, -0.7303452491760254, -0.0999986082315445, -0.15194348990917206, -0.6828077435493469, 0.08310350775718689, 0.495956689119339, 0.6016363501548767...
def getpercentidentity ( seq1, seq2, gap _ char = " - " ) : ntotal = 0 nidentical = 0 for a in range ( len ( seq1 ) ) : if seq1 [ a ]! = gap _ char and seq2 [ a ]! = gap _ char : ntotal + = 1 if seq1 [ a ] = = seq2 [ a ] : nidentical + = 1 if ntotal = = 0 : return 0. 0 return float ( nidentical ) / ntotal
[ 0.08483891189098358, -0.9352543950080872, 0.7738829851150513, 0.07044472545385361, -0.2178594172000885, 0.10738448053598404, 0.20110462605953217, 0.36053308844566345, 0.8798340559005737, 1.1607915163040161, 0.2080296277999878, -0.146267369389534, -0.6527003645896912, -0.09091083705425262, ...
def sdict _ from _ csv ( filepath : pathtype, wl : float = wl _ cband, xkey : str = " wavelengths ", xunits : float = 1, prefix : str = " s ", ) - > sdict : df = pd. read _ csv ( filepath ) if xkey not in df : raise valueerror ( f " { xkey! r } not in { df. keys ( ) } " ) nsparameters = ( len ( df. keys ( ) ) - 1 ) / /...
[ 0.1446225494146347, 0.45326876640319824, 0.5697590708732605, -0.8409555554389954, -1.4550576210021973, -0.5239655375480652, 0.48989519476890564, -0.05972537398338318, 0.30932989716529846, 0.4684365391731262, -0.6343787908554077, 0.02749142423272133, 0.512955904006958, -0.02949514612555504,...
def draw _ ecliptic ( self, ax ) : ecl _ glon = [ ] ecl _ singlat = [ ] zaxis = skydir ( 270, 90 - 23. 439281 ) xaxis = skydir ( ) yaxis = zaxis. cross ( xaxis ) for phi in np. arange ( 0, 2 * np. pi, 0. 05 ) : t = np. sin ( phi ) * xaxis + np. cos ( phi ) * yaxis sd = skydir ( hep3vector ( * t ) ) tglon = sd. l ( ) ; ...
[ 0.35064220428466797, 0.24991503357887268, 0.6117939949035645, -0.7117773294448853, -0.30004289746284485, 1.54850435256958, 0.058623287826776505, 0.8663085699081421, 0.6756128072738647, 0.05227998271584511, -0.0661109909415245, 0.6558216214179993, 0.42424407601356506, -0.1315673440694809, ...
def twosum ( self, nums, target ) : lut = { } for i, num in enumerate ( nums ) : if ( target - num ) in lut : return ( [ lut [ target - num ], i ] ) lut [ num ] = i return [ ]
[ -1.4563430547714233, -1.2557045221328735, 0.6911352872848511, 0.014879603870213032, 0.236676886677742, -0.43531349301338196, 0.12270590662956238, 0.2747095823287964, 0.04213521629571915, 0.27244096994400024, -0.8367679715156555, 0.4927825331687927, 0.3265443742275238, -0.6877920031547546, ...
def get _ mtime ( file _ path ) : try : return file _ path. stat ( ). st _ mtime except filenotfounderror : # due to a race condition return 0. 0
[ 0.44506773352622986, -0.37357911467552185, 0.344937801361084, 0.2554951608181, 0.8390153646469116, -0.26868245005607605, 0.3873554468154907, -0.4204840064048767, -0.3374693691730499, 0.9170877933502197, 1.1099785566329956, -0.7986969947814941, -0.5886292457580566, 0.6847875118255615, -0....
def bindfield ( require _ var ) : def decorator ( function ) : if'bind _ field'not in _ ipopo _ explorer : _ ipopo _ explorer ['bind _ field'] = { require _ var : function } else : _ ipopo _ explorer ['bind _ field'] [ require _ var ] = function return function return decorator
[ -1.205054521560669, -0.22755837440490723, 0.5581077337265015, -0.3050074577331543, -0.6010337471961975, 0.4890314042568207, 0.7943741679191589, 0.5308476686477661, 0.4059653878211975, 0.13507510721683502, -0.20446555316448212, -0.3002268075942993, 0.34792372584342957, -0.1512501835823059, ...
def testresolvequerywithillegalquery ( self ) : with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. resolvequery ( session,'has fluiddb / about') yield self. assertfailure ( deferred, tbadrequest )
[ 0.38892731070518494, 0.40179207921028137, 0.6358469128608704, 0.9120792150497437, 0.19736549258232117, 0.496284157037735, -0.6334810256958008, -0.5071988701820374, -0.10950154811143875, -0.8738976716995239, 0.7483794093132019, -0.8321341276168823, -0.4436970055103302, 0.9035449624061584, ...
def uppertri ( self ) : return self. _ u
[ 0.32093334197998047, -0.34114933013916016, 0.47027015686035156, 0.1248735785484314, 0.31053876876831055, 0.8983270525932312, 1.1788268089294434, 0.5567350387573242, 0.710178792476654, -0.6791238784790039, -0.26622602343559265, 0.7582171559333801, 0.023951485753059387, -1.417382836341858, ...
def summarize _ plant _ to _ bus ( df, grid, all _ buses = false ) : _ check _ data _ frame ( df, " pg " ) _ check _ grid ( grid ) _ check _ plants _ are _ in _ grid ( df. columns. to _ list ( ), grid ) all _ buses _ in _ grid = grid. plant [ " bus _ id " ] buses _ in _ df = all _ buses _ in _ grid. loc [ df. columns ]...
[ -0.716435432434082, 0.6405044794082642, 0.47181436419487, 0.6762858033180237, 0.3403240442276001, 0.07379835844039917, 0.7439377307891846, 0.35053783655166626, -0.08784498274326324, 0.3965650498867035, 0.6668909788131714, 0.21256345510482788, -0.03428589552640915, -0.19613906741142273, 1...
async def topxp ( self, ctx ) : promoarray = self. settings. getserverstat ( ctx. message. server, " members " ) promosorted = sorted ( promoarray, key = lambda x : int ( x ['xp'] ) ) # promosorted = sorted ( promoarray, key = itemgetter ('xp') ) startindex = 0 total = 10 msg = " " if len ( promosorted ) < 10 : total =...
[ -0.30317655205726624, 0.03538938984274864, 0.9563296437263489, -0.07763142138719559, -0.24606186151504517, 0.0628194585442543, -0.25399333238601685, -0.0004261136054992676, 0.4750034213066101, 0.4611666798591614, -0.31861257553100586, 1.1394455432891846, -0.9645103216171265, 0.147178888320...
def load _ task _ data ( self ) : if self. verbose : print ('loading task data for { } '. format ( self. fpath ) ) # get logparser class for this recording, initialized with recording event data self. _ task _ log _ parser = nwbio. get _ recording _ log _ parser ( self. fpath, final _ timestamp = self. last _ original ...
[ -0.11034608632326126, -0.2534649074077606, 0.8156368732452393, 0.2429097443819046, -0.11317481100559235, 0.6817615032196045, 0.4783397316932678, 0.4760405421257019, -0.7075962424278259, 0.18337668478488922, -0.735157310962677, 0.16159510612487793, 0.5591045618057251, 0.42686671018600464, ...
def update ( self, pin _ name, create = false, version = none ) : if not version : logger. debug ('resolving version for pin [ % s ] ', pin _ name ) version = self. _ editor. get _ commit ( pin _ name ) elif self. _ editor. _ validate : logger. debug ('validating pin [ % s ] ', pin _ name ) self. _ editor. validate _ p...
[ -0.6564036011695862, -0.9156568050384521, 0.37599852681159973, -0.4255158305168152, -0.04436223581433296, 0.8212145566940308, -0.09093689918518066, -0.4450274407863617, 0.005446408875286579, 1.0508140325546265, -0.2985367774963379, 0.20688769221305847, -0.9093672633171082, -0.9619867801666...
def test _ _ app _ manager _ store _ has _ custom _ repr _ _ succeeds ( am ) : assert'appmanager store'in appmanager ( ). _ _ repr _ _ ( )
[ 0.8272783756256104, -0.18935228884220123, 0.11626311391592026, -0.4851863384246826, -1.1249701976776123, 0.6296268701553345, -0.40254583954811096, 0.5398731827735901, 0.916743278503418, -0.30767467617988586, -0.4688170552253723, 0.4936956763267517, 0.7156006097793579, 0.5687373280525208, ...
def append _ write ( filename = " ", text = " " ) : with open ( filename,'a') as f : chars = f. write ( text ) return chars
[ -0.40422767400741577, -0.37723541259765625, 0.4522491693496704, -0.2810359299182892, 0.03582780808210373, -0.16195809841156006, -0.7316327691078186, 0.5639032125473022, -0.32632437348365784, -0.08870843052864075, -0.3526611924171448, 0.24105848371982574, -0.2895677387714386, -0.22989663481...
def getsmalldependenceemphasisfeaturevalue ( self ) : pd = self. coefficients ['pd'] jvector = self. coefficients ['jvector'] nz = self. coefficients ['nz'] # nz = np, see class docstring sde = numpy. sum ( pd / ( jvector [ none, : ] * * 2 ), 1 ) / nz return sde
[ 0.38222989439964294, -0.21676120162010193, 0.5147491693496704, -0.3617500960826874, 0.2316492199897766, 0.1967378854751587, 1.383878231048584, -0.014396943151950836, 0.37654909491539, -0.3504592478275299, -0.8179600238800049, 0.507510781288147, -0.5032874345779419, 0.1931280493736267, 0....
def on _ grad _ computed ( self, net, named _ parameters, x = none, y = none, training = none, * * kwargs ) :
[ -0.21297506988048553, -0.1372988075017929, 0.690900981426239, 0.04545849561691284, 0.4529365003108978, 0.3371606469154358, -0.18513217568397522, -0.1797943115234375, -0.7629024982452393, 0.4512841999530792, -1.2982257604599, -0.21388544142246246, 0.2563910484313965, 0.549899160861969, -0...
def first _ case ( self ) : # tests if the city has ever been infected before if self. ever _ infected = = false and self. infected > 0 : self. ever _ infected = true return true else : return false
[ 0.2857092618942261, -0.6792149543762207, 0.7188458442687988, -0.20983964204788208, 0.4524872601032257, 0.1535053700208664, -0.009998354129493237, 0.3527800440788269, 0.4652296006679535, -0.0061535886488854885, 0.45107540488243103, -0.788866400718689, -1.0428547859191895, 0.2693899571895599...
def nodes2tmax _ op ( self, ops, output _ fname ) : buff = [ ] outfile = open ( output _ fname, " w " ) for idx, op _ node in enumerate ( ops ) : buff. append ( op _ node ) if len ( buff ) = = 5 or idx = = len ( ops ) - 1 : res = " set _ test _ point _ element { " for node in buff : gate = self. node2gate [ node ] cell...
[ -0.31594130396842957, -0.09553342312574387, 0.6061592102050781, 0.38569316267967224, 0.13790275156497955, 0.2776864469051361, 1.315900206565857, -0.1293165534734726, -0.26052555441856384, 1.0414974689483643, 0.23574727773666382, 0.07306180149316788, 0.12494353204965591, -0.3991303741931915...
def verify _ service ( selling _ point ) : wsfev1 = _ get _ afip ( ) last _ auth _ invoice = wsfev1. compultimoautorizado ( invoice _ type, selling _ point ) if int ( last _ auth _ invoice ) = = 0 : raise valueerror ( " bad last auth invoice ( afip is misbehaving ) " ) print ( " last authorized invoice ", last _ auth _...
[ -0.0889393761754036, -0.5314704179763794, 0.543850839138031, 0.4164716899394989, 0.4162728488445282, -0.468841552734375, 0.0395505465567112, -0.4219163656234741, 0.9100099802017212, -0.3922692537307739, 1.0883673429489136, 0.9265906810760498, -0.94598388671875, 0.19079580903053284, 0.814...
def run ( self, basis, conf = 1. 0, show = false, outrules = false, verbose = true ) : basis2 = basis if basis = = " genrr " : if self. rerulatt is none : self. rerulatt = rerulattice ( self. supp, self. datasetfilename, xmlinput = true ) self. rerulatt. xmlize ( ) self. rerulatt. v. verb = verbose and self. verb latt ...
[ 0.11591772735118866, -0.046250779181718826, 0.6964683532714844, -0.5038965344429016, -0.3424290120601654, 0.10979313403367996, 0.23289994895458221, 0.4539720416069031, -0.30231714248657227, 0.1704486906528473, 0.4029370844364166, 0.6403663754463196, -0.8141371011734009, 0.889028012752533, ...
def reset _ message ( self ) : self. _ message = " "
[ 0.022283287718892097, 0.6699208617210388, 0.2403855174779892, -0.4523985683917999, 0.6936511993408203, -0.39978089928627014, -0.006811932660639286, -0.6334481835365295, -1.1951603889465332, -0.014122641645371914, 0.3338773548603058, 2.153278112411499, -1.2647013664245605, 0.084730289876461...
def about ( request ) : template _ name = " about. html " page _ title ='a propose |'+ settings. site _ name context = {'page _ title': page _ title, } return render ( request, template _ name, context )
[ -0.07319914549589157, 0.18984930217266083, 0.4169529974460602, 0.31134697794914246, 0.1771782636642456, 0.23259159922599792, -0.5377393960952759, 0.7197874188423157, -0.21615639328956604, 0.8032079339027405, 1.4103461503982544, -0.3011493384838104, -0.1290753036737442, 0.45456233620643616,...
def testbinomial ( self ) : for n in range ( 100, 500, 100 ) : print ( f " testing estimation of uniform distribution for a data size of { n }. " ) data = np. random. binomial ( n = 1, p = 0. 5, size = ( n, ) ) for n _ blk in range ( 1, n / / 2 ) : # non blocking param = tools. analysis. analysisparam ( tools. analysis...
[ 0.3261949121952057, -0.19807815551757812, 0.7253565788269043, 0.3433343768119812, 0.5315449237823486, 0.4049535095691681, 0.782576858997345, -0.24472013115882874, -0.28282076120376587, -0.3736628293991089, -0.7440592050552368, 0.6611878871917725, -0.7341706156730652, 0.6051353812217712, ...
def test _ _ normalize ( ) : # missing'labels'assert imageconfig. _ normalize ( json. loads ('{ " config " : { } }') ) = = { " config " : { " labels " : { " signatures " : " [ ] " } } } # missing'signatures'assert imageconfig. _ normalize ( json. loads ('{ " config " : { " labels " : { " x " : " 5 " } } }') ) = = { " c...
[ -0.42385563254356384, -0.06340048462152481, 0.7835288047790527, -1.354889154434204, -0.35396263003349304, -0.43651315569877625, -0.1304044872522354, -0.2717585265636444, 0.22753441333770752, 0.4659443199634552, -1.2002884149551392, -0.9663753509521484, 0.30680862069129944, 0.14057977497577...
def define _ batch _ env ( constructor, num _ agents, env _ processes ) : with tf. variable _ scope ('environments') : if env _ processes : envs = [ tools. wrappers. externalprocess ( constructor ) for _ in range ( num _ agents ) ] else : envs = [ constructor ( ) for _ in range ( num _ agents ) ] batch _ env = tools. b...
[ 0.6960357427597046, -0.5710527896881104, 0.45182088017463684, 0.3034400939941406, 0.3727574646472931, 0.2879497706890106, -0.26941147446632385, 0.20417839288711548, -0.4639440178871155, -0.06038077548146248, -0.10040825605392456, 0.6054771542549133, 0.5680732727050781, 0.30765584111213684,...
def prices _ and _ share ( self ) : # get params and return from class j = self. j t = self. t jt = list ( itertools. product ( range ( 1, j + 1 ), range ( 1, t + 1 ) ) ) params = self. params z _ jt = self. z _ jt data = self. characteristics ( ) # data ['e _ jt'] = pd. series ( 0, index = data. index. values, dtype =...
[ -0.5130391716957092, 0.2930907607078552, 1.0440300703048706, -0.28235986828804016, -0.11624490469694138, 0.3349978029727936, 0.7944053411483765, 0.21169564127922058, -0.5288790464401245, 0.7834991812705994, -0.2363826185464859, 0.20048817992210388, -0.20424771308898926, 0.29464781284332275...
def near _ bfs ( start _ x, start _ y, stop _ x, stop _ y, grid ) : q = queue ( ) temp _ path = [ ( start _ x, start _ y ) ] q. put ( temp _ path ) while not q. empty ( ) : tmp _ path = q. get ( ) last _ node = tmp _ path [ len ( tmp _ path ) - 1 ] if is _ near ( last _ node, stop _ x, stop _ y ) : return tmp _ path [ ...
[ -0.36244577169418335, -0.2742331624031067, 1.1570515632629395, 0.13254040479660034, -0.293870747089386, 0.039298441261053085, -0.03540565446019173, -1.2401769161224365, -0.5478518605232239, 0.4322587251663208, -0.268826961517334, 0.6475877165794373, -0.8021292686462402, 0.5688289999961853,...
def update ( self, point, probability, origin, width, max _ depth ) : if max _ depth = = 0 : self. _ update _ probability ( probability ) else : if self. is _ leaf ( ) : self. _ split ( ) # todo check whether we really need to split given the observation child _ index = self. index ( point, origin, width ) self. _ chil...
[ -0.721291184425354, -0.36247435212135315, 0.5632315874099731, 0.7603034377098083, -0.389953076839447, 0.23823395371437073, -0.3507542908191681, 1.0662760734558105, 0.33536460995674133, 0.2096957415342331, 0.83494633436203, -0.175498828291893, -0.34523940086364746, -0.25724542140960693, -...
def hashes ( item, d, packed ) : codes = [ ] encoded = item. encode ( " utf8 " ) i = 0 while len ( codes ) < d : codes + = list ( array ('i ', sha512 ( packed [ i ] + encoded ). digest ( ) ) ) i + = 1 return codes [ : d ]
[ -0.4183284342288971, 0.4793786406517029, 0.41098424792289734, 0.5205496549606323, -0.7954230904579163, -0.2995394468307495, -0.9015233516693115, -0.0009214073070324957, 1.2749969959259033, 0.15414369106292725, -0.666881799697876, -0.3081822693347931, 0.2192961722612381, -0.9398635029792786...
def randomminmcgroupcount ( self ) : if self. force _ auto _ sync : self. get ('randomminmcgroupcount') return self. _ randomminmcgroupcount
[ -0.4435788094997406, -0.010729360394179821, 0.3774566650390625, -0.15257012844085693, -0.7757422924041748, 0.47065451741218567, 0.8803325891494751, -0.9081555604934692, 0.045498814433813095, -1.0057885646820068, -0.932337760925293, 1.1377060413360596, -1.614667296409607, 0.2796933054924011...
def asgi ( self, path : str, *, name : str = " ", type : typing. container [ literal [ " http ", " websocket " ] ] = ( " http ", " websocket " ), # type : ignore root _ path : str = " ", ) - > typing. callable [ [ t ], t ] : def register ( endpoint : t ) - > t : self. append ( asgiroute ( path, endpoint, name, type, ro...
[ -0.6918364763259888, 0.7186803221702576, 0.7988739013671875, 0.07078840583562851, -0.4816891551017761, -0.7164326906204224, -0.5678039193153381, -0.34615570306777954, -0.057938102632761, 0.4975833594799042, -0.6807135939598083, 1.1560009717941284, 0.14010567963123322, 0.5077494978904724, ...
def add _ item ( self, description, quantity, amount ) : item = dict ( u _ mtx = 123456, cod _ mtx = 1234567890123, codigo = " ", ds = description, qty = quantity, umed = 7, bonif = 0. 00, despacho = u'nº 123456 ', ) subtotal = amount * quantity iva _ id = iva _ codes [ self. iva _ rate ] item [ " iva _ id " ] = iva _ ...
[ 0.14477486908435822, 0.0330379344522953, 0.8813597559928894, 0.1365426927804947, 0.3507315218448639, -0.15765143930912018, 0.24286414682865143, 0.30829641222953796, -0.10016404837369919, 0.508830726146698, -0.4180188477039337, -0.2819136381149292, -0.06710894405841827, -0.29662659764289856...
def i ( tag, message ) : # pylint : disable = invalid - name date = _ _ get _ date ( ) if log _ level _ stdout > = 3 : _ _ log _ to _ stdout ( colors. color _ info, date, tag + " / i ", message ) if log _ level _ file > = 3 : _ _ log _ to _ file ( date, tag + " / i ", message )
[ -0.032342955470085144, 0.203608438372612, 0.5327579379081726, 0.3597332239151001, 0.19138909876346588, -0.054054319858551025, 0.655778169631958, -0.7690644264221191, -1.912655234336853, 0.014083187095820904, 0.06706041097640991, 0.03479771688580513, 0.13174067437648773, 0.3273999094963074,...
def to _ output ( self, value ) : return { self. name : [ self. inner. to _ output ( v ) [ self. name ] for v in value ] }
[ -1.4161975383758545, -0.5822491645812988, 0.391112357378006, -1.1532196998596191, -1.3597688674926758, -0.9922457337379456, -0.4795774519443512, -0.47100016474723816, -0.6663355827331543, 0.8017261028289795, -1.2393012046813965, -0.5498767495155334, 0.168892502784729, 0.6591147184371948, ...
async def async _ step _ bluetooth ( self, discovery _ info : bluetoothserviceinfobleak ) - > flowresult : await self. async _ set _ unique _ id ( discovery _ info. address ) self. _ abort _ if _ unique _ id _ configured ( ) self. context [ " local _ name " ] = discovery _ info. name self. _ discovery _ info = discover...
[ -0.13848622143268585, 0.06060398370027542, 0.35041922330856323, 0.5297642946243286, 0.4016790986061096, -0.1004369929432869, 0.04088858515024185, 0.013390826992690563, -0.23390363156795502, -0.6960805058479309, -0.6223294138908386, 0.4345216751098633, 0.4072687029838562, 0.3393121361732483...
def rotxyz ( self, ang _ x, ang _ y, ang _ z ) : qx = ar ( ang _ x, v ( 1, 0, 0 ) ) qy = ar ( ang _ y, v ( 0, 1, 0 ) ) qz = ar ( ang _ z, v ( 0, 0, 1 ) ) self. rot = qx * qy * qz * self. rot
[ 0.13240037858486176, -0.2893412709236145, 0.2487439066171646, -1.2017662525177002, 0.6732694506645203, -0.08467463403940201, -0.5714528560638428, -0.45622000098228455, 0.3507750332355499, -0.3584458529949188, -0.30986931920051575, 0.030278189107775688, -0.4024689495563507, -1.3545553684234...
def oss _ size ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " oss _ size " )
[ 0.2816530764102936, 0.6957512497901917, 0.5359185934066772, 0.2210725098848343, 0.2689990997314453, 1.0483472347259521, 0.2404908835887909, -0.08486507833003998, 0.9354672431945801, -0.6319404244422913, 0.31916433572769165, 0.18026280403137207, 0.0358046256005764, -1.0765653848648071, -0...
def all _ posts ( ) : cursor = mongo. db. posts. find ( ). limit ( 10 ) posts = map ( lambda bs : post ( bson = bs ), cursor ) out _ json = json. dumps ( {'list': posts }, cls = postencoder, indent = 2 ) resp = response ( out _ json, mimetype ='application / json') return resp
[ 0.2503296434879303, -0.6641752123832703, 0.6342790722846985, 0.21974749863147736, 1.056329607963562, -0.38792598247528076, -0.628655731678009, 0.7207324504852295, 0.17088580131530762, 0.6306630969047546, -1.072165608406067, -0.08006753027439117, -0.07734131813049316, 0.7443279027938843, ...
def _ macro _ completer ( self, event ) : ms = get _ macro _ server ( ) macro _ name = event. command. lstrip ('%') # calculate parameter index param _ idx = len ( event. line. split ( ) ) - 1 if not event. line. endswith ('' ) : param _ idx - = 1 # get macro info info = ms. getmacroinfoobj ( macro _ name ) # if macro ...
[ 0.19636446237564087, -0.6180639863014221, 1.0392423868179321, 0.36433616280555725, 0.0031256380025297403, 0.006991582456976175, -0.3366187512874603, 0.06793440133333206, -0.17834754288196564, 1.3424547910690308, -0.11514317989349365, 0.3149738907814026, -0.3577045500278473, 1.7126132249832...
def randomize _ ligand _ position ( cls, positions, receptor _ atom _ indices, ligand _ atom _ indices, sigma, close _ cutoff ) : # convert to dimensionless positions. positions _ unit = positions. unit x = positions / positions _ unit # compute ligand center of geometry. x0 = x [ ligand _ atom _ indices, : ]. mean ( 0...
[ -0.14854279160499573, -0.17939814925193787, 0.6777600646018982, -1.1287219524383545, -0.06417229026556015, 0.46422097086906433, 0.009528852067887783, 0.04793836548924446, 0.5857278108596802, 0.8158708214759827, 0.528117835521698, -0.44108331203460693, 0.07809872925281525, -1.15068960189819...
def tree _ id ( self ) : if self. _ tree _ id is not none : return self. _ tree _ id else : try : return self. parent. tree _ id except attributeerror : raise nameerror ( " you have to specify tree _ id to bootstraptreeview if the parent object does " " not implement. tree _ id! " )
[ 1.4844428300857544, -0.00015555895515717566, 0.5482012629508972, 0.09044253826141357, -0.05546053871512413, 0.2740900218486786, -0.02871323935687542, 0.2886597216129303, 0.6664925813674927, -0.2775748372077942, 0.4135492742061615, 0.8330487012863159, -0.3986678421497345, 2.07120943069458, ...
def send _ email ( sys _ args, emails, subject, message ) : emails = emails. split ( ',') erd, err _ report = tempfile. mkstemp ( ) fp _ err _ report = open ( err _ report, " w " ) fp _ err _ report. write ( message ) fp _ err _ report. close ( ) try : for email in emails : cmd = command ('mail - s " % s " % s < % s'% ...
[ 0.18913573026657104, 0.25578540563583374, 0.47205159068107605, -0.3430818021297455, 0.6301016807556152, -0.054124705493450165, -0.18609006702899933, 0.31970417499542236, -0.6237587928771973, 0.6631315350532532, 0.3222721517086029, 0.5586534142494202, -0.36948513984680176, 0.165658488869667...
def hour _ range ( num ) : if num < 8 : ret = 0 elif num > = 8 : ret = 8 return ret
[ -1.2496098279953003, -0.12458022683858871, 0.510192334651947, 0.6085802912712097, 0.3490569591522217, 1.365417718887329, -0.324928343296051, -0.2351779192686081, -0.43256643414497375, 0.6879714131355286, 0.11352401971817017, -0.12058315426111221, -0.9878985285758972, -0.7769551277160645, ...
def check _ cutters ( self ) : # gate to prevent this when the field _ shape has not been received if self. field _ shape = = none or self. field _ frame _ id = = none : return ( false, false ) # get the left cutter left _ cutter = self. get _ cutter _ shape ( self. field _ frame _ id, self. left _ cutter _ frame _ id ...
[ -0.4867453873157501, -0.826321542263031, 0.8141559958457947, -0.9713643193244934, 0.1550992727279663, 0.07072953879833221, -0.29562339186668396, -0.07421737164258957, -0.2773163914680481, 0.3870224952697754, -0.791059136390686, 0.18072566390037537, -0.11391307413578033, -0.1182816177606582...
def _ _ init _ _ ( self, args, problem, use _ cuda ) : self. max _ regularization _ examples = args. num _ shaving if hasattr ( args, " num _ shaving " ) else 0 self. max _ validation _ examples = args. num _ validation if hasattr ( args, " num _ validation " ) else 0 self. max _ training _ examples = args. num _ train...
[ 0.4123176634311676, 0.3290899991989136, 0.872514009475708, 0.9685812592506409, 0.6628485918045044, -0.12223701179027557, 0.203676238656044, 0.3135375380516052, 0.09606145322322845, -0.1598624438047409, 0.06520842015743256, 0.02961183711886406, 0.15274283289909363, 1.2678613662719727, 0.3...
def create _ logic _ block ( self, name, width = 1, height = 1 ) : if name in self. _ modules : raise prgaapierror ( " module'{ }'is already created ". format ( name ) ) return self. _ modules. setdefault ( name, logicblock ( name, width, height ) )
[ -0.23612269759178162, 0.03610004484653473, 0.39266330003738403, -0.06487184762954712, 0.34662002325057983, 0.8753331303596497, -0.13572728633880615, -1.5048141479492188, 0.4050770401954651, -0.18168552219867706, -0.4578062891960144, 0.09475526213645935, -1.0357944965362549, 0.8446596264839...
def remove ( self, key : int ) - > none : hashcode = self. get _ hashcode ( key ) for i, each in enumerate ( self. key [ hashcode ] ) : if each = = key : self. value [ hashcode ]. pop ( i ) self. key [ hashcode ]. pop ( i ) return return
[ -0.7717676758766174, 0.3138066530227661, 0.6084961891174316, -0.17023195326328278, -0.8449931740760803, -0.11041510105133057, 0.4003729820251465, 1.348939061164856, -0.3679921627044678, 1.1362321376800537, -0.5916683077812195, -0.7260091304779053, -0.5959222912788391, 0.5188884735107422, ...
def find _ test _ index ( test, selected _ tests, find _ last _ index = false ) : idx = 0 found _ idx = - 1 for t in selected _ tests : if t. startswith ( test ) : found _ idx = idx if not find _ last _ index : break idx + = 1 return found _ idx
[ -0.437549889087677, -0.9583353400230408, 0.5415790677070618, 0.004604538436979055, -0.28513845801353455, -0.32706528902053833, 1.6563254594802856, -0.3007218837738037, 0.3004434108734131, 0.02256632223725319, 0.18034391105175018, 0.18446756899356842, -1.435738444328308, -0.2015148997306823...
def word2vec ( self ) : files = os. listdir ( self. args. word2vec _ path ) files = [ self. args. word2vec _ path +'/'+ f for f in files if str ( self. args. embedding _ size _ 0 ) in f and'txt'in f ] assert len ( files ) = = 1 embedding _ file = files [ 0 ] words = list ( ) word _ dict = dict ( ) word _ embedding = li...
[ 0.33851519227027893, 0.059480343014001846, 0.7281937599182129, -0.4495267868041992, 0.0811537429690361, 0.27639684081077576, 0.9609932899475098, 0.9489059448242188, -1.0845462083816528, 0.8830117583274841, -0.591775119304657, 0.02208433300256729, 0.21355147659778595, 1.2997173070907593, ...
def test _ setup _ template _ disabled ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd, " - e ", " setup. template. enabled = false " ] ) assert exit _ code = = 0 self. idxmgmt. assert _ index _ template _ not _ lo...
[ -0.5039942264556885, 0.11747082322835922, 0.5139298439025879, -0.4497426152229309, 0.13217762112617493, 0.7624619603157043, 1.0928688049316406, 0.7886523604393005, -0.08780541270971298, 0.31503644585609436, -0.3769965171813965, -0.5057989358901978, -0.9281874895095825, 0.4475545287132263, ...
def addblock ( self, s ) : self. blocks. append ( s ) width = max ( [ len ( x ) for x in s. split ('\ n') ] ) return u'\ 001 [ % s % s ]'% ( len ( self. blocks ) - 1,'@'* width )
[ 0.2008223831653595, -0.16156567633152008, 0.6376292705535889, 0.27684327960014343, -1.1211580038070679, -0.08187255263328552, -0.7102648019790649, -0.31318968534469604, 0.7875267863273621, -0.8116045594215393, -0.07209698855876923, 0.49751269817352295, -0.491289347410202, -0.12167672812938...
def test _ get _ step ( self ) : pass
[ 0.245549738407135, 0.7368714809417725, 0.03464581072330475, 1.395321249961853, 1.4090089797973633, -0.18326134979724884, 0.7812404632568359, -0.34277641773223877, -0.9568952918052673, -1.8219112157821655, -0.6810111403465271, -0.10606782883405685, -0.9203671813011169, 0.39976292848587036, ...