text
stringlengths
25
2.19k
embedding
listlengths
768
768
def run ( self, args ) : msgs = self. context ['pubsub _ msgs'] pubsub = self. context ['pubsub'] subscription _ path = util. subscriptionformat ( args. subscription ) result = {'subscriptionid': subscription _ path } seek _ req = msgs. seekrequest ( ) if args. snapshot : if args. snapshot _ project : snapshot _ projec...
[ -0.013662481680512428, 0.24032407999038696, 0.7379907965660095, -0.11191357672214508, 0.012936199083924294, -0.15666207671165466, -0.47328490018844604, -0.5027363896369934, 0.06772936135530472, -0.32858288288116455, 0.18826061487197876, 0.5819266438484192, -0.10779518634080887, -0.05569316...
def input _ bool ( self, msg ) : ans = input ( msg ). lower ( ) return ( ans = ='y'or ans = ='yes')
[ -0.14884793758392334, 0.15512363612651825, 0.44355684518814087, 0.2619023621082306, -0.9820516705513, 1.1381676197052002, 0.19147942960262299, -0.18793213367462158, 0.004796226974576712, -0.6016087532043457, -0.23982220888137817, -0.05310114100575447, -0.4168391823768616, 0.474403232336044...
def test _ cant _ delete _ driver _ invalid _ request ( self ) : json _ response = api _ call ( self, " delete ",'/ driver / delete ', dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ],'missing id') res = self. client. post ('/ dri...
[ -0.6237037777900696, -0.18027417361736298, 0.7999708652496338, 0.4972582459449768, 0.7852148413658142, 0.4943099319934845, -0.50898677110672, 0.41406846046447754, 0.18234984576702118, -0.08736047893762589, 0.015683768317103386, -0.5033190250396729, -0.6095776557922363, 0.7931339144706726, ...
def download _ image ( url ) : if'http'in url : req = requests. get ( url ) with open ('/ tmp / cat. jpg ','wb') as f : f. write ( req. content ) return url
[ -0.42227038741111755, 0.15713725984096527, 0.48962169885635376, 0.15457917749881744, -0.08926833420991898, 0.2991925776004791, 0.20458443462848663, -0.01115866657346487, -0.2874070405960083, -0.359550803899765, 0.0025482475757598877, -0.3043976426124573, 0.08266453444957733, 0.573551833629...
def _ _ len _ _ ( self ) : return len ( self. _ dataframe )
[ -0.2031976580619812, 0.14428038895130157, 0.20700772106647491, -1.3017467260360718, 0.44351696968078613, -0.251914381980896, 0.2850811183452606, 0.8958665728569031, 0.15268047153949738, -1.3112246990203857, -0.8601810336112976, 0.07284524291753769, 0.8363730907440186, -1.0233513116836548, ...
def fixture _ observations _ input _ files _ raw ( case _ id : str, filled _ file : path ) - > dict : return { " family _ ped _ path " : filled _ file, " profile _ vcf _ path " : filled _ file, " snv _ vcf _ path " : filled _ file, " sv _ vcf _ path " : none, }
[ 0.020748093724250793, 0.24307355284690857, 0.29832005500793457, -0.8187755346298218, -0.13443364202976227, 0.06882129609584808, 0.6479795575141907, -0.1972651183605194, -0.3854786157608032, -0.06177765876054764, -0.40488287806510925, -0.5143752098083496, 0.7110390067100525, 0.1642752438783...
def prepare ( self ) : # note that variable actual _ request is a dict with lists as values, which can be of length # greater than one if its key appears more than once in the query. # see the note in the docstring to counthandler. _ get _ valid _ queries ( ) for how this is handled. logger. info ('new query to / count...
[ -0.09117332845926285, -0.14434820413589478, 0.44007787108421326, 0.32102593779563904, 0.19092771410942078, -0.15576858818531036, -0.2661910355091095, 0.046011216938495636, 0.08529311418533325, -0.550005316734314, 0.29279059171676636, -0.7537621259689331, 0.5349360108375549, 0.1684038043022...
def getvar ( port, var ) : dat = read _ data ( port = port, datatype ='live ', outformat ='raw') dat = parse _ live _ data ( dat ) dat = process _ live _ data ( dat ) if var = = " status " : dat = " " " date : { date } weekday : { weekday } time : { time } unit : { unit } range : { range } mode : { mode } hold : { hold...
[ 0.15089671313762665, -0.9393708109855652, 0.7832537293434143, -0.6377679109573364, -0.39845776557922363, 0.19077467918395996, -0.5832230448722839, -0.21766602993011475, -0.6560666561126709, -0.16303180158138275, 0.35286226868629456, 0.6560242176055908, -0.10122668743133545, 0.0045642354525...
def field ( self, name ) : if self. is _ null ( ) : raise nullpyobjectptr ( self ) return self. _ sbvalue. getchildmemberwithname ( name )
[ 0.5455110669136047, -0.27389660477638245, 0.49683189392089844, -0.17334415018558502, -0.5891504287719727, 0.5363218784332275, 0.06650926917791367, -1.8362553119659424, 0.6468686461448669, -0.7550122737884521, -0.8089547753334045, -0.02520006150007248, -0.6487818360328674, -0.31728813052177...
def adjust _ loc ( self, loc, object _ size ) : adj _ loc = ( loc [ 0 ] - object _ size [ 0 ] / 2, loc [ 1 ] - object _ size [ 1 ] / 2 ) return adj _ loc
[ -0.06543809175491333, -1.3493893146514893, 0.6199315786361694, -0.6488335728645325, -0.22988364100456238, 0.3488064706325531, 1.44255530834198, 0.5031329393386841, 0.5756341814994812, 0.37789952754974365, 0.3637312650680542, 0.4157673418521881, 0.484047532081604, -0.5051209330558777, 0.0...
def wgs84toosgb36 ( latitude, longitude, radians = false ) : # latlon in wgs to xyz in wgs # xyz in wgs to xzy in osgb36 # xyz in osgb36 to latlon in osgb36 # latitude = latitude # longitude = longitude lat _ xyz = lat _ long _ to _ xyz ( latitude, longitude, radians, datum = wgs84 ) wgs _ gb = wgs84toosgb36transform (...
[ -0.15699957311153412, -0.03003782406449318, 0.5579062104225159, -0.5294435620307922, 0.3284466564655304, 0.07509997487068176, -1.6747658252716064, -0.40015608072280884, -0.4301129877567291, 1.5720258951187134, -0.5258991718292236, 0.23426106572151184, -1.03457772731781, 0.1721878945827484,...
def ls ( paths, include _ children = true ) : if isinstance ( paths, str ) : paths = paths. split ( ) options = [ ] if not include _ children : options. append ('- d') return [ line. split ( ) [ - 1 ] for line in sh ( ['hdfs ','dfs ','- ls'] + options + paths, # not checking return code here so we don't # fail paths do...
[ -0.16773223876953125, 0.5133473873138428, 0.8720315098762512, 0.7174896597862244, 0.8457062244415283, -0.44827449321746826, -0.5196137428283691, -0.00047659873962402344, 0.11609828472137451, -0.006702129729092121, 0.8221753239631653, -0.6703500151634216, -0.42187902331352234, 0.38080242276...
def validate ( self, connections, group ) : pairs = it. product ( group, group ) pairs = it. ifilter ( lambda ( a, b ) : a! = b, pairs ) pairs = it. ifilter ( lambda ( a, b ) : b not in connections [ a ], pairs ) pairs = list ( pairs ) for pair in pairs : self. logger. debug ( " pair % s, % s not connected ", * pair ) ...
[ -1.2742221355438232, -0.47008079290390015, 0.5823773145675659, -0.15098443627357483, -0.3518980145454407, 0.26977837085723877, 0.42861995100975037, -0.471523642539978, -0.6917298436164856, 0.5811449289321899, 0.9030005931854248, -0.46360349655151367, -1.339298129081726, 0.45540449023246765...
def _ find _ start _ table ( self, relationship _ list, min _ start _ table _ size ) : table _ dict = dict ( ) table _ set = set ( ) def increase _ table _ in _ dict ( table ) : if table _ dict. get ( table ) is none : table _ dict [ table ] = 0 else : table _ dict [ table ] + = 1 for relationship in relationship _ lis...
[ 0.18434998393058777, -0.04525676369667053, 0.8566199541091919, 0.394707053899765, -1.0766328573226929, -0.11756446957588196, 0.45357805490493774, -0.2318601757287979, -0.4550434648990631, 0.1148897334933281, 0.001207864610478282, 0.3151501417160034, -0.9214798808097839, 0.6750666499137878,...
def validate ( self ) - > bool : valid _ properties = true if vocab _ folder in self. path : valid _ properties = self. check _ type ( ) if class _ definitions _ folder in self. path : valid _ properties = self. check _ required ( ) if not valid _ properties : self. write _ validation _ message ( ) return false return ...
[ -0.6490402817726135, -0.4919559061527252, 0.7011095881462097, 0.4996951222419739, 0.7187814116477966, 0.6747064590454102, 0.5994341969490051, -0.07451915740966797, -0.8462845087051392, -0.38486191630363464, 0.8234784007072449, -0.17065949738025665, -0.9058650732040405, 0.6608676910400391, ...
def create _ tag _ category ( name, description, cardinality ) : create _ spec = category _ svc. createspec ( ) create _ spec. name = name create _ spec. description = description create _ spec. cardinality = cardinality associabletypes = set ( ) create _ spec. associable _ types = associabletypes return category _ svc...
[ 0.2198353260755539, 0.5786677002906799, 0.3784305453300476, 0.17374660074710846, 0.6427109241485596, -0.45997554063796997, -0.7932310700416565, -0.05262723192572594, -0.938147783279419, -0.6344282627105713, -0.06015500798821449, 0.044212568551301956, 0.37242719531059265, 0.530277669429779,...
def period ( self ) - > st. utcperiod : now = st. utctime _ now ( ) return st. utcperiod ( now - self. start _ offset, now - self. end _ offset )
[ 0.037521690130233765, -0.7751020789146423, 0.44548049569129944, -0.20700137317180634, -0.12578080594539642, 0.8676280975341797, 0.39220210909843445, 0.08580382913351059, 0.8970105051994324, 0.2376585602760315, 1.0609557628631592, 0.7057623863220215, -0.4382750988006592, -1.314082145690918,...
def enable _ xla ( ) : config = tf. configproto ( ) config. graph _ options. optimizer _ options. global _ jit _ level = tf. optimizeroptions. on _ 1 k. set _ session ( tf. session ( config = config ) )
[ 1.289250135421753, 0.26936447620391846, 0.5418331623077393, 0.4167119562625885, 0.18159246444702148, 0.09665458649396896, 0.9522711038589478, 0.7780939936637878, 0.09864363074302673, 0.9729880690574646, -1.0147548913955688, 0.7708088159561157, -0.7313118577003479, -0.6947638988494873, 0....
def most _ frequent ( self, k ) : word _ count = [ ( w, self. word _ count [ w ] ) for w in self. words [ : k ] ] return countedvocabulary ( word _ count = word _ count )
[ 0.8421522974967957, -0.7214077711105347, 0.44732794165611267, 0.21323560178279877, -0.12344235181808472, -0.828987717628479, -0.7730852365493774, -0.18778793513774872, -0.14168936014175415, -0.22758451104164124, 0.41289201378822327, -0.17111094295978546, 0.10786810517311096, 1.017558693885...
def find ( self, * * kwargs ) : return self. _ element. find ( * * kwargs )
[ 0.08869172632694244, 0.3116803765296936, 0.24144503474235535, 0.29298830032348633, -0.02177243120968342, 0.1354098916053772, -0.11681964993476868, -1.210317611694336, -0.6885637640953064, -0.47911861538887024, 0.35274040699005127, 0.13488031923770905, -1.4325758218765259, 0.314304769039154...
def load _ hdf5 ( filename, path ='/') : return _ reportinterface. _ _ load _ dict _ from _ hdf5 _ _ ( filename, path = path )
[ 0.3772960305213928, 0.41721171140670776, 0.38952869176864624, -0.5204536318778992, -0.951912522315979, -0.3602367341518402, 1.4901173114776611, -0.31431758403778076, -1.520612359046936, -0.47757741808891296, 0.05156535655260086, -0.9421303868293762, -1.1233395338058472, -0.1829187124967575...
def variablerecurrentreverse ( inner ) : def forward ( input, hidden, weight, batch _ sizes ) : output = [ ] input _ offset = input. size ( 0 ) last _ batch _ size = batch _ sizes [ - 1 ] initial _ hidden = hidden flat _ hidden = not isinstance ( hidden, tuple ) if flat _ hidden : hidden = ( hidden, ) initial _ hidden ...
[ -0.588218092918396, -0.4326852858066559, 0.8383147716522217, -0.06268409639596939, -0.5399828553199768, -0.2720635235309601, 0.3008670508861542, 0.3564728796482086, -1.04804265499115, 0.12104036659002304, -0.14282947778701782, 0.4872282147407532, -0.00048397009959444404, -0.068504601716995...
def reconstruct ( descriptors ) : contour _ reconstruct = np. fft. ifft ( descriptors ) contour _ reconstruct = np. array ( [ contour _ reconstruct. real, contour _ reconstruct. imag ] ) contour _ reconstruct = np. transpose ( contour _ reconstruct ) contour _ reconstruct = np. expand _ dims ( contour _ reconstruct, ax...
[ -0.8419069051742554, -0.19892680644989014, 0.743017852306366, 0.19209808111190796, -0.15990693867206573, -0.8546139597892761, 0.9289239645004272, 0.9896877408027649, 0.4222356081008911, 0.029358869418501854, -0.053043950349092484, 0.22841708362102509, 0.5020150542259216, 0.0819847285747528...
def test _ update _ vcs _ root _ entry ( self ) : pass
[ 0.37958723306655884, -0.9705615043640137, 0.20385977625846863, 1.0941234827041626, 0.03347082436084747, 0.34509891271591187, 1.012876033782959, -0.18487206101417542, 0.6403159499168396, -0.08341273665428162, -0.746711015701294, 0.4055940806865692, -1.179654836654663, -0.14556293189525604, ...
def usando _ whitelist ( whitelist, url ) : return ( whitelist and ( not any ( [ url. host ( ) [ - len ( k ) : ] = = k for k in whitelist ] ) ) )
[ -1.2292660474777222, 0.20732054114341736, 0.31745827198028564, 0.24717946350574493, -0.031175458803772926, 0.13189063966274261, -0.9619108438491821, 0.49042221903800964, 0.06350758671760559, 0.9800872206687927, -0.33410152792930603, 0.7354626655578613, -0.61436527967453, 0.3502914905548095...
def remove _ variants ( conn, dataset, list _ of _ var _ tuples ) : delete _ counter = 0 log. info ('deleting variants from database..') # loop over each sample ( key ) of the dictionary : click. echo ( " variants to remove : % s ( it might take some time! ) " % len ( list _ of _ var _ tuples ) ) pbar = enlighten. coun...
[ -0.2618340849876404, 0.35219764709472656, 0.6833319067955017, -0.34845277667045593, -0.674572229385376, -0.3818853199481964, 0.1960967630147934, 0.6534213423728943, -0.1650940179824829, 0.4123947322368622, 0.28091007471084595, -0.8766195774078369, -0.7301859855651855, 0.14621202647686005, ...
def vnf _ link _ to _ internal ( ext ) : internal = { } if " id " in ext : internal [ " id " ] = ext [ " id " ] internal [ " source " ] = ext [ " source " ] internal [ " target " ] = ext [ " destination " ] internal [ " traffic " ] = ext [ " required _ capacity " ] internal [ " latency " ] = ext [ " latency " ] if inte...
[ -1.386717677116394, -0.7241843938827515, 0.591778576374054, -1.7786953449249268, -0.6812189817428589, -0.8295029401779175, -0.9915643334388733, -0.304348349571228, -0.09832323342561722, 0.01690296083688736, -0.9579465389251709, 0.5589959025382996, -0.813629150390625, -0.32986393570899963, ...
def lnprob ( self, value ) : raise notimplementederror
[ 0.4463754892349243, 0.22883570194244385, 0.4845084547996521, -0.6970251202583313, -0.5256221294403076, 0.7816579937934875, -0.3104528486728668, -1.2037960290908813, 0.8166614770889282, 0.25227656960487366, -0.17160402238368988, -0.5935251116752625, 0.22892387211322784, 0.27058175206184387,...
def _ _ init _ _ ( self, project ) : if not isinstance ( project, gsmodutils. gsmproject ) : raise typeerror ('requires valid gsmodutils project') self. project = project self. log = defaultdict ( testrecord ) self. load _ errors = [ ] self. invalid _ tests = [ ] self. syntax _ errors = dict ( ) self. _ task _ execs = ...
[ 0.20120076835155487, -0.06797729432582855, 0.5988896489143372, -0.1237635537981987, 0.09093666821718216, 0.8855186700820923, 0.524904191493988, -0.09071502834558487, -0.5163206458091736, -0.2717910706996918, -0.5461115837097168, 0.25689321756362915, -1.0655162334442139, 0.5797948837280273,...
def train _ recursive _ cv ( xtr, ytr, k, layernum, test _ iter = 40, max _ iter = 400, margin = 1, rand = rand, min _ layer = 2 ) : defectnum = sum ( ytr ) print ( f'number of defective data : { defectnum }, k ( cross validation ) : { k }') n = get _ max _ layer _ size ( np. shape ( xtr ) [ 1 ] ) layer _ list, perf _ ...
[ 0.258323073387146, 0.4660951793193817, 0.797846257686615, 0.9083496332168579, -0.1246720403432846, -0.19142934679985046, 0.5660046935081482, -0.14506283402442932, -0.49780890345573425, -0.22860819101333618, 0.23491261899471283, 0.14511030912399292, -0.21519696712493896, 0.45793360471725464...
def clean _ strs ( * args ) : return ( clean _ str ( x ) for x in args )
[ -0.2115081250667572, -0.9621381759643555, 0.38502347469329834, -0.46934324502944946, 0.0797816663980484, 0.06446003168821335, -1.0111809968948364, -0.5460252165794373, -1.3815206289291382, 0.5054959058761597, 0.7213172912597656, 0.5529751181602478, -0.4602074921131134, 0.8621286153793335, ...
def _ find _ minimum _ noise _ std ( self ) - > float : threshold = 1e - 4 maximum _ noise _ std = self. _ calculate _ max _ noise _ std ( ) low, high = 0, maximum _ noise _ std while low + threshold < high : mid = ( high - low ) / 2 + low pld = self. _ compose _ distributions ( mid ) pld _ epsilon = pld. get _ epsilon...
[ 0.6911801695823669, -0.5691397786140442, 0.7687970399856567, -0.5178316831588745, -0.43601301312446594, 0.22393830120563507, -0.04093246906995773, -0.21055887639522552, -0.29090943932533264, -0.4000905752182007, -0.25757932662963867, 0.38700735569000244, -0.7664018273353577, -0.23621863126...
def get _ integers ( lst ) : result = [ ] for elem in lst : result. append ( int ( elem ) ) return result
[ -0.7440354228019714, 0.2832624912261963, 0.18985453248023987, 0.7522487044334412, 0.5228620171546936, 0.09015118330717087, -0.5836885571479797, 0.6661757230758667, -0.02524694614112377, -0.5160453915596008, -1.6206563711166382, -0.2389969378709793, -0.8476503491401672, 0.7786858677864075, ...
def linelist _ select ( self, event ) : if event. button = = 1 : self. update _ line _ id ( ) self. _ detns _ idx = - 1 # try to perform a fit self. fitsol _ fit ( ) # now replot everything self. replot ( )
[ 0.8059943914413452, -0.9054694175720215, 0.20861652493476868, 0.9467594623565674, 0.7269254922866821, 0.2659814953804016, 0.12742450833320618, -0.0822138786315918, 0.7643874883651733, -0.7387173175811768, -0.6956273913383484, 0.5903422236442566, 0.4104110598564148, 0.2391820251941681, -0...
def copy ( self ) : return installer ( self. descriptor, self. cache, self. platforms, self. arches )
[ -0.1027492806315422, -1.1585644483566284, 0.25316113233566284, 0.4655218720436096, -0.764953076839447, 0.4699852764606476, 0.44480252265930176, -0.22666136920452118, 0.12708117067813873, 0.36368757486343384, 0.22446639835834503, 0.41133832931518555, -0.5669431090354919, 0.28215163946151733...
def make _ dataset _ iterator ( self, dataset ) : # pylint : disable = useless - super - delegation return super ( parameterserverstrategy, self ). make _ dataset _ iterator ( dataset )
[ -1.0253469944000244, 0.39896950125694275, 0.18331654369831085, -0.9525787234306335, -0.7186420559883118, 0.04070943221449852, -0.023970281705260277, -0.20317484438419342, 0.4540838301181793, 0.12697288393974304, 0.8223561644554138, 0.6263051629066467, 0.5759058594703674, 0.5206248760223389...
def push _ scope ( self ) : self. scopes. append ( { } )
[ -0.29735833406448364, 0.9849879741668701, 0.4301041066646576, -0.8849204182624817, 0.45259103178977966, -0.2686694264411926, -1.3409522771835327, -0.3421882688999176, 0.43166351318359375, 0.7272287607192993, -0.015988469123840332, 1.0141836404800415, -0.14435872435569763, 0.462260305881500...
def test _ cant _ create _ car _ invalid _ request ( self ) : json _ response = api _ call ( self, " post ",'/ car / create ', none, 200 ) self. assertequal ( json _ response, none ) res = self. client. post ('/ car / create') self. assertequal ( res. status _ code, 200 ) res = self. client. post ('/ car / create ', da...
[ -0.8501101732254028, 0.07153166830539703, 0.8478891253471375, 0.09172585606575012, 0.914379358291626, 0.8385988473892212, -0.30457165837287903, -0.4505152404308319, -1.134185791015625, -0.42767009139060974, -0.30532968044281006, -0.19724977016448975, -0.30649203062057495, 0.644023180007934...
def get _ time _ limit ( env : vecenv, current _ max _ episode _ length : optional [ int ] ) - > int : # try to get the attribute from environment if current _ max _ episode _ length is none : try : current _ max _ episode _ length = env. get _ attr ( " spec " ) [ 0 ]. max _ episode _ steps # raise the error because th...
[ -0.7317105531692505, 0.3071368634700775, 0.6572868824005127, 0.21361443400382996, 0.30274131894111633, 0.25349077582359314, -0.28031742572784424, 0.6340427398681641, -0.3875662088394165, 1.2668547630310059, 0.061211246997117996, 0.17873860895633698, 0.164598286151886, 0.7561441659927368, ...
def fastml _ asr ( tree _ file, aln _ file, prefix = '. /') : print ( tree _ file ) print ( aln _ file ) t = d. tree. get ( path = tree _ file, schema ='newick') uniq _ name = str ( uuid. uuid4 ( ) ) output _ name = osp. join ( prefix, uniq _ name + '. fasta') output _ tree = osp. join ( prefix, uniq _ name + '. tre') ...
[ 0.68499356508255, -1.1496601104736328, 0.8157339096069336, -0.44796299934387207, -0.5843212604522705, -0.6268557906150818, 0.2498437762260437, 0.31786540150642395, -0.6070451736450195, 0.9977893829345703, 0.19560126960277557, 0.3140406608581543, 0.3647860884666443, 0.7252771854400635, 0....
def test _ format _ max _ job _ time ( self ) : test _ job = gaussianadapter. _ _ new _ _ ( gaussianadapter ) test _ job. max _ job _ time = 59. 888 self. assertequal ( test _ job. format _ max _ job _ time ('days'),'2 - 11 : 53 : 16') self. assertequal ( test _ job. format _ max _ job _ time ('hours'),'59 : 53 : 16')
[ 0.11900314688682556, -0.3375306725502014, 0.3272090554237366, 0.07091425359249115, -0.16615456342697144, 0.5523057579994202, -1.1557519435882568, -0.33910462260246277, 0.5819064378738403, 0.319953978061676, -0.06694763153791428, 0.22977136075496674, 0.5521551966667175, 1.115870475769043, ...
def load _ words ( ) : # print " loading word list from file... " # infile : file infile = open ( wordlist _ filename,'r ', 0 ) # wordlist : list of strings wordlist = [ ] for line in infile : wordlist. append ( line. strip ( ). lower ( ) ) # print " ", len ( wordlist ), " words loaded. " return wordlist
[ 0.6007416844367981, -0.6723905205726624, 0.41134536266326904, -0.6055217981338501, -0.017487596720457077, 0.47776636481285095, -0.5889725685119629, 0.6797244548797607, -0.2633572518825531, 1.0336518287658691, -0.570409893989563, 0.43301156163215637, -1.272940754890442, 1.0086911916732788, ...
def format ( self, to _ format ) : return to _ format. split ( )
[ -0.8617500066757202, -0.1506596952676773, 0.568886399269104, -0.37139570713043213, 0.5033283233642578, -0.7514272332191467, -0.7936534285545349, 0.3718779981136322, 0.4856230318546295, 0.35582277178764343, -0.010049654170870781, -0.004219959024339914, -0.11460348218679428, -0.0692842379212...
def _ get _ modifier ( modifier ) : if modifier is none : return none elif modifier. lower ( ) = = " ctrl " : return key. ctrl elif modifier. lower ( ) = = " alt " : return key. alt
[ -1.1347438097000122, -0.6316879391670227, 0.3429308533668518, -0.37744084000587463, -0.004595812875777483, -0.5764737725257874, -0.6953867673873901, -0.19087083637714386, 0.3685624599456787, -0.14654675126075745, 0.15020112693309784, 0.2631083130836487, -0.29045847058296204, 0.850361347198...
def get _ wceff _ fccc ( wc _ obj, par, qiqj, lep, nu, mqi, scale, nf = 5 ) : qqlnu = qiqj + lep +'nu'+ nu wc = wc _ obj. get _ wc ( qqlnu, scale, par, nf _ out = nf ) if lep = = nu : c _ sm = get _ cvlsm ( par, scale, nf ) else : c _ sm = 0 # sm contribution only for neutrino flavor = lepton flavor c = { } c ['7'] = 0...
[ 0.2816891372203827, -0.5440738797187805, 0.48602768778800964, -0.9186480641365051, 0.05284629762172699, -0.2660718262195587, 0.018078826367855072, 0.08998152613639832, -0.46764010190963745, 0.24142903089523315, -0.26234152913093567, 0.15663519501686096, 0.28511396050453186, 0.9360176920890...
def split ( dataframe, fractions ) : if not fractions : raise valueerror ( " need fractions for the split. " ) if len ( fractions ) = = 1 : return [ dataframe ] s = sum ( fractions ) x, xs = fractions [ 0 ], fractions [ 1 : ] first, rest = binary _ split ( dataframe, 1. 0 * x / s ) return [ first ] + split ( rest, xs )
[ -0.32864874601364136, 1.3077802658081055, 0.4386509358882904, 0.9443568587303162, 0.6621647477149963, -0.6363295316696167, 0.21617455780506134, 0.0007208764436654747, 0.18124334514141083, -0.8125855922698975, 0.011605761013925076, -0.3765392005443573, -0.6958987712860107, -0.7799072265625,...
def finished ( self ) : # print ('caught finished') if self. disablegui or self. quitonfinish : qapp. quit ( )
[ 1.2567766904830933, -0.8982735872268677, 0.32805532217025757, 0.7049791812896729, -0.7702716588973999, 0.5828989744186401, -0.183604896068573, -0.5596092343330383, 0.0461876317858696, 0.5729517936706543, -0.6724880337715149, -0.16037046909332275, -0.5451235771179199, 1.5447778701782227, ...
def django _ user _ model ( db ) : from django. contrib. auth import get _ user _ model return get _ user _ model ( )
[ -0.680324375629425, 0.22862398624420166, 0.015579176135361195, 0.8964123725891113, -0.2759629786014557, 0.9432771801948547, 0.39058664441108704, 0.25484344363212585, 0.3947673738002777, 0.1256641447544098, -1.0636545419692993, -0.6265990734100342, 0.8997817635536194, -0.3559757173061371, ...
def is _ on ( self, device _ id : str ) - > bool : return ( self. devices [ device _ id ] [ " current _ state " ] > 0 or ( self. devices [ device _ id ] [ " fan _ speed " ] or fan _ off )! = fan _ off )
[ -0.022540004923939705, -0.12525054812431335, 0.3086124658584595, 0.8993324637413025, -0.26597142219543457, 0.10435117036104202, -0.5374119877815247, 0.26036596298217773, 0.5161863565444946, 0.031245412304997444, -0.059456031769514084, 0.16330599784851074, -0.2544483542442322, 0.63491719961...
def is _ on ( self ) - > bool | none : return self. processor. entity _ data. get ( self. entity _ key )
[ -0.16638629138469696, 0.09321169555187225, 0.47151029109954834, -0.228597030043602, 0.3847636580467224, -0.4419289231300354, -1.3630250692367554, 0.7044042944908142, -0.25203123688697815, 0.44352617859840393, 0.1808200627565384, 0.5392815470695496, -0.11555463075637817, 0.4491839110851288,...
def neu _ industry ( stock _ data, sector _ series ) : # align sector _ series to stock _ data in case of stock _ data's sparse stocks inner = sector _ series [ stock _ data. columns ] stock _ data = stock _ data. replace ( [ - np. inf, np. inf ], 0 ). fillna ( value = 0 ) trans _ matrix = pd. dataframe ( ) for stock i...
[ -0.8527047634124756, 0.10209762305021286, 0.5588390827178955, -0.18151043355464935, 0.31362786889076233, 0.11395116150379181, 0.2685553729534149, -0.3629898428916931, 0.4459301829338074, 0.5516209602355957, 0.439847469329834, 0.3297196924686432, 0.09719079732894897, -0.416836678981781, 0...
def get _ dynamic ( self, key, num _ values ) : if num _ values = = 0 : return 0, 0, 0 order = self. meta [ " trees " ] [ key ] [ " order " ] max _ dyn = 0 if self. meta [ " trees " ] [ key ] [ " num _ dynamic " ]! = 0 : max _ dyn = self. meta [ " trees " ] [ key ] [ " dynamic " ] [ - 1 ] [ " order " ] if num _ values ...
[ -0.9026404619216919, 0.08939854055643082, 0.7203884124755859, 0.6164831519126892, 0.08672831952571869, -1.3266881704330444, -0.2965095639228821, -0.4789101183414459, -1.6396377086639404, 0.14825396239757538, -0.30763962864875793, 0.1002466008067131, 0.2439655363559723, 0.41905128955841064,...
def escape ( self, value ) : if value is none : return value elif isinstance ( value, ( int, float, long, decimal ) ) : return value res = value res = res. replace ('\ \ ','\ \ \ \') res = res. replace ('\ n ','\ \ n') res = res. replace ('\ r ','\ \ r') res = res. replace ('\ 047 ','\ 134 \ 047') # single quotes res =...
[ 0.6043754816055298, -0.20426149666309357, 1.032074213027954, -0.14176395535469055, -0.499874085187912, -0.7916291356086731, -0.4274997413158417, -0.5799659490585327, -0.056274496018886566, 0.2999773919582367, -0.21241703629493713, -0.17793743312358856, -0.7073143124580383, 0.57600945234298...
def set _ num _ updates ( self, num _ updates ) : super ( ). set _ num _ updates ( num _ updates ) self. num _ updates = num _ updates
[ -0.25435131788253784, -0.005679648835211992, 0.3745512366294861, 0.5670077204704285, -0.180906280875206, 0.13435937464237213, -0.239717036485672, 0.6029164791107178, 0.5835503935813904, -0.4980313181877136, -1.162926435470581, -0.2042980045080185, -0.07388787716627121, -0.19725409150123596...
def regex _ type _ 1 ( line, mot ) : replacement _ word ='' if mot = ='abdomen': mot ='| '. join ( variation _ abdomen ) replacement _ word ='abdomen'if mot = ='avantbras': mot ='| '. join ( variation _ avant _ bras ) replacement _ word ='avant bras'if mot = ='bassin': mot ='| '. join ( variation _ bassin ) replacement...
[ 0.8233956694602966, -0.53812175989151, 1.0690574645996094, -0.07875823974609375, -0.28685805201530457, -0.025196677073836327, -0.34732821583747864, 0.6447741985321045, -0.628118634223938, 0.4427941143512726, -0.21874739229679108, 0.09104499220848083, -0.07205989956855774, 0.362052470445632...
def power _ spectrum ( self, time, radius = none, * * kwargs ) : radius = basicconfig ['params. r _ surf'] if radius is none else radius coeffs = self. synth _ coeffs ( time, * * kwargs ) return mu. power _ spectrum ( coeffs, radius )
[ 0.36595281958580017, -0.5951315760612488, 0.5475351810455322, 0.2510586977005005, -0.35830095410346985, -0.60368812084198, -0.5211249589920044, -0.27991893887519836, -0.7517186403274536, -0.10347394645214081, 0.010183807462453842, 0.47423818707466125, -0.042693957686424255, 0.7171759009361...
def clean _ consent _ with _ household _ member ( self ) : initials = self. cleaned _ data. get ( " initials " ) first _ name = self. cleaned _ data. get ( " first _ name " ) gender = self. cleaned _ data. get ( " gender " ) household _ member = self. cleaned _ data. get ( " household _ member " ) if household _ member...
[ 0.37139806151390076, -0.5863566994667053, 0.7368993163108826, 0.2989825904369354, -0.04349071905016899, 0.2824929654598236, -0.25970253348350525, 0.30171364545822144, -0.9318987131118774, 0.15849077701568604, -0.2982800304889679, 0.4376543462276459, -0.28684356808662415, 1.0728182792663574...
def te _ elementcalc ( pdf _ 1, pdf _ 2, pdf _ 3, pdf _ 4, x _ pred _ val, x _ hist _ val, y _ hist _ val ) : # function evaluations term1 = pdf _ 1 ( [ x _ pred _ val, x _ hist _ val, y _ hist _ val ] ) term2 = pdf _ 2 ( [ x _ hist _ val, y _ hist _ val ] ) term3 = pdf _ 3 ( [ x _ pred _ val, x _ hist _ val ] ) term4 ...
[ 0.13563913106918335, -0.23330223560333252, 0.6280829310417175, -0.24913965165615082, 0.5524713397026062, -0.4984424412250519, -0.26578593254089355, 0.4055640399456024, -0.24288228154182434, -0.022553443908691406, 0.4809949994087219, 0.36071112751960754, 0.10874941200017929, -0.637906372547...
def handle _ command ( command, channel ) : feelings _ list = [ ] feelings _ list. append ( command ) response = " hello beautiful! how are you feeling today? use the * " + request _ command + \ " * request to get my musical interpretation of your mood today. " if command. startswith ( request _ command ) : slack _ cli...
[ 0.07821759581565857, 0.31541475653648376, 0.7702175974845886, 0.3050316274166107, 1.1212341785430908, -0.19895586371421814, -0.5508312582969666, -0.899519681930542, 0.24679040908813477, -0.7834429740905762, 0.372890442609787, 0.822950005531311, -0.6540675163269043, 0.8967723250389099, 0....
def get _ star _ list ( soup ) : # don't get soup too often, the server will rufused request # soup = get _ link _ soup ( link ) # stars = [ ] star _ elements = soup. select ('div [ class = " star - name " ]') for s in star _ elements : yield s. text # stars. append ( s. text ) # return stars
[ -1.6609820127487183, -0.38967791199684143, 0.3486484885215759, 0.17632520198822021, -0.8351649045944214, -0.16196617484092712, -0.7370437383651733, 0.39468541741371155, 1.1832696199417114, -0.12316597253084183, -0.8232309818267822, 0.05061028525233269, 0.28192779421806335, 1.09432089328765...
def _ _ init _ _ ( self, options : " namespace " ) : options. skip _ list = _ sanitize _ list _ options ( options. skip _ list ) options. warn _ list = _ sanitize _ list _ options ( options. warn _ list ) self. options = options formatter _ factory = choose _ formatter _ factory ( options ) self. formatter = formatter ...
[ 0.29626867175102234, -0.4016890525817871, 0.4636650085449219, 0.7406700849533081, -0.22493374347686768, -0.4496614933013916, 0.34236907958984375, -0.5945736169815063, 0.8672506213188171, -0.6014902591705322, -0.08651222288608551, 0.9490678906440735, 0.32441458106040955, 1.3650240898132324,...
def seed ( ) - > none : _ get _ default _ mps _ generator ( ). seed ( )
[ 0.6927005052566528, 0.4565306603908539, 0.2495977282524109, -0.1867906004190445, 1.2826648950576782, 0.5543115735054016, 0.903713047504425, 0.4636962115764618, -0.36030781269073486, -1.2308892011642456, 0.5413278937339783, 0.8736088275909424, -1.3547008037567139, 0.5680176019668579, -1.1...
def zone _ id ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " zone _ id " )
[ 1.4728257656097412, -0.23725496232509613, 0.29989826679229736, 0.6251676082611084, 0.7737758159637451, 0.7584015130996704, 0.5750191807746887, 0.6719293594360352, 1.448602318763733, -0.12697596848011017, 0.24066434800624847, 0.886777400970459, -0.2662534713745117, -0.6909303069114685, -0...
def _ _ str _ _ ( self ) : reservedseats = self. location. number _ of _ seats - self. number _ of _ free _ seats present = reservedseats - self. tickets. count return " showtime # " + str ( self. id ) + " of " + str ( self. movie _ playing ) + ", " + str ( self. location ) + ", at " + str ( self. timeslot ) + " ( " + ...
[ -0.1354665607213974, -1.3993544578552246, 0.9353384971618652, -0.8551710247993469, -0.6229866147041321, 0.7996146082878113, -0.5093935132026672, 0.03595088794827461, -0.4944104850292206, 0.26200029253959656, 0.12185082584619522, 0.04890061914920807, -0.20270024240016937, -0.099636964499950...
def minmatch _ factor _ validator ( count _ df : dataframe, column _ index : int, min _ match : float = 10, factor : float = 2 ) - > bool : if count _ df. iloc [ 0 ] [ column _ index ] < min _ match : return false if count _ df. iloc [ 1 ] [ column _ index ]! = 0 : ratio = count _ df. iloc [ 0 ] [ column _ index ] / co...
[ 0.368953138589859, -0.6895667314529419, 0.7794919013977051, 0.1684403270483017, -0.3408340811729431, 0.1541091799736023, 0.10818453878164291, -0.07203933596611023, -0.4096107482910156, -0.3428848385810852, 0.6136630177497864, 0.054372288286685944, -0.34699082374572754, -0.6826192140579224,...
def client _ secret ( self ) - > optional [ str ] : return pulumi. get ( self, " client _ secret " )
[ 1.6132408380508423, 0.06771896034479141, 0.4205702841281891, 0.14215372502803802, 0.7199335694313049, 0.6693846583366394, -0.07064104080200195, -1.2998400926589966, -0.2781887948513031, -0.05545562505722046, -0.8092811703681946, 0.4632631242275238, 0.41614779829978943, -1.3792228698730469,...
def mousemoveevent ( self, event ) : if ( event. buttons ( ) = = qt. mousebuttons ( qt. leftbutton ) and ( event. pos ( ) - self. _ _ dragstartpos ). manhattanlength ( ) > qapplication. startdragdistance ( ) ) : drag = qdrag ( self ) mimedata = qmimedata ( ) index = self. tabat ( event. pos ( ) ) mimedata. settext ( se...
[ -0.20861224830150604, -0.4592006206512451, 0.7406991124153137, -0.32803669571876526, -0.4559575319290161, 0.883082389831543, -0.7157547473907471, -0.1445126086473465, -0.45970943570137024, 0.12627790868282318, -0.8827693462371826, -0.20896391570568085, 0.49698102474212646, 0.27417740225791...
def test _ find _ accel _ sequences ( ) : t = np. array ( [ 1. 02754281, 1. 83007625, 1. 96758198, 2. 17759073, 3. 19263303, 3. 93266386, 4. 52518855, 5. 00270845, 5. 43522647, 5. 80024168, 5. 84524355, 6. 15275636, 6. 44776866, 6. 72278012, 6. 98279095, 7. 20280012, 7. 41030876, 7. 61781741, 7. 79782491, 7. 95533147, ...
[ 0.6794747710227966, -0.1779365837574005, 1.0917575359344482, 0.09951182454824448, 0.4116062819957733, 0.2885545492172241, 0.7280415892601013, -0.6528647541999817, -0.11468373239040375, 0.031774722039699554, -0.3298387825489044, -0.372928261756897, 0.4787381887435913, -0.025910304859280586,...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, create _ time : optional [ pulumi. input [ str ] ] = none, description : optional [ pulumi. input [ str ] ] = none, labels : optional [ pulumi. input [ mapping [ str, pulumi. input [ str ] ] ] ] = none, name...
[ -0.12272167205810547, -0.004921790212392807, 0.626423716545105, 0.3178125321865082, 0.29371148347854614, 0.8758738040924072, 0.021797316148877144, 0.1834351122379303, 0.8570266366004944, 0.13904275000095367, 0.22844979166984558, 0.8839088678359985, 0.2457541972398758, -0.7920052409172058, ...
def _ _ init _ _ ( self, card, default _ difficulty = difficulty. default, default _ attribute = characterattribute. default, force _ completed = false ) : super ( ). _ _ init _ _ ( ) self. _ _ card = card self. _ _ default _ difficulty = default _ difficulty self. _ _ default _ attribute = default _ attribute self. _ ...
[ -0.6608061194419861, 0.24283163249492645, 0.5172122120857239, 0.03562517836689949, 0.3703420162200928, 0.28555431962013245, 0.19603075087070465, 0.6569827198982239, -0.09164845943450928, -0.07751373946666718, -1.0417200326919556, -0.2658959627151489, 0.24948903918266296, 0.7579470872879028...
def min _ angle _ print ( current _ layer, x2, y, layer _ height ) : # increment _ size = 1 / n mm _ per _ rev = ( 10 ) a = 0 # print " current layer ", current _ layer # print " filament width ", filament _ width # print " increment ", increment _ size # print " n ", n # print " y ", y # print " layer height ", layer ...
[ 0.6958053112030029, -1.1795848608016968, 0.818138062953949, -0.669259250164032, -0.12058935314416885, -0.03419316187500954, 1.0706359148025513, -0.4584018588066101, -0.24521246552467346, 0.21140053868293762, 0.4394008219242096, 0.8320430517196655, -0.407336950302124, 0.3684535622596741, ...
def test _ concurrentimplicitworkingdirectory ( self ) : self. parseoptions ( [ ] ) # make sure we end up with the same working directory after this test # as we had before it. self. addcleanup ( os. chdir, os. getcwd ( ) ) # make a new directory and change into it. this isolates us from state # that other tests might ...
[ 0.12277525663375854, 0.25289013981819153, 0.7249590754508972, 0.15083354711532593, 0.7266015410423279, -0.08066776394844055, 1.4865514039993286, 0.15539436042308807, 0.42674142122268677, -0.3710327446460724, -0.4467636048793793, -0.03577108308672905, -0.4471537172794342, 0.0792508944869041...
def expand ( self, corners : list [ point ], acc : int ) - > none : for i in range ( len ( corners ) ) : corners [ i ]. x * = acc corners [ i ]. y * = acc
[ 0.3871214687824249, 0.21132142841815948, 0.47846293449401855, -0.6129460334777832, 0.5975684523582458, -0.12073830515146255, -0.20981934666633606, -0.050224266946315765, 0.2722281217575073, 0.2819676399230957, 0.4420955181121826, -0.4562772214412689, 0.6414110660552979, 0.24094024300575256...
def select ( self, * keys, * * executor _ config ) : return self. map ( lambda row : { key : row [ key ] for key in keys }, * * executor _ config )
[ -0.9625585079193115, 0.194329634308815, 0.22521840035915375, 0.28548261523246765, -0.0844036415219307, -1.3229317665100098, -1.0803370475769043, 0.16559141874313354, -0.4648635685443878, 0.3805186450481415, -0.17555926740169525, -0.30183082818984985, 0.4325678050518036, 0.2219991683959961,...
def _ bullet _ target _ collision ( self, bullet ) : self. stats. reset _ target _ missed ( ) self. stats. target _ hit + = 1 self. stats. target _ hits + = 1 self. _ update _ hit _ count _ button ( ) se. target _ hit. play ( ) self. bullets. remove ( bullet ) if self. stats. target _ hit = = 3 : self. stats. reset _ h...
[ -0.4092291295528412, 0.018754031509160995, 0.5898603200912476, 0.05403510481119156, 0.7951445579528809, -0.2497604638338089, 0.6919161677360535, -0.5293759703636169, 0.11867456883192062, 0.588983416557312, -0.026171738281846046, -0.20734862983226776, -0.06122821941971779, -1.19831800460815...
def resetoutput ( self ) : self. outputconnector. untap ( self,'output') self. outputtype = 0 self. outputconnector = none
[ -0.5408769845962524, -0.7197081446647644, 0.30832406878471375, 0.5085675120353699, -0.0823231190443039, -0.863128662109375, 1.4433280229568481, -0.1757356822490692, -0.6153445839881897, -0.10347867757081985, 0.4196698069572449, -0.308245986700058, -0.32423704862594604, -0.333844393491745, ...
def drawpolygon ( self, pointlist, edgecolor = none, edgewidth = none, fillcolor = none, closed = 0 ) : portsaver = _ portsaver ( self ) self. _ preparetodraw ( ) polygon = qd. openpoly ( ) filling = 0 if fillcolor : if fillcolor! = transparent : _ setbackcolor ( fillcolor ) filling = 1 elif self. defaultfillcolor! = t...
[ -0.7708545923233032, -0.15025809407234192, 0.7680755257606506, -0.42828643321990967, 0.29085734486579895, 0.6893345713615417, -0.0429219976067543, 0.12778687477111816, 0.9444252848625183, -0.35450053215026855, -0.7983425259590149, -0.1765296757221222, 0.054447002708911896, -0.0817046687006...
def get _ percolated _ node _ edge ( origin _ struct, node _ struct, rad _ dict, probe _ rad ) : _, vor _ accessible _ node _ struct, _, _ = get _ voronoi _ percolate _ nodes ( origin _ struct, rad _ dict, probe _ rad ) # print vor _ accessible _ node _ struct. lattice = = node _ struct. lattice # print vor _ accessibl...
[ 0.0915931835770607, -0.34511905908584595, 0.6035792827606201, -0.47113487124443054, -0.2831445336341858, 0.12873618304729462, 0.6379792094230652, 0.7374674081802368, -0.020403925329446793, 0.47528955340385437, 0.940900444984436, 0.9401039481163025, -0.7461119294166565, -0.0924389436841011,...
def transition _ lik ( self, means, results ) : # choose std s. t., if predictions are'bad ', punishment should be high dist = normal ( means, self. dyn. transition _ lik _ std ) log _ lik = dist. log _ prob ( results ) return log _ lik
[ -0.05870097875595093, 0.18880361318588257, 0.26094117760658264, 0.019681865349411964, -0.7298343181610107, 0.32509633898735046, -0.15198035538196564, 0.24127976596355438, 0.018298856914043427, 0.6459422707557678, -0.05771572142839432, 0.02325454168021679, 0.6532745361328125, -0.12866853177...
def non _ uniform _ savgol ( x, y, window, polynom ) : if len ( x )! = len ( y ) : raise valueerror ('" x " and " y " must be of the same size') if len ( x ) < window : raise valueerror ('the data size must be larger than the window size') if type ( window ) is not int : raise typeerror ('" window " must be an integer'...
[ 0.3945871591567993, 0.07045286893844604, 0.9464017152786255, -0.21417582035064697, -0.9619993567466736, -0.4033043384552002, 0.5011205077171326, 0.41903775930404663, -0.3429076373577118, 0.8996084332466125, -0.7589461207389832, 0.7111234068870544, 0.17306049168109894, 0.020653529092669487,...
def custom _ namespaces _ per _ services ( self ) - > pulumi. output [ optional [ sequence ['outputs. integrationcustomnamespacesperservice'] ] ] : return pulumi. get ( self, " custom _ namespaces _ per _ services " )
[ 0.31386563181877136, 0.45465752482414246, 0.4063066840171814, 0.18756121397018433, -0.5253051519393921, 0.5445681810379028, 0.6107187867164612, -0.7091615200042725, 1.4852503538131714, -0.3968545198440552, -0.35643377900123596, 0.49387988448143005, 0.20672138035297394, 0.3384656608104706, ...
def _ _ str _ _ ( self ) : result = " " for key, value in self. _ groups. items ( ) : result + = " group { } : \ n ". format ( key ) result + = str ( self. _ groups [ key ] ) return result
[ -0.8045070171356201, -0.6983852982521057, 0.22143539786338806, -1.5014216899871826, -0.5933607816696167, 0.35216024518013, -0.4869576096534729, -0.809465765953064, -1.3265513181686401, -0.09465410560369492, 0.9053542613983154, 0.5228988528251648, -0.05495791137218475, 0.10903661698102951, ...
def process ( save _ file = true ) : input _ metadata _ file = os. path. join ( cfg. input _ path, cfg. raw _ data _ filename ) output _ metadata _ file = os. path. join ( cfg. output _ path, cfg. processed _ data _ filename ) input _ metadata _ file = os. path. realpath ( os. path. normpath ( input _ metadata _ file )...
[ 0.15513813495635986, 0.5890211462974548, 0.7119181156158447, -0.11683125793933868, 0.704745888710022, -0.35440558195114136, 0.3055816888809204, 0.6392155885696411, -1.0060518980026245, 0.43588879704475403, 0.605055034160614, 0.08007969707250595, 0.3462950885295868, 0.013272427022457123, ...
def savetofile ( self, filepath ) : d = self. save ( ) [ 0 ] with open ( filepath,'wb') as f : f. write ( d )
[ -0.7906514406204224, -0.1496151238679886, 0.1672261506319046, -0.5197480320930481, 1.4691702127456665, 0.7542657852172852, 0.5550519227981567, -0.39138859510421753, -0.5911694169044495, 0.5056897401809692, -1.0135173797607422, -0.44120654463768005, 0.18100208044052124, 0.16049426794052124,...
def naivebayes ( train _ set, train _ labels, dev _ set, smoothing _ parameter, pos _ prior ) : # todo : write your code here # return predicted labels of development set return [ ]
[ -1.1544219255447388, 0.36208611726760864, 0.5428812503814697, 0.8330758213996887, -0.22243107855319977, 0.9699471592903137, 0.06703955680131912, -0.5309816002845764, -0.2535010576248169, -0.44076818227767944, 0.5097095370292664, 0.05806717276573181, -0.3654353618621826, 0.1601553112268448,...
def register ( self, engine ) : if not isinstance ( engine, compressionengine ) : raise valueerror ( _ ( b'argument must be a compressionengine') ) name = engine. name ( ) if name in self. _ engines : raise error. abort ( _ ( b'compression engine % s already registered') % name ) bundleinfo = engine. bundletype ( ) if ...
[ -0.6473948955535889, 0.018653584644198418, 0.8065228462219238, 0.08711633086204529, 0.2342538833618164, -0.03229047358036041, 0.10286186635494232, -0.3931592106819153, -0.4494404196739197, -0.09574683010578156, -0.8750277161598206, -0.0302230566740036, -0.5973278284072876, 0.71267539262771...
def click _ change _ password ( self ) : time. sleep ( 0. 8 ) webdriverwait ( self. driver, 10 ). until ( ec. visibility _ of _ element _ located ( ( by. css _ selector, self. css _ changepassword ) ) ) self. driver. find _ element _ by _ css _ selector ( self. css _ changepassword ). click ( )
[ -0.05876040458679199, 0.007100555580109358, 0.720884382724762, 0.2342173308134079, 1.0241410732269287, -0.13315966725349426, 0.22332678735256195, 0.3082537055015564, 0.38171857595443726, 0.938026487827301, 0.015097272582352161, 1.0022335052490234, -0.6087728142738342, 0.3289235532283783, ...
def validate _ batch _ size _ for _ multi _ gpu ( num _ gpus, batch _ size ) : if batch _ size > 0 : if num _ gpus > 4 : from tensorflow. python. client import device _ lib local _ device _ protos = device _ lib. list _ local _ devices ( ) num _ gpus = sum ( [ 1 for d in local _ device _ protos if d. device _ type = ='...
[ 0.2999613881111145, 0.10137642920017242, 0.6535136103630066, 1.082738995552063, 0.06942601501941681, 0.30168330669403076, -0.048485517501831055, 0.14266245067119598, -0.29277071356773376, 0.03061811253428459, 0.5485840439796448, -0.2179451733827591, -0.26953011751174927, 0.8029637336730957...
def make _ regex ( query ) : return re. compile ('^'+ re. escape ( query ) +'$ ', re. ignorecase )
[ -0.06359417736530304, -0.0035247269552201033, 0.30457037687301636, -0.08899559080600739, -0.7152217030525208, 0.6945303082466125, -0.9110009074211121, 0.5922144055366516, 0.1805991381406784, -0.4519036114215851, 0.150198295712471, 0.5528923869132996, -0.16881370544433594, -0.45557087659835...
async def load ( self, ctx, *, cog : str ) : if not mod _ check ( ctx ) : return try : self. client. load _ extension ( " cogs. " + cog ) except exception as e : await ctx. send ( f " * * ` error : ` * * { type ( e ). _ _ name _ _ } - { e } " ) else : await ctx. send ( " * * ` success ` * * \ n { pistol } " ) self. las...
[ -0.04212066903710365, 1.1961349248886108, 0.78672194480896, -0.14595142006874084, -0.18464338779449463, 0.17625461518764496, -0.5411068201065063, -0.18804381787776947, 0.1516530066728592, 0.4887469708919525, -0.774968683719635, 1.0290415287017822, -1.1344066858291626, -0.07352561503648758,...
def chroma _ effect _ strength ( self ) : # type : ( ) - > float return self. _ chroma _ effect _ strength
[ 0.7346141338348389, -0.9449194669723511, 0.16892598569393158, 0.4555536210536957, 0.7120290994644165, 0.8141059279441833, 1.0896899700164795, -0.31211090087890625, -0.053676288574934006, -0.8481336832046509, -1.2769122123718262, 0.199148029088974, -1.453970193862915, 0.14578145742416382, ...
def convert _ nestedexpr _ to _ tuple ( nested _ expression ) - > tuple [ set [ str ], tuple ] : function _ names = set ( ) new _ nested = [ ] for i, argument in enumerate ( nested _ expression ) : if i = = 0 : function _ names. add ( argument ) new _ nested. append ( argument ) else : if isinstance ( argument, list ) ...
[ -0.9547473788261414, 0.15994645655155182, 0.9498206377029419, 0.16978982090950012, 0.1615341454744339, -0.5656692981719971, -0.19452525675296783, 0.6136068105697632, -0.5214939713478088, -0.007375843822956085, -0.7292371392250061, 0.3959527015686035, -0.21939055621623993, 0.401847809553146...
def set _ attendance ( cls ) : student _ id = input ('insert student id :') date = input ('insert date :') option = input ('a = present, b = late c = not there :') option = option. upper ( ) if option = ='a': attendance ='present'elif option = ='b': attendance ='late'elif option = ='c': attendance ='absent'else : print...
[ -0.4586925506591797, -0.23466579616069794, 0.773466944694519, 0.06779653578996658, -0.021610142663121223, 1.1748580932617188, 0.3530714511871338, 0.35883277654647827, 0.2227499932050705, 0.6483902335166931, -0.28211283683776855, -0.047159258276224136, -0.38367658853530884, 0.61886298656463...
def create _ producer ( self, stream, local = false, producer _ name = none, initial _ sequence _ id = none, send _ timeout _ millis = 30000, compression _ type = compression _ types. none, max _ pending _ messages = 1000, block _ if _ queue _ full = false, batching _ enabled = false, batching _ max _ messages = 1000, ...
[ 0.18303710222244263, -0.2605026662349701, 0.8834693431854248, 1.08432137966156, -0.15558703243732452, -0.29069459438323975, 0.19131451845169067, -0.45858293771743774, 0.5699592232704163, 0.2663592994213104, 0.008609939366579056, 1.1875048875808716, -0.6770216822624207, 0.5720301270484924, ...
def get _ snapshots ( self, machine _ id : str ) - > apiresponse : return self. _ get ( " list ", { " pk " : self. user _ pk, " sdi _ id " : self. sdi _ pk, " machine _ id " : machine _ id } )
[ -0.6905501484870911, 1.4379931688308716, 0.22739744186401367, 0.8190828561782837, -0.741172730922699, -0.12673577666282654, -1.0173578262329102, -0.7580923438072205, 0.299148291349411, -0.3359086811542511, -0.7175796031951904, 0.006035524886101484, 0.41652175784111023, 0.5551748871803284, ...
def _ fake _ run _ completion ( self, scenario _ id ) : with api. app. app _ context ( ) : run = models. scenario. query. get ( scenario _ id ). latest _ run run. status _ id = models. scenariorunstatus. success _ id run. outputs. append ( models. output ( output _ type _ id = self. test _ output _ type _ id, unit = se...
[ -0.14190195500850677, -0.4565880000591278, 0.6786824464797974, -0.27461957931518555, 0.29004770517349243, -0.24003855884075165, 0.5032175779342651, -0.09506426006555557, -0.30835744738578796, 0.747176468372345, -0.8588834404945374, -0.19625011086463928, 0.11576323956251144, 0.3280311226844...
def terrain _ to _ z _ height ( self, h ) : return - 16 + 32 * h / 255
[ -0.30298537015914917, -0.3360218405723572, 0.38890358805656433, 0.6255236864089966, -0.4652285873889923, 0.9036198258399963, 0.2953706681728363, -1.2249857187271118, -0.4132906496524811, 0.24847222864627838, -0.32102832198143005, -0.09837283194065094, -0.13743004202842712, -0.1309994161128...
def test _ three _ plots ( self ) : inch _ per _ unit = 1. 0 x _ units = 8 y _ units = 1 left = [ 1, 3, 6 ] bottom = 0 width = [ 1, 2 ] height = 1 figsize, coords = pt. make _ coordinates ( inch _ per _ unit, x _ units, y _ units, left, bottom, width, height ) r = 0. 125 c = [ ( r, 0, r, 1 ), ( 3 * r, 0, 2 * r, 1 ), ( ...
[ 0.4047882854938507, 0.7300812602043152, 0.5691221356391907, -0.085713692009449, -0.08305789530277252, 1.3342503309249878, 0.4593682885169983, -0.5725277066230774, -0.10097499936819077, -0.5066211819648743, -0.5804159045219421, -0.6581548452377319, -0.3656247556209564, -1.0300053358078003, ...
def put _ key ( html _ txt, apikey ) : apistring = ( " https : / / maps. googleapis. com / maps / api / js? " " key = % s & callback = initialize & libraries = visualization " " & sensor = true _ or _ false " ) soup = bs4. beautifulsoup ( html _ txt,'html. parser') soup. script. decompose ( ) # remove the existing scri...
[ -0.8389745354652405, 0.35111722350120544, 0.3555784225463867, -1.640998125076294, -0.4511295258998871, -0.20191507041454315, -0.45895665884017944, 0.9952070116996765, 0.03394737467169762, 1.5494279861450195, -0.21621744334697723, -0.18438859283924103, -0.6436648368835449, 0.174477145075798...
def flip ( num ) : if num < = 0 or ( num % 10 ) = = 0 : return - 1 return int ( " ". join ( reversed ( " { } ". format ( num ) ) ) )
[ -1.3621896505355835, 0.521229088306427, 0.8173528909683228, -0.5350048542022705, -0.6052528619766235, 0.15765509009361267, 0.2782500088214874, 1.059981107711792, -0.29239216446876526, -0.029564008116722107, 0.7446618676185608, 0.023072300478816032, -0.5688549876213074, 0.05225291848182678,...