text
stringlengths
25
2.19k
embedding
listlengths
768
768
def run _ calcs ( self, places ) : self. place = places self. coords = self. get _ coords ( self. places ) self. total _ km = self. calc _ distance ( self. coords ) self. carbon _ eq = self. calc _ carbon ( self. total _ km ) print ( " carbon emission eq : ", self. carbon _ eq ) return self. carbon _ eq
[ -0.0831715390086174, -0.33299243450164795, 0.48428481817245483, 0.24205711483955383, -0.18059150874614716, 0.3224339783191681, 0.6271559000015259, 0.30097082257270813, -0.4710926115512848, 0.009905709885060787, -0.6579064130783081, -0.6001495718955994, -0.6056841611862183, 0.68095463514328...
def element _ text _ should _ not _ contain ( self, name, text ) : selector = self. get _ web _ element _ selector ( name ) self. element _ should _ not _ contain ( selector, text )
[ -0.4722793698310852, -0.27410516142845154, 0.227301225066185, 0.512799084186554, -0.487505704164505, 0.9137584567070007, 0.049957845360040665, 0.0584891252219677, 0.6089046597480774, 0.10197640210390091, -0.43186232447624207, -0.316288024187088, -1.254398226737976, 0.09123184531927109, -...
def test _ list _ integer _ min _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 3. xsd ", instance = " nistdata / list / ...
[ -0.0702584758400917, -0.4606155455112457, 0.41689854860305786, 0.22730349004268646, -0.5476005673408508, 0.2601882219314575, -0.5231717824935913, -0.06680190563201904, 1.0846532583236694, 0.8765936493873596, -1.2897969484329224, 0.14942535758018494, -0.6350418329238892, 0.4954119324684143,...
def wireshark ( self ) : if not mainwidgets [ " main " ]. isrunning ( ) : mainwidgets [ " log " ]. append ( " you must start the topology first! " ) return progname = " wireshark " if environ [ " os " ] = = " windows " : progname + = ". exe " if core. util. progexists ( progname ) : outfile = environ [ " tmp " ]. repla...
[ 0.7157385349273682, 0.026461269706487656, 0.784501850605011, -0.554405927658081, 0.5342110395431519, 0.2806936800479889, 0.9427408576011658, -0.8354742527008057, -0.4768345057964325, -0.4135192930698395, -0.09743790328502655, 0.7412182688713074, -0.48734936118125916, 0.7971383929252625, ...
def delete _ user _ pool ( userpoolid = none ) : pass
[ -0.24640639126300812, -0.22312739491462708, -0.07708337903022766, 1.373373031616211, 0.047623515129089355, 0.5406346321105957, 1.4032957553863525, -0.302139550447464, 1.2647382020950317, -0.16411657631397247, -0.7560510635375977, 1.6725835800170898, -0.9048012495040894, -0.4775362610816955...
def _ grow _ ones ( ll ) : ur = ( ll [ 0 ] - 1, ll [ 1 ] - 1 ) maxarea = _ area ( ll, ur ) xmax = n for iy in xrange ( ll [ 1 ], m ) : if data [ n * iy + ll [ 0 ] ] = = 0 : break # we use cache directly # for each iy, we already know continuous'1'at this row xmax = min ( cache [ iy ] + ll [ 0 ], xmax ) ix = xmax - 1 ur...
[ -0.6923280358314514, 1.0151453018188477, 0.7271379828453064, 0.22988639771938324, -0.3679766058921814, -0.23619160056114197, 1.353797435760498, 0.05700143799185753, 0.8423641920089722, 0.06703794002532959, 0.2183096706867218, -0.6178770661354065, -0.21878303587436676, 0.15413512289524078, ...
def test _ list _ integer _ length _ nistxml _ sv _ iv _ list _ integer _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 1. xsd ", instance = " nistdata / list / integer / schema + ...
[ -0.5809921622276306, -0.01942109316587448, 0.3916926980018616, 0.6513640880584717, -0.15399841964244843, 0.018186841160058975, -0.010760457254946232, 0.6935892105102539, 1.51706063747406, 0.9813592433929443, -0.8260140419006348, -0.4212495684623718, -0.5067415833473206, 1.0354336500167847,...
def get _ stance _ size ( num ) : square = 1 i = 1 while square < num : square = i * i i + = 1 return i
[ -0.526489794254303, 0.5508538484573364, 0.6054815649986267, -0.19810758531093597, -0.580467164516449, -0.7414785027503967, 1.3441280126571655, -0.3582117557525635, 0.6827955842018127, -0.5654473900794983, -0.9012525677680969, -0.34130382537841797, -0.9239566922187805, -0.41139766573905945,...
def test _ server _ httperror _ code _ 404 ( self ) : with self. assertraises ( httperror ) : test _ endpointname = " / api / sys / testing " cmd = baserestendpointtest. curl _ cmd6. format ( test _ endpointname ) logger. info ( " executing cmd = { } ". format ( cmd ) ) urlopen ( cmd )
[ -0.5354088544845581, -0.506733775138855, 0.35796114802360535, 0.46224427223205566, 1.1463134288787842, 0.3575625717639923, 0.6816983819007874, 0.4983552396297455, -0.3214693069458008, -0.40346506237983704, -0.3953231871128082, 0.25934064388275146, -0.7984169721603394, 0.3861319422721863, ...
def _ format _ data ( self, data : curve. curvedata ) - > curve. curvedata : # take average over the same x value by regenerating sigma from variance of y values series, xdata, ydata, sigma, shots = multi _ mean _ xy _ data ( series = data. data _ index, xdata = data. x, ydata = data. y, sigma = data. y _ err, shots = ...
[ 0.44272303581237793, -0.32090523838996887, 0.6560606956481934, -0.7097688913345337, -0.487373948097229, 0.017112884670495987, -0.4638679325580597, -1.0784871578216553, 0.7784097790718079, 0.3995143473148346, 0.6094548106193542, 1.3253782987594604, 1.0447696447372437, 0.44839802384376526, ...
def normalize ( array ) : array - = array. min ( ) array / = array. max ( ) return array
[ -0.2040240466594696, -0.6829367280006409, 0.5057862997055054, 0.6363083124160767, -0.2573411166667938, 0.518166720867157, 0.002003788948059082, -0.12566430866718292, 0.9115120768547058, -0.04061416536569595, 0.08254844695329666, 0.0703461542725563, -1.1744694709777832, 0.19412031769752502,...
def prepare ( self, class _ map = none ) : def clean _ name ( name ) : " " " " abc, 123 " : " abc " : param name : : return : " " " " " " returns a shorter version of object names for cleaner display. " " " return ", ". join ( name. split ( ", " ) [ : 1 ] ) # build ( or rebuild ) everything else from the info dicts. se...
[ -0.815430760383606, -0.004158760886639357, 0.9012992978096008, -0.3693905770778656, -0.1675199419260025, 0.10641279071569443, 0.5691241025924683, 0.34878650307655334, 0.4245499074459076, -0.3015112578868866, -0.5845695734024048, 0.592927098274231, 0.3141533434391022, 0.6638005375862122, ...
def save ( self, model = none, model _ path = none, titles _ meta = none, titles _ path = none, outpath = none, vocab = none, concepts _ only = false, concepts _ prefix ='id ', concepts _ postfix ='di ', protocol = 2, log _ every = 0 ) : import gensim import pickle # open the model if necessary if model = = none : mode...
[ -0.2901421785354614, -0.15555766224861145, 0.7392568588256836, -0.1221972331404686, 0.07640676945447922, -0.3573499917984009, 0.488834947347641, 0.13011600077152252, 0.22959686815738678, 0.0055174208246171474, -0.5810061693191528, -0.04532720893621445, 0.12881530821323395, 0.26761311292648...
def _ add _ registry _ deletes ( self, node, calls ) : regdeletes = calls [ ( ( calls ['api'] = ='regdeletevaluea') | ( calls ['api'] = ='regdeletevaluew') | ( calls ['api'] = ='ntdeletekey') ) & ( calls ['status'] = = true ) ] for i, regdelete in regdeletes. iterrows ( ) : regname = none for arg, val in regdelete ['ar...
[ -0.3116276264190674, 0.76915043592453, 0.6219292283058167, -0.6110438108444214, 1.5024369955062866, -0.06393039971590042, 0.1548682004213333, 0.4722422659397125, 0.6467373371124268, 0.675613284111023, 0.15686443448066711, 0.8746207356452942, -0.04427112638950348, 0.3354014754295349, 0.45...
def emd _ calc ( a, b, m ) : # print ( f " { a. shape = }, { b. shape = }, { m. shape = } " ) g0 = ot. emd ( a, b, m ) # this is the optimal transport matrix return ( g0 * m ). sum ( ) # this is the wasserstein distance ( divide by g0. sum ( ) if it is not 1 )
[ 0.9446554183959961, -0.23146088421344757, 0.4910074472427368, -0.03948186710476875, -0.4942515790462494, 0.34393811225891113, 0.12891581654548645, 0.8881075382232666, 0.0882565975189209, 0.4395802915096283, 0.2724817395210266, 0.27145329117774963, -0.7133408188819885, 0.3048596680164337, ...
def handleinsert ( request ) : insert _ type = request. get. get ('type ','' ) if insert _ type = ='loyalty': object _ id = config. loyalty _ class _ id api _ object = loyalty. generate _ loyalty _ class ( config. issuer _ id, object _ id ) collection = service. loyaltyclass ( ) elif insert _ type = ='offer': object _ ...
[ -1.1262407302856445, -0.0039380923844873905, 0.9628897309303284, -0.11765788495540619, 0.8994544744491577, 0.605492889881134, -0.13266506791114807, -0.8054645657539368, 0.3388475775718689, 0.2940919101238251, -0.2758179306983948, -0.4056451618671417, -0.6829882860183716, 0.1209037080407142...
def solve ( num _ wizards, num _ constraints, wizards, constraints ) : conspairs = dict ( ) for wizard in wizards : for otherwizard in wizards : if wizard! = otherwizard : conspairs [ alphabetizepair ( ( wizard, otherwizard ) ) ] = set ( ) for constraint in constraints : conspairs [ alphabetizepair ( ( constraint [ 0 ]...
[ -0.3436709940433502, -0.37057316303253174, 0.7922161817550659, 0.34446966648101807, -0.07466726750135422, -0.7623446583747864, 0.8906998038291931, 0.31228718161582947, 0.36087778210639954, 0.8110666871070862, -0.3879556953907013, -0.09880828857421875, -1.1704623699188232, 0.533317387104034...
def rs _ check _ table _ def ( psql, db, tables, schemaname ) : query ='''select " column " from pg _ table _ def where tablename = % ( tablename ) s \ and schemaname = % ( schemaname ) s'''for table in tables : param _ dict = {'tablename': table,'schemaname': schemaname, } msg = query % param _ dict result = psql. run...
[ 0.16848628222942352, 0.6920933127403259, 0.769433856010437, 1.0618393421173096, 0.00773676997050643, -0.052915483713150024, -0.3008100092411041, 0.0855107456445694, -1.245565414428711, 0.8033541440963745, -0.18011537194252014, 0.3475637435913086, -0.3406439423561096, 0.7109555006027222, ...
def science _ slit ( self ) : return self. bitmask. flagged ( self. mask,'science')
[ 0.5177980661392212, 0.6759198904037476, 0.38346007466316223, 0.14633844792842865, 0.6716002821922302, 1.024705410003662, -0.1745157390832901, -1.2621054649353027, 0.934127688407898, -0.44947540760040283, 0.8696654438972473, 1.9694005250930786, -0.46277421712875366, 0.06838393211364746, -...
def l2norm ( pair ) : a = pair [ 0 ] b = pair [ 1 ] return ( ( b [ 0 ] - a [ 0 ] ) * * 2 + ( b [ 1 ] - a [ 1 ] ) * * 2 ) * * 0. 5
[ -0.37521475553512573, -1.1240227222442627, 0.6953682899475098, -0.41651830077171326, -1.1812185049057007, -0.6692118048667908, 0.06558434665203094, 0.10622468590736389, -0.8716748356819153, 0.1359161138534546, -0.2816924452781677, 0.8201249241828918, -0.2097425013780594, -0.489739507436752...
def write _ story ( ) : url ='http : / / www. washingtonpost. com'elements = format _ elements ( * soupify ( url ) ) filename ='wapo _ top _ story. txt'with open ( filename,'w') as story : for e in elements : story. write ( e ) story. write ('\ n \ n') story. write ('= = = = = = = =')
[ -0.24969621002674103, -0.3043118715286255, 0.4097636938095093, 0.2803305387496948, 0.9176019430160522, 0.47825393080711365, 0.3073922395706177, 0.9595675468444824, 0.2548435926437378, -0.025172624737024307, -0.6890458464622498, -0.14537747204303741, 0.8897631764411926, 0.013229980133473873...
def reset ( self ) : paths = [ ] for filename in os. listdir ( self. cached _ repo ) : if filename. startswith ( ". git " ) : continue path = os. path. join ( self. cached _ repo, filename ) if os. path. isfile ( path ) : paths. append ( path ) elif os. path. isdir ( path ) : for model in os. listdir ( path ) : paths. ...
[ -0.1559297889471054, -0.13445428013801575, 0.32864734530448914, -0.09923365712165833, 0.11635720729827881, 0.023893386125564575, 0.5406540036201477, 0.16524162888526917, -0.7541971802711487, 0.39555680751800537, -0.19003961980342865, 0.4284358024597168, 0.08691611140966415, 0.3711460232734...
def append ( self, pp ) : self. _ _ processors. append ( pp )
[ -0.6198309659957886, 0.13048626482486725, 0.6641911268234253, -0.37458163499832153, 0.06138865277171135, 1.182496428489685, -1.3420722484588623, 0.11896170675754547, 0.5326722264289856, -0.08087120205163956, -0.09321047365665436, 0.44572263956069946, -1.575866937637329, 0.5968900918960571,...
def _ _ init _ _ ( self, idf _ corpus, word2vec _ file ) : self. w2v _ vectors = none # set this attribute to a keyedvectors instance with loaded weights self. tfidf _ vectorizer = none # set this attribute to a tfidf vectorizer that is fit to idf _ corpus
[ 0.3446062207221985, -0.7486816048622131, 0.28400206565856934, -0.03526885062456131, 0.37305334210395813, 0.22114160656929016, 0.34177395701408386, 0.021024253219366074, -1.189186453819275, -0.3547744154930115, 0.27988308668136597, -0.07262597978115082, -0.5728680491447449, 1.10930609703063...
def true _ online _ td _ lambda _ weight _ update ( weights, features _ next _ state, features, value _ old, reward, z, lam, gamma, learning _ rate ) : # true online td - lambda update value = np. dot ( weights, features ) value _ next _ state = np. dot ( weights, features _ next _ state ) td _ error = reward + gamma *...
[ 0.2163938581943512, -0.5298520922660828, 0.4889642894268036, -0.5715576410293579, -0.5942102074623108, 0.24485372006893158, -0.43058159947395325, 0.33603981137275696, -0.37221068143844604, 1.0642303228378296, -0.10255410522222519, -0.1821640431880951, 0.6560552716255188, -0.591959714889526...
def test _ list _ integer _ min _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 4. xsd ", instance = " nistdata / list / ...
[ -0.1362823247909546, -0.4534965455532074, 0.2736181914806366, 0.19509950280189514, -0.4122672975063324, -0.08083756268024445, -0.585981011390686, -0.12801708281040192, 1.2275243997573853, 0.2993268370628357, -0.9507336020469666, -0.5426952838897705, -1.0405702590942383, 0.20475198328495026...
def cluster ( self ) : self. kmeans _ ret = self. kmeans _ obj. fit _ predict ( self. descriptor _ vstack )
[ 0.24031268060207367, 0.12717562913894653, 0.2431456446647644, 0.6384378671646118, 0.3853132426738739, -0.3680078089237213, 0.2255956530570984, 0.7005957365036011, 0.1546303778886795, 0.18662624061107635, 0.538925290107727, 1.984122395515442, 0.2095368355512619, -0.6331009268760681, -0.11...
def build ( self ) : super ( reactionparameterblock, self ). build ( ) self. _ reaction _ block _ class = reactionblock # reaction index self. rate _ reaction _ idx = set ( initialize = [ " r1 ", " r2 " ] ) # smoothing factor self. eps = param ( mutable = true, default = 1e - 8, doc = " smoothing factor ", units = pyun...
[ 0.10448415577411652, 0.058595530688762665, 0.9100251197814941, 0.2464449405670166, 0.39714810252189636, -0.5476441383361816, 0.1136685460805893, -0.12537409365177155, -0.7231757640838623, -0.29435041546821594, -0.9311605095863342, 0.12516213953495026, 0.3815755248069763, 0.1308909952640533...
def have _ all _ finished ( self ) : return set ( self. _ keys ) = = set ( self. _ results. keys ( ) )
[ -0.4886941611766815, -0.42616140842437744, 0.4166279137134552, 0.3592492640018463, 0.15627308189868927, 0.2817174196243286, -0.42555031180381775, -0.8579139113426208, -1.085191011428833, 0.319487601518631, -1.0365756750106812, -0.5189788341522217, -0.5623611807823181, 0.912704348564148, ...
def tag ( self ) : return ( f " { self. component _ name } [ parametric " f " { self. bulge _ prior _ model _ tag } " f " { self. disk _ prior _ model _ tag } " f " { self. envelope _ prior _ model _ tag } " f " { self. align _ bulge _ disk _ tag } " f " { self. align _ bulge _ envelope _ centre _ tag } " f " { self. l...
[ 0.8860889077186584, -1.1275912523269653, 0.5302306413650513, -1.276835560798645, 0.9916313290596008, 0.37126651406288147, -0.3376753032207489, -0.5041706562042236, -0.7688717246055603, 0.534529983997345, -0.21498574316501617, -0.08729833364486694, 0.221919983625412, 0.6256725192070007, -...
def _ _ init _ _ ( self, object _ type = none, product _ id = none, reference _ name = none, last _ updated = none, name _ by _ locale = none, status = none, stage = none, editable _ state = none, purchasable _ state = none, promotable _ state = none, links = none, pricing = none ) : # type : ( optional [ producttype _...
[ 0.06504998356103897, -0.14333759248256683, 0.8192085027694702, 0.30392444133758545, -0.2419743835926056, -0.0013229805044829845, 0.29144248366355896, 0.596133291721344, 1.348240852355957, 0.817065417766571, 0.08588194847106934, 0.6578506827354431, 0.06346076726913452, 0.13080327212810516, ...
def removeaprreg ( self, date ) : del self. aprreg [ date ]
[ -0.532448410987854, 0.5336287617683411, 0.34460556507110596, -1.3176969289779663, -0.9822393655776978, 0.3398635983467102, -0.649276077747345, 0.15280389785766602, 0.05998947471380234, 0.43721550703048706, -0.13145795464515686, 0.07729792594909668, -0.6913410425186157, -0.09236188232898712...
def generatechipimports ( ) : import parser _ browser as bp # import needs to be removed otherwise # if parser _ browser. py is to be run alone sys. stdout. write ( " \ n > auto - importing bookmarks : " ) # todo : add the config setup check before this for paths with spinner ( ) : if ( _ _ import _ gc ) : try : for ch...
[ 0.3318251967430115, -0.022999515756964684, 0.6513170599937439, 0.9042931199073792, -0.10407520085573196, 0.540742814540863, 0.7191756367683411, -0.624552309513092, -0.25797343254089355, 0.3529343008995056, -0.042802125215530396, 0.4265030026435852, -0.755447268486023, 0.7526358962059021, ...
def insertionsort ( l ) : result = l [ : ] lengthdata = len ( result ) start = 1 while start < = lengthdata - 1 : if result [ start ] < result [ start - 1 ] : value = result. pop ( start ) # find insertion point for i in range ( start ) : if result [ i ] > value : result. insert ( i, value ) break start + = 1 return re...
[ -0.3769158124923706, 0.8747249245643616, 0.5255638957023621, -0.35015687346458435, -0.7493506073951721, 0.08736464381217957, 0.7239820957183838, -0.8704928159713745, -0.31440380215644836, 0.008089819923043251, -0.83492511510849, -0.27540671825408936, -1.606632113456726, 0.23021961748600006...
def test _ atomic _ id _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 3. xsd ", instance = " nistdata / atomic / id / schema + instance...
[ 0.19238640367984772, 0.0017681902972981334, 0.5502039194107056, 0.44905298948287964, -0.17738468945026398, 0.6260519623756409, -0.2808208763599396, -0.05048586055636406, 0.7972875237464905, 1.0729938745498657, -0.1496547907590866, 0.24392516911029816, 0.09965921938419342, -0.56468164920806...
def install _ path ( self, dst _ sw, last _ port, match, event ) : p = _ get _ path ( self, dst _ sw, event. port, last _ port ) if p is none : log. warning ( " can't get from % s to % s ", match. dl _ src, match. dl _ dst ) import pox. lib. packet as pkt if ( match. dl _ type = = pkt. ethernet. ip _ type and event. pa...
[ 0.06492987275123596, 0.1456102877855301, 0.7880006432533264, -0.7911260724067688, -0.19617639482021332, -0.5933773517608643, 0.19782695174217224, -0.21499034762382507, -0.35983651876449585, 0.061621736735105515, -0.08419245481491089, -0.8842760920524597, -0.11026772856712341, -0.5015225410...
def connect ( self, server = none, port = none ) : outdebug ('connect') with self. lock : self. _ connect1 ( server, port )
[ -1.079277753829956, -0.38979971408843994, 0.31808024644851685, 1.496175765991211, -0.288079172372818, 0.1970221996307373, 0.16179046034812927, -0.3495939075946808, -0.796566903591156, -0.33493873476982117, -0.4343181550502777, 0.6220930218696594, -0.9989845156669617, 0.5894586443901062, ...
def community _ metrics ( ) : body = request. get _ json ( ) metric _ list = body [ " metrics " ] if " metrics " in body else [ ] metric _ fns = { metric _ name : supported _ metrics [ metric _ name ] for metric _ name in metric _ list if metric _ name in supported _ metrics } metrics = metric. merge _ metrics ( metric...
[ -0.17378097772598267, 0.8829779028892517, 0.49568039178848267, 0.8453848361968994, 0.0008432122995145619, 0.08033622056245804, -0.05211510881781578, -0.3844483494758606, -0.3810136914253235, 0.2162722796201706, 0.12060151249170303, -0.6470562815666199, -0.2492026537656784, 0.23126278817653...
def combine _ data _ to _ single ( data _ list : list, snwe _ list : list, latlon _ step _ list : list, method : optional [ str ] ='mean ', latlon _ step : optional [ list ] = [ - 0. 000833334, 0. 000833334 ] ) \ - > tuple [ ndarray, ndarray, list ] : # get the maximum extent of all data n = len ( data _ list ) snwe _ ...
[ -0.07296369224786758, 0.688064455986023, 0.7973213791847229, 0.388936847448349, 0.19602008163928986, 0.646102249622345, -0.21554899215698242, 0.6007903218269348, -0.2541621923446655, 0.8328977227210999, -0.14653803408145905, 0.32294097542762756, 0.4515090584754944, 0.9210947155952454, -0...
def whoami ( ctx ) : return ctx. run ('whoami'). stdout. strip ( )
[ 0.443649023771286, -0.45462340116500854, 0.5528542995452881, 0.5662227272987366, 0.24617668986320496, 0.03568606823682785, -0.2764644920825958, -0.9362050294876099, -0.22065861523151398, -0.723150372505188, 0.27892106771469116, 0.7309510707855225, -0.6489242315292358, -0.17179028689861298,...
def _ run _ cmds ( self, raw ) : # if don't have a list of cmds make a single cmd list if isinstance ( raw, list ) : cmds = raw else : cmds = [ raw ] # run each command in turn for raw _ cmd in cmds : # make sure we have env _ root when needed if raw _ cmd. count ('% ( env _ root ) s') and len ( self. _ env _ dir ) = =...
[ -1.3970673084259033, 0.26495784521102905, 0.6114875078201294, -0.1947127878665924, 0.24428504705429077, -0.4680212140083313, -0.15239986777305603, 0.17827248573303223, -0.1762883961200714, -0.8017268776893616, 0.19699957966804504, 0.058355964720249176, 0.2143632024526596, 0.916013181209564...
def sendmsg ( s, to, data, control, flags ) : # create ctypes buffers and pointers from our structures. we need to hang on # to the underlying python objects, because we don't want them to be garbage # collected and freed while we have c pointers to them. # convert the destination address into a struct sockaddr. if to ...
[ 0.5933375954627991, 0.7845466136932373, 0.949862003326416, -0.9258719086647034, -0.05277172476053238, -0.6774178147315979, -0.17488567531108856, -0.8545584082603455, 0.04070770740509033, -0.2961466312408447, -0.026792272925376892, 0.24407675862312317, -0.8337199091911316, 0.080074526369571...
def word2vec _ model ( sentences, size = 100, min _ count = 5, window = 5, negative = 5, cbow = true, iterations = 5, seed = 0, workers = 1 ) : sg = not cbow model = word2vec ( sentences = sentences, size = size, window = window, min _ count = min _ count, workers = workers, sg = sg, seed = seed, negative = negative ) ...
[ 0.4767082929611206, 0.05259493365883827, 0.6405816078186035, 0.12437429279088974, -0.9827769994735718, 0.18358977138996124, 0.5271024703979492, -0.622617244720459, -0.24976111948490143, 0.591158390045166, -0.12213979661464691, 0.21417711675167084, 0.42098596692085266, 0.21164833009243011, ...
def get ( self, type : type [ t ], query : mapping [ str, any ] ) - > t : logger. info ( " getting sourcehandlers for \ " { type } \ " ". format ( type = type. _ _ name _ _ ) ) try : handlers = self. _ get _ types [ type ] except keyerror : try : logger. info ( " building new sourcehandlers for \ " { type } \ " ". form...
[ -1.121387004852295, 0.08774488419294357, 0.4924852252006531, -0.7258052229881287, 0.06702929735183716, -0.4395027160644531, -0.614966094493866, -1.1313766241073608, 0.2939365804195404, 0.17336973547935486, -0.4218998849391937, 0.4317968189716339, -0.5518808960914612, 0.07338382303714752, ...
def test _ atomic _ qname _ min _ length _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 1. xsd ", instance = " nistdata / atomic / qn...
[ 0.29364949464797974, -0.8326602578163147, 0.4120790958404541, 0.15104025602340698, -0.6614890098571777, 0.17118097841739655, -0.37902334332466125, -0.8005815148353577, 0.4146677553653717, 0.31688740849494934, -0.4633326232433319, 0.2339686006307602, -0.19690820574760437, 0.0916454121470451...
def _ _ init _ _ ( self, billing _ address1 = none, billing _ address2 = none, billing _ city _ name = none, billing _ country _ name = none, billing _ full _ name = none, billing _ postal _ code = none, billing _ state _ name = none, cart _ id = none, created _ date = none, currency = none, current _ fulfillment _ sta...
[ 0.6916179656982422, -0.6446541547775269, 0.8890300989151001, 0.22926339507102966, -0.025909962132573128, -0.7615141272544861, -0.2093326300382614, -0.5825014114379883, 0.5839729309082031, -0.17659880220890045, -0.2853052616119385, 0.011097410693764687, 0.4675847589969635, 0.012872120365500...
def update _ state _ bird ( ) : search _ input = input ('enter the state to update :') if search _ input in state _ list. keys ( ) : new _ bird = input ('enter bird name :') state _ list [ search _ input ] ['state bird'] = new _ bird print ( " state name : ", search _ input, " \ n bird : ", state _ list [ search _ inpu...
[ -0.8516950607299805, -0.21827386319637299, 0.6124306321144104, -0.09515069425106049, -0.7248389720916748, 0.7003737688064575, -0.40543681383132935, 0.2839333713054657, -0.4305790364742279, 0.640974223613739, -1.071663498878479, 1.3539596796035767, -0.8534402847290039, 0.6868039965629578, ...
def test _ sign _ hmac _ sha1 ( self ) : self. assertraises ( valueerror, sign _ hmac _ sha1, self. control _ base _ string, self. client _ secret, self. resource _ owner _ secret ) sign = sign _ hmac _ sha1 ( self. control _ base _ string, self. client _ secret. decode ('utf - 8'), self. resource _ owner _ secret. dec...
[ 0.01761540398001671, -0.21668727695941925, 0.24931028485298157, 0.2945869266986847, 0.9309501051902771, 0.3908449709415436, -0.2295456975698471, 0.30247408151626587, -0.015789128839969635, -0.1134527400135994, -0.23259598016738892, -0.3886605501174927, -0.8019222021102905, -0.0247632078826...
def get _ additive _ primes ( limit : int ) - > list : pos = 1 primes = [ ] while pos < = limit : if isprime ( pos ) and isprime ( sum ( list ( map ( int, str ( pos ) ) ) ) ) : primes. append ( pos ) pos = nextprime ( pos ) return primes
[ -0.6257011294364929, 0.0751626193523407, 0.6615097522735596, -0.31163039803504944, -0.5243517160415649, 0.15467801690101624, -0.9669716358184814, 0.41906818747520447, 1.4579334259033203, 0.7504842281341553, -0.4139508903026581, 0.4267915189266205, -0.6330126523971558, 0.274682879447937, ...
def get ( self, request ) : reservations = reservation. objects. all ( ) return render ( request, " reservations. html ", { " reservations " : reservations } )
[ 0.1170148178935051, 0.5106950402259827, 0.33506232500076294, 0.2362547516822815, 0.07296393811702728, 0.7087620496749878, -1.1425633430480957, 1.5096039772033691, -0.8673537969589233, 0.5174086093902588, 1.2086845636367798, -0.3009069263935089, 0.4778197705745697, 0.10375004261732101, -0...
def assert _ hass _ vera _ devices ( hass : homeassistant, platform : str, arr _ len : int ) - > none : assert hass. data [ vera _ devices ] [ platform ] assert len ( hass. data [ vera _ devices ] [ platform ] ) = = arr _ len
[ 0.3545326292514801, 0.29896897077560425, 0.13690373301506042, 0.5142530202865601, 0.6644852161407471, 0.4421066641807556, 0.20627395808696747, 0.07139114290475845, 0.2952602207660675, -0.6290580630302429, -0.5014817714691162, 0.08772709220647812, -0.01704336330294609, 1.1619560718536377, ...
def get _ nodes ( user ) : all _ nodes = create _ menu ( settings. stars _ dashboard _ navigation ) visible _ nodes = [ ] for node in all _ nodes : filtered _ node = node. filter ( user ) # don't append headings without children if filtered _ node and ( filtered _ node. has _ children ( ) or not filtered _ node. is _ h...
[ -1.1842273473739624, 0.7950693368911743, 0.6334357261657715, 0.29571348428726196, -1.235672116279602, 0.35298457741737366, 0.051334768533706665, -0.23666228353977203, -0.011938870884478092, 0.22559136152267456, -0.3672718107700348, 0.8702406883239746, 0.14450395107269287, 0.564877867698669...
def test _ example _ input _ two _ clone _ duplicate _ names ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ two " ) input _ page...
[ -0.11837375164031982, 0.567014753818512, 0.7859153747558594, 0.6116575002670288, 0.3225048780441284, 0.5385890007019043, 0.03644386678934097, -1.0295964479446411, 0.3255697786808014, 0.7692751288414001, -0.47167110443115234, 0.1406024545431137, 0.38209542632102966, 0.018826203420758247, ...
def preprocessing _ tips ( ) - > none : st. header ( " tips for preparing your data " ) st. write ( " make sure your dataset is in a xlsx ( excel ) format. " ) st. write ( " make sure it has the structure as seen below with the exact same column names " ", same structure for scoring points, same structure for players t...
[ 0.28292664885520935, -0.12593358755111694, 0.7153782844543457, 0.17136770486831665, 0.28610214591026306, -0.03138412907719612, 0.4662891626358032, 0.3922620713710785, -0.3242907226085663, 0.2602483630180359, -0.2330368459224701, 0.33511167764663696, 0.31504547595977783, -1.2043613195419312...
def mc _ return ( episode _ mask, episode _ mini _ mask, actions _ taken, value, reward, discount ) : size = len ( reward ) g = np. zeros ( shape = ( size, ), dtype = float ) for i, hldr in enumerate ( reversed ( [ a for a in zip ( reward, value, actions _ taken, episode _ mini _ mask, episode _ mask ) ] ) ) : # nb : e...
[ -0.20085354149341583, -0.4103327989578247, 0.5878725051879883, -0.15072917938232422, -0.19631704688072205, -0.43259990215301514, 0.11370525509119034, 0.09992074966430664, 0.06728536635637283, 0.9522379040718079, 0.7475479245185852, 0.28341907262802124, -0.29661595821380615, -0.984696090221...
def _ get _ name ( self ) : self. m _ lock. acquire ( ) try : anonid = self. m _ anonid self. m _ anonid + = 1 finally : self. m _ lock. release ( ) name ='anon / % d'% anonid return name
[ -0.5196493268013, -0.8451887965202332, 0.4818325936794281, -0.3596060574054718, -1.205862045288086, 0.09871471673250198, -0.013926053419709206, -0.7518361806869507, -0.26401954889297485, 0.2455352395772934, -0.19317305088043213, -0.3039891719818115, 0.08428862690925598, -0.1283894777297973...
def group _ base _ message _ key ( cls, message ) : raise notimplementederror
[ -0.8180035948753357, -0.22996626794338226, 0.39757078886032104, 0.2742995321750641, 0.34564027190208435, 0.21884535253047943, 0.9639400243759155, -0.9725635647773743, -1.3862674236297607, 0.3521377444267273, 0.4660206735134125, 0.8469268083572388, -1.1148968935012817, 1.037753939628601, ...
def retrieve ( self, letter _ number ) : rep = self. send ( " retr " + letter _ number + crlf ) result = [ ] print ( self. parse _ sender ( rep ) ) print ( self. parse _ subject ( rep ) ) print ( self. parse _ date ( rep ) ) boundary = self. find _ boundary ( rep ) if boundary : mime _ objects = self. find _ mime ( bou...
[ -0.47336238622665405, -0.5638682246208191, 0.8297200798988342, -0.1346079260110855, 0.17814798653125763, -0.2914772927761078, 0.48991504311561584, -0.22729842364788055, 0.5858035087585449, -0.6039878129959106, -0.5139617919921875, 0.02547057904303074, -1.3630475997924805, -0.09218715131282...
def exponential _ cutoff _ power _ law _ eval ( amplitude, gamma, gamma _ c, index ) : return amplitude * gamma * * ( - index ) * np. exp ( - gamma / gamma _ c )
[ 0.7622479200363159, -0.8982093334197998, 0.1731433868408203, -1.1840991973876953, -0.12652043998241425, 1.163813829421997, -0.08747079223394394, 0.7947766184806824, -0.06544028222560883, 1.2990602254867554, 0.7532035112380981, 0.31137996912002563, -0.27962103486061096, -0.6313442587852478,...
async def flat _ conversations ( request : historyquery = historyquery ( ), collection : str = depends ( authentication. authenticate _ and _ get _ collection ) ) : flat _ data, message = historyprocessor. flatten _ conversations ( collection, request. month, request. sort _ by _ date ) return { " data " : flat _ data,...
[ -1.0939775705337524, 0.20502591133117676, 0.35684168338775635, -0.005421327892690897, 0.0669441819190979, 0.51583331823349, 0.18879686295986176, -0.9238433837890625, -0.05202040448784828, -0.3154330253601074, 0.7439166903495789, 0.796532392501831, -0.7199010848999023, 0.6670960783958435, ...
def _ _ exit _ _ ( self, exc _ type, exc _ val, exc _ tb ) : if exc _ type : timing = time. time ( ) - self. in _ time self. f. write ('date and time : { }, \ nduration : { } \ n '. format ( self. start _ t, timing ) ) self. f. write ('error : { } { } { } '. format ( exc _ type, exc _ val, exc _ tb ) ) self. f. close (...
[ -0.10831901431083679, -0.6579416990280151, 0.9037179350852966, -0.30493754148483276, -0.13424308598041534, 0.8794487714767456, 0.4088509976863861, 0.4394003450870514, -0.805180013179779, 0.4374297261238098, 0.4611169695854187, 0.18376974761486053, -0.38925299048423767, 0.48071062564849854,...
def getthingstateforlogicalinterface ( self, thingtypeid, thingid, logicalinterfaceid ) : req = apiclient. thingstateurl % ( self. host, thingtypeid, thingid, logicalinterfaceid ) resp = requests. get ( req, auth = self. credentials, verify = self. verify ) if resp. status _ code = = 200 : self. logger. debug ( " state...
[ -0.5800192356109619, -0.3535894453525543, 0.3361537456512451, -0.6503614187240601, -0.5061755180358887, 0.08353076875209808, -1.318505883216858, -1.3005459308624268, -0.2767966091632843, 0.12454886734485626, -0.20853598415851593, 0.6162827610969543, -1.165558099746704, 0.11474934965372086,...
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterius3dius3 _ cast ( * args )
[ 0.30651652812957764, -0.31949979066848755, 0.42156335711479187, -0.5218951106071472, -0.19886904954910278, 0.8776386976242065, -0.07468581944704056, -0.0684722289443016, 0.5337219834327698, 0.7614426612854004, -0.06278666853904724, -0.0461970679461956, -0.530158519744873, -0.60633909702301...
def get _ docstring _ panel ( self, cached _ obj : cachedobject, console, term _ height : optional [ int ] = none, fullscreen : bool = false, ) - > panel : # todo improve docstring rendering speed, appears to be a bottleneck title = " [ i ] docstring " docstring = console. render _ str ( " \ n ". join ( cached _ obj. d...
[ 0.504187822341919, 0.18433578312397003, 0.6685450077056885, -1.0429110527038574, -1.2909338474273682, 0.09795521944761276, -0.15769131481647491, -0.5208500623703003, -0.09789060056209564, 0.5997611284255981, 0.5389407873153687, 0.3869872987270355, 0.04032224416732788, -0.3689423203468323, ...
def validate _ commit _ message ( ) : try : script, commit _ msg = sys. argv link _ match = re. search ( link _ regex, commit _ msg ) merge _ match = re. search ( merge _ regex, commit _ msg, re. ignorecase ) if link _ match is not none or merge _ match is not none : return 0 except exception as e : print ( " error " )...
[ -0.2368643432855606, -0.43236997723579407, 0.7849801778793335, 0.06788026541471481, 1.0917572975158691, 0.2778395414352417, 0.8032425045967102, 1.106109857559204, -0.3431878983974457, -0.3352300524711609, 1.531195878982544, -0.10576336830854416, -1.766644835472107, 1.0493444204330444, -0...
def start ( self, commandline, stdin = pipe, stdout = pipe, stderr = pipe, directory = none, exit _ handler = none ) : if isinstance ( commandline, str ) : argv = self. splitter ( commandline ) elif isinstance ( commandline, list ) : argv = commandline else : raise valueerror ( " start needs a command string or argv li...
[ -0.7508681416511536, -0.5784882307052612, 0.5129075646400452, -0.38404014706611633, -0.018181635066866875, 0.5329807996749878, -0.1804652214050293, 0.5213207006454468, -0.15487657487392426, -0.10102139413356781, -0.1564774364233017, 0.6363652944564819, -0.34373974800109863, 0.2567807734012...
def players ( self ) - > list [ partialonlineplayer ] : return [ partialonlineplayer ( self. _ corkus, self, username = p ) for p in self. _ attributes ]
[ -0.22254186868667603, -1.3844507932662964, 0.18434593081474304, 0.8114413022994995, 0.6271690726280212, 1.313960075378418, -0.2593323290348053, 0.652718186378479, 0.40791580080986023, 0.50117427110672, -0.9621061682701111, 0.20283058285713196, -1.16917884349823, -0.11832337081432343, -0....
def print _ board ( board ) : print ('\ n - - - - -') print ('|'+ board [ 0 ] [ 0 ] +'|'+ board [ 0 ] [ 1 ] +'|'+ board [ 0 ] [ 2 ] +'|') print ('- - - - -') print ('|'+ board [ 1 ] [ 0 ] +'|'+ board [ 1 ] [ 1 ] +'|'+ board [ 1 ] [ 2 ] +'|') print ('- - - - -') print ('|'+ board [ 2 ] [ 0 ] +'|'+ board [ 2 ] [ 1 ] +'|'...
[ 0.3985081911087036, 0.14956656098365784, 1.4070634841918945, 0.11301997303962708, -0.05289565771818161, 0.9874612092971802, -0.3278537392616272, 0.3081037104129791, -0.15146474540233612, 0.22010236978530884, -0.03951672837138176, 0.33901891112327576, -0.7416858673095703, 0.4135523736476898...
def database ( name, * * kwargs ) : if not database _ exists ( name, * * kwargs ) : create _ database ( name, * * kwargs )
[ -0.046848591417074203, 0.9361004829406738, 0.5779052972793579, 0.16741769015789032, 0.944360613822937, 0.27920350432395935, -0.9140558242797852, -0.42368224263191223, -0.04771266505122185, 0.1730475127696991, -0.5333248972892761, -0.27903425693511963, -0.6652050614356995, 0.643770217895507...
def norm _ allcolumns _ allrows ( df, index _ ='datetime') : df _ = df. set _ index ( index _ ). copy ( ) df _ = ( df _ / np. max ( np. abs ( df _. values ) ) ). reset _ index ( ) return df _
[ -0.04862820729613304, 0.28229382634162903, 0.689932644367218, 1.1606415510177612, -0.38554853200912476, -0.11964517086744308, -0.26264503598213196, 0.3803693950176239, 0.05468851700425148, -0.1904321014881134, 1.0342438220977783, -0.00999167375266552, 1.0581835508346558, 0.0017754505388438...
def _ _ init _ _ ( self, call, * * kwargs ) : self. _ call = safe _ coerce _ to _ tuple ( call ) self. _ options = [ ] self. _ values = [ ] self. _ kwargs = { } self. _ object = none self. set _ kwargs ( * * kwargs )
[ -0.8410717844963074, 0.972171425819397, 0.5606484413146973, 0.18012705445289612, -0.321331650018692, -0.19808627665042877, -1.1649986505508423, -1.0513451099395752, 0.40191414952278137, 0.18060296773910522, -0.9456120729446411, 0.030691104009747505, -0.21661391854286194, 0.1584782153367996...
def new _ qt _ console ( self, evt = none ) : try : if hasattr ( self. ipkernel,'profile') : return connect _ qtconsole ( self. ipkernel. connection _ file, profile = self. ipkernel. profile ) else : return connect _ qtconsole ( self. ipkernel. connection _ file ) except exception as e : if self. logger : self. logger....
[ 1.1034431457519531, -1.202134609222412, 0.537580668926239, 0.2925421893596649, -0.022792674601078033, 0.06357026845216751, -0.07820606976747513, -0.9521499276161194, -0.5533077120780945, -0.30576249957084656, 0.6451524496078491, -0.303981214761734, -0.19665005803108215, -0.3251906633377075...
def findchromosome ( rsid, genotype, filename ) : # project. findchromosome ('i3001931 ','c ','mygenome. txt') with open ( filename,'rt') as fin : for line in fin : if ( rsid = = line. split ( ) [ 0 ] ) and ( genotype = = line. split ( ) [ 3 ] ) : return line. split ( ) [ 1 ]
[ 0.38505038619041443, -0.8786100745201111, 0.5958403944969177, -0.044382598251104355, -0.06684363633394241, 0.181156188249588, 0.3061572015285492, -0.011111926287412643, -0.49549734592437744, 0.5148286819458008, 0.6153886318206787, 0.3101253807544708, -1.5389378070831299, -0.145105674862861...
def get _ relations _ graph ( self ) - > typing. dict [ str, typing. list [ typing. tuple [ str, bool, int, int, typing. dict ] ] ] : graph : typing. dict [ str, typing. list [ typing. tuple [ str, bool, int, int, typing. dict ] ] ] = collections. defaultdict ( list ) for resource _ id in self. keys ( ) : if not issubc...
[ -0.5545137524604797, 1.4410524368286133, 0.4436682462692261, -1.325819492340088, 0.48865771293640137, -0.1385563313961029, 0.6539044380187988, -0.6499602794647217, -0.6172396540641785, 0.2530761659145355, 0.15987958014011383, -0.3192557394504547, 0.11912058293819427, -0.18435001373291016, ...
def toggleflatreviewmode ( self, inputevent = none ) : verbosity = _ settingsmanager. getsetting ('speechverbositylevel') if self. flatreviewcontext : if inputevent and verbosity! = settings. verbosity _ level _ brief : self. presentmessage ( messages. flat _ review _ stop ) self. flatreviewcontext = none self. updateb...
[ -0.9058196544647217, -0.1815439611673355, 0.6091570258140564, -0.21560868620872498, -0.07201644033193588, 0.9392610788345337, -0.232542484998703, 0.24651241302490234, 0.3768036961555481, 0.27210789918899536, 0.30854517221450806, 0.649598240852356, -0.9044116139411926, 0.30323195457458496, ...
def stark _ assert _ le ( exp _ val, actual _ val, code : starkmsg, message : optional [ str ] = none ) : if exp _ val > actual _ val : eq _ log = f'{ exp _ val } > { actual _ val }'message = f'{ message } \ n { eq _ log }'if message else eq _ log raise starkexception ( code, message )
[ 0.40201514959335327, -0.4731706380844116, 0.6067909002304077, 0.2803083658218384, 0.29891374707221985, 0.5680725574493408, -0.6651163101196289, 0.33743202686309814, -0.18704667687416077, -0.3545316159725189, 0.6044501662254333, 0.48768287897109985, 0.37712088227272034, 1.1312496662139893, ...
def _ _ init _ _ ( self, maze : union [ list [ list [ int ] ], np. array ] ) : self. _ path _ find = pathfind ( maze ) self. heuristic _ accuracy = 1 # octile distance
[ 0.17526103556156158, 0.34483733773231506, 0.1999897062778473, 1.3994303941726685, 0.28062453866004944, 0.4947914779186249, 1.5601611137390137, 0.925382137298584, 0.14650483429431915, 0.21713906526565552, 0.10708349198102951, -1.0936102867126465, -0.4598431885242462, 1.2297292947769165, -...
def undochunk ( method ) : @ functools. wraps ( method ) def undoed ( * args, * * kwargs ) : err = none try : cmds. undoinfo ( openchunk = true ) result = method ( * args, * * kwargs ) except exception as err : pass finally : cmds. undoinfo ( closechunk = true ) if err : raise err return result return undoed
[ -0.14042288064956665, -0.5423230528831482, 0.8515328168869019, -1.0047541856765747, -0.39364007115364075, -0.30685341358184814, 0.7009387016296387, 0.08661884069442749, -0.3379351496696472, -0.8391099572181702, 0.9937809705734253, 0.25429436564445496, 0.7301377058029175, -0.097309172153472...
def print _ para ( model ) : st = { } strings = [ ] total _ params = 0 for p _ name, p in model. named _ parameters ( ) : if not ('bias'in p _ name. split ( '.') [ - 1 ] or'bn'in p _ name. split ( '.') [ - 1 ] ) : st [ p _ name ] = ( [ str ( x ) for x in p. size ( ) ], np. prod ( p. size ( ) ), p. requires _ grad ) tot...
[ 0.3350929617881775, -0.3785327970981598, 1.030914306640625, -0.9297695755958557, -0.7893304228782654, 0.36367911100387573, 0.03906841203570366, -0.641029953956604, -0.6739148497581482, 1.4204782247543335, -0.4331897795200348, 0.6549833416938782, -0.1470707803964615, 0.5275604128837585, -...
def _ _ len _ _ ( self ) : if not self. is _ materialized : self. get ( ) return len ( self. _ value )
[ -0.09891245514154434, 0.5779801607131958, 0.3024981617927551, -0.8782511949539185, 0.1574755609035492, -0.02439192496240139, 0.023495886474847794, 0.5383380055427551, 0.4515573978424072, -0.268634170293808, -0.4940815567970276, -0.38862696290016174, 0.13883692026138306, 0.2648965120315552,...
def _ weekly ( self, pattern _ dict ) : try : _ repeat _ weeks = 1 _ freq _ interval = 0 if self. _ pattern ['freq _ type'] = = 8 : _ repeat _ weeks = self. _ pattern ['freq _ recurrence _ factor'] _ freq _ interval = self. _ pattern ['freq _ interval'] pattern _ dict ['freq _ type'] = 8 # encoding if'weekdays'in patte...
[ -1.6282787322998047, 1.0952963829040527, 0.8227548599243164, -0.9395192861557007, -0.20859837532043457, -0.9131689071655273, 0.6283328533172607, 0.028842447325587273, 0.660429060459137, 0.19539321959018707, 0.32919612526893616, 0.33858323097229004, 0.624129056930542, 0.08742798864841461, ...
def test _ log _ error _ mail _ task ( app, testdata, mocker, users ) : prev _ sender = app. config [ " mail _ notify _ sender " ] app. config. update ( dict ( celery _ task _ always _ eager = true, mail _ notify _ sender = [ ] ) ) mocker. patch ( " invenio _ app _ ils. records. api. patron. get _ patron ", return _ va...
[ 0.7551233172416687, 0.6396682262420654, 0.6167630553245544, 0.012531829997897148, -0.018952196463942528, 0.4449760913848877, -0.40741193294525146, 0.4991682469844818, -0.039095502346754074, -0.24693748354911804, -0.9119426012039185, 1.3585641384124756, 0.6352171301841736, -0.33795422315597...
def _ _ next _ _ ( self ) : data _ set = self. train if self. use _ test _ set : data _ set = self. test # upper and lower indexes for the batches upper _ idx = ( self. batch _ number + 1 ) * self. batch _ size lower _ idx = self. batch _ number * self. batch _ size # if our lower index is in the bounds of our data, we...
[ -0.356600284576416, -0.5322737693786621, 0.7369930744171143, -0.06856364011764526, -0.82709139585495, -0.34848153591156006, 0.42997604608535767, -0.18568480014801025, -0.5864385366439819, -1.2132289409637451, -0.0013651333283632994, 0.31074485182762146, 0.00737413065508008, -0.055981010198...
def parse _ request _ uri _ response ( self, uri, state = none, scope = none ) : self. token = parse _ implicit _ response ( uri, state = state, scope = scope ) self. _ populate _ attributes ( self. token ) return self. token
[ -1.1851857900619507, -0.7135032415390015, 0.5462653636932373, -0.031256433576345444, -0.43296825885772705, -0.20135514438152313, 0.564111053943634, 0.614499032497406, 1.2854275703430176, -0.9624775648117065, -0.22202470898628235, -0.2417370080947876, -0.32699495553970337, -1.59382140636444...
def process _ recommendation ( drug ) : stayed _ on _ drug, switched _ drug, switched _ drug _ better, best _ drug = r. recommend ( drug ) total = stayed _ on _ drug + switched _ drug stayed _ frac = float ( stayed _ on _ drug ) / total better _ frac = float ( switched _ drug _ better ) / switched _ drug best _ frac = ...
[ -0.1145448386669159, -0.3009588420391083, 0.45097777247428894, -0.6876049041748047, 0.32145434617996216, -0.4648389518260956, -0.4911831021308899, -0.5253946781158447, -0.9589856266975403, 1.0814378261566162, -0.48456424474716187, 0.264492392539978, 0.18638209998607635, -0.1150519251823425...
def is _ steering _ wheel _ heater _ on ( self ) - > bool : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " steering _ wheel _ heater " )
[ -0.02537890151143074, -0.3164229989051819, 0.42298004031181335, 0.5086889863014221, 0.2571231424808502, -0.02134600467979908, -1.5243664979934692, 0.6131910085678101, -0.904956042766571, 0.7964183688163757, -0.7529520392417908, -0.08654637634754181, -0.1997603178024292, 0.8254848718643188,...
def createrdf ( annotated _ triples, triples ) : rdfgraph = graph ( ) for i in range ( len ( triples ) ) : subject = none predicate = none obj = none " " " subject checking " " " if annotated _ triples [ i ] [ 0 ] : subject = uriref ( annotated _ triples [ i ] [ 0 ] [ 0 ] ) else : subject _ obj = bnode ( ) rdfgraph. ad...
[ 0.389047235250473, 0.2885444462299347, 0.7795052528381348, -1.1417924165725708, -0.5275195837020874, 0.3549046218395233, 0.06757655739784241, 0.00197910750284791, 0.2813055217266083, 0.4630223512649536, -0.10432133078575134, 0.46368464827537537, -0.14682240784168243, -0.772350549697876, ...
def updated _ date ( self, updated _ date ) : self. _ updated _ date = updated _ date
[ 0.6690042018890381, -0.10353638976812363, -0.0027452760841697454, 0.7298030853271484, -0.3361065983772278, 0.9498260021209717, -0.06752569228410721, 1.3811626434326172, 0.11378307640552521, -0.5071095824241638, -0.6287407279014587, 0.8291511535644531, 0.6366053223609924, 0.4260921478271484...
def get _ missing _ letters ( trie, word ) : result = get _ trie _ count _ missing ( word, trie ) # find all the indices idxs = [ i. start ( ) for i in re. finditer ('# ', word ) ] # match the indicies with the result # if no match is found, return'e ', the most common letter in english return ( result, [ ( result [ 0 ...
[ -0.4208539128303528, -0.2451651245355606, 0.4691554307937622, 0.30182328820228577, 0.45990148186683655, -0.6112926602363586, 0.5421367883682251, 0.7258991003036499, 0.02904166467487812, 1.1711570024490356, -0.3537248969078064, -0.4000958204269409, -0.45020005106925964, 0.49953991174697876,...
def first _ pass ( self, pmt _ array, prev _ balance _ array, amort _ pmt _ array, interest _ accrued _ array ) : # interest _ accrued = [ ] # new _ balance = [ ] # pmt _ new = [ ] # np. max ( interest _ accrued _ array - pmt _ array, 0 ) water _ fall _ payer = lambda x : max ( 0, x ) # x should be interest - payment f...
[ 0.941046416759491, -0.4214330315589905, 1.0898138284683228, -0.7396594285964966, 0.6253886222839355, 0.9091598391532898, 0.2934114634990692, -1.1295489072799683, 0.7222405076026917, 0.1240057572722435, 1.0140246152877808, 0.5093722939491272, -0.4233561158180237, 0.11532178521156311, 0.46...
def discovery _ endpoint ( self ) - > str : return pulumi. get ( self, " discovery _ endpoint " )
[ 0.9491450786590576, -0.1446426510810852, 0.3717092275619507, 1.3309564590454102, 0.9980682730674744, 0.6133266091346741, 0.19071224331855774, 0.18478664755821228, -0.11255746334791183, -0.1573227345943451, 0.4502391517162323, 0.45341965556144714, 0.3648693859577179, -0.23164688050746918, ...
def action _ button _ confirm ( self, cr, uid, ids, context = none ) : return _ value = super ( sale _ order, self ). action _ button _ confirm ( cr, uid, ids, context = context ) so = self. browse ( cr, superuser _ id, ids [ 0 ], context = context ) pricelist = so. pricelist _ id if pricelist. code : # promo to use on...
[ -0.7572145462036133, -0.024512620642781258, 0.4914196729660034, 1.277603268623352, 0.34432676434516907, -0.19487813115119934, 0.5167326331138611, -0.20144611597061157, 0.5344345569610596, 1.3021782636642456, -0.7020920515060425, 0.45271220803260803, -0.24106377363204956, 0.2815211713314056...
def test _ remove _ stop _ words _ ideal ( self ) : expected = ['weather ','sunny ','man ','happy'] actual = remove _ stop _ words ( ['the ','weather ','is ','sunny ','the ','man ','is ','happy'], removestopwordstest. stop _ words ) self. assertequal ( expected, actual )
[ -0.6849226355552673, 0.14000558853149414, 0.4088408350944519, -0.03582971170544624, -0.10174769908189774, 0.39797404408454895, -0.4535227417945862, 1.3662478923797607, -0.41551053524017334, 0.6684682965278625, -0.7111731767654419, -0.48200035095214844, -0.5783874988555908, -0.2882228493690...
def test _ par _ parent _ explicit _ mp _ fork _ par _ child ( self ) : body = " " " if 1 : x = np. arange ( 1000000. ) y = np. arange ( 1000000. ) q = multiprocessing. queue ( ) # start openmp runtime on parent via parallel function z = busy _ func ( x, y, q ) # fork ( ) underneath with no exec, will abort ctx = multi...
[ 0.7894482016563416, -0.6720578670501709, 0.9791398644447327, 0.1659075915813446, -0.17134885489940643, 0.5101863741874695, 0.12049204111099243, -0.4594760835170746, -0.3656303286552429, -0.6114524006843567, -0.35391074419021606, 0.9684929251670837, -0.39692965149879456, 0.8293332457542419,...
def exists ( self, bucket _ name : str, object _ name : str, retry : retry = default _ retry ) - > bool : client = self. get _ conn ( ) bucket = client. bucket ( bucket _ name ) blob = bucket. blob ( blob _ name = object _ name ) return blob. exists ( retry = retry )
[ 0.3371129333972931, -1.0400891304016113, 0.7924289703369141, 0.38258448243141174, 0.7356882691383362, 0.7245422005653381, -1.1999423503875732, -0.3262101411819458, -0.48016470670700073, 0.64089435338974, -0.9814869165420532, 0.9702190160751343, -0.4567232131958008, -1.1403945684432983, -...
def test _ atomic _ any _ uri _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 1. xsd ", instance = " nistdata / atomic / anyuri ...
[ -0.012454287149012089, -0.25858086347579956, 0.39374345541000366, 0.8007280230522156, -0.38692185282707214, -0.21732348203659058, 0.381284236907959, -0.14748264849185944, -0.15763601660728455, 0.17708276212215424, 0.03490438312292099, -0.43779075145721436, -0.3713287115097046, 0.5599229931...
def print _ status ( self ) : from pprint import pprint status _ format _ version, status = self. _ load _ status ( ) print > > self. stdout, " status _ format _ version : ", status _ format _ version pprint ( status, self. stdout )
[ 0.655205488204956, -1.2835688591003418, 0.5106306672096252, 0.1896952986717224, 0.1508559286594391, 0.36039653420448303, -0.4881458580493927, 0.1694464087486267, -0.4699808955192566, -0.26793795824050903, -0.3169690668582916, 1.2681071758270264, 0.4488140046596527, 0.9491838812828064, 0....
def updatecurrentvectors ( self, position, isfirstframe = false ) : self. state. updatecurrentvectors ( position, isfirstframe ) self. _ needsbehaviourcalculation = true self. _ needsbehaviourcommit = false self. debugcolour = col. defaultcolour self. currentbehaviour. onagentupdated ( self )
[ -0.6053237915039062, -1.3741055727005005, 0.31870126724243164, -0.25531744956970215, 0.29289984703063965, -0.6330235600471497, 0.5599631667137146, -1.0686476230621338, 1.0387341976165771, 0.2868179678916931, -0.1067054495215416, 0.14977239072322845, -0.6202032566070557, 1.0382773876190186,...
def getmatchedfilter ( s ) : t = s. upper ( ) n = len ( t ) for k in predefined _ filters : if k. upper ( ) [ : n ] = = t : return ( k, predefined _ filters [ k ] ) return none, none
[ -0.7749212980270386, -1.1859995126724243, 0.45055893063545227, 0.13114401698112488, -0.45841556787490845, -0.9888039231300354, 0.030794404447078705, -0.3290623128414154, -0.19820140302181244, -0.23435787856578827, -0.9606413841247559, 0.9878710508346558, 0.19552364945411682, 0.320647597312...
def _ _ init _ _ ( self, name : str, dim : int, time _ derivs : list [ int ], symbol : str, dlim : dict [ int, tuple [ list [ float ] ] ], t : union [ none, int ], ) : # # the name of the model. self. name = name # # model dimension. self. dim = dim # # time derivatives required for the model. self. time _ derivs = tim...
[ 0.2828467786312103, 0.9192304015159607, 0.5723298192024231, 0.25972047448158264, -0.247179314494133, -0.13366149365901947, -0.35373446345329285, 0.07828441262245178, -0.9309720396995544, 0.771681547164917, -1.2939578294754028, 0.02319231443107128, 0.9368698000907898, 0.054118357598781586, ...