text
stringlengths
25
2.19k
embedding
listlengths
768
768
def gitdelver _ config _ params _ fixture ( ) - > dict [ str, str ] : config _ params = { " repo _ path " : str ( path. home ( ) ), " csv _ output _ folder _ path " : str ( path. home ( ) ), " keep _ unsupported _ files " : false, " analysis _ mode " : analysismode. commits _ files, " nb _ processes " : 4, " nb _ commi...
[ 0.21069307625293732, -0.06048860773444176, 0.7021269798278809, -0.3523416519165039, -0.31672248244285583, 0.32386231422424316, -0.10177099704742432, 0.4067247807979584, -0.48451364040374756, 0.6654557585716248, -0.9832961559295654, 0.104594387114048, 0.28485792875289917, 0.6913818717002869...
def get _ sold _ products ( date ) : with open ('products. csv ', newline ='' ) as csv _ file : product _ reader = csv. dictreader ( csv _ file ) sold _ products = [ product for product in product _ reader if product ['sell _ date'] = = date ] return sold _ products
[ -0.7830792665481567, -0.6175625324249268, 0.27542951703071594, 0.4959476590156555, 0.057056672871112823, 0.8772115707397461, -0.4250471591949463, -0.3193061053752899, 0.502085268497467, 0.17939208447933197, -0.598549485206604, 0.7903556823730469, 0.8335465788841248, 0.019978931173682213, ...
def _ setup _ category _ states ( self ) : # note : assumes three memory images ; make it adaptive later. self. category _ state = torch. stack ( [ self. category _ embeds [ " focus " ], self. category _ embeds [ " memory " ], self. category _ embeds [ " memory " ], self. category _ embeds [ " memory " ], ], dim = 0, )...
[ 0.32183489203453064, 0.4373776912689209, 0.36157047748565674, -0.2612358033657074, 0.4496189057826996, -0.13158836960792542, 1.0912225246429443, -0.0884038507938385, -0.0879218801856041, -0.07235335558652878, -0.23125621676445007, -0.4369717836380005, 0.5560502409934998, 0.1057721227407455...
def missing _ num ( lst, num ) : # lst. append ( num + 1 ) lst. append ( num + 1 ) last = 0 for i in lst : if i! = last + 1 : return last + 1 last + = 0 raise exception ( " none missing! " )
[ -0.2081030160188675, 0.022157952189445496, 0.6794056296348572, 1.168475866317749, -0.35080912709236145, 0.46263858675956726, 0.4799562692642212, 0.5022202730178833, 0.7290093302726746, -0.677058219909668, -1.443122386932373, 0.06808976083993912, -0.825282633304596, 0.7877168655395508, 0....
def _ simplify _ punctuation ( text ) : corrected = str ( text ) corrected = re. sub ( r'( [!?, ; ] ) \ 1 + ', r'\ 1 ', corrected ) corrected = re. sub ( r'\. { 2, } ', r '... ', corrected ) return corrected
[ 0.34994378685951233, -0.9525766968727112, 0.4958648681640625, 0.08574944734573364, -0.639363169670105, -0.49552398920059204, 0.17664726078510284, 1.6702988147735596, 0.6151679754257202, 0.30072927474975586, -0.41559505462646484, -0.26848724484443665, -0.18780189752578735, -0.68387615680694...
def convert _ to _ percent ( value ) : return f'{ value * 100 } % '
[ -0.24199071526527405, -0.6501086950302124, 0.311387300491333, -0.5218390226364136, -0.6838579177856445, -0.13211314380168915, -0.21538087725639343, -0.37954527139663696, 0.41148805618286133, 1.172106146812439, 0.27917808294296265, -1.013546347618103, 0.32429248094558716, -0.784742653369903...
def import _ requests ( self ) : try : import requests except importerror : pnote ( " requests module is not installed " \ " please install requests module to " \ " perform any activities related to rest interfaces ", " error " ) else : self. req = requests
[ 0.2623256742954254, -0.41284358501434326, 0.5002230405807495, 0.744437575340271, 1.3025975227355957, 1.006720781326294, 0.2447565197944641, -0.7493404746055603, 0.5915825366973877, -0.41900408267974854, -0.1597490757703781, 0.10027170926332474, -0.8577238917350769, 0.12383947521448135, 0...
def adult _ population ( self ) - > tuple [ list [ person ], list [ person ] ] : men = [ couple. hb for couple in self. cs ] women = [ couple. wf for couple in self. cs ] return men, women
[ -1.2964036464691162, -0.7485098838806152, 0.492434561252594, -0.0012371670454740524, -0.32706373929977417, 0.8181501030921936, -0.16947074234485626, -0.34431105852127075, -0.8116707801818848, 0.41486719250679016, -0.47373494505882263, -0.37764301896095276, 0.37530407309532166, 1.1626185178...
def render _ shift _ calender ( request ) : return render ( request,'stylist / calendar / shift _ calendar. html')
[ -0.2536669969558716, -0.12922291457653046, 0.2076251357793808, 0.35698816180229187, -0.45668670535087585, 0.9837702512741089, -0.02810800075531006, 0.15383179485797882, 0.34142011404037476, -0.15323199331760406, 0.8928763270378113, -0.27259889245033264, 0.030862506479024887, 0.739015519618...
def get _ arguments ( ) : parser = argparse. argumentparser ( description = " deeplab - resnet network " ) parser. add _ argument ( " - - model ", type = str, default = model, help = " model choice ( deeplabmulti / deeplabvgg / oracle ). " ) parser. add _ argument ( " - - data - dir ", type = str, default = data _ dire...
[ -0.14849911630153656, 0.4303908944129944, 0.8265631198883057, -0.48627758026123047, 0.6950691342353821, -0.16083897650241852, -0.25066110491752625, 0.22314845025539398, -0.9667613506317139, -0.20572517812252045, -0.7081725001335144, -0.16404135525226593, -0.5310403108596802, 0.083847887814...
def warn ( msg, * params ) : header = " [ % s ] " % _ _ name _ _ aimsgwarning ( header + msg, * params )
[ -0.21227486431598663, 0.5418594479560852, 0.4413992166519165, -0.15785697102546692, 0.029840925708413124, -0.061013393104076385, -1.1764992475509644, -0.19430236518383026, -0.7421026229858398, 0.47511520981788635, 0.0724639743566513, 1.2373027801513672, 0.4340037703514099, 0.12017660588026...
def tolocale ( self, name, name _ enc = none, locale _ enc = none ) : if locale _ enc is none : locale _ enc = self. to _ enc if name _ enc is none : name _ enc = self. from _ enc if self. unicode _ system : if isinstance ( name, unicode ) : return name else : return name. decode ( name _ enc, " strict " ) if locale _ ...
[ 0.4364829659461975, -0.6136825084686279, 0.6848656535148621, 0.04596300423145294, -0.5196095705032349, -0.3834569752216339, -0.4151996970176697, -0.1758555918931961, 0.4899073839187622, 0.24636542797088623, -0.5482416749000549, 0.4621696174144745, -0.333829790353775, -0.22795753180980682, ...
def is _ major ( self ) : return self. _ call ('is _ major'). yes
[ -0.2546186149120331, 0.9183086156845093, 0.5629345178604126, 1.2140154838562012, 0.3687354028224945, 0.8676609396934509, -0.8821697235107422, 0.01677842065691948, 0.6351576447486877, -0.5381360650062561, 0.6771161556243896, 0.7150829434394836, -0.7790884375572205, 0.2530500292778015, -1....
def score _ s3 ( cls, deployment, source _ url, destination _ url, credential = none, * * kwargs ) : intake _ settings = { " type " : " s3 ", } if credential is not none : if isinstance ( credential, credential ) : intake _ settings [ " credential _ id " ] = credential. credential _ id else : intake _ settings [ " cred...
[ -0.2451908141374588, -0.3103121221065521, 0.7246405482292175, -0.293522447347641, 0.19412152469158173, 0.4995063841342926, -0.7347109317779541, 0.23532235622406006, -0.04150994494557381, 1.2247990369796753, -0.10626877099275589, 0.6077284216880798, -0.13927270472049713, -0.4569052755832672...
def test _ startserviceaddmultipleroutes ( self ) : self. component. domains. add ('component2') self. component. startservice ( ) self. assertin ('component ', self. router. routes ) self. assertin ('component2 ', self. router. routes )
[ 0.5578534603118896, -0.3395288586616516, 0.45263469219207764, 0.27736759185791016, 1.1535978317260742, 0.40120550990104675, -0.6338168382644653, -0.09398676455020905, 0.5392451286315918, -0.9875381588935852, -0.6877064108848572, 0.29239287972450256, -0.13303978741168976, 0.9154389500617981...
def collect ( cls, block _ structure ) : block _ structure. request _ xblock _ fields ('mode') block _ structure. request _ xblock _ fields ('max _ count') block _ structure. request _ xblock _ fields ('category') store = modulestore ( ) # needed for analytics purposes def summarize _ block ( usage _ key ) : " " " basi...
[ -0.0879252701997757, 0.0036362120881676674, 0.812153160572052, -0.3553512394428253, 0.8094773888587952, -0.03528404235839844, 0.795522153377533, -0.45828476548194885, -0.4298909902572632, 0.5408043265342712, 0.0540003664791584, -0.040107253938913345, 0.8943779468536377, 0.8889438509941101,...
def generate _ sc ( size, n ) : natoms = n * * 3 pos = range ( n ) x = np. zeros ( ( natoms, 3 ) ) i = 0 for px, py, pz in it. product ( pos, pos, pos ) : x [ i ] = ( px, py, pz ) x [ i ] = x [ i ] * ( size / n ) i + = 1 return x
[ -0.032599709928035736, 0.6606665849685669, 0.5238765478134155, -0.7598007321357727, -0.04694773256778717, 0.179764062166214, -0.5468748211860657, -0.2641671299934387, 1.0678553581237793, 0.5611385107040405, -1.1402209997177124, -0.1599869430065155, 0.5240406394004822, -0.38850855827331543,...
def get _ window _ stats ( self, item, * identifiers ) : raise notimplementederror
[ -0.7728670239448547, -0.2667957544326782, 0.2874991297721863, 0.9562522768974304, 0.10629690438508987, 0.26092082262039185, 0.16003406047821045, -0.697807252407074, 0.44766899943351746, -0.08448291569948196, -0.822297990322113, 1.072324275970459, -0.5601422786712646, 0.4372824728488922, ...
def get _ macroserver _ for _ door ( door _ name ) : full _ door _ name, door _ name, door _ alias = from _ name _ to _ tango ( door _ name ) db = get _ tango _ db ( ) door _ name = door _ name. lower ( ) server _ list = list ( db. get _ server _ list ('macroserver / *') ) server _ list + = list ( db. get _ server _ li...
[ -0.8932092189788818, -0.406238853931427, 0.6046306490898132, -0.1567801833152771, -0.43476662039756775, -0.392619252204895, -0.02368241734802723, -0.29888486862182617, 0.24552470445632935, 0.0982591062784195, -0.1347980797290802, 0.4249361753463745, -0.8138749599456787, 1.5691794157028198,...
def forbundletype ( self, bundletype ) : engine = self. _ engines [ self. _ bundletypes [ bundletype ] ] if not engine. available ( ) : raise error. abort ( _ ( b'compression engine % s could not be loaded') % engine. name ( ) ) return engine
[ 0.42477911710739136, -0.5819272994995117, 0.2307778000831604, 0.02327408641576767, -0.09414996206760406, -0.29458773136138916, -0.05272972583770752, -1.0034840106964111, -0.35355207324028015, 0.4015684127807617, 0.8548746705055237, 0.0012735145865008235, -0.21270029246807098, 0.56740128993...
def autolabel ( rects ) : for rect in rects : height = rect. get _ height ( ) ax. text ( rect. get _ x ( ) + rect. get _ width ( ) / 2., 1. 05 * height,'% d'% int ( height ), ha ='center ', va ='bottom')
[ 0.3640100061893463, -1.1134518384933472, 0.697496771812439, -0.30440884828567505, -0.06067044660449028, 0.2347286492586136, 0.7404890656471252, -0.8243803381919861, 0.02902683988213539, 0.5011022686958313, -0.41198647022247314, 0.20887386798858643, 0.6676005721092224, -0.13940373063087463,...
def save ( self, filename ) : if self. _ canvas is not none : img = self. _ canvas. render ( ) vispy. io. write _ png ( filename, img )
[ -0.27675309777259827, 0.09405721724033356, 0.5583258867263794, -0.3537072539329529, 0.12319908291101456, 0.27301859855651855, 0.7388501763343811, 0.21033453941345215, -0.2959774136543274, -0.18660210072994232, -0.47515615820884705, -0.6190820932388306, 0.1807740479707718, 0.598754703998565...
def get _ state _ values _ logits _ probabilities _ log _ probs ( self, nn _ input, internal _ states = none ) : self. logger. warn ( " deprecated api method ` get _ state _ values _ logits _ probabilities _ log _ probs ` used! " " use ` get _ state _ values _ logits _ parameters _ log _ probs ` instead. " ) nn _ outpu...
[ -0.660667896270752, -0.2023281753063202, 0.40954434871673584, -0.1858116239309311, -0.12785391509532928, -0.893885612487793, -1.2253838777542114, -0.8997634649276733, -0.15404590964317322, -0.20683564245700836, -0.06498245149850845, 0.10275717824697495, 0.2164880335330963, -0.2802824079990...
def test _ create _ user _ with _ email ( tmpdir ) : test _ authdb _ url = get _ test _ authdb ( tmpdir ) get _ public _ suffix _ list ( ) # 0. start the email server email _ server, maildir = generate _ email _ server ( tmpdir ) email _ server. start ( ) time. sleep ( 3. 0 ) # 1a. create a new session session _ payloa...
[ 0.6238020062446594, 0.09605247527360916, 0.6746537685394287, 0.7953808307647705, 0.6630232334136963, 0.25201594829559326, 0.17272551357746124, -0.581598162651062, 0.08118540793657303, -0.07402140647172928, -1.762497901916504, 0.2263103425502777, 0.19752182066440582, -0.22242102026939392, ...
def set _ modified _ by ( self, modified _ by ) : try : from zcrmsdk. src. com. zoho. crm. api. users import user except exception : from.. users import user if modified _ by is not none and not isinstance ( modified _ by, user ) : raise sdkexception ( constants. data _ type _ error,'key : modified _ by expected type :...
[ -0.9111398458480835, 0.15541449189186096, 0.2749598026275635, 0.38236182928085327, -0.29981833696365356, -0.08560772985219955, 0.9437748193740845, 0.33417993783950806, -0.12999475002288818, 0.41145241260528564, -0.6417535543441772, 0.4030454158782959, -0.5499441027641296, 0.888739943504333...
def test _ check _ config _ params _ missing _ nb _ commits _ before _ checkpoint ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture. pop ( " nb _ commits _ before _ checkpoint ", none ) with pytest. raises ( systemexit ) : gitd...
[ 0.743929386138916, 0.9810254573822021, 0.528361439704895, 0.25793227553367615, 0.5848665833473206, 0.14340752363204956, 0.0757109746336937, 0.012566464953124523, -0.6923072338104248, 0.6090719103813171, -0.8256343007087708, -0.5199403166770935, -0.339998334646225, 1.1862668991088867, 0.5...
def main ( ) : user _ choice = input ('name of input file :') print ( ) read _ file = readfile ( user _ choice ) print ( " the original list of cities is : " ) print _ list ( read _ file ) print ( ) print ( " the new list of cities is : " ) selection _ sort ( read _ file ) print _ list ( read _ file )
[ -0.05083717033267021, -0.835382878780365, 0.5076614618301392, 0.5567870140075684, -0.055163394659757614, 1.2435929775238037, 0.6463527679443359, 0.4034534692764282, -0.6872622966766357, -0.10153115540742874, 0.20082752406597137, 0.7573740482330322, 0.013031648471951485, -0.1704659909009933...
def character _ span ( self ) : return ( self. _ tokens [ 0 ]. character _ span [ 0 ], self. _ tokens [ - 1 ]. character _ span [ 1 ] )
[ -0.5573497414588928, -0.9782006740570068, 0.6680487990379333, -1.0739375352859497, 0.113740473985672, 0.13833008706569672, -0.21987861394882202, 0.03942019119858742, -0.04779399186372757, -0.22886048257350922, -0.906100332736969, 0.6613453030586243, 0.1551186740398407, -0.283294141292572, ...
def compressstream ( self, it, opts = none ) : raise notimplementederror ( )
[ -0.37766242027282715, -0.12389657646417618, 0.4937075674533844, 0.790317714214325, -0.010283038951456547, 0.3409136235713959, 0.3878333270549774, -0.4941175878047943, -0.05710436776280403, -0.41714218258857727, 0.4189029633998871, 0.1916501671075821, -0.8761442303657532, 0.6998735070228577...
def multiply ( x, y ) : return str ( int ( x ) * int ( y ) )
[ -0.7730344533920288, -0.14931152760982513, 0.593089759349823, -0.8907970190048218, -0.972990870475769, -0.0037972345016896725, -2.010284662246704, -2.1586809158325195, -0.2933976650238037, 0.8814154863357544, 0.5481579899787903, -0.45818719267845154, 0.2200096845626831, -0.9310129284858704...
def describe _ battery ( self ) : print ( f " this car's battery has size of { self. battery _ size } kwh. " )
[ 1.3632917404174805, -0.03626028820872307, 0.428197979927063, -0.24029894173145294, 0.48011860251426697, 0.3902280330657959, -0.24003133177757263, -0.6899945735931396, -1.124635934829712, -0.6387538313865662, -0.028002697974443436, 1.4939326047897339, -0.19377678632736206, 0.932401061058044...
def test _ unpack _ type _ error ( trace, check _ golden _ file ) : def f ( * args, * * kwargs ) : pass @ trace def unpack _ type _ error ( ) : with pytest. raises ( valueerror ) : a, b, c = " hi " # unpack _ sequence with pytest. raises ( typeerror ) : a, * c = 1 # unpack _ ex with pytest. raises ( typeerror ) : a = *...
[ -0.36967217922210693, 0.5719629526138306, 0.6508747935295105, 0.4435580372810364, 0.8046725988388062, -0.23573127388954163, 0.9843215346336365, -0.14223113656044006, 0.44047296047210693, 0.14785437285900116, -0.43044811487197876, 0.18604278564453125, 0.019744357094168663, -0.34188738465309...
def sensor _ callback ( self, var, value ) : _ logger. debug ( " received update for % s : % s ", var, value ) dispatcher _ send ( self. hass, signal _ comfoconnect _ update _ received. format ( var ), value )
[ 0.6156870722770691, -0.8277416229248047, 0.4341924786567688, -0.49083876609802246, -0.4397977888584137, -0.1369236260652542, -0.2971504330635071, -0.660871684551239, 0.6492812633514404, 0.6942140460014343, -0.707051157951355, -0.6931048035621643, 0.014637848362326622, 0.31765609979629517, ...
def make _ combined _ regressor ( n _ hidden _ layers = 3, hidden _ layer _ size = 100, activation ='tanh ', dropout _ prob = 0. 0, alpha = 100., learning _ rate = 1. e - 3 ) : # inputs input _ layer = input ( shape = ( settings. n _ thetas _ features, ) ) # network hidden _ layer = dense ( hidden _ layer _ size, activ...
[ 0.42855149507522583, -0.011894688941538334, 1.0725809335708618, 0.3787528872489929, 0.15407496690750122, 0.1640327125787735, -0.182033509016037, -0.327496737241745, 0.04177013784646988, 0.35196763277053833, -0.45212897658348083, -0.20821067690849304, 0.07740558683872223, -0.383278012275695...
def _ get _ object _ for _ given _ param ( same _ arr _ size _ list, param ) : for elem in same _ arr _ size _ list : if param in elem. parameters _ list : return elem return none
[ 0.3193758428096771, -0.3339073956012726, 0.4740186035633087, 0.26218119263648987, 0.28306934237480164, -0.14192338287830353, 0.4822506308555603, -0.7090686559677124, 0.5547311305999756, 0.44009968638420105, -0.28912028670310974, 1.0204639434814453, -0.14864711463451385, 0.30522793531417847...
def update _ proxies _ callback ( self ) : logger = logging. getlogger ( self. name ) if not self. transport. isopen ( ) : self. transport. open ( ) proxies = self. client. request _ proxies ( self. name, downloader _ config ['proxy _ pool _ size'] ) logger. debug ('get proxies : % s'% proxies ) self. transport. close ...
[ -0.6896097660064697, -0.7149049043655396, 0.7835519909858704, -0.958377480506897, 0.30164191126823425, -0.23248302936553955, -0.38473889231681824, -0.41815221309661865, 0.2647029459476471, 0.47313567996025085, -0.30615946650505066, -0.05218205973505974, -0.6474701762199402, 0.2656145989894...
def get _ flow _ rate ( self, syringe _ num ) : self. _ check _ syringe _ number ( syringe _ num ) return remove _ crud ( self. write ( " rat " + _ int _ to _ char ( syringe _ num ), 20 ) [ 1 : 7 ] )
[ 0.14367008209228516, 0.5924079418182373, 0.5420573353767395, -0.7005189657211304, 0.6095473766326904, -0.9063014984130859, 0.6055377125740051, -0.32974371314048767, 0.43042707443237305, -0.0817432776093483, -0.0574488639831543, 0.3023981750011444, -0.9260646104812622, -0.003097481094300747...
def testgetcurrent ( self ) : for om0 in numpy. arange ( start = 0. 2, stop = 0. 5, step = 0. 29 ) : for ok0 in numpy. arange ( start = - 0. 2, stop = 0. 2, step = 0. 39 ) : for w0 in numpy. arange ( start = - 1. 2, stop = - 0. 7, step = 0. 49 ) : for wa in numpy. arange ( start = - 0. 2, stop = 0. 2, step = 0. 39 ) : ...
[ 0.13840672373771667, -0.765580415725708, 0.6842584013938904, 0.2617664039134979, 0.5418485403060913, 0.7334097027778625, 1.0627515316009521, -0.2757549583911896, -0.5008805394172668, -0.5086445212364197, -0.08664672076702118, 0.08015027642250061, -0.4021545350551605, 0.19484876096248627, ...
def download ( filename ) : filename = os. path. basename ( filename ) return send _ from _ directory ( document. upload _ folder, filename )
[ -0.09250446408987045, -0.40602466464042664, 0.5655679702758789, 0.008002113550901413, -0.46700596809387207, -0.5615925788879395, 0.7874775528907776, -0.26348409056663513, -1.0749828815460205, -0.15925441682338715, -0.012840364128351212, -0.036259423941373825, -0.5369232892990112, 0.3706062...
def _ _ init _ _ ( self, conf : dict, addr : str, loop = none, update _ callback = none ) : self. conf = dlepconfiguration ( * * conf ) if self. conf. discovery is none : self. dlep _ mcast _ ipv4addr = " " self. dlep _ udp _ port = self. discovery _ port else : self. dlep _ mcast _ ipv4addr = self. conf. discovery. ge...
[ 0.11240577697753906, 0.4122439920902252, 0.724366307258606, -0.19676274061203003, -0.4899251461029053, -0.03201796114444733, 0.21407513320446014, 0.3164752125740051, 0.8194000124931335, -0.009125585667788982, -0.21296150982379913, -0.7443598508834839, -0.12436546385288239, 0.95323646068573...
def install ( self, destdir, components = none, release = true ) : if not components : return self. _ install _ all ( destdir ) installed _ files = list ( ) for component in components : installed _ for _ component = self. _ install _ component ( component, destdir, release = release ) installed _ files. extend ( insta...
[ -0.8740050792694092, -0.3862231969833374, 0.5462113618850708, 0.03360884264111519, 0.21294941008090973, -0.4311082065105438, -0.4360685348510742, 0.8353270888328552, 0.13607777655124664, 0.722296416759491, -0.2320210337638855, -1.172646403312683, -0.12904946506023407, 1.1081126928329468, ...
def get _ program _ args ( ) : desc = " " " import sympl or symbiosis firewall control files into nftfw run the command with no arguments to get'how to'type help. " " " ap = argparse. argumentparser ( prog ='import ', description = desc ) main = ap. add _ argument _ group ( title ='main actions ', description ='one or ...
[ 0.6098008155822754, -0.4085542559623718, 0.8777183294296265, -0.4873909056186676, 0.49565231800079346, 0.5392162799835205, 0.7100830078125, -0.33174097537994385, 0.1853453367948532, -0.01106469240039587, -0.2622472643852234, 0.1761946678161621, -0.02826201170682907, 1.461774230003357, 0....
def call _ in _ subprocess ( func, * args, * * kwargs ) : ( rp, wp ) = os. pipe ( ) if _ ispython2 : # o _ cloexec flag is set in python 3 only. for p in ( rp, wp ) : fcntl. fcntl ( p, fcntl. f _ setfd, fcntl. fd _ cloexec ) pid = os. fork ( ) val, error = none, none if pid! = 0 : # parent os. close ( wp ) rp = os. fdo...
[ 0.5277932286262512, 0.1180608943104744, 0.9901135563850403, -0.43451666831970215, -0.5829683542251587, 0.028008924797177315, 0.03869271278381348, -0.7229512333869934, 0.007138887420296669, 0.0735071450471878, 0.10702084749937057, 0.22498509287834167, -0.10334057360887527, -0.17297552525997...
def calculatepost ( self, betabinom = false, k _ range = 0 ) : # # # range for k : if isinstance ( k _ range, int ) : if ( max ( self. s ) = = 0 ) : # # # range for n _ 0 self. k _ range = arange ( max ( self. ymax, self. l _ range [ 0 ] * self. mul ), self. l _ range [ - 1 ] * self. mul, dtype = int ) else : self. k _...
[ 0.29163745045661926, -0.3657720386981964, 0.8802552223205566, 0.6170523166656494, -0.41443923115730286, -0.04805588722229004, 0.043211765587329865, 0.9780997633934021, -0.690929651260376, 0.08321690559387207, -0.731327474117279, -0.6931155323982239, -0.7615305185317993, 0.7371427416801453,...
def set _ format ( self, type : optional [ str ] = none, columns : optional [ list ] = none, output _ all _ columns : bool = false, * * format _ kwargs, ) : format _ kwargs. update ( format _ kwargs. pop ( " format _ kwargs ", { } ) ) # allow to use self. set _ format ( self. format ) # check that the format _ type and...
[ -0.9476391673088074, -0.48208338022232056, 0.5461704730987549, -0.006231737323105335, -0.24931694567203522, -0.918670117855072, -0.19273649156093597, -0.44104406237602234, -0.504424512386322, 0.05081897974014282, 0.02156919613480568, 0.8844521641731262, 0.57945716381073, 0.7658720016479492...
def getpreampgain ( index ) : andor _ solis. getpreampgain. restype = ctypes. c _ uint gain = ctypes. c _ float ( ) result = andor _ solis. getpreampgain ( ctypes. c _ int ( index ), ctypes. byref ( gain ) ) check _ status ( result ) return float ( gain. value )
[ -0.5484418272972107, 0.3170548677444458, 0.5675720572471619, 0.026887115091085434, -0.49676185846328735, -0.44052448868751526, 0.9046635627746582, -0.7458563446998596, 0.8947387337684631, -0.6923069953918457, -0.6263760328292847, 0.4759550988674164, -0.7331370115280151, 0.10914604365825653...
def reg _ sse _ grad ( x, y, w, l, b _ mat ) : sse _ gradient = sse _ grad ( x, y, w, b _ mat ) reg _ term _ vec = w * l reg _ sse _ gradient = sse _ gradient + reg _ term _ vec return reg _ sse _ gradient
[ 0.26016077399253845, 1.0614049434661865, 0.37274429202079773, -0.3997300863265991, 0.500257670879364, -0.16523011028766632, 0.10351499170064926, 0.4524694085121155, -0.5406885743141174, 0.946574866771698, -0.9661656022071838, 0.9638071060180664, -0.3551936447620392, 0.09069856256246567, ...
def copy ( source, destination, move = false ) : source = os. path. abspath ( os. path. expanduser ( source ) ) destination = os. path. abspath ( os. path. expanduser ( destination ) ) shutil. copyfile ( source, destination ) shutil. copystat ( source, destination ) if move : os. remove ( source )
[ 0.2859216034412384, 0.21409748494625092, 0.5604779124259949, -0.0014577426481992006, -0.6516470313072205, 0.9382069706916809, 0.4751279056072235, 0.11679807305335999, -0.08314415067434311, 0.7629222273826599, 0.24530646204948425, -0.06985285878181458, 0.8026360273361206, -0.312561273574829...
def _ _ init _ _ ( self, sim _ metric = " cosine " ) : self. sim _ metric = sim _ metric
[ 1.6733300685882568, 1.125261664390564, 0.30413389205932617, 1.0977052450180054, -0.4224714934825897, 0.24631288647651672, 0.29167884588241577, 0.06858579069375992, -0.5200854539871216, 0.2939620614051819, 0.0877014622092247, -0.6688581705093384, 0.2013871818780899, -0.3957046568393707, -...
def create _ data _ item ( module _ qualname, symbol ) : data _ item _ id = " { 0 }. { 1 } ". format ( module _ qualname, symbol. qualname ) byte _ data = pickle. dumps ( symbol. arg _ spec ) base64 _ data = base64. b64encode ( byte _ data ) data _ item _ data = str ( base64 _ data, " utf - 8 " ) data _ item = dataitem...
[ -0.19499076902866364, -0.20868942141532898, 0.2500036954879761, -0.4673057496547699, -0.01397088821977377, 0.6813322305679321, -0.9159677624702454, 0.23650412261486053, -0.3056472837924957, 0.0904485285282135, -0.719745397567749, 0.36026859283447266, 0.023308532312512398, -0.43471002578735...
def form _ valid ( self, form ) : response = super ( ). form _ valid ( form ) # assign store employee role to created user. rolepermissions. roles. assign _ role ( self. object, roles. storeemployee ) return response
[ -0.34124574065208435, -0.1953849345445633, 0.32430604100227356, 0.13781169056892395, 0.46175435185432434, 0.39095738530158997, 0.47208261489868164, 0.11651687324047089, 0.4846683144569397, -0.3484339714050293, -0.16361653804779053, -0.29054221510887146, 0.42528632283210754, 0.1814008504152...
def sparseff ( d _ ff, n _ elements _ in _ block = 32, d _ lowrank = 64, temperature = 0. 1, quant _ prob = 0. 3, use _ bfloat16 = false, big _ weights _ in _ bfloat16 = false, mode ='train ', kernel _ initializer = init. glorotuniforminitializer ( ), bias _ initializer = init. randomnormalinitializer ( 1e - 6 ), dropo...
[ 0.9552478790283203, 0.6324857473373413, 0.9184408783912659, 0.7228497862815857, 0.18403078615665436, -0.782336950302124, 0.7832172513008118, 0.023605136200785637, -0.02956225536763668, -0.7878813147544861, -0.37858614325523376, 0.02456621825695038, 0.05775302276015282, 0.8487340211868286, ...
def _ _ check _ and _ make _ output _ location ( self ) : if os. path. exists ( self. archivation _ path ) : return true else : try : os. makedirs ( self. archivation _ path ) print ( " % s created " % self. archivation _ path ) return true except oserror : print ( " check if you have permissions to % s " % self. archi...
[ -0.5922272801399231, 0.03376782312989235, 0.678121030330658, 0.7053654193878174, -0.41723671555519104, 0.157724529504776, 1.2688826322555542, 0.8454303741455078, -0.5351917743682861, -0.4473474323749542, 1.062607765197754, -0.3156657814979553, 0.13309946656227112, -0.961181640625, 0.3223...
def filter _ object _ activity ( object _ id : uuid, object _ content _ type : contenttype, user _ id : none = none, team : optional [ team ] = none, user _ type : optional [ usertype ] = none, audit _ type : optional [ audittype ] = none, date _ from : optional [ date ] = none, date _ to : optional [ date ] = none, ) ...
[ 0.5768610835075378, -0.7957700490951538, 0.7373834252357483, 0.03354327008128166, -0.22434093058109283, -0.12437056005001068, 0.6465087532997131, -0.810620903968811, 0.4848485589027405, 0.11734393239021301, 0.9664312601089478, 1.8940963745117188, 0.19270503520965576, -0.21461503207683563, ...
def _ _ iter _ _ ( self ) : for group in self. _ groups : yield group
[ -0.8287745714187622, -0.31216683983802795, 0.00043606472900137305, -0.5537936687469482, 0.02949574775993824, 0.5097537040710449, -0.009313038550317287, -1.1350278854370117, -0.9160854816436768, -0.7315449714660645, 1.1391340494155884, 0.35611504316329956, -0.3781057596206665, 0.06800742447...
def get _ aux _ by _ names ( self, song _ name ) : if self. song _ to _ idx is not none : idx = self. song _ to _ idx [ song _ name ] if self. instruments is not none : return self. instruments [ idx ], self. tempos [ idx ] return none
[ 0.05458833649754524, -0.8644760847091675, 0.4459419250488281, -1.0406641960144043, -0.7641416788101196, -0.3214592933654785, -0.3399019241333008, -0.6303008794784546, 0.30701059103012085, 0.7265531420707703, -0.4140114188194275, 0.4199601411819458, -0.2783806324005127, 0.005417785607278347...
def creategraph ( self, node, currentnode ) : # create html code for the node image = node. state. drawstate ( ) htmlstring = " < < table > " rows, cols, _ = image. shape for i in range ( rows ) : htmlstring + = " < tr > " for j in range ( cols ) : if image [ i, j, 0 ] = = 255 : htmlstring + = " < td bgcolor ='# ff0000...
[ -0.2793165147304535, 0.8291727304458618, 1.1312999725341797, -1.0146218538284302, -0.787636399269104, 0.1350991278886795, 0.007626935839653015, 0.10407380759716034, 0.10819682478904724, 0.07027427852153778, 0.5715053081512451, -0.28824731707572937, -0.25367113947868347, 0.04164664074778557...
def generate _ zpl ( payloads, darkness = 25 ) : base _ zpl = " " " ^ xa ~ sd { darkness } ^ fo310, 20 ^ by1 ^ bcn, 50, n, n, y, n ^ fd { text } ^ fs ^ cfc, 10, 5 ^ fo310, 80 ^ fd { text } ^ fs ^ xz " " " for payload in payloads : yield textwrap. dedent ( base _ zpl. format ( darkness = darkness, text = payload ) )
[ -0.5154958963394165, -0.24845384061336517, 0.5371871590614319, -0.7523518800735474, -1.1859022378921509, 0.35206037759780884, -0.4365425407886505, -0.8736298680305481, 0.10564006119966507, -0.17354397475719452, 0.07572473585605621, -0.45353803038597107, -0.325101375579834, -0.2427006214857...
def randomstring ( self, stringlength = 10 ) : letters = string. ascii _ lowercase return''. join ( random. choice ( letters ) for i in range ( stringlength ) )
[ 0.14334996044635773, -0.7233582139015198, 0.1788409799337387, -1.469797968864441, 0.6528255343437195, 0.8351666331291199, -0.6980593204498291, -0.6002758145332336, 0.7456280589103699, 0.08873305469751358, 0.05022120475769043, 0.44835177063941956, -1.4358816146850586, -0.9926913380622864, ...
def loadpythonobject ( modulefilename, objname ) : # must add path to system search path first if not os. path. isfile ( modulefilename ) : logging. error ( " could not find % s " % modulefilename ) sys. exit ( 1 ) modulepath, modulename = os. path. split ( modulefilename ) modulename = modulename. replace ( ". py ", "...
[ 0.45296159386634827, -0.7670370936393738, 0.679762601852417, -0.7322090268135071, -0.8626589775085449, -0.2967643439769745, 0.4382759928703308, -0.9615985751152039, 0.4012966454029083, 0.48892420530319214, 0.09540256857872009, 0.746144711971283, 0.04464666172862053, -0.7102325558662415, ...
def test _ 04 _ 3 _ days ( self ) : self. m _ schedule _ obj. dayofweek = dayofweek _ saturday l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) # print ( prettyformatany. form ( l _ days,'b1 - 04 - a - days') ) self. assertequal ( l _ days, 3 )
[ -0.14451341331005096, 0.8971596956253052, 0.34763434529304504, -1.4267033338546753, 0.26248857378959656, -0.17967048287391663, -0.4485868215560913, -0.3268197476863861, 0.7310468554496765, -0.30845770239830017, -0.2451634556055069, -0.5423291921615601, 0.26546046137809753, -0.4650843143463...
def _ _ loadfile ( self, filename ) : with open ( self. configdir + os. path. sep + filename ) as file : values = yaml. load ( file, yaml. fullloader ) return values
[ -0.6692675948143005, -0.4986078441143036, 0.44000759720802307, -0.35283130407333374, -0.6844589710235596, -0.4809955358505249, -0.13796238601207733, 0.8965831398963928, -1.0004518032073975, 0.5847787261009216, -0.6026952266693115, -0.4769364893436432, 0.0410316027700901, 0.9543400406837463...
def findcost ( a, b, operation ) : insert = np. genfromtxt ( '. / csv _ files / insert. csv ', delimiter = ',') delete = np. genfromtxt ( '. / csv _ files / del. csv ', delimiter = ',') substitute = np. genfromtxt ( '. / csv _ files / substitute. csv ', delimiter = ',') reversal = np. genfromtxt ( '. / csv _ files / re...
[ -0.4329022169113159, 0.3629731237888336, 0.7485113739967346, -0.8177798390388489, -0.562104344367981, -0.43585044145584106, 0.4996556043624878, 1.1867969036102295, -0.27708113193511963, 1.228080153465271, -0.24622580409049988, 0.32124605774879456, -0.4329655170440674, -0.3706270158290863, ...
def combo _ to _ string ( c ) : n1, n2 = combo _ to _ names ( c ) s1 = ', '. join ( n1 ) s2 = ', '. join ( n2 ) return " group1 : [ " + s1 + " ] ; group 2 : [ " + s2 + " ] "
[ -0.8594953417778015, -0.4110451638698578, 0.5106251835823059, -0.5109986066818237, -0.7203969955444336, 0.10519058257341385, 0.018724802881479263, -0.07997677475214005, -0.5799084305763245, 0.4755144417285919, -0.6690355539321899, 0.11722910404205322, 0.08645524084568024, -0.28863617777824...
def guess _ my _ number ( low, high ) : user ='' print ( f'\ nplease think of a number between { low } and { high }!') time. sleep ( 3 ) while user! ='c': guess = ( high + low ) / / 2 print ( f'\ nis your secret number { guess }?') user = input ( ( " \ nenter'h'to indicate the guess is too high. " " enter'l'to indicate...
[ 0.1662999540567398, 0.04519917443394661, 0.7041147351264954, 0.7277550101280212, -0.14555011689662933, 0.7275249361991882, 0.26282167434692383, -0.6088200211524963, -1.038271188735962, -1.0654085874557495, -0.8448326587677002, 1.105987548828125, -0.6423923373222351, -0.02893291786313057, ...
def format _ cdna _ coords ( self ) : # format coordinates. if self. cdna _ start = = self. cdna _ end : return str ( self. cdna _ start ) else : return " % s _ % s " % ( self. cdna _ start, self. cdna _ end )
[ -0.19527049362659454, -0.7816624641418457, 0.4395885467529297, -1.1294955015182495, -0.46621230244636536, 0.43689945340156555, -0.0916060283780098, -1.0044132471084595, -0.17101500928401947, -0.1351056843996048, 0.3351201117038727, 0.6376610994338989, 0.9782622456550598, -0.184763476252555...
def gvo _ supported ( self, screen ) : return query _ int _ attribute ( self, screen, [ ], nv _ ctrl _ gvo _ supported )
[ -0.852228581905365, 1.0946974754333496, 0.5366160273551941, 1.0414812564849854, 0.14293994009494781, 0.2133157104253769, -0.18308085203170776, -1.3023967742919922, 0.29194149374961853, 0.2975764870643616, -0.47683462500572205, -0.15518508851528168, -0.5566418170928955, 0.42295148968696594,...
def apply ( self, als ) : # filter points outside the [ - threshold, threshold ] interval around the # first mode of elevations elevations = als. get ('elevation') # determine elevation of first mode # hist, bins = np. histogram ( elevations [ np. isfinite ( elevations ) ], bins = 100 ) hist, bins = np. histogram ( ele...
[ 0.6529645323753357, -0.36860862374305725, 0.7490582466125488, 0.27910473942756653, -0.0948212593793869, 0.37153565883636475, -0.016495846211910248, 0.8249973654747009, -0.19127921760082245, 0.718305766582489, 0.27318865060806274, 0.49648556113243103, 1.2358367443084717, -0.0950264707207679...
def serialize ( filename, serializable _ object ) : if not filename : raise exception ( " invalid path " + filename + " to save the object. " ) try : data _ file = open ( filename,'wb') pickle. dump ( serializable _ object, data _ file ) data _ file. close ( ) except exception as ex : print ( ex. message )
[ 0.20197415351867676, -1.0523170232772827, 0.4471997022628784, 0.8383296728134155, 0.38071221113204956, 0.4438118636608124, 0.6753080487251282, 0.9862682223320007, -0.44367778301239014, 0.02899380959570408, -1.1058803796768188, -0.07500801235437393, -0.44682085514068604, -0.6090279221534729...
def count ( lines ) : words = [ w for l in lines for w in l. strip ( ). split ( ) ] return counter ( words )
[ 0.9231261014938354, -0.656409502029419, 0.4499299228191376, -0.859332799911499, -0.31398123502731323, 0.48835158348083496, -0.7100071907043457, 0.8374351859092712, -0.2717815637588501, -0.2533916234970093, 0.14623510837554932, -0.6656238436698914, -0.09783482551574707, 0.8296676874160767, ...
def find _ files ( pid, pbcor ) : testdirs ='% s / science _ goal. * / group. * / member. *'% ( pid ) test = glob. glob ( testdirs ) pbcors = [ ] for t in test : testfile ='% s / product / % s'% ( t, pbcor ) test2 = glob. glob ( testfile ) for t2 in test2 : pbcors. append ( t2 ) print ( " found % d directories, with % ...
[ 0.07129981368780136, -0.7166538834571838, 0.5630408525466919, 1.574510097503662, 0.8236268162727356, 0.19295068085193634, 0.5890504717826843, -0.5705570578575134, -0.48089829087257385, 0.09860211610794067, -0.011198177002370358, -0.00794301275163889, -0.7372557520866394, 0.6053923964500427...
def _ _ init _ _ ( self, quats, times, source, dest, av = none ) : self. source = source self. dest = dest self. quats = quats self. times = np. atleast _ 1d ( times ) if av is not none : self. av = np. asarray ( av ) else : self. av = av
[ 0.001008656807243824, 0.49481287598609924, 0.5378067493438721, -0.6463726758956909, -0.9409956336021423, 0.11679399758577347, -0.4276931881904602, -0.5262516736984253, 0.8040148615837097, 0.6768704652786255, 0.01027724239975214, 0.33743566274642944, 0.9235213398933411, 0.5694752931594849, ...
def new _ event ( event ) : id = t. distinguishedfolderid ( id = event. calendar _ id ) if event. calendar _ id in distinguished _ ids else t. folderid ( id = event. calendar _ id ) start = convert _ datetime _ to _ utc ( event. start ) end = convert _ datetime _ to _ utc ( event. end ) root = m. createitem ( m. savedi...
[ -0.1634887158870697, 0.13058044016361237, 0.8109807968139648, -0.07381361722946167, -0.301347017288208, 0.3755732476711273, -0.020171182230114937, 0.1137554943561554, 0.5234885811805725, 0.3383164405822754, -0.029697977006435394, 0.2626612186431885, 0.6121375560760498, 0.04920835793018341,...
def get _ hsensors ( headers ) : sensor _ l = [ ] for i in ( headers [ 7 : ] ) : if i [ 0 ]! ='-': sensor _ l. append ( i ) return sensor _ l
[ -0.3109762370586395, -0.23289640247821808, 0.49775752425193787, 1.0730175971984863, 1.1911083459854126, 0.01970544084906578, -1.102527141571045, 0.5011759996414185, 0.5755806565284729, 0.2534656822681427, -1.4059009552001953, -0.1489553600549698, -0.7183085083961487, -0.22211198508739471, ...
def _ _ lt _ _ ( self, other ) : if type ( other ) is type ( self ) : if self. type! = other. type : return notimplemented elif isinstance ( other, discordentity ) : if self. type not in other. _ _ class _ _. _ _ name _ _ : return notimplemented else : return notimplemented return ( self. id < other. id )
[ -0.4328470826148987, -0.8823608756065369, 0.9342783689498901, -1.1070727109909058, 0.26387426257133484, 0.07466568052768707, -0.2623578906059265, -1.6014230251312256, 0.30019551515579224, -0.3545459806919098, -0.7140894532203674, 0.1383894383907318, -0.1313217580318451, 1.1494593620300293,...
def _ load _ vocabulary ( f ) : vocabulary = { } for row in f. readlines ( ) : name, idx _ = row. split ('\ t ', 2 ) vocabulary [ name ] = int ( idx _ ) - 1 return vocabulary
[ -1.029766321182251, -0.13575461506843567, 0.423036128282547, -1.1157456636428833, -1.4341869354248047, -0.8851585984230042, -0.14688226580619812, 0.1854899674654007, -1.6523138284683228, 0.8319398164749146, -0.7940042614936829, -0.8462054133415222, 0.5137545466423035, -0.2937832176685333, ...
def makeshell ( self, * args ) : return _ topods. topods _ builder _ makeshell ( self, * args )
[ -0.46731796860694885, 0.564352810382843, 0.16668926179409027, 0.4009895920753479, -0.6973162293434143, 0.8633499145507812, 0.67106693983078, -1.0587552785873413, -0.283712774515152, -1.1318652629852295, -0.0010244984878227115, 0.1176847442984581, -0.22551657259464264, -0.1887769103050232, ...
def remove _ register _ by _ name ( self, reg _ names : list [ str ] ) - > none : for reg in self. registers : if any ( reg. name in name for name in reg _ names ) : self. registers. remove ( reg )
[ -0.38000425696372986, 0.3261236548423767, 0.31592974066734314, 0.37984174489974976, 0.4571456015110016, -0.5228610634803772, -0.10551805794239044, 0.8157166242599487, -0.37377673387527466, 0.5089668035507202, -1.2544788122177124, -0.20282499492168427, -1.4759235382080078, 0.809808075428009...
def contains _ sequence ( dna1, dna2 ) : if dna2 in dna1 : return true else : return false
[ -0.3138631582260132, -0.5302537679672241, 0.5973110795021057, 0.3283177614212036, -1.2446715831756592, 0.12065008282661438, -1.3958734273910522, 0.10628018528223038, -0.3420049548149109, -0.002123703947290778, -0.400636225938797, 1.0232303142547607, -0.31429198384284973, 0.2583703100681305...
def plugin _ response _ handler ( ) : # recieving data from the plugin product _ id = request. json ['product _ id'] url = request. json ['url'] website _ name = request. json ['website _ name'] # checking if the product was already analyzed outdated = false product = is _ present ( website _ name, product _ id ) produ...
[ -0.44455716013908386, -1.4139677286148071, 0.7659429907798767, -0.3370368480682373, 0.27199628949165344, 0.2875857353210449, 0.0394144244492054, -0.48219233751296997, -0.10644469410181046, 0.740075945854187, -0.4838613271713257, 0.1691773384809494, -0.07878982275724411, -0.0635787025094032...
def add _ faiss _ index _ from _ external _ arrays ( self, external _ arrays : np. array, index _ name : str, device : optional [ int ] = none, string _ factory : optional [ str ] = none, metric _ type : optional [ int ] = none, custom _ index : optional [ " faiss. index " ] = none, # noqa : f821 train _ size : optiona...
[ -0.18032695353031158, 0.7052618265151978, 0.7205072045326233, 0.22250980138778687, -0.39087674021720886, -0.055208589881658554, -0.07864753156900406, 0.17296352982521057, 0.5534576773643494, 0.030608849599957466, -0.22973671555519104, 0.6677115559577942, 1.0157994031906128, -0.228038325905...
def getfastestrecommendedvsspeed ( ) : andor _ solis. getfastestrecommendedvsspeed. restype = ctypes. c _ uint index = ctypes. c _ int ( ) speed = ctypes. c _ float ( ) result = andor _ solis. getfastestrecommendedvsspeed ( ctypes. byref ( index ), ctypes. byref ( speed ) ) check _ status ( result ) return int ( index....
[ -0.2664215564727783, 0.16079013049602509, 0.39289164543151855, 0.32061463594436646, -0.269684761762619, -1.0335509777069092, 0.0528438463807106, -0.2955920696258545, 0.053190868347883224, 0.3282286822795868, 0.09374205023050308, 1.0702162981033325, -0.6507344841957092, 0.22757728397846222,...
def square ( value ) : new _ value = value * * 2 print ( new _ value )
[ -0.3851441740989685, -0.9810072779655457, 0.36934494972229004, 0.5296562910079956, -0.31464290618896484, 0.2821837365627289, 0.7204883694648743, -1.270434021949768, -0.205766960978508, -0.09971071779727936, -0.7388402223587036, 1.4577059745788574, 0.6067880392074585, 0.6083759069442749, ...
def drawtextrectangles ( text _ shapes, img ) : for shape in text _ shapes : top _ left _ corner = ( int ( shape [ 0 ] ), int ( shape [ 2 ] ) ) bottom _ right _ corner = ( int ( shape [ 1 ] ), int ( shape [ 3 ] ) ) cv2. rectangle ( img, top _ left _ corner, bottom _ right _ corner, ( 255, 0, 0 ), 5 )
[ -0.377079039812088, -0.2642766535282135, 0.608863115310669, -0.7480221390724182, 0.24770373106002808, 0.16414998471736908, -0.07715471088886261, 0.320913165807724, -0.5043556690216064, 0.9524754881858826, -0.38674241304397583, -0.9711301922798157, -0.6222312450408936, 0.2499394565820694, ...
def send ( to, subject, text ) : msg = mimemultipart ( ) msg ['from'] = gmail _ user msg ['to'] = to msg ['subject'] = subject msg. attach ( mimetext ( text ) ) mailserver = smtplib. smtp ( " smtp. gmail. com ", 587 ) mailserver. ehlo ( ) mailserver. starttls ( ) mailserver. ehlo ( ) mailserver. login ( gmail _ user, g...
[ -0.4498120844364166, 0.025747738778591156, 0.5878610610961914, -0.10950299352407455, -0.4497230350971222, 0.886111855506897, -0.649885892868042, -0.2334689199924469, -0.11444773524999619, -0.047959547489881516, -1.0622172355651855, 1.2306708097457886, -0.6259294748306274, -0.39766505360603...
def delete _ inbox _ messages ( ser ) : try : for i in xrange ( 26 ) : delete _ inbox _ message ( ser, i ) except exception : return {'success': false } return {'success': true }
[ -1.2799280881881714, 0.1861536055803299, 0.34141871333122253, 0.31171634793281555, 0.08459959924221039, -0.14003489911556244, -0.24898609519004822, -0.8382644653320312, 0.22243201732635498, -0.41459253430366516, -0.9596713185310364, -0.2450919896364212, -1.2939776182174683, 0.0791579484939...
def user _ trip _ duration ( filename ) : with open ( filename,'r') as f _ in : # set up csv reader object reader = csv. dictreader ( f _ in ) # initialize count variables total _ subscriber _ duration = 0 n _ subscribers = 0 total _ customer _ duration = 0 n _ customers = 0 # compute the total duration for each type o...
[ 0.004346827976405621, -0.0668240487575531, 0.5950220823287964, 0.20644977688789368, 0.031261082738637924, 0.247219517827034, 0.5112845301628113, 0.32784339785575867, -0.7363650798797607, 1.4043316841125488, 0.00638869171962142, 0.34232839941978455, 0.6066009402275085, 0.6592780351638794, ...
def binaryusagecode ( self ) : code = 0 s = 1 for c in self. comps : if c > 0 : code + = s s * = 2 return code
[ -0.15929490327835083, -0.5662145018577576, 0.824665904045105, 0.19238443672657013, 0.7437539100646973, -0.3478262424468994, 0.892116129398346, -0.13302765786647797, 0.0006987922824919224, -0.06746111810207367, -0.06497399508953094, 0.33539506793022156, -0.5327648520469666, 0.82516115903854...
def _ _ init _ _ ( self, * args, * * kwargs ) : super ( videocrawler, self ). _ _ init _ _ ( * args, * * kwargs ) self. setvar ('category ','video') # setting a video tag self. settag ('video ', self. pathholder ( ). basename ( ) )
[ 0.1947324275970459, 0.2466440349817276, 0.4332521855831146, 1.221840739250183, 0.5605538487434387, 0.18326503038406372, 0.34702542424201965, -0.11918044090270996, 0.0581040158867836, -0.589475691318512, -0.13667809963226318, 0.5832298994064331, 0.4268401265144348, 1.6200319528579712, -0....
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, filters : optional [ pulumi. input [ sequence [ pulumi. input [ pulumi. inputtype ['networkpacketcapturefilterargs'] ] ] ] ] = none, maximum _ bytes _ per _ packet : optional [ pulumi. input [ int ] ] = none, max...
[ -0.5384573340415955, -0.026546550914645195, 0.6768164038658142, -0.13722142577171326, -0.38340848684310913, 0.11103936284780502, -0.32276344299316406, -0.4393236041069031, 1.2091827392578125, -0.24171942472457886, -0.8360961675643921, 0.1231863722205162, 0.7617307305335999, -0.286205321550...
def euclidian _ norm ( self ) : return np. sqrt ( np. sum ( np. power ( self. _ a _ original. flatten ( ), 2 ) ) )
[ 0.39318639039993286, -0.9575411081314087, 0.3416121304035187, 0.016193831339478493, -0.08044146001338959, -0.7734816670417786, 0.9490147829055786, 0.9100874662399292, 0.1560305953025818, 0.05303243175148964, 0.09869302064180374, 0.5394086837768555, 0.13466951251029968, 0.0986199602484703, ...
def _ _ init _ _ ( self, path _ format : str ) : self. _ path _ format = path _ format # not intended for use, but keeping in case, for now if'{'not in path _ format : rootdir = ensure _ slash _ suffix ( path _ format ) # if the path _ format is equal to the _ prefix ( i. e. there's no { } formatting ) #... append a fo...
[ -0.03827748820185661, -0.6833946108818054, 0.704272985458374, 0.29294899106025696, -0.8063289523124695, -0.3875774145126343, 0.4485255777835846, 0.641379177570343, -0.49100643396377563, -0.8264579176902771, 0.4992750883102417, -0.6909062266349792, 0.4689948856830597, 0.6009798049926758, ...
def get _ item ( klass, name ='obj ', param _ name ='id ', filter _ key ='id') : def _ get _ item ( func ) : def wrapper ( * args, * * kwargs ) : if filter _ key not in kwargs : raise exception ('guarded handler for " % s " but it was not in params'% filter _ key ) filter _ kwargs = { } filter _ kwargs [ filter _ key ]...
[ -0.12474346905946732, -0.1690422147512436, 0.8646588921546936, 0.10122880339622498, -0.39736270904541016, -0.020279238000512123, -0.12229819595813751, -0.5609498620033264, -0.3255752921104431, 0.9466190934181213, 0.27048054337501526, 0.31075170636177063, 0.2541683614253998, -0.226302996277...
def plot _ gmm ( gmm ) : gauss1 = distribution ( mu = np. array ( gmm. mu [ 0 ] ), sigma = np. asarray ( gmm. sigma [ 0 ] ) ) gauss2 = distribution ( mu = np. array ( gmm. mu [ 1 ] ), sigma = np. asarray ( gmm. sigma [ 1 ] ) ) n = 256 x = np. linspace ( 0, 512, n ) y = np. linspace ( 0, 512, n ) x, y = np. meshgrid ( x...
[ 0.3133653998374939, 0.4951004385948181, 0.9338517785072327, -0.16145536303520203, -0.3030034601688385, 0.64801424741745, 0.9689705967903137, 0.08363690227270126, 0.5670264363288879, 0.05515583977103233, -0.21138334274291992, 0.8466876745223999, -0.38497230410575867, 0.7031823396682739, 0...
def test _ customuserform ( ) : form = customuserform ( ) assert hasattr ( form, " helper " ) assert hasattr ( form. helper, " layout " )
[ 1.2485244274139404, 0.08856718242168427, 0.09264954924583435, -0.03641370311379433, -0.2769705355167389, 0.3647938072681427, 1.311039924621582, 0.3457539975643158, 0.5428937077522278, -2.391160249710083, -0.9405663013458252, -0.6742091178894043, 0.9461581110954285, 0.3401256799697876, 0....
def load _ images ( images _ path, as _ array = true ) : file _ list = os. listdir ( '. / hbtn') images = [ ] file _ names = [ ] for file in sorted ( file _ list ) : path = images _ path +'/'+ file image = cv2. imread ( path ) image = cv2. cvtcolor ( image, cv2. color _ bgr2rgb ) images. append ( image ) file _ names. ...
[ -0.6023745536804199, -0.4199519455432892, 0.5608862638473511, 0.2456735223531723, 0.5449213981628418, -0.06664912402629852, 0.09650565683841705, -0.2348422408103943, -0.25323987007141113, 0.859561562538147, -0.16118274629116058, -0.3817175626754761, 0.38697534799575806, 1.1508677005767822,...
def plot _ galaxy _ int _ observational _ data ( axis, property ) : # first check if axis scale is log or not. if so all zeros are converted to small numbers. log = false if axis. get _ yaxis ( ). get _ scale ( ) = ='log': log = true if property = ='z'or'o / h'in property : if property = ='z': key _ name ='metal _ z _ ...
[ 0.021377934142947197, 0.31935060024261475, 0.8847214579582214, -0.2691793143749237, 0.16478917002677917, 0.3017306327819824, 0.037079859524965286, 0.003130990779027343, -0.6062520146369934, 0.1701919138431549, 0.5162619352340698, 1.0301281213760376, 0.381717324256897, 0.22660313546657562, ...
def set _ all _ tracks ( self, attr, value ) : for track in self. tracks. values ( ) : if hasattr ( track, attr ) : # if the feature has the attribute if getattr ( track, attr )! = value : setattr ( track, attr, value ) # set it to the passed value
[ 0.02230069227516651, -0.6831706166267395, 0.7013973593711853, 0.3525773882865906, -0.12362557649612427, 0.2670802175998688, -0.08124588429927826, 0.022014010697603226, -1.196607232093811, 0.36749669909477234, 0.07215221226215363, 0.07333200424909592, 0.3380131423473358, 1.4291425943374634,...
def update _ product ( products : list [ productmodel ], token : optional [ str ] = header ( none ) ) : token _ decoded = decode _ token ( token ) if ( token _ decoded = = none ) : return {'msg':'token is required'} controller = productcontroller ( ) id _ product = controller. search _ by _ body ( products [ 0 ], token...
[ -1.1302076578140259, -0.7164340019226074, 0.4318629801273346, 0.5171273350715637, 0.36980128288269043, 0.38419991731643677, -0.4489463269710541, -0.7513413429260254, -0.1512473225593567, 0.40409570932388306, -1.066173791885376, -0.20588985085487366, -0.7101650834083557, -0.6383661031723022...
def get _ all _ ds _ privileges ( tenant _ uuid ) : logging. debug ( " get _ all _ ds _ privileges " ) err _ msg, _ auth _ mgr = get _ auth _ mgr ( ) if err _ msg : return err _ msg, none if _ auth _ mgr. allow _ all _ access ( ) : return none, _ auth _ mgr. get _ all _ ds _ privileges _ dict ( ) privileges = [ ] try :...
[ -0.6718186736106873, 0.7809121012687683, 0.6927624940872192, 0.25900793075561523, 0.1035645455121994, -1.2861359119415283, -0.8798878788948059, 0.8855376839637756, 0.20171280205249786, 0.1281554400920868, 0.24963971972465515, 0.48927995562553406, 0.3651979863643646, 0.2615204453468323, 0...