text
stringlengths
25
2.19k
embedding
listlengths
768
768
def validate ( self, data ) : git _ manager = gitmanager ( ) branch _ list = git _ manager. get _ branch _ names ( ) if data ['base _ branch'] not in branch _ list : raise validationerror ('base branch not found!') if data ['compare _ branch'] not in branch _ list : raise validationerror ('compare branch not found!') i...
[ 0.23411346971988678, -0.6347623467445374, 0.7185307741165161, 0.010704295709729195, 0.6693372130393982, 1.3656823635101318, -0.9812716245651245, -0.5708033442497253, -0.31494125723838806, 0.25046858191490173, 0.25090718269348145, -0.03963988646864891, -0.45641472935676575, 0.80762547254562...
def update _ calendar _ interaction ( event : googlecalendarevent, ignore _ emails = ( ) ) - > typing. optional [ interaction ] : user = event. social _ account. user event _ adapter = googlecalendareventadapter ( event. data ) needs _ interaction = ( # event must be confirmed event _ adapter. get _ status ( ) = = goog...
[ -0.3770182132720947, -1.006240725517273, 0.9603869318962097, -0.18535304069519043, -0.12366028875112534, 0.5466011166572571, 0.3046504855155945, -0.27195146679878235, 0.8105548024177551, 0.668389618396759, 0.2139141708612442, -0.01292326208204031, -0.8429911136627197, -0.3605729937553406, ...
def reconfig _ pma _ set _ post _ cdr _ reverse _ serial _ loopback ( fpgaid, data, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " writing a 1 to this bit enables post - cdr reverse serial loopback. writing a 0 disables post - cdr reverse serial loopback. " " " reconfig _ pma _ set _ indirect _ register ( fpgai...
[ -0.2217799723148346, -0.48195868730545044, 0.8940796852111816, -0.804944634437561, -0.42431992292404175, 0.3916940689086914, 0.6571279168128967, -0.06912361085414886, 0.012639650143682957, 0.18717415630817413, -0.6276146769523621, 1.4874143600463867, -1.1610523462295532, 0.3119940757751465...
def test _ text _ in _ image ( datadir ) : pass
[ -0.09301106631755829, -0.22658246755599976, 0.2570120692253113, -0.3725074529647827, -0.5888997912406921, 0.4687776565551758, 0.6256587505340576, 0.1309250146150589, 0.5862833261489868, -0.46613118052482605, -0.0006985922809690237, 0.5835275650024414, -0.5369356870651245, 0.846265375614166...
def create _ table ( flag ) : table _ flag = orcnamestr ( ). from _ module _ flag ( flag ) definition = _ _ import _ _ ( " definition. table ", { }, { }, [ " modules " ] ). _ _ getattribute _ _ ( table _ flag. table _ config _ name ( ) ) class extra : " " " extra table info " " " orc _ keys = [ ] orc _ order = " " orc ...
[ 0.03285565227270126, -0.02477104589343071, 0.8944414854049683, -0.7375866174697876, -0.05900608003139496, -0.19273953139781952, 0.33398932218551636, -0.2482052892446518, -0.882881224155426, 0.38726741075515747, -0.7194355130195618, -0.07589735090732574, 0.06394186615943909, 0.6065418124198...
def _ history _ matches ( self, i ) : return ( self. history _ search _ text is none or self. _ working _ lines [ i ]. startswith ( self. history _ search _ text ) )
[ -0.28463903069496155, 0.20881010591983795, 0.3555559813976288, 0.3413200080394745, 0.28465011715888977, 0.06976499408483505, -0.20803244411945343, -0.4713297486305237, 0.21957142651081085, -0.24651077389717102, -0.08561164885759354, -0.30484363436698914, -0.805680513381958, 0.4326828122138...
def required _ body ( fields ) : def _ file _ content _ validation _ wrapper ( func ) : @ wraps ( func ) def _ wrapped ( * args, * * kwargs ) : data = request. get _ json ( ) if data : for i in fields : if i not in data. keys ( ) : return jsonify ( {'message':'the key ` ` { 0 } ` ` is required '. format ( i ) } ), 400 ...
[ -1.5251575708389282, -0.2945025563240051, 0.7004575729370117, -0.577041506767273, -0.3841012120246887, 0.2824268937110901, -0.5677046775817871, -0.9521154165267944, -0.4643058776855469, 0.6903995275497437, -0.16615727543830872, 0.020304974168539047, -0.17160435020923615, 0.5065228343009949...
def select _ all ( self ) : return gbselection ( self. _ df, self. by, none, self. downsample, self. rule, self. downsample _ n )
[ 0.18057651817798615, 0.10477820038795471, 0.28822147846221924, 0.5683632493019104, 1.2634564638137817, -0.42828068137168884, 0.9530559778213501, -0.7282209992408752, 0.11156845092773438, -0.75699782371521, 0.5997051000595093, 1.3532954454421997, -0.9095661044120789, -0.5368340611457825, ...
def add _ bandpass ( self, lower _ bound, upper _ bound, color = none, label = none, opacity = 0. 1 ) : bandpass = ( lower _ bound, upper _ bound, color, label, opacity ) self. bandpasses. append ( bandpass ) return
[ -0.5645227432250977, -1.102706789970398, 0.756561279296875, 0.4710141122341156, 0.9952231645584106, 1.1598596572875977, -1.5203226804733276, -0.5885298848152161, -0.04004088416695595, -0.7084305882453918, -0.5114687085151672, 0.823886513710022, -0.4272184669971466, 0.45799437165260315, 0...
def loadvar ( array, trainable = false, name = none ) : placeholder = tf. placeholder ( dtype = array. dtype, shape = array. shape ) var = tf. variable ( placeholder, trainable = trainable, collections = [ ], name = name ) load _ var = lambda sess : sess. run ( var. initializer, feed _ dict = { placeholder : array } ) ...
[ -0.2814311683177948, -0.03774847090244293, 0.5731556415557861, -0.6147770881652832, -1.0408575534820557, -0.5056518316268921, 0.14506949484348297, -0.41655951738357544, 0.1315343827009201, 0.36249837279319763, -1.1833456754684448, 0.016642166301608086, -0.18771518766880035, 0.0978427156805...
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilterius3ius3. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.20926515758037567, 0.553661048412323, 0.006124448962509632, -0.2580834925174713, -0.45104506611824036, 0.500847339630127, -0.3508720397949219, -0.7543650269508362, -0.02259056456387043, -0.3324005901813507, -0.16527989506721497, 0.3068919777870178, -1.1159907579421997, 0.9685266017913818...
def find _ cell _ end ( self, lines ) : # markdown : ( last ) two consecutive blank lines if self. metadata is none : self. cell _ type ='markdown'prev _ blank = 0 for i, line in enumerate ( lines ) : if self. start _ code _ re. match ( line ) : if i > 1 and prev _ blank : return i - 1, i, false return i, i, false if _...
[ -0.6678329110145569, -0.23323293030261993, 1.0596481561660767, 0.5888713002204895, 0.20643350481987, -0.5294733047485352, 0.7245962619781494, 0.6307944655418396, -1.5858041048049927, 0.45565998554229736, 0.05496252328157425, -0.5333673357963562, -0.5503241419792175, 0.6635003089904785, -...
def get _ tile _ east _ neighbor ( self, tile ) : return self. _ get _ tile _ neighbor ( tile, " east " )
[ -0.37703436613082886, 0.4891946017742157, 0.7176209688186646, 0.3659662902355194, -0.9968910217285156, 1.049707055091858, 0.4583677649497986, -1.676673412322998, 0.04839830845594406, 0.7569122314453125, -0.25809943675994873, 0.2607766091823578, -0.037711843848228455, 0.305986225605011, 0...
def find _ all _ table _ schema _ errors ( self ) : errors = [ ] for table in self. tables. values ( ) : if hasattr ( table,'schema _ errors') : errors. extend ( table. schema _ errors ) return errors
[ -0.09349857270717621, 0.052543021738529205, 0.4335668683052063, 1.2641819715499878, -0.0266126561909914, 0.42338964343070984, -0.23651733994483948, 0.7298952341079712, -0.05462833121418953, 0.13402186334133148, -0.5372254252433777, 0.3551786243915558, 0.3649227023124695, 1.4099842309951782...
def crossover ( inst1, inst2, p _ mut ) : # cut solutions at random points. c1 = inst1 [ : np. random. randint ( 1, len ( inst1 ) ) ] c2 = inst2 [ : np. random. randint ( 1, len ( inst2 ) ) ] # append elements in second solution in order found. offspring1 = np. hstack ( ( c1, inst2 [ ~ np. in1d ( inst2, c1 ) ] ) ) offs...
[ -0.6906541585922241, -0.12817800045013428, 1.0647811889648438, 0.29027676582336426, -0.6407984495162964, 0.48526686429977417, -0.34360793232917786, -0.30692628026008606, 0.25718817114830017, 0.4121479392051697, 0.21249036490917206, 0.7463483214378357, -0.13974341750144958, -0.3432094156742...
def _ _ channel _ conv _ revt ( self, x, y ) : # get 3 - d result conv = np. asarray ( [ self. _ _ conv2d ( x, np. rot90 ( y [ :, :, i ], 2 ) ) for i in range ( self. previous _ channels ) ] ) # reformat dimensions conv = np. swapaxes ( np. swapaxes ( conv, 1, 3 ), 1, 2 ) return conv
[ -0.01172622013837099, -0.3032389283180237, 0.8260278105735779, -1.1810113191604614, -0.1851068139076233, -0.5839149355888367, -0.4184792935848236, -0.45081549882888794, -0.42130374908447266, 0.9611921310424805, 0.7554963231086731, 1.0829130411148071, 0.20497629046440125, -1.283504843711853...
def resolve _ edges ( self, dag, pag, columns, tabu _ edges, num _ paths, objectives ) : bi _ edge = " < - > " directed _ edge = " - - > " undirected _ edge = " o - o " trail _ edge = " o - > " # entropy only contains directed edges. options = { } for opt in columns : options [ opt ] = { } options [ opt ] [ directed _ ...
[ -0.48188894987106323, -0.3990582525730133, 0.884915828704834, -0.17317761480808258, 0.4300462603569031, -0.14039072394371033, 0.4787807762622833, 1.0073851346969604, -0.06947623938322067, 0.43774616718292236, 0.4404785633087158, -0.32834023237228394, 0.3190098702907562, -0.70615154504776, ...
def _ all _ paths ( self, position, past _ decorations ) : for endpt in self. forward [ position ] : decorations = past _ decorations + ( ( position, endpt ), ) if endpt = = self. end _ sentinel : yield decorations else : for p in self. _ all _ paths ( position = endpt, past _ decorations = decorations ) : yield p
[ 0.05287114903330803, 0.5532225966453552, 0.5886977910995483, 0.5877952575683594, -0.4879586696624756, 0.5921586155891418, -0.18353690207004547, 0.6280616521835327, 0.25397181510925293, 0.41973504424095154, 0.3660542964935303, -0.5619874000549316, 0.29550209641456604, 0.7399837970733643, ...
def get _ enqueue _ time ( self ) : return self. enqueued _ at
[ 0.05321217328310013, -0.7209593653678894, 0.7322568893432617, -0.6872427463531494, 0.49439501762390137, 0.5142421722412109, -1.0144891738891602, -0.6689741015434265, -0.8253023028373718, 0.6930638551712036, -0.5677580833435059, 0.6556280851364136, 0.4026471972465515, 0.9235790967941284, ...
def _ _ init _ _ ( self, pool, cr ) : hr _ readable _ fields = ['active ','child _ ids ','employee _ id ','employee _ ids ','employee _ parent _ id ','hr _ presence _ state ','last _ activity ','last _ activity _ time ','can _ edit ', ] hr _ writable _ fields = ['additional _ note ','address _ home _ id ','address _ id...
[ 0.05435074865818024, 0.15647412836551666, 0.8704997897148132, -0.061155010014772415, -0.05900246649980545, 0.16237588226795197, 0.9895256161689758, -0.22055308520793915, -0.039582930505275726, 0.27848073840141296, -0.6050789952278137, 0.43760746717453003, -0.4784870147705078, 0.01754490658...
def total ( ) - > int : storage = psutil. disk _ usage ('/') return storage. total
[ -0.22885118424892426, 0.32477861642837524, 0.7067155241966248, -0.19635742902755737, 0.6379843354225159, -0.6827868223190308, 1.1048426628112793, -0.3128807246685028, -0.28149324655532837, -0.13405856490135193, -0.3128940761089325, -0.645013689994812, 0.1756274402141571, -0.446066439151763...
def dispatch _ deadline _ usec ( self ) : return self. _ _ dispatch _ deadline _ usec
[ 0.46141719818115234, -0.11074989289045334, 0.9058959484100342, -0.0034798330161720514, 0.5641281008720398, 1.0403865575790405, 0.9140682220458984, 0.14068946242332458, 0.28254005312919617, 0.1444256752729416, -0.3280448913574219, -0.35036197304725647, 0.6352689266204834, -1.001061320304870...
def uctselectchild ( self ) : s = sorted ( self. childnodes, key = lambda c : c. wins / c. visits + sqrt ( 2 * log ( self. visits ) / c. visits ) ) [ - 1 ] return s
[ 0.6802330017089844, 0.008437378332018852, 0.499178409576416, 0.0658489242196083, -0.6451455950737, 0.3164670467376709, 1.585700273513794, -1.0709534883499146, -0.15654955804347992, -0.0010588020086288452, 0.17195473611354828, 0.4483777582645416, 0.19519607722759247, -1.284249186515808, -...
def install ( cassette ) : httplib. httpconnection = vcrhttpconnection httplib. httpsconnection = vcrhttpsconnection httplib. httpconnection. cassette = cassette httplib. httpsconnection. cassette = cassette # patch requests v1. x try : import requests. packages. urllib3. connectionpool as cpool from. stubs. requests _...
[ 0.22644054889678955, -0.7093663215637207, 0.9362448453903198, -0.09005462378263474, 0.2069103717803955, 0.47328388690948486, 0.17136411368846893, -0.5562294125556946, 0.8169490098953247, 0.38127240538597107, -0.6160407662391663, 0.1358146220445633, -0.36981236934661865, 0.0650198683142662,...
def applicable ( dataset ) : # pylint : disable = unused - argument return true
[ -0.33410924673080444, 0.252227246761322, 0.2940574884414673, -0.02154865860939026, -1.0037786960601807, 0.5417661070823669, 0.19228163361549377, 0.9058207273483276, 0.7848456501960754, -0.8104515075683594, 0.2824937701225281, -0.03211899846792221, -0.5019784569740295, 0.8420358896255493, ...
def check _ training _ output _ values ( outputs, distributions, params ) : def check _ output _ support ( output, distribution, eps = 1e - 3, i = none ) : " " " check is any output values below eps if using gamma or beta. raise a warning that this may lead to nans in training. " " " if np. any ( output < eps ) and dis...
[ -0.27655717730522156, -0.7487900853157043, 0.6988033056259155, 0.38489437103271484, -0.44002464413642883, -0.19107340276241302, 0.6137310266494751, -0.6012259721755981, -0.6777735352516174, -0.289581298828125, 0.07762990891933441, -0.1459011286497116, 0.5793516635894775, 0.4715360701084137...
def get _ first _ tag _ for _ next _ release _ branch ( self, branch ) : if is _ release _ branch ( branch ) : log. debug ( f " { branch } is release branch " ) try : next _ release _ branch = self. get _ next _ release _ branch ( get _ release _ branch _ from _ branch _ name ( branch ) ) log. debug ( f " { next _ rele...
[ 0.16097542643547058, 0.29788944125175476, 0.5453203320503235, 0.6523995995521545, -0.2516871690750122, -0.40754950046539307, -0.6804623007774353, -0.5858674645423889, 0.2637721300125122, 0.2552497088909149, 0.008968370966613293, -0.2756996750831604, -0.8033915162086487, 1.1714905500411987,...
async def _ _ load _ _ ( self ) - > none : # determine whether to sync application commands sync : bool = self. _ settings. client. data. sync if self. _ settings. client. data. sync is not none else true # initialize the command loader self. _ loader : loader = loader ( commandtree ( self ) ) # initialize args to be p...
[ 0.357467383146286, -0.21295654773712158, 0.579442024230957, -0.4185963571071625, 0.47857576608657837, -0.5488916635513306, -0.32903149724006653, -0.6091869473457336, -0.20264111459255219, -0.3015393614768982, 0.566429078578949, 0.34367650747299194, 0.23293210566043854, 1.0614573955535889, ...
def insert _ poorly ( self, val ) : if not self. contains ( val ) : if self. _ root is none : self. _ nodes [ val ], self. _ root = [ none, float ('inf'), none ], val else : node = self. _ root while true : if isinstance ( node, list ) : print node left, right, parent = self. _ nodes [ node ] if ( left < val ) and ( va...
[ -0.14709588885307312, 1.0507702827453613, 0.7569177746772766, -0.4030725657939911, -0.43393146991729736, 0.1849411427974701, 0.06969427317380905, -0.760698676109314, 0.018064340576529503, 0.0222457367926836, -0.7106820344924927, 0.398427814245224, -0.9526783227920532, 1.214909315109253, ...
def slice ( self, origin, direction, length = 2 ) : # the edge wheel described in the docnotes above, used for calculating edges and steps # edge is the step we take for each distance, # step is the increment for each cell that distance out edge, step = self. directions [ direction % 6 ], self. directions [ ( direction...
[ -0.47794026136398315, -0.5435714721679688, 0.6200441122055054, 0.5723134875297546, -0.5920379161834717, -0.719007670879364, -0.06628236919641495, 1.0589756965637207, 0.23257790505886078, 0.7442216277122498, -0.4959818422794342, -0.04300256446003914, -0.04198260232806206, -0.6480712890625, ...
def _ _ init _ _ ( self, product _ code, description, market _ price, rental _ price ) : self. product _ code = product _ code self. description = description self. market _ price = market _ price self. rental _ price = rental _ price
[ 0.5460590720176697, 0.023823224008083344, 0.4153483510017395, 1.0153318643569946, 0.9082348346710205, 0.42727425694465637, -1.0950615406036377, -0.09435532987117767, -0.7507341504096985, 0.7952562570571899, 0.11084408313035965, 0.6284615993499756, -0.29068708419799805, 0.14868317544460297,...
def plot _ tweets _ over _ time ( self, plot _ run = true, cinema _ run = false, critical _ period = false ) : # use release date to end weekend to highlight the reigon where the film was in the cinema releasedate = self. ukreleasedate endweekend = self. first _ run _ end # check if we need to highlight the cinema run ...
[ 0.06086062267422676, 0.21614941954612732, 0.6908189058303833, -0.43398502469062805, 0.3272954225540161, 0.3445283770561218, -0.02585243247449398, -0.05468440428376198, -0.40704354643821716, 0.9095734357833862, 0.6335214972496033, 0.9496614336967468, 0.6257790327072144, 0.6620565056800842, ...
def putlab ( lab, instr ='' ) : if type ( lab ) = = list : for l in lab [ : - 1 ] : instructions [ - 1 ]. append ( ( l,'','' ) ) instructions [ - 1 ]. append ( ( lab [ - 1 ], instr,'' ) ) else : instructions [ - 1 ]. append ( ( lab, instr,'' ) )
[ -1.0186609029769897, 0.7962484955787659, 0.5870571136474609, -0.27732324600219727, 0.304836243391037, 0.8445612788200378, 0.041824743151664734, 0.08260329067707062, 0.10435768961906433, 0.206462100148201, -0.05110640451312065, -0.11693300306797028, -1.385995626449585, 0.6469163298606873, ...
def ensure _ entities _ exist ( key, max _ concurrent = 50 ) : urls = fetch ( key ) if not urls : instance _ group _ managers. set _ instances ( key, [ ] ) return base _ name = key. parent ( ). parent ( ). id ( ) revision = key. parent ( ). id ( ) zone = key. id ( ) keys = { url : get _ instance _ key ( base _ name, re...
[ -0.8093239665031433, 0.5607151985168457, 0.6344271302223206, -0.4873419404029846, 0.6275460124015808, 0.012338393367826939, 0.029766201972961426, 0.04040546342730522, -0.5149061679840088, 0.8296480774879456, 0.055961355566978455, 0.09614870697259903, -0.41704845428466797, 0.816624939441680...
def testbeta ( self ) : for n in range ( 100, 500, 100 ) : print ( f " testing estimation of uniform distribution for a data size of { n }. " ) data = np. random. beta ( a = 1, b = 1, size = ( n, ) ) for n _ blk in range ( 1, n / / 2 ) : # non blocking param = tools. analysis. analysisparam ( tools. analysis. blocking,...
[ 0.1627286821603775, -0.2782996594905853, 0.6627804040908813, 0.13456064462661743, 0.8914484977722168, 0.10946893692016602, 1.0177088975906372, -0.32264795899391174, -0.45762771368026733, -0.4383987486362457, -0.5562241077423096, 0.4879220426082611, -0.8721914291381836, 0.9140847325325012, ...
def whoseturn ( self ) : if self. _ gamestate = = self. game _ over : return self. player _ none else : return self. _ currentplayer
[ -0.03533394634723663, -1.6543166637420654, 0.6318254470825195, 0.02027076482772827, 0.16979673504829407, 0.05959734693169594, 0.26243776082992554, -0.5573408007621765, -0.3764439821243286, -0.015516255050897598, 0.7581729292869568, 0.5145029425621033, -0.6021552681922913, -1.07060575485229...
def get _ conversion _ data ( audiodata, fs, refine _ f0 ) : features = [ ] logging. info ( " start building speaker a dictionary : extracting feature for conversion ( sp, ap, f0 ) " ) for audio in tqdm ( audiodata ) : # extract feature _ f0, t = pw. dio ( audio, fs ) # raw pitch extractor if refine _ f0 : f0 = pw. sto...
[ -0.2854587733745575, -0.600225567817688, 0.6248807311058044, 0.3740277886390686, -0.34055376052856445, -0.4312269389629364, -0.40134915709495544, 0.49881377816200256, 0.3100146949291229, -0.018543237820267677, -0.737419843673706, -0.5002210140228271, 0.6027889251708984, 0.9921535849571228,...
def my _ information ( request ) : data = { } u = request. user profile = u. get _ profile ( ) # initial _ profile = {'dob': profile. dob. strftime ( " % m / % d / % y " ) if profile. dob else'' } user _ form = userinfoform ( request. post if request. post. get ('user _ form') else none, instance = u, prefix ='user') s...
[ -0.08188223093748093, -0.7137577533721924, 1.0455317497253418, 0.29810041189193726, -0.26343029737472534, 0.22258296608924866, 0.41057759523391724, -0.2781107723712921, 0.10593505203723907, -0.5643159747123718, -0.142289400100708, -0.4115390479564667, 0.5250666737556458, 0.529970109462738,...
def control _ team ( color ) : rospy. init _ node ('controller _ % s'% color, anonymous = true ) namespaces = get _ namespaces ( color ) for namespace in namespaces : vehicles [ namespace ] = vehicle ( color, namespace ) rospy. spin ( )
[ -0.1934337317943573, 0.19560353457927704, 0.42217475175857544, -0.7639889717102051, 1.026303768157959, -0.1810043305158615, -0.6186160445213318, -0.7960063219070435, 0.36305880546569824, 0.4064446985721588, -1.100608229637146, -0.11362815648317337, 0.56611567735672, 0.42747583985328674, ...
def edit _ classifications ( self, identifier _ type, identifier ) : work = self. load _ work ( flask. request. library, identifier _ type, identifier ) if isinstance ( work, problemdetail ) : return work staff _ data _ source = datasource. lookup ( self. _ db, datasource. library _ staff ) # previous staff classificat...
[ -0.9795843958854675, -0.2635500431060791, 0.7469514608383179, -0.36382046341896057, 0.177381232380867, 0.16104145348072052, 0.6758269667625427, 0.03536059707403183, -0.7983884811401367, 0.073965884745121, -0.094484344124794, 0.5968703031539917, 0.08856146037578583, 0.8399376273155212, 0....
def overlap _ room ( self, room ) : for tile in self. all _ tiles : for comp _ tile in room. all _ tiles : if tile. coor = = comp _ tile. coor : return true return false
[ -0.47173964977264404, -0.7962983846664429, 0.7662619948387146, 0.7330878973007202, -0.4340314567089081, 0.7053403258323669, 0.4732377231121063, 0.3264595866203308, -0.1542079746723175, 0.3532120883464813, -0.1869155466556549, -0.21824729442596436, -0.8463003039360046, 0.9857525825500488, ...
def iter _ tests ( self, recollect = false, skip _ default = false ) : if recollect or not self. _ tests _ collected : self. collect _ tests ( ) for tid, func in self. _ task _ execs. items ( ) : # skip base files - this just runs all the tests twice if func = = self. _ exec _ default and not skip _ default : yield fun...
[ -0.11639425903558731, -0.07169703394174576, 0.6853439807891846, 0.9885068535804749, 1.093281626701355, 0.18604271113872528, 0.9033299684524536, -0.13084745407104492, -0.7493433952331543, -0.17021514475345612, 0.2319643497467041, -0.1823178082704544, -0.24635031819343567, 0.6639292240142822...
def from _ dict ( dictionary = dict ( ) ) : obj = profile ( ) " " " print ( dictionary ) " " " obj. set _ id ( dictionary [ " id " ] ) # eigentlich teil von businessobject! obj. set _ name ( dictionary [ " name " ] ) obj. set _ age ( dictionary [ " age " ] ) obj. set _ adress ( dictionary [ " adress " ] ) obj. set _ se...
[ 0.39769554138183594, -0.7572678923606873, 0.6554616093635559, -0.35813164710998535, -0.3515813648700714, 1.1153854131698608, -0.36717379093170166, -0.6581031680107117, 0.6746196746826172, -0.10063828527927399, -0.9399940371513367, -0.12309335172176361, -0.011600610800087452, -0.28807228803...
def optimize _ parameters ( self ) : # forward self. forward ( ) # compute fake images and reconstruction images. # g _ a and g _ b self. set _ requires _ grad ( [ self. netdiscriminatordecoderg _ a, self. netdiscriminatordecoderg _ b ], false ) self. set _ requires _ grad ( [ self. netg _ a, self. netg _ b ], true ) s...
[ -0.30057722330093384, 0.569532036781311, 0.5700105428695679, -0.6487254500389099, 0.84700608253479, -0.6638938188552856, 0.6076701283454895, -0.3507922887802124, -0.9213138818740845, -0.17927923798561096, -0.4090530276298523, 0.3604438900947571, -0.132295161485672, 1.2202314138412476, 0....
def config _ to _ click ( config : dict ) - > dict : ec2 _ configs = {'ec2 -'+ k : v for ( k, v ) in config ['providers'] ['ec2']. items ( ) } click = {'launch': dict ( list ( config ['launch']. items ( ) ) + list ( ec2 _ configs. items ( ) ) ),'describe': ec2 _ configs,'login': ec2 _ configs } return click
[ -0.774857759475708, -0.2602147161960602, 0.2778228223323822, -0.9263089895248413, -0.24329473078250885, 0.08695752173662186, -0.549442708492279, 0.597160816192627, 0.3987095355987549, 0.9657533168792725, -0.7544866800308228, 1.1139732599258423, 1.0948481559753418, 0.09653636068105698, 0....
def write _ data ( days _ between _ dates, start _ date ) : file _ path = ('/ users / fortucj / documents / skoo / python / 220 / sp _ python220b _ 2019 / students /'+'cjfortu / l06 / assignment / data / exercise. csv') all _ data = [ [ uuid. uuid4 ( ), 10 + i, 11 + i, 12 + i, 13 + i, ( start _ date + datetime. timedel...
[ -0.8872338533401489, -0.323090523481369, 0.7051160335540771, -0.04535612836480141, 0.6474422812461853, 0.678022027015686, 0.4233139455318451, 0.6444783806800842, 0.2665441930294037, -0.525905966758728, -0.11044204235076904, 0.3976761996746063, 0.1214463859796524, -0.42609575390815735, -0...
def listen ( self ) - > none : listener = mystreamlistener ( self. mathslogic _ bot _ id, self ) stream = tweepy. stream ( auth = self. api. auth, listener = listener ) stream. filter ( follow = [ self. mathslogic _ bot _ id ] )
[ 1.4124034643173218, -0.5649633407592773, 0.2537596523761749, 0.07917159050703049, 0.3266228437423706, 1.0938221216201782, 0.011804039590060711, -0.5375731587409973, -0.07556968927383423, -0.5052418112754822, -0.06607664376497269, 1.1839762926101685, 0.16022907197475433, 1.11749267578125, ...
def normalise _ abn ( original _ abn ) : # strip all whitespace and dashes abn = re. sub ('( \ s | - ) ','', original _ abn ) if re. match ('[ 1 - 9 ] [ 0 - 9 ] { 10 } ', abn ) is none : raise validationerror ('invalid abn : { } '. format ( original _ abn ) ) # see the following for algorithm details : # https : / / ab...
[ 1.0515109300613403, -0.9930643439292908, 0.879936933517456, 0.052883557975292206, -0.37024787068367004, 0.26236286759376526, 0.7486492991447449, 0.3673456013202667, 1.007110834121704, 0.1513565629720688, 0.6315996050834656, 0.23941250145435333, 0.1697538048028946, -0.2663544714450836, 1....
def get _ instance _ fields ( self, sender, instance ) : data = get _ fields _ and _ properties ( sender, instance ) return data
[ -0.9025101065635681, -0.02001914009451866, 0.5355312824249268, -1.106550931930542, -0.42770150303840637, 0.10721123218536377, -0.04203605651855469, -0.23451639711856842, -0.15398511290550232, 0.023102056235074997, -1.8407163619995117, -0.17339330911636353, 0.2777336537837982, -0.8165407776...
def resolve ( ip ) : if opt. resolve : try : resolved = " ( " + socket. gethostbyaddr ( ip ) [ 0 ] + " ) " except : resolved = " ( host name not found ) " return resolved else : return " "
[ -0.5452548861503601, 0.7789772748947144, 0.7187828421592712, 0.5435824990272522, -0.19868144392967224, -0.6978325247764587, -0.9887925982475281, -0.4862610399723053, -0.34096792340278625, 0.21746282279491425, 0.7120688557624817, -0.6853089332580566, -0.7247236967086792, -0.6443740129470825...
def _ make _ inheritable ( self, handle ) : return duplicatehandle ( getcurrentprocess ( ), handle, getcurrentprocess ( ), 0, 1, duplicate _ same _ access )
[ 0.912062406539917, -0.781011164188385, 0.6220278143882751, 0.0509616993367672, -0.2159891128540039, 1.2908613681793213, 1.4460277557373047, -0.6827300786972046, 0.21300601959228516, -1.1449990272521973, -0.015400409698486328, 1.0359162092208862, -0.7295043468475342, -0.32135871052742004, ...
def _ get _ cron _ period ( self, min _ margin = 120 ) : cron _ limit = config. get ('limit _ time _ real _ cron') req _ limit = config. get ('limit _ time _ real') cron _ timeout = cron _ limit if cron _ limit > - 1 else req _ limit return cron _ timeout - ( min _ margin + random. randint ( 1, 60 ) )
[ 0.17137020826339722, -0.02359677292406559, 0.6936066150665283, 0.19024229049682617, -0.1422874480485916, 0.5717498064041138, -0.0905022993683815, 0.577398955821991, 0.7145071625709534, 0.5002239942550659, 0.697380781173706, 0.7928952574729919, -0.4629650115966797, -0.6252158880233765, 1....
def list _ append ( ) : try : app _ l = load _ from _ json _ file ( '. / add _ item. json') except : app _ l = [ ] for i in range ( 1, len ( argv ) ) : app _ l. append ( argv [ i ] ) save _ to _ json _ file ( app _ l, '. / add _ item. json')
[ -1.1700656414031982, -0.4897707402706146, 0.6334129571914673, 0.3874628245830536, 0.8705488443374634, 0.9455029964447021, -0.8941472768783569, 0.5376841425895691, -0.059450414031744, 0.7651124000549316, -1.0951182842254639, 0.5502076745033264, 0.2932550311088562, 1.3707798719406128, 0.02...
def get _ items ( self, tree ) : for node in tree. findall ('site') : yield site ( node )
[ -0.8118255734443665, 0.2751459777355194, 0.3696182668209076, -0.14054778218269348, 0.2144688218832016, 0.32738012075424194, -0.1692325621843338, -0.38929441571235657, 0.04409615322947502, -0.19391712546348572, 0.08494562655687332, -0.06403438746929169, 0.3319006562232971, 0.302879750728607...
def generate _ inspections ( self, rows, generate _ efforts _ flag = false ) : header = ('id |'' itaac _ status |'' icn _ status |'' est _ completion _ date |'' date _ received |'' facility |'' targeted _ flag') itaac _ ids = [ ] output = [ header ] with open ('{ } inspections. csv '. format ( self. directory ),'w +') ...
[ -0.5042479038238525, 0.411799818277359, 0.7251133918762207, -0.1631796807050705, 0.818297803401947, 0.579260528087616, 0.6683334708213806, 0.16407160460948944, -0.29950934648513794, -0.3890937864780426, -0.20317569375038147, -0.13510525226593018, -0.19472314417362213, 0.5436144471168518, ...
def on _ segment ( seg, pt, on _ line = false ) : # is the pt on the line? if not on _ line : cross = cross _ product ( seg, ( pt, seg [ 0 ] ) ) if abs ( cross ) > small : return false seg _ length = euclidean ( seg [ 0 ], seg [ 1 ] ) # if the intersection of the two lines is within the segment, the legth of the # segm...
[ 0.6527756452560425, -0.06533534079790115, 0.57166588306427, -0.27194860577583313, 0.23851202428340912, 0.08954373002052307, -1.2250820398330688, 0.23316150903701782, -0.44753560423851013, 0.601455569267273, -0.2137644737958908, -0.662955641746521, 0.02488205023109913, -0.25256964564323425,...
def _ send _ event ( self, context, resource _ data, event _ id, event _ key = none ) : arg _ dict = {'context': context,'resource _ data': resource _ data } ev = self. sc. new _ event ( id = event _ id, data = arg _ dict, key = event _ key ) self. sc. post _ event ( ev )
[ -0.222178116440773, 0.24990758299827576, 0.3885904550552368, 0.07733242958784103, 0.37669745087623596, 0.334351509809494, -1.1581122875213623, 0.2688569724559784, -0.014883887022733688, 0.9733267426490784, -0.44971370697021484, 0.7155272960662842, 0.23176251351833344, 0.5363146066665649, ...
def test1 _ moap ( self ) : for method in [ " mwu ", " rf " ] : df = moap ( self. clusters, method = method, scoring = " score ", motiffile = self. motifs _ score, ) self. assertequals ( ( 623, 4 ), df. shape ) for method in [ " hypergeom " ] : df = moap ( self. clusters, method = method, scoring = " count ", motiffile...
[ -0.3602045178413391, -0.1535913497209549, 0.4037916362285614, 0.4428948163986206, 0.5277201533317566, 0.2189447432756424, 0.7699323892593384, -0.2726113200187683, 0.3678502142429352, -0.7133200168609619, 0.3868452310562134, -0.17693738639354706, -0.40672600269317627, -0.14326727390289307, ...
def get _ weights _ of _ splitting ( file ) - > [ ] : weights = [ ] with open ( file ) as f : docs = yaml. load _ all ( f, loader = loader ) for dep in docs : for item in dep [ " spec " ] [ " subroutes " ] [ 0 ] [ " splits " ] : weights. append ( item [ " weight " ] ) return weights
[ -0.008624298498034477, 0.034298211336135864, 0.5668793320655823, -0.18137791752815247, 0.17782621085643768, -0.07137083262205124, 0.9563186764717102, 1.2626193761825562, -0.8719227313995361, 0.4899018704891205, -0.7997393012046814, 0.09877844899892807, 0.12929734587669373, 0.93684685230255...
def terminal ( board ) : num _ of _ em = 0 for i in range ( 3 ) : for j in range ( 3 ) : if board [ i ] [ j ] = = empty : num _ of _ em + = 1 if num _ of _ em = = 0 or winner ( board )! = none : return true else : return false raise notimplementederror
[ -0.7424838542938232, 0.604464054107666, 0.8476406931877136, 0.3800072968006134, -0.07700215280056, 0.343019038438797, 0.3538541793823242, 1.142996072769165, 0.3463127613067627, 0.40809711813926697, -0.4774322509765625, -0.6814538836479187, -0.06652198731899261, -0.2319909930229187, -0.59...
def load _ optimizer ( optimizer, learning _ rate ) : optimizer _ path = " tensorflow. keras. optimizers. " + optimizer optimizer _ module = load _ class _ from _ module ( optimizer _ path ) return optimizer _ module ( lr = learning _ rate )
[ 0.5321000218391418, -0.4277840852737427, 0.3431035280227661, 0.006573458667844534, -0.6190714836120605, -0.6474518179893494, -0.9141532182693481, -0.15155071020126343, 0.345404714345932, 0.7989184260368347, -0.2100222408771515, 0.17549557983875275, -0.3605640232563019, 0.14832085371017456,...
def generate _ use _ keys ( ) : all _ locals = np. sort ( list ( globals ( ). keys ( ) ) ) use _ keys = [ ] for lkey in all _ locals : if'kw _'in lkey : use _ keys. append ( lkey ) return use _ keys
[ -0.9476452469825745, -0.09731444716453552, 0.7274051308631897, 0.027991779148578644, -0.2925744950771332, -0.09880642592906952, -0.28945159912109375, -0.3333361744880676, -0.34490275382995605, 0.7990005016326904, -0.27438119053840637, 0.9771885871887207, -0.36832714080810547, 1.40205752849...
def reset ( self, data ) : return true
[ -0.8884432911872864, 0.6510254740715027, 0.20687055587768555, 0.41504788398742676, 0.2884054183959961, 0.4617074429988861, 0.00508448202162981, 0.003753627883270383, 0.01197156310081482, -0.04080582037568092, -1.0965602397918701, 0.010828157886862755, -1.6729971170425415, -0.73715162277221...
def reached ( self, x _ m, y _ m ) : self. _ last _ x _ m = x _ m self. _ last _ y _ m = y _ m return math. sqrt ( ( x _ m - self. _ waypoints [ self. _ current _ waypoint ] [ 0 ] ) * * 2 + ( y _ m - self. _ waypoints [ self. _ current _ waypoint ] [ 1 ] ) * * 2 ) < 1. 5
[ -0.17102645337581635, -0.8662803769111633, 0.538928747177124, -0.2812747061252594, -0.24216924607753754, 0.39910832047462463, -0.4129440188407898, -0.4325605034828186, -0.6398652195930481, 1.0007944107055664, -0.35097742080688477, 0.9304378032684326, -0.856441855430603, -0.0429929457604885...
def query _ operational _ intents ( area _ of _ interest : scd. volume4d, ) - > list [ scd. operationalintent ] : op _ intent _ refs = scd _ client. query _ operational _ intent _ references ( resources. utm _ client, area _ of _ interest ) tx = db. value get _ details _ for = [ ] for op _ intent _ ref in op _ intent _...
[ -0.7393087148666382, -0.21521562337875366, 0.692439615726471, 0.27615711092948914, -0.24512609839439392, 0.12355030328035355, 0.6712551116943359, -0.2017117440700531, 1.0381574630737305, 0.7012379169464111, 0.8766837120056152, 0.2167949229478836, -0.285873681306839, -0.03840102627873421, ...
def get _ handler ( self, path, routes = none, params = none ) : routes = routes or self. routes params = params or { } for route in routes : match = route. match ( path ) if not match : continue rest _ path, url _ params = match if isinstance ( route. handler, list ) : try : return self. get _ handler ( rest _ path, r...
[ -0.15183579921722412, 0.03705834969878197, 0.6124040484428406, 0.9697414636611938, 0.2748425602912903, 0.04779132455587387, 0.09140408784151077, 0.568354606628418, -0.1686554104089737, -0.6202220320701599, 0.2412101924419403, -0.07449942082166672, 0.016780484467744827, -0.0905887633562088,...
def test _ day _ weather ( ) : # define values for the first set of parameters choice _ month1 = 9 choice _ day1 = 12 ma _ temp1 = 79 mi _ temp1 = 51 av _ temp1 = 65 pre1 = 0. 13 # define values for the second set of parameters choice _ month2 = 2 choice _ day2 = 10 ma _ temp2 = 34 mi _ temp2 = 5 av _ temp2 = 19. 5 pre...
[ 0.3280862867832184, -0.6013866066932678, 0.8080668449401855, 0.41046619415283203, 0.2550060749053955, 1.0210422277450562, 0.17785009741783142, -0.2988300621509552, -0.9958072900772095, -0.5425127148628235, -0.08402988314628601, 0.07342041283845901, -0.3645877242088318, 0.8183541297912598, ...
def pos _ tag _ pairs ( self, textpairs ) : sents1 = [ textpair. t1. split ( ) for textpair in textpairs ] sents2 = [ textpair. t2. split ( ) for textpair in textpairs ] tag1 = self. postagger. tag _ sents ( sents1 ) tag2 = self. postagger. tag _ sents ( sents2 ) rlist = [ ] for i in range ( len ( tag1 ) ) : t1 _ tag =...
[ -0.987798810005188, -0.7903252840042114, 0.9161974787712097, -0.6360849142074585, -0.852733314037323, 0.24262769520282745, -0.42036721110343933, 0.553397536277771, -1.270767331123352, 1.0829532146453857, -0.22711551189422607, -1.4728642702102661, -1.0432945489883423, 0.6527708768844604, ...
def test _ pool _ list _ empty ( self ) : result = stratisdbus. pool _ list ( ) self. assertequal ( result, [ ] )
[ -0.6632050275802612, 0.08340004086494446, 0.21353909373283386, -0.3714992105960846, 1.4012036323547363, 1.5522452592849731, -0.033227793872356415, -0.5450004935264587, 0.26640328764915466, -0.3065662086009979, -1.0001579523086548, 0.7793163061141968, -0.4646874666213989, 0.0881892293691635...
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilteriuc2iuc2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.415103554725647, -0.18373341858386993, 0.12158562242984772, -0.21770571172237396, -0.8633686304092407, -0.08889233320951462, 1.2764216661453247, -0.036938104778528214, -1.2949081659317017, -0.8710501790046692, -0.016490399837493896, 0.6351161003112793, 0.8873213529586792, 1.0976951122283...
def get _ design _ matrix ( self, topo = none ) : if topo is none : topo = self. to _ dense _ design _ matrix ( ). x return numpy. reshape ( topo, topo. shape [ 0 ], topo. shape [ 1 ] * topo. shape [ 2 ] * topo. shape [ 3 ] )
[ -0.31476861238479614, 0.852292537689209, 0.5621748566627502, 0.23588936030864716, 0.9216679930686951, 0.37902402877807617, -0.1232539489865303, 0.037213653326034546, 0.33142077922821045, -0.8643913865089417, -0.0105589022859931, 0.10559128224849701, 0.5190379023551941, -0.705402135848999, ...
def convolve ( self, x ) : return signal. convolve ( x, self. data, mode ='full')
[ 0.8364990949630737, 0.36773183941841125, 0.590064525604248, 0.37800002098083496, -0.6938518285751343, 0.37353184819221497, -0.6753038167953491, -0.7707315683364868, -0.01198276411741972, 0.10220208019018173, -1.554282784461975, 0.607574462890625, 0.48399898409843445, -0.10584478825330734, ...
def get _ audio _ features _ for _ tracks ( sp, track _ list ) : # some playlists have local tracks, which need to be avoided ('spotify : local') track _ uris = [ track ['uri'] for track in track _ list if track ['uri']. strip ( ). startswith ('spotify : track') ] features = [ ] full _ batch _ size = 50 num _ full _ ba...
[ -0.044662561267614365, -0.2416747659444809, 0.5377023816108704, 0.704508900642395, 0.325572669506073, -0.5389280319213867, -0.01190198678523302, 0.2334582358598709, -0.5848342180252075, 0.10055086761713028, -0.5183135271072388, -0.17505192756652832, 0.09461285918951035, 0.5528424978256226,...
def instance _ update _ and _ get _ original ( context, instance _ uuid, values ) : return impl. instance _ update _ and _ get _ original ( context, instance _ uuid, values )
[ -0.952399492263794, -0.7998171448707581, 0.40260350704193115, -0.18009760975837708, -0.8855215311050415, -0.15367847681045532, -0.19088195264339447, 0.7991806268692017, -0.08828025311231613, 0.20734435319900513, -0.13128043711185455, 0.2512500584125519, 0.1376228928565979, -1.3888475894927...
def load _ wordembeddings ( self, emb _ size ) : with open ( self. pretrain _ filename ) as f : load = f. readlines ( ) loaded _ embeddings = np. zeros ( ( len ( load ), emb _ size ) ) # read the embddings step = 0 for line in load : s = line. split ( ) # check if the word is in the corpus word =''. join ( s [ : - self...
[ -0.49808353185653687, 0.44328680634498596, 0.82794189453125, -0.077586330473423, -0.12504324316978455, 0.4248710572719574, 0.8817417025566101, 0.10526549071073532, 0.18701468408107758, 0.648987352848053, -0.7463346719741821, 0.2585529386997223, -0.8922069668769836, 0.9179386496543884, -0...
def _ replace _ vals _ in _ namespace ( opt _ names = none ) : global _ session f _ dict = globals ( ) if opt _ names = = none : opt _ names = _ session. opts. get _ names ( ) if isinstance ( opt _ names, str ) : opt _ names = [ opt _ names ] for opt _ name in opt _ names : if opt _ name in f _ dict : f _ dict [ opt _ ...
[ -0.7753744125366211, -0.27049243450164795, 0.6357558965682983, -0.3846812844276428, -0.37185221910476685, -0.6371368169784546, -0.5016554594039917, -0.02531442977488041, 0.35960692167282104, 0.23471029102802277, -0.0460934191942215, 0.6780951023101807, -0.41924771666526794, 0.5834838747978...
def applicable ( dataset ) : return len ( dataset. data. axes ) < = 3
[ 0.7184352874755859, 1.1470699310302734, 0.40652531385421753, -0.8362396359443665, -0.6239010691642761, 0.5488442182540894, -0.679905891418457, 0.5920268893241882, 0.5932537317276001, -0.21170294284820557, 0.36968666315078735, -0.13448545336723328, 0.5220205187797546, -0.34691548347473145, ...
def get _ size ( self ) : return self. size
[ -0.14716149866580963, 0.21237541735172272, 0.36383846402168274, -0.358771950006485, 0.27323436737060547, 0.33399805426597595, 0.7675017714500427, -0.06576526910066605, -0.03700753673911095, -1.5641813278198242, -0.33600497245788574, 0.048282742500305176, -0.6517909169197083, -0.03231657296...
def plotevents ( x, labelidx ) : for i, ( startv, endv ) in enumerate ( labelidx ) : # only label the last event ( makes the plot prettier ) label = " event " if i = = ( len ( labelidx ) - 1 ) else none # just plot the start of the evet plt. axvline ( x [ startv ], linestyle ='- - ', label = label )
[ 0.6085123419761658, -0.2254786342382431, 0.6390081644058228, -0.34395989775657654, 0.6755345463752747, 0.20598363876342773, -0.4920066297054291, 0.13680125772953033, 0.8367693424224854, 0.566276490688324, 0.2694645822048187, 0.7949851751327515, 0.20428577065467834, -1.0039972066879272, 0...
def calcwavenumbers ( wl, p, t ) : # the standard equations are : # a = 2 * pi / lambda # kx = a * sin ( theta ) * cos ( phi ) # ky = a * sin ( theta ) * sin ( phi ) # kz = a * cos ( theta ) # this is assuming that theta, phi are in the convention from sutinjo et al. 2015 # i. e. phi = pi / 2 - az kx = ( 2 * np. pi / w...
[ -0.2291477471590042, -0.3600980341434479, 0.5580466389656067, -0.34382179379463196, -0.41616976261138916, 0.18079817295074463, -0.202484592795372, 1.0771257877349854, -0.05729042738676071, 0.4323134422302246, -1.2981301546096802, -0.42155569791793823, -0.20400099456310272, 0.90710353851318...
def getboxes ( htmltext ) : return re. findall ('< td class = " montantpetit g " > (. *? ) & nbsp ; < / td > ', htmltext, re. s ) or none
[ -0.012740486301481724, 0.3859593868255615, 0.7332562208175659, 0.8947173953056335, -0.303996205329895, -0.4562946557998657, -0.7491967678070068, -0.39162033796310425, 0.16880398988723755, 0.6334214210510254, -0.6399089694023132, -0.4211626946926117, -0.2806936204433441, 0.43910709023475647...
def cast _ to _ int ( text ) : num _ int = false try : num _ int = int ( text ) except valueerror : pass return num _ int
[ -0.24550214409828186, -0.7021766901016235, 0.24639159440994263, -0.8394109010696411, -0.3482694625854492, 0.6673504710197449, 0.26519718766212463, -0.2297651320695877, -0.08839244395494461, 0.5430340766906738, -0.024967294186353683, 0.07489078491926193, -1.7714744806289673, -0.118918403983...
def _ _ parse _ one _ element ( self, element ) : if element. isspace ( ) or not element : return if element in keyword _ list : self. _ _ token _ list. append ( ( element, keyword ) ) return elif element in symbols _ list : # again, not supposed to happen self. _ _ token _ list. append ( ( element, symbol ) ) return e...
[ -0.1841481775045395, -0.22111324965953827, 0.7542586326599121, 0.05697096511721611, -0.31402453780174255, 0.13899677991867065, -0.24927069246768951, 0.6194592118263245, 0.5599514245986938, -0.14189809560775757, -0.5156207084655762, 0.19270360469818115, -0.33595818281173706, 1.1194784641265...
def is _ inside ( self, pt ) : ray = ( ( 0, 0 ), pt ) intersections = 0 # check whether lines intersect the ray. for line in self. lines : if intersect ( ray, line ) : intersections + = 1 # check whether the ray happens to cross a corner of the rectangle. this # will not be registered as an intersection so has to be ch...
[ -0.39652252197265625, 0.08436612039804459, 0.6902757287025452, -0.04310096800327301, -0.21625404059886932, -0.11646261811256409, -0.3765939474105835, -0.17377804219722748, -0.026898955926299095, -0.322422593832016, 0.007390330079942942, -0.3135237991809845, -1.0153921842575073, 0.191302895...
def _ stage1 ( self, image ) : x = self. pool1 _ stage1 ( f. relu ( self. conv1 _ stage1 ( image ) ) ) x = self. pool2 _ stage1 ( f. relu ( self. conv2 _ stage1 ( x ) ) ) x = self. pool3 _ stage1 ( f. relu ( self. conv3 _ stage1 ( x ) ) ) x = f. relu ( self. conv4 _ stage1 ( x ) ) x = f. relu ( self. conv5 _ stage1 ( x...
[ -0.7843690514564514, -0.13437402248382568, 0.6847482323646545, 0.5616299510002136, -0.7371439933776855, -0.13106654584407806, 1.141064167022705, -0.205095112323761, 0.004783439449965954, 1.3262865543365479, 0.08415612578392029, -0.4122154414653778, 0.3054160177707672, 0.36368927359580994, ...
def get _ contig _ from _ kmer ( kmer, genome _ dir ) : if genome _ dir [ - 1 ]! ='/': genome _ dir + ='/'genome _ list = [ file for file in os. listdir ( genome _ dir ) if ( file. endswith ( '. fna') and file. startswith ('strain') ) ] positions = { } for strain in genome _ list : strain _ name = strain. split ('/') [...
[ 0.15708114206790924, -0.5662693977355957, 0.5222569704055786, 0.20495371520519257, -1.5509315729141235, -1.0501112937927246, 0.4777396321296692, 0.3475075662136078, -1.086788296699524, 0.881305992603302, -0.9535338878631592, -1.159238338470459, -0.30881544947624207, 0.7493686079978943, 0...
def _ _ init _ _ ( self, battery _ size = 75 ) : self. battery _ size = battery _ size
[ 0.6784188747406006, 0.06846687942743301, 0.3645590543746948, 0.5177472233772278, -0.5275794267654419, 0.7859009504318237, -0.31062811613082886, -0.040821172297000885, -0.41506627202033997, -0.6730039119720459, -0.4762759804725647, 0.18917010724544525, 0.22138291597366333, 0.545596361160278...
def test _ qlibrary _ instantiate _ n _ gon ( self ) : design = designs. designplanar ( ) try : ngon except exception : self. fail ( " ngon failed " ) try : ngon ( design, " my _ name " ) except exception : self. fail ( " ngon ( design, \ " my _ name \ " ) " ) try : ngon ( design, " my _ name2 ", options = { } ) except...
[ -0.7473905682563782, 0.2428339123725891, 0.522882342338562, -0.687569797039032, 0.48851120471954346, 0.7269419431686401, -0.16408978402614594, -0.5461527705192566, -0.34157225489616394, -0.7583338618278503, -0.8954262137413025, -0.48935773968696594, 0.04124472662806511, 0.33234456181526184...
def mark _ dangers ( self, ingredients : set [ str ], allergens : set [ str ] ) - > none : self. ingredients - = ingredients self. allergens - = allergens
[ 0.467511922121048, -0.5410616993904114, 0.19187073409557343, -0.21388836205005646, 0.8014250993728638, -0.19367586076259613, -1.3351428508758545, 1.1254260540008545, -0.2436213195323944, 0.05395406112074852, -0.12383026629686356, 0.982204794883728, -0.19239522516727448, -0.3390978872776031...
def procexe _ linkname ( self, pid ) : if self. _ procexe _ linkname = = none : self _ pid = os. getpid ( ) for l in ( " exe ", " file " ) : f = " / proc / % d / % s " % ( self _ pid, l ) if os. path. exists ( f ) : try : os. readlink ( f ) # exe link must be available and is a readable link except oserror as e : raise...
[ 0.2880139946937561, -1.048974633216858, 0.8890881538391113, -0.2863709330558777, 0.030899500474333763, 0.39761659502983093, 0.12861652672290802, 1.2100361585617065, -0.12450093775987625, -0.32145971059799194, 0.9075483679771423, 0.5823212265968323, 0.36794787645339966, 0.47996416687965393,...
def _ iter _ namespace _ mappings ( element : element ) : namespaces = _ gather _ namespaces ( element ) if null in namespaces : namespaces. remove ( null ) else : root _ namespace = element. name. namespace namespaces. remove ( root _ namespace ) yield none, root _ namespace for i, namespace in enumerate ( sorted ( na...
[ 0.015465318225324154, -0.0002610224182717502, 0.6319864988327026, 0.08492498844861984, -1.5181207656860352, -0.08247490972280502, -0.1118767186999321, -1.1679736375808716, 1.7105474472045898, -0.11894852668046951, 0.11141577363014221, -0.06965499371290207, 0.9948411583900452, 0.96919292211...
def text _ to _ list _ of _ lines ( text ) : return [ line. split ( ) for line in text. strip ( ). split ('\ n') ]
[ 0.15473245084285736, -0.5199088454246521, 0.1164352297782898, -0.1761859655380249, 0.16888092458248138, 0.13965864479541779, -1.553835153579712, 1.1076191663742065, 0.8432929515838623, 0.0003747375449165702, -0.7714511752128601, 0.13688696920871735, 0.03856425732374191, 0.8865643739700317,...
def instance _ type _ get ( context, id ) : return impl. instance _ type _ get ( context, id )
[ -0.6480276584625244, 0.2421645075082779, 0.30198800563812256, -0.7064265608787537, 0.2975863814353943, -0.3341870903968811, -0.020051520317792892, -1.1421726942062378, 0.35689637064933777, 0.34627434611320496, 0.09003817290067673, 1.4791185855865479, -0.7986883521080017, -0.622101128101348...
def key _ pair _ destroy ( context, user _ id, name ) : return impl. key _ pair _ destroy ( context, user _ id, name )
[ -1.0361838340759277, 0.096921905875206, 0.15831300616264343, 0.22452294826507568, -2.2188684940338135, -0.005237914156168699, -0.33357709646224976, -0.08346597105264664, -0.23169703781604767, 0.8214726448059082, -0.15805953741073608, -0.005269068293273449, -0.9564478397369385, -0.315064460...
def root _ asset _ keys ( self ) - > abstractset [ assetkey ] : from. asset _ selection import assetselection return assetselection. keys ( * self. materializable _ asset _ keys ). roots ( ). resolve ( self )
[ -0.18799716234207153, -0.3860248923301697, 0.475734144449234, 0.09352265298366547, -0.013693246990442276, -0.4616294503211975, 0.176202654838562, -0.8591143488883972, -0.026499120518565178, 0.2573222517967224, 0.361419677734375, 1.5356295108795166, 0.1618347316980362, 0.08031953126192093, ...
def move _ to _ start ( self ) : self. move ( self. settings ['extent'] [ 0 ] [ 0 ], self. settings ['extent'] [ 1 ] [ 0 ], mode ='absolute ', history = true )
[ -0.6987471580505371, -0.7636553645133972, 0.7554419636726379, 0.05343015119433403, 0.4453197121620178, 0.463277667760849, 0.6282578706741333, -0.22969675064086914, -0.6754299998283386, 1.2678171396255493, -0.052011650055646896, 1.5956953763961792, 0.8948143720626831, -0.6376256346702576, ...
def readteclado ( self ) : updatebuttonstime = 0. 4 updatetime = time. time ( ) while true : if ( ( time. time ( ) - updatetime ) > updatebuttonstime ) : if ( gpio. input ( self. buttonright ) = = 0 ) : self. data. estadoteclado ['right'] = true updatetime = time. time ( ) self. data. changedscreen = true if ( gpio. in...
[ 0.051121558994054794, -0.234462171792984, 0.7576398849487305, 0.03814752772450447, -0.6190018653869629, 0.3543485701084137, 0.0902092456817627, -0.5645333528518677, -0.5017127990722656, 0.4022126793861389, -0.13108329474925995, -0.21912994980812073, -0.019632825627923012, 0.457372546195983...
def set _ color _ all ( self, red : float, green : float, blue : float, sat : float, bri : float ) : if self. get _ lights ( ) is not none : for light in self. get _ lights ( ) : self. set _ color ( light, red, green, blue, sat, bri )
[ -0.4512183964252472, -0.14630596339702606, 0.6101346015930176, 0.8082637190818787, 0.9977572560310364, 0.3130978047847748, -1.0142722129821777, -0.30717796087265015, -0.44984573125839233, -0.13726885616779327, -0.4655934274196625, 0.06044517084956169, 0.6537885665893555, 1.4951672554016113...
def do ( self, input, output, direction ) : if ( self. current _ symbol ( )! = input or not direction in ( tape. left, tape. right, tape. stay ) or output not in self. alphabet ) : print " tape. do ( ) : bad instruction : ( input = % s, output = % s, direction = % d ) " % ( input, output, direction ) print " tape : % s...
[ -0.5900180339813232, -0.7239550352096558, 0.6176655292510986, -0.28804129362106323, -0.03323958441615105, 0.27149730920791626, 0.26793789863586426, -0.7619093060493469, -0.07289726287126541, 0.18149392306804657, 0.09387185424566269, 0.27381858229637146, -0.6078739762306213, 0.5483369231224...
def reconfig _ eyeq _ get _ bit _ counter31 _ 0 ( fpgaid, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " only valid when the berb enable and counter enable bits are set. bit counter [ 63 : 0 ] reports the total number of bits received since you enabled or reset ber counters. each increment represents 256 bits. ...
[ 0.042195145040750504, 0.26780766248703003, 0.8455759882926941, -0.44652220606803894, -0.22326809167861938, 0.8847694993019104, 0.7208893299102783, -0.5714549422264099, 0.4085397720336914, 0.3829731345176697, 0.716801643371582, 0.8669155240058899, -0.9016456604003906, 0.8968241214752197, ...