text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ compile _ circuit _ router ( ) : router _ mock = magicmock ( ) cirq. contrib. quantum _ volume. compile _ circuit ( cirq. circuit ( ), device = cirq. google. bristlecone, router = router _ mock, routing _ attempts = 1 ) router _ mock. assert _ called ( )
[ -0.2601802945137024, -0.3537974953651428, 0.3699253797531128, 0.051308728754520416, 0.48631808161735535, 0.07821470499038696, 0.5639008283615112, 0.30868807435035706, -0.03559114411473274, -0.4958321154117584, -0.38641923666000366, 0.2754940092563629, -0.790892481803894, 0.5297056436538696...
def test _ exchange _ code _ jwt _ key ( self ) - > none : from authlib. jose import jwt token = { " type " : " bearer ", " access _ token " : " aabbcc ", } self. fake _ server. post _ token _ handler. side _ effect = none self. fake _ server. post _ token _ handler. return _ value = fakeresponse. json ( payload = toke...
[ 0.3565235137939453, 0.7832478880882263, 0.7031406760215759, -0.3724164068698883, 0.38506948947906494, -0.09066218882799149, -0.5725314021110535, 0.1038919985294342, -0.011407356709241867, 0.1814287304878235, -0.45620524883270264, 0.7429269552230835, 0.05460033193230629, 0.7008852362632751,...
def gammas ( self, gamma _ v ) : if self. is _ frozen : warnings. warn ( f'cannot set gammas to a frozen normalizer { self. name }. ', userwarning ) else : np. copyto ( self. _ gamma _ v, gamma _ v, casting ='same _ kind')
[ -0.9585648775100708, -0.31133827567100525, 0.31957772374153137, -0.5944521427154541, 0.5266610980033875, -0.05984354019165039, 0.34026244282722473, -0.6966156363487244, 0.5120022296905518, 0.21526262164115906, -0.6468604803085327, 1.7022207975387573, -0.20724737644195557, 0.602124154567718...
def _ build _ list _ params ( param _ name, key, values ) : params = { } if hasattr ( values,'_ _ iter _ _') : index = 0 for value in values : params [ str ( param _ name ) +'['+ str ( index ) +'].'+ str ( key ) ] = str ( value ) index + = 1 else : params [ str ( param _ name ) +'[ 0 ].'+ str ( key ) ] = str ( values )...
[ -0.6837947368621826, -0.23572267591953278, 0.5604898929595947, -0.4820711314678192, -0.1641310602426529, -0.8277903199195862, -0.8899133801460266, 0.8067233562469482, -0.40542006492614746, 0.7710039615631104, 0.0760861486196518, -0.3780629634857178, 0.37275922298431396, 1.2790871858596802,...
def getnetworklistbytype ( self, session, network _ type ) : self. getlogger ( ). \ debug ('getnetworklistbytype ( type = % s )'% ( network _ type ) ) return session. query ( networks ). filter ( networks. type = = network _ type ). all ( )
[ -0.6142233610153198, 0.09847347438335419, 0.25265777111053467, 0.41615909337997437, 0.8816992044448853, -0.6490322351455688, -0.17957453429698944, -0.809760570526123, 1.544337511062622, 0.4341738820075989, -0.6418484449386597, -0.48133963346481323, 0.10384353250265121, 1.0524177551269531, ...
def get _ annotmatch _ config _ hashid ( ibs, annotmatch _ rowid _ list, eager = true, ninput = none ) : id _ iter = annotmatch _ rowid _ list colnames = ( config _ hashid, ) config _ hashid _ list = ibs. db. get ( const. annotmatch _ table, colnames, id _ iter, id _ colname ='rowid ', eager = eager, ninput = ninput ) ...
[ -0.33727893233299255, 0.43272221088409424, 0.3606767952442169, 0.6105818152427673, 0.12789760529994965, 0.07316821813583374, -0.2755177319049835, 0.10617826133966446, 0.18042325973510742, 1.2600957155227661, -0.3000987470149994, -0.6909017562866211, -0.01536356471478939, 0.5699368119239807...
def name ( self, name ) : self. _ name = name
[ -0.7426688075065613, -0.5267971158027649, 0.028339257463812828, -0.49122101068496704, -0.9281920194625854, 0.32336241006851196, 0.2469799667596817, 0.4466080665588379, -0.38216784596443176, 0.8633190989494324, -1.4300670623779297, -0.7967672348022461, 0.4041702449321747, 0.6463659405708313...
def train ( self, inputs, targets ) : self. ridge. fit ( inputs, targets )
[ 0.00962346512824297, -0.23407907783985138, 0.10716810077428818, 0.09458509087562561, 1.7249221801757812, 0.12017299979925156, -0.26388663053512573, 0.09417617321014404, -1.2112945318222046, -0.5068773627281189, 0.21696248650550842, 0.849566638469696, -0.6923459768295288, -0.345851272344589...
def get _ xs _ dominant ( self ) : idx = self. _ xs. index ( max ( self. _ xs ) ) return self. _ p1 [ idx ], self. _ p2 [ idx ]
[ -0.5315110683441162, -0.42949774861335754, 0.7924891710281372, 0.18767902255058289, 0.6238892674446106, -0.3160959780216217, -1.2281770706176758, -0.04820927605032921, -0.21446648240089417, 0.059364065527915955, -0.37102973461151123, 0.7659029364585876, 0.2724457085132599, -1.0182178020477...
def get _ travel _ time ( graph, path ) : eta = 0 for i in range ( len ( path ) - 1 ) : eta + = graph [ path [ i ] ] [ path [ i + 1 ] ] return eta * 120
[ -0.8361639976501465, 0.9595431685447693, 0.763620913028717, -0.0722208321094513, 0.16666601598262787, -0.5539724230766296, 0.2469605654478073, -0.5680995583534241, -0.1676252782344818, 1.7981197834014893, -0.04909292235970497, -0.21134233474731445, 0.07927074283361435, -0.81589674949646, ...
def run _ with _ vertical _ hseq ( prefix, model, n _ iter = 10, mpi = false, n _ processes = multiprocessing. cpu _ count ( ), overwrite = false ) : from hyperion. grid import cylindricalpolargrid from hyperion. model. model _ output import modeloutput from hyperion. util. integrate import integrate from hyperion. uti...
[ 0.08565782755613327, 0.046041883528232574, 0.9498191475868225, 0.40222907066345215, 0.17629386484622955, -0.17208045721054077, 0.14280647039413452, -0.13220027089118958, -0.9959818720817566, 1.0233169794082642, -0.6434472799301147, 0.06151876598596573, -0.1231120377779007, 0.77970808744430...
def test _ is _ matrix ( self ) : self. assertraises ( nonmatrixerror, ismatrix,'a') self. assertraises ( nonmatrixerror, ismatrix, vector ( [ 1, 2, 3 ] ) ) self. assertraises ( nonmatrixerror, ismatrix, [ [ 1, 2 ], [ 2 ] ] ) self. assertraises ( nonnumericerror, ismatrix, [ [ 1,'a'], ['a ', 1 ] ] ) assert ( ismatrix (...
[ -0.7371146082878113, -0.015355437994003296, 0.3771322965621948, 0.4828220307826996, 0.11976554244756699, -0.20360338687896729, 0.4258718490600586, 0.23723332583904266, 1.2372881174087524, -0.5174992084503174, -0.23767173290252686, -0.09162526577711105, -0.5641025900840759, 0.48493906855583...
def test _ claims _ expired _ locks ( self ) : mission = missionfactory ( ) pages = pagefactory. create _ batch ( 3, mission = mission ) users = userfactory. create _ batch ( 2 ) page. objects. filter ( pk = pages [ 0 ]. pk ). update ( locked _ by = users [ 1 ], locked _ until = timezone. now ( ) - timedelta ( seconds ...
[ 0.9240037202835083, -0.4007508456707001, 0.4778953492641449, 0.2445162683725357, 0.1728994995355606, 1.180638074874878, -1.4120155572891235, -0.13953760266304016, -0.43577003479003906, 0.009416598826646805, 0.5208101272583008, 0.5931301712989807, 0.007298905402421951, -0.4396612048149109, ...
def _ find _ transform _ job ( job _ name, sage _ client ) : transform _ jobs _ page = sage _ client. list _ transform _ jobs ( maxresults = 100, namecontains = job _ name ) while true : for transform _ job in transform _ jobs _ page [ " transformjobsummaries " ] : if transform _ job [ " transformjobname " ] = = job _ ...
[ 0.258331298828125, -0.4020838737487793, 0.6283992528915405, -1.4731303453445435, -0.3427025079727173, -0.6056151390075684, -0.3149402141571045, -0.2940315306186676, 0.2812804579734802, -0.16746167838573456, -0.065547876060009, 0.31950271129608154, -0.6976865530014038, 0.4415709972381592, ...
def _ _ init _ _ ( self, table : sa. table, model : type [ modeltype ], db : database ) : self. table = table self. model = model self. db = db
[ 0.421355277299881, 0.46481865644454956, 0.38781312108039856, 1.5843243598937988, 0.1330818086862564, 0.3720393478870392, -0.3066859543323517, 0.19738583266735077, -0.08806171268224716, 0.45616376399993896, -0.23237770795822144, 0.22383156418800354, 0.36697691679000854, 0.8894853591918945, ...
def _ _ init _ _ ( self, images, xpos, ypos, health ) : # speed is zero so that nothing can move this totem super ( ). _ _ init _ _ ( images, xpos, ypos, speed = 0 )
[ 0.3890213072299957, -0.25243857502937317, 0.5156238675117493, 0.45631033182144165, 0.5660297274589539, 0.06746461987495422, -0.36902210116386414, 0.6308399438858032, -0.44170698523521423, -0.1113431304693222, -0.3109697103500366, -1.0509589910507202, 0.20292843878269196, 0.4306981265544891...
def project _ well _ loc ( self ) : distances = [ ] for well _ xy in self. well _ xy : [ xp, yp ] = well _ xy # get profile origin self. data. get _ profile _ origin ( ) # project drillhole location onto profile and get distance along profile [ m, c1 ] = self. data. profile [ x0, y0 ] = self. data. profile _ origin x =...
[ -0.08077464997768402, -0.6563300490379333, 0.5639969706535339, -0.5702629089355469, -0.26101648807525635, 0.5072166919708252, 1.471877932548523, -0.5233859419822693, 0.21547336876392365, 0.7373822927474976, -0.5766300559043884, -0.09960899502038956, 0.027562962844967842, 0.0447343848645687...
def test _ generate _ get _ parameter _ values _ string ( self ) : # example acs - > cpe rpc call. copied from : # http : / / djuro82. blogspot. com / 2011 / 05 / tr - 069 - cpe - provisioning. html # following edits made : # - change header id value from'null0'to'null ', to match magma # default id expected _ acs _ st...
[ -0.061679523438215256, -0.13634604215621948, 0.8516253232955933, -1.0912351608276367, 0.09441319853067398, 0.1001306101679802, -0.7789763808250427, -0.07555199414491653, -0.18297691643238068, 0.038442693650722504, 0.18104664981365204, 0.5131471753120422, -0.3914785385131836, 0.273620307445...
def list _ existing _ dates ( self ) : existing _ keys = [ obj. key for obj in self. _ bucket. objects. filter ( prefix = self. prefix ) ] existing _ dates = [ ] for key in existing _ keys : m = re. search ( r'( \ d + - \ d + - \ d + ) ', key ) date = m. group ( 1 ) if date not in existing _ dates : existing _ dates. a...
[ -0.6515002250671387, -0.926389753818512, 0.566717803478241, -0.11688579618930817, -0.02673511952161789, 0.36120983958244324, -0.9201486110687256, 0.18404561281204224, 0.2403196543455124, 0.60750812292099, -0.6932603120803833, 0.6779878735542297, -0.021415580064058304, 0.46234801411628723, ...
def fuel _ burn _ min _ balance _ abs _ rule ( mod, f, ba, bt, h ) : return ( mod. total _ horizon _ fuel _ burn _ by _ fuel _ and _ fuel _ ba _ from _ all _ sources _ expression [ f, ba, bt, h ] + mod. fuel _ burn _ min _ shortage _ abs _ unit _ expression [ f, ba, bt, h ] > = mod. fuel _ burn _ min _ unit [ f, ba, bt...
[ 0.19775602221488953, -0.5309975147247314, 0.5502206683158875, 0.29146766662597656, 0.100757896900177, 0.9494383931159973, -0.41106048226356506, 0.003241686848923564, -0.5914576649665833, -0.7245959639549255, 0.438249796628952, 0.43128225207328796, -0.3990018665790558, 0.7887802720069885, ...
def sum ( self ) - > dataframe : return self. select _ all ( ). sum ( )
[ -0.5808388590812683, 0.5749682784080505, 0.3064992129802704, 0.4618753492832184, 0.6070647239685059, -0.6025415062904358, 0.19827800989151, -0.08021850883960724, -0.052173927426338196, -0.7755184173583984, -0.06809300929307938, 0.5644395351409912, -0.0024681470822542906, -1.031464695930481...
def post ( self, * args, * * kwargs ) : if self. request. method = = " post " and self. request. is _ ajax ( ) : form = self. form _ class ( self. request. post ) if form. is _ valid ( ) : title = form. cleaned _ data ['title'] created _ by = self. request. user if deliverytask. objects. filter ( title = title, created...
[ -1.1060258150100708, -0.03227069601416588, 1.1713294982910156, 0.29136642813682556, -0.7330448627471924, 0.5240443348884583, 0.04767097905278206, -0.09150157868862152, -0.7142036557197571, 0.21501436829566956, -1.4038715362548828, -0.6926456689834595, 0.8320214748382568, 0.9586403369903564...
def maintenance _ strategies ( self ) - > optional [ pulumi. input ['fleetspotoptionsmaintenancestrategiesargs'] ] : return pulumi. get ( self, " maintenance _ strategies " )
[ 0.27643486857414246, -0.231356680393219, 0.6339990496635437, 0.5030924081802368, 1.2171992063522339, 0.734502375125885, 0.28753191232681274, -0.5505698323249817, 0.9728359580039978, -0.6902852058410645, 0.213955819606781, -0.02590136229991913, 0.11455032974481583, -0.2317524403333664, -0...
def grid _ directory ( self ) : return os. path. join ( self. _ user _ config _ directory ( ), " grid " )
[ 0.052753858268260956, 0.33605852723121643, 0.619295597076416, 0.8815203905105591, 0.19621482491493225, 0.43251264095306396, 0.8472636938095093, -0.1559126228094101, -0.13465803861618042, -0.9604793787002563, 0.45567619800567627, 0.745714545249939, -0.32298189401626587, 0.4280714988708496, ...
def getsamplingpoints ( self ) : return self. points
[ 0.07836539298295975, -0.15059739351272583, 0.2673408091068268, 0.6194257140159607, -0.5875624418258667, 0.24655769765377045, -0.2652103304862976, 0.6511303782463074, 0.6672852635383606, 0.22709104418754578, -0.26561835408210754, -0.13745512068271637, -0.4445189833641052, -0.225405558943748...
def to _ coo ( tree, target _ tree, seq _ dict ) : # all target bit strings target _ mps = multipartitions ( target _ tree ) clades = list ( tree. find _ clades ( order ='level') ) term _ names = [ term. name for term in tree. get _ terminals ( ) ] term _ names. sort ( ) # lookup table ( node name to index ) lookup = d...
[ 0.6380710601806641, -0.08547156304121017, 0.726346492767334, -0.7221136093139648, -0.4545215666294098, -0.5624783635139465, -0.2809750437736511, 0.41620001196861267, -0.8212095499038696, 1.2350903749465942, -0.613902747631073, 0.23439104855060577, 0.4545922875404358, -0.165486142039299, ...
def flip _ case ( phrase, to _ swap ) : # get uppercase and lowercase of to _ swap : to _ swap _ both = [ to _ swap. upper ( ), to _ swap. lower ( ) ] # turn phrase into list phrase _ list = list ( phrase ) # iterate and swap casing for idx in range ( len ( phrase _ list ) ) : if phrase _ list [ idx ] in to _ swap _ bo...
[ -1.3876404762268066, -0.5219635963439941, 0.8022158741950989, -0.7113704681396484, 0.14249666035175323, 0.7455310225486755, -0.872652530670166, 1.0061745643615723, 0.5539485812187195, 1.517928957939148, 0.31747809052467346, 0.4185088872909546, -0.1176377534866333, -0.017826242372393608, ...
def _ _ init _ _ ( self, _ strict _ mode = false, * * kwargs ) : for key, val in kwargs. items ( ) : if not _ strict _ mode or key in self. _ _ dict _ _ : self. _ _ dict _ _ [ key ] = val
[ -0.548678457736969, -0.3634180724620819, 0.5750449895858765, 0.05218387395143509, -0.053903836756944656, 0.7975115776062012, -0.7075433731079102, -0.23076178133487701, -1.0989948511123657, 0.1944027841091156, -0.9543650150299072, -0.6866244077682495, -0.1156429573893547, 0.7919093370437622...
def _ _ init _ _ ( self, myinputfilename, dagmc = none ) : super ( modmcnpforphotons, self ). _ _ init _ _ ( ) self. inputfilename = myinputfilename self. dagmc = dagmc if self. dagmc is none : self. dagmc = _ is _ dagmc ( self. inputfilename ) if self. dagmc : print " { 0 } is a dag - mcnp input file. ". format ( self...
[ -0.48177242279052734, -0.07875309884548187, 0.4718106985092163, -0.173341765999794, -0.9943742156028748, -0.259433776140213, 0.8120422959327698, 0.4790900647640228, 0.612859308719635, -0.77044677734375, 0.20390106737613678, 0.2972347140312195, -0.10537703335285187, 0.8305937647819519, 1....
def _ update _ mode ( self ) : mode = self. _ modes _ heap [ - 1 ] [ 0 ] assert mode in range ( self. number _ of _ modes ( ) ) if self. _ mode _ index = = mode or ( mode = = 2 and not self. song ( ). view. selected _ track. has _ midi _ input ) : self. _ previous _ mode _ index = self. _ mode _ index else : self. _ mo...
[ -0.8758342862129211, -0.5875265002250671, 0.8175991177558899, -0.0853896513581276, 0.25819775462150574, 0.1186012402176857, 0.8483723998069763, -0.8481583595275879, -0.17016944289207458, 0.341957151889801, -0.32448068261146545, -0.32669875025749207, -0.5431759357452393, 0.3271125853061676,...
def _ _ init _ _ ( self, base _ path : optional [ union [ str, path ] ] = none, in _ memory : bool = true, columns = { 0 : " text ", 3 : " sense " }, label _ name _ map : optional [ dict [ str, str ] ] = none, banned _ sentences : optional [ list [ str ] ] = none, sample _ missing _ splits : union [ bool, str ] = true,...
[ 0.06303004175424576, 0.3026093542575836, 0.8791322112083435, 0.01734655164182186, -0.5054886341094971, -0.5839651823043823, 0.48170244693756104, 0.5651909112930298, -0.058884650468826294, -0.6528931856155396, 0.8843205571174622, 0.05125027149915695, 0.6688783168792725, -0.22996772825717926...
def return _ keys ( self ) : return list ( self. mapper. keys ( ) )
[ -1.1869513988494873, -0.41871580481529236, 0.33443683385849, 0.23685963451862335, -0.34346991777420044, 0.34834012389183044, -0.8788785934448242, 0.4370971620082855, 0.34378474950790405, -0.088393434882164, -0.410461962223053, -0.2017812281847, -0.4448762834072113, -0.3604251742362976, -...
def find _ items ( self, input _ data ) : results = [ item for item in self. _ item _ list if input _ data = = item. title or input _ data = = item. call _ number ] return results
[ -0.9516672492027283, -0.4581737816333771, 0.4059608280658722, 0.4844294488430023, 0.1697138100862503, 1.0085761547088623, -1.4039493799209595, -0.4625900685787201, -0.047536250203847885, -0.30976584553718567, 0.1396290808916092, -0.0464417040348053, -1.0037163496017456, 0.409261018037796, ...
def wctot _ dict ( wc _ obj, sector, scale, par, nf _ out = 5 ) : wc _ np _ dict = wc _ obj. get _ wc ( sector, scale, par, nf _ out = nf _ out ) if nf _ out = = 5 : wc _ sm = wcsm _ nf5 ( scale ) else : raise notimplementederror ( " deltaf = 1 wilson coefficients only implemented for b physics " ) # fold in approximat...
[ -0.2472638338804245, -0.5758198499679565, 0.6444259285926819, -0.8146406412124634, -0.7518054246902466, -0.6061098575592041, 1.0046557188034058, -0.3094598948955536, -0.38877761363983154, 0.8230046629905701, -0.3499981164932251, 0.2605471611022949, 0.06449835002422333, 0.8865146040916443, ...
def _ get _ long _ key _ value ( key : str, value : int ) - > model _ pb2. keyvalue : return model _ pb2. keyvalue ( key = key, v _ int64 = value, v _ type = model _ pb2. valuetype. int64 )
[ 0.07066135108470917, 0.48688727617263794, 0.42552050948143005, -0.2431403398513794, -0.3981490731239319, -0.19850559532642365, -1.255987524986267, -0.27711838483810425, -0.8715007901191711, 1.0856698751449585, 0.146497443318367, 0.3037918210029602, 0.36800193786621094, 0.0712016224861145, ...
def git _ dummy _ repo _ dir ( repos _ path : pathlib. path, create _ git _ dummy _ repo ) : return create _ git _ dummy _ repo ( " dummyrepo " )
[ -0.33268266916275024, 0.3706939220428467, 0.5399723649024963, -0.7382887005805969, 0.6789342164993286, 0.3012479543685913, 0.5564330220222473, -0.8566396832466125, 1.0706371068954468, -0.1335834413766861, -0.6780672669410706, 0.5548133254051208, 0.17532679438591003, -0.5879009962081909, ...
def _ get _ vcf _ feature _ and _ vcf _ feature _ reply ( self, code ) : current _ value = wintypes. dword ( ) maximum _ value = wintypes. dword ( ) if not ctypes. windll. dxva2. getvcpfeatureandvcpfeaturereply ( self. _ handle, wintypes. byte ( code ), none, ctypes. byref ( current _ value ), ctypes. byref ( maximum _...
[ -0.8439447283744812, -0.29268908500671387, 0.6328383684158325, -0.026233987882733345, 0.2221810668706894, -0.9100573658943176, 0.22569897770881653, 0.14283223450183868, 0.5180904269218445, 0.15003876388072968, -0.2283325493335724, 0.7237117290496826, -0.8557650446891785, 0.2470549196004867...
def _ _ exit _ _ ( self, * _ ) : if self. aborted _ by _ user or self. authentication _ failed : # unable to authenticate, not saving cookies. return if self. _ _ authenticated _ with _ cookies or not self. _ _ cached _ cookies : # previous session resumed from cached cookies or no cookies to cache, not saving cookies....
[ -0.720453143119812, -0.05324319377541542, 0.591259241104126, 0.5239155888557434, -0.38617321848869324, -0.5020098686218262, 0.3388173282146454, -0.2754387855529785, 0.23611962795257568, 0.7612603902816772, -0.12247387319803238, -0.1949043571949005, -0.09979093819856644, -0.4153271019458771...
def agent _ build _ get _ by _ triple ( context, hypervisor, os, architecture ) : return impl. agent _ build _ get _ by _ triple ( context, hypervisor, os, architecture )
[ 0.04030212014913559, -0.21706241369247437, 0.49351075291633606, 0.8906188011169434, 0.6250413060188293, -0.6220436096191406, 0.2253149002790451, -0.16427300870418549, 0.5566028952598572, 0.47821560502052307, 0.15158402919769287, 0.5707277655601501, 0.8673589825630188, -1.7340550422668457, ...
def get _ serializer _ context ( self ) : return {'request': self. request }
[ -1.0609303712844849, -0.9881914258003235, 0.33270949125289917, -0.6221276521682739, -0.811090350151062, -0.005578553304076195, -0.7846593260765076, 0.17913882434368134, 0.8197704553604126, -0.49639803171157837, -0.04947177693247795, -0.030336234718561172, -0.12814390659332275, -0.351955831...
def pdb _ res _ seq _ cmp ( res _ seq1, res _ seq2 ) : ( int1, icode1 ) = get _ int _ icode ( res _ seq1 ) ( int2, icode2 ) = get _ int _ icode ( res _ seq2 ) if int1 < int2 : return - 1 elif int1 > int2 : return 1 else : # compare icodes, note none < x for any x if icode1 < icode2 : return - 1 elif icode1 > icode2 : r...
[ -1.2559033632278442, -1.2607618570327759, 0.9412267804145813, -0.6148141026496887, 0.1318127065896988, -0.485835999250412, -0.5154499411582947, -0.2895941436290741, -0.23720721900463104, 0.6038540601730347, -0.4521395266056061, -0.9252417683601379, -1.1557972431182861, -0.8480989933013916,...
def getfloat ( self, key, default = _ unset ) : if not self. cf. has _ option ( self. main _ section, key ) : if default is _ unset : raise nooptionerror ( key, self. main _ section ) return default return self. cf. getfloat ( self. main _ section, key )
[ 0.5477539896965027, 0.833524227142334, 0.590782880783081, 0.38344046473503113, 0.8056994080543518, -0.304190993309021, 0.2540246248245239, -0.6497247815132141, -0.9008476138114929, -0.04294058680534363, 0.6410727500915527, -0.17390820384025574, -1.0054700374603271, 1.0221115350723267, -0...
def async _ delivery ( context : callbackcontext ) : # retriving subscriber data collections = job _ send _ record. aggregate ( [ { " $ group " : { " _ id " : {'chat _ id': " $ chat _ id ",'name': " $ name ",'username': " $ username ",'first _ name': " $ first _ name " } } } ] ) # bs object of sarkariresut. com # bs _ ...
[ 0.12524686753749847, -0.33086511492729187, 0.6762007474899292, -0.2912534773349762, 0.07051479816436768, 0.30994006991386414, -0.4092487692832947, -0.6548004150390625, -0.6112838387489319, 0.777669370174408, -0.5538366436958313, 0.5830782651901245, 0.15102112293243408, 1.000004529953003, ...
def _ _ initialise _ stream _ temperatures ( self ) : # get list of sensors in project device _ list _ url = " { } / projects / { } / devices ". format ( self. api _ url _ base, self. project _ id ) # request device _ listing = requests. get ( device _ list _ url, auth = ( self. username, self. password ) ). json ( ) f...
[ -0.8158692717552185, -0.7180874943733215, 0.558219313621521, -0.35559383034706116, 0.7277225255966187, -0.1072712317109108, 0.1844579428434372, 0.24688278138637543, -0.35921889543533325, 0.7427268624305725, -0.402015745639801, 0.21801896393299103, -0.7915276288986206, 1.407165765762329, ...
def _ fitter _ result ( self, image, algorithm _ results, affine _ transforms, scale _ transforms, gt _ shape = none ) : return multiscaleparametriciterativeresult ( results = algorithm _ results, scales = self. scales, affine _ transforms = affine _ transforms, scale _ transforms = scale _ transforms, image = image, g...
[ -0.21306878328323364, -0.045762259513139725, 0.3848543167114258, 0.17051169276237488, -0.982101321220398, -0.41387739777565, -0.821077823638916, -0.8333128094673157, -0.4680062234401703, 0.3245646357536316, 0.6239266395568848, -0.31640103459358215, 0.3366297483444214, 0.6448036432266235, ...
def fileisempty ( ) : datafile = open ( " data. txt " ) # move to first character in file datafile. seek ( 0 ) firstchar = datafile. read ( 1 ) if not firstchar : print ( " file is empty! " ) datafile. close ( ) return true else : print ( " file not empty! " ) datafile. close ( ) return false
[ -0.22550010681152344, -0.6987701654434204, 0.7636110782623291, -0.5513781309127808, 0.6702383160591125, 1.3553969860076904, -0.06280054152011871, 0.42745357751846313, -1.35536789894104, 0.1959606111049652, -0.5096303224563599, 0.5526540279388428, 0.15875090658664703, -0.5464246869087219, ...
def create _ six _ list ( self, file ) : # klaster # data = self. open _ multiple _ line ( " / home / klaster / profana v1. 0 / nowa _ baza _ danych / " + file ) # local # data = self. open _ multiple _ line ( " / mnt / d / 45. 76. 38. 24 / final _ site - project / important _ files / database _ file / " + file ) # vul...
[ -0.47488588094711304, -0.6976342797279358, 0.3597339689731598, 0.18532516062259674, 0.2267865687608719, 0.4891631603240967, -0.1630312204360962, 0.4345497786998749, -1.0820338726043701, 0.5017105340957642, -1.267085075378418, -0.15583008527755737, 0.07676578313112259, 0.8433145880699158, ...
def _ configure _ aws _ resources ( self ) : # create an s3 bucket to hold the configuration self. bucket _ name = app +'-'+ self. args. suffix logging. info ('creating bucket % s ', self. bucket _ name ) aws _ s3 = boto3. client ('s3') aws _ s3. create _ bucket ( bucket = self. bucket _ name ) if self. args. clean : d...
[ -0.11934689432382584, -0.09588754177093506, 0.41465049982070923, -0.2699076235294342, 0.320159912109375, 0.30288103222846985, -0.121517114341259, 0.044767022132873535, 0.5419937372207642, 0.4490630328655243, -0.22330217063426971, -0.5014841556549072, 0.8135610222816467, 0.4391884505748749,...
def lloyds _ algorithm ( k, points, distance _ fn = euclidean _ distance, on _ iteration = noop ) : points = np. array ( points ) partition = _ initial _ partition ( k, points ) iterations = 0 while true : changes = dict ( ) means = _ calculate _ means ( partition, points ) for i, subset in partition. items ( ) : for j...
[ 0.8569263815879822, 0.0632869154214859, 0.49214306473731995, -0.29737988114356995, -0.808182418346405, -0.6597980856895447, 0.0214620940387249, 0.5727466940879822, 0.6235367655754089, 0.7335365414619446, -0.08246918022632599, 0.3069542348384857, 0.05681506171822548, -0.1730160415172577, ...
def remove _ nan ( cloud _ in, cloud _ out ) : # if the clouds are not the same, prepare the output if cloud _ in! = cloud _ out : # attributes not writeable # cloud _ out. sensor _ origin = cloud _ in. sensor _ origin # cloud _ out. sensor _ orientation = cloud _ in. sensor _ orientation cloud _ out. resize ( cloud _ ...
[ 0.28448283672332764, -0.6447057127952576, 0.6649481654167175, 0.28803855180740356, 0.2309381663799286, 0.6087709069252014, 0.22735852003097534, 0.5422115921974182, -0.42792579531669617, 0.34966522455215454, -0.09393604099750519, 0.23550613224506378, -0.18424458801746368, 0.5379043817520142...
def print _ sum ( data ) : print ( np. array ( data ) )
[ 0.35969045758247375, -0.3723243772983551, 0.32372403144836426, -0.2627999186515808, 0.801593542098999, 0.5133954286575317, -0.27039673924446106, -1.0174050331115723, 0.12848520278930664, -0.13595423102378845, -0.37295398116111755, 1.8622198104858398, -0.011609950102865696, -0.0211045984178...
def make _ test _ filesystem ( pool _ path, fs _ name ) : ( ( filesystems _ created, ( array _ of _ tuples _ with _ obj _ paths _ and _ names ), ), return _ code, msg, ) = stratisdbus. fs _ create ( pool _ path, fs _ name ) _ raise _ error _ exception ( return _ code, msg, filesystems _ created ) return array _ of _ tu...
[ -0.6036214232444763, -0.036349132657051086, 0.5220508575439453, -0.37249013781547546, 0.3967975974082947, -0.3449181616306305, 0.9876246452331543, -1.2723208665847778, 0.2820594608783722, -1.039865255355835, -0.08428839594125748, -0.3661132752895355, -0.7525543570518494, -0.589787006378173...
def get _ part _ payload ( self, part ) : # fsource = part [ " tmpfile " ] # fsource. seek ( 0 ) # return fsource. read ( ) pass
[ -0.11817166954278946, -0.9509088397026062, 0.5397488474845886, -1.212133526802063, -1.0147885084152222, 0.541533887386322, -0.16306491196155548, -0.5577417016029358, -0.6692870259284973, 0.18577678501605988, -0.4890185296535492, -1.397872805595398, -0.8946437239646912, -0.6806105971336365,...
def goto _ next _ room ( self ) : if self. can _ continue = = false : print ( " you can't go on just yet, the path to the next room is still blocked! " ) return next _ room = self. current _ room ['number'] + 1 self. current _ room = self. game ['rooms'] [ str ( next _ room ) ] # if the next room is the highest visited...
[ -0.34463170170783997, 0.07548876106739044, 0.6182503700256348, 1.0665197372436523, 0.10330760478973389, 0.1853746771812439, 0.23606471717357635, 0.22196541726589203, -0.37261196970939636, 0.2587359845638275, -0.4336710274219513, 0.6458778977394104, -0.4406172037124634, 0.28184816241264343,...
def register _ operator ( cls, operator ) : cls. _ register _ operator ( operator ( ) ) return operator
[ -1.1396985054016113, 0.7567474246025085, 0.3296970725059509, 0.39883071184158325, -0.4760113060474396, -0.6210790276527405, -0.22247527539730072, 0.029196690768003464, 0.7249079942703247, -1.149059534072876, -1.226102352142334, -0.21531765162944794, -0.18136709928512573, -0.148594051599502...
def _ field _ arg _ with _ new _ and _ prev _ check _ trigger _ function ( self, outer _ self, * args, * * kwargs ) : prev _ ok = self. _ field _ arg _ with _ prev _ check _ trigger _ function ( outer _ self ) new _ ok = self. _ field _ arg _ with _ new _ check _ trigger _ function ( outer _ self ) return prev _ ok and...
[ -0.7887229919433594, -0.4064509868621826, 0.6735769510269165, 0.15277807414531708, 0.11719359457492828, -0.08285506814718246, 0.38225439190864563, 0.08260691165924072, -0.6941472291946411, 0.2792872488498688, -0.5420188307762146, 0.5516072511672974, -0.07070938497781754, 0.4375806748867035...
async def get _ dot _ syntax ( self, * * kwargs ) - > " models. dotfish " : cls = kwargs. pop ('cls ', none ) # type : clstype [ " models. dotfish " ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) # construct url url = self. get _ dot...
[ -0.9918730854988098, -0.11552314460277557, 0.8961278200149536, -0.13180841505527496, -0.31011849641799927, -1.1325476169586182, 0.17303042113780975, -0.2887343168258667, -0.042333461344242096, -0.401178777217865, -0.6607791185379028, 1.282193899154663, 0.11701081693172455, -0.5754466056823...
def duration _ in _ mins ( datum, city ) : # your code here if city! ='washington': duration = int ( datum ['tripduration'] ) / 60 else : duration = ( int ( datum ['duration ( ms )'] ) ) / ( ( 10 * * 3 ) * ( 60 ) ) return duration
[ -0.15156246721744537, 0.07858719676733017, 0.2702104449272156, -1.0332847833633423, -0.29640209674835205, 0.07174955308437347, -0.9457977414131165, 0.5688650608062744, 0.8185324668884277, 0.7457812428474426, -0.3455309569835663, 0.2866601049900055, 0.6434696316719055, -0.628585934638977, ...
def install ( self, package, version, base _ url, inst _ dir, force _ cbdeps = false ) : self. package = package self. symbols ['package'] = package self. version = version self. symbols ['version'] = version self. base _ url = base _ url # make install inst _ dir absolute # qqq should use. resolve ( ) rather than. abs...
[ -0.7623207569122314, 0.27805009484291077, 0.5213645696640015, -0.21840234100818634, 0.10925589501857758, -0.5783116817474365, 0.7907584309577942, 0.4730037450790405, 0.19503673911094666, 0.26291072368621826, -0.5715216398239136, -0.31934770941734314, 0.045740943402051926, 0.723897874355316...
def comment ( self ) - > typing. optional [ str ] : return self. _ values. get ('comment')
[ 0.7023615837097168, 0.06850624084472656, 0.30904707312583923, 0.47027480602264404, 1.41529381275177, 0.7076126337051392, 1.105292797088623, -0.2024454027414322, 0.16673420369625092, -0.054230380803346634, -0.005078529939055443, -0.799645185470581, -0.12288621813058853, -0.7864037752151489,...
def parse _ mask ( self, anns, img _ mask ) : if len ( anns ) = = 0 : return img _ mask for ann in anns : m = self. anntomask ( ann, img _ mask. shape [ 0 ], img _ mask. shape [ 1 ] ) img _ mask [ m = = 1 ] = ann ['category _ id'] train _ mask = np. zeros _ like ( img _ mask ) for c in mycoco. labelid _ 2 _ trainid. ke...
[ -0.9816124439239502, -0.21853485703468323, 0.538091778755188, 0.8093125224113464, 0.31825441122055054, -0.46433064341545105, 0.058922767639160156, -0.4724276661872864, 0.2037382870912552, 0.7821857929229736, 0.3368198275566101, 0.020161569118499756, 1.3122307062149048, 0.39438295364379883,...
def subarraysum ( nums, k ) : freq = defaultdict ( int ) freq [ 0 ] = 1 subsum = 0 res = 0 for i in range ( len ( nums ) ) : # prefix sum from 0 to i subsum + = nums [ i ] # the other prefix sum from 0 to j, # ( where 0 < = j < i ) # to receive the subarray sum of'k'other _ sum = subsum - k if other _ sum in freq : res...
[ 0.7331584095954895, 0.1782728135585785, 0.7849889397621155, 0.37232670187950134, -0.34128785133361816, -0.6484010219573975, 1.3080226182937622, 0.30032631754875183, 1.0910826921463013, 0.4205796420574188, -0.8050746917724609, -0.25014859437942505, -0.2066624015569687, 0.25672468543052673, ...
def change ( self, file ) : try : # schema loading. print'loading internet options schema...'xsdfile = os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ) +'\ proxy - settings. xsd'xsddoc = etree. parse ( xsdfile ) schema = etree. xmlschema ( xsddoc ) print'[ done ]'# xml parsing and validation. config = etree. pa...
[ -0.9681817889213562, 0.32382717728614807, 0.9059083461761475, -0.44702303409576416, 0.027785947546362877, 0.19623780250549316, 0.6864830851554871, 0.3364851474761963, -0.5480301976203918, 1.2065149545669556, -0.16887767612934113, -0.6170937418937683, -1.2212904691696167, -0.313034474849700...
def writeselectedpixel ( self ) : sname ='singlepix _ c % i _ r % i _ data. pickle'% ( self. thiscol, self. thisrow ) dsingle = { } dsingle ['vthispixel'] = n. copy ( self. vthispixel ) dsingle ['vtimes'] = n. copy ( self. vtimes ) dsingle ['gthishi'] = n. copy ( self. gthishi ) dsingle ['gthislo'] = n. copy ( self. gt...
[ -0.10940142720937729, -0.4113169312477112, 0.35657182335853577, -0.238880917429924, 0.13401088118553162, 0.16612747311592102, 0.9334080815315247, 0.4837512671947479, 0.38048455119132996, 0.12142932415008545, -0.49357521533966064, 0.5624199509620667, 0.09358064830303192, 0.32559746503829956...
def attach ( self, observer ) : if observer not in self. observers : self. observers. append ( observer ) observer. watch _ list. append ( self )
[ 0.14051933586597443, -0.33076712489128113, 0.46246179938316345, -0.10755137354135513, 0.262786865234375, 1.1053962707519531, -0.6971166133880615, 0.09378328919410706, 0.6118204593658447, -0.5230557322502136, -0.6486172080039978, -0.03896871581673622, -0.39977142214775085, 1.588500499725341...
def align ( seq1, seq2, gap _ opening, gap _ extension, scoring _ matrix ) : alignment _ matrix = np. zeros ( ( len ( seq1 ), len ( seq2 ) ) ) # intialize to zero for i in range ( 1, len ( seq1 ) ) : # for each sequence to be aligned for j in range ( 1, len ( seq2 ) ) : left = find _ max _ gap ( alignment _ matrix [ : ...
[ -0.2203437238931656, -0.6534314751625061, 0.8333209753036499, 0.6269403100013733, -0.9500749111175537, -0.042777419090270996, 0.02098567970097065, 0.42147019505500793, 0.5767605900764465, 0.9049592614173889, 0.6278787851333618, -0.2522084712982178, -0.34268251061439514, -0.0522751137614250...
def calcdirection ( x0, y1, x2, y2 ) : # distance moved between points distx = ( x2 - x1 ) disty = ( y2 - y1 ) ret = none if distx! = 0 : # calculate angle of movement ret = np. degrees ( np. arctan ( disty / distx ) ) # check 0° or 180° if distx < 0 and disty = = 0 : ret = 180 else : # has sphero moved or not if disty...
[ -0.060396160930395126, -0.4543178081512451, 0.8201531767845154, 0.24259579181671143, -0.4043283760547638, -0.21410517394542694, -0.3161724805831909, -0.15798871219158173, -0.08898530900478363, -0.1638447791337967, -0.5198563933372498, 0.16919657588005066, 0.31368720531463623, -0.4956749081...
def masks _ to _ flows2 ( masks ) : if masks. ndim > 2 : raise valueerror ('3d input not yet implemented') ly, lx = masks. shape mu = np. zeros ( ( 2, ly, lx ), np. float64 ) dia = utils. diameters ( masks ) [ 0 ] slices = scipy. ndimage. find _ objects ( masks ) for i, si in enumerate ( slices ) : if si is not none : ...
[ 0.5691151022911072, -0.22120948135852814, 1.0019563436508179, 0.5341700911521912, -0.28936994075775146, 0.4476641118526459, 0.6757055521011353, -0.794487476348877, 0.8194317817687988, 0.14489835500717163, 0.16792725026607513, 0.5031954646110535, 0.6556280851364136, 0.46254655718803406, -...
def masked _ frequency _ of _ splitlist ( self, returnmatches = false, * * kwargs ) : # if returnmatches is requested, return matching trees matches = [ ] partialmask = kwargs [ " mask " ] if " mask " in kwargs else self. taxon _ namespace. all _ taxa _ bitmask ( ) if " split _ bitmask " in kwargs : targetsplits = kwar...
[ -0.7823245525360107, 0.14290769398212433, 0.9704004526138306, 0.29003170132637024, 0.013679549098014832, -0.7823345065116882, 1.5128860473632812, 0.13888710737228394, 0.030170265585184097, 0.17682912945747375, -0.5112208724021912, -0.9356496930122375, -1.0864369869232178, 0.171577244997024...
def commit ( self, sql, data = none ) : conn = self. get _ db ( ) cursor = conn. cursor ( ) cursor. execute ( sql, data ) conn. commit ( ) cursor. close ( ) conn. close ( )
[ 0.24119189381599426, 0.09435195475816727, 0.6844891309738159, 0.4624740481376648, 0.21139481663703918, 0.26368850469589233, -1.2115445137023926, 0.553263783454895, -0.40525364875793457, 0.5944784283638, -0.0332440622150898, 0.13366036117076874, -0.5034131407737732, 0.19265858829021454, -...
def uv _ wavelengths ( interferometer, label _ yunits = " v - wavelengths ( $ \ lambda $ ) ", label _ xunits = " u - wavelengths ( $ \ lambda $ ) ", include = none, plotter = none, ) : plotter. plot _ grid ( grid = grids. gridirregular. manual _ yx _ 1d ( y = interferometer. uv _ wavelengths [ :, 1 ] / 10 * * 3. 0, x =...
[ 0.0640978291630745, 0.8342810273170471, 0.44936057925224304, -0.15920798480510712, 0.0453355647623539, 0.2617588937282562, 0.2758479416370392, 1.2383594512939453, -0.09271487593650818, -0.5054278373718262, 0.18038249015808105, 1.4186793565750122, 0.11150800436735153, 0.45622754096984863, ...
def flatten ( self, root : treenode ) - > none : if not root : return none lefttail = self. flatten ( root. left ) righttail = self. flatten ( root. right ) if lefttail : lefttail. right = root. right root. right = root. left root. left = none if righttail : return righttail elif lefttail : return lefttail else : retur...
[ 0.5390030741691589, 0.23508892953395844, 0.7532021403312683, 0.11282867193222046, -0.5031505227088928, -0.08884310722351074, -0.4610556364059448, -0.3030691146850586, 0.6470053791999817, -0.2701410949230194, -0.6364288330078125, 1.1878165006637573, -1.0444440841674805, 1.324232578277588, ...
def _ start _ new _ thread ( self ) : self. wallpaper _ thread = changewallpaperthread ( self. spotify, self. folder _ path ) self. wallpaper _ thread. start ( )
[ 0.27194440364837646, -0.651027262210846, 0.060640979558229446, -0.32409659028053284, 1.159440517425537, 0.8223128914833069, -0.09855971485376358, 0.8593796491622925, -0.35461899638175964, -0.1924288421869278, -0.3078346252441406, 1.399306058883667, -0.5873817205429077, 0.4914000630378723, ...
def create ( asyncsocketspool, localaddr = none, recvbuflen = 4096, broadcast = false ) :...
[ -0.2439568042755127, 0.5457526445388794, 0.4572746753692627, 0.1321532279253006, 0.2565051019191742, -0.3320888578891754, 0.985704243183136, -0.6357377767562866, 0.4963333308696747, -0.37435659766197205, -0.7653074264526367, 1.2228472232818604, -0.26671525835990906, -0.10566829144954681, ...
def create _ volume ( self, name, size _ str, lv _ type ='default ', mirror _ count = 0, cmd _ prefix = none ) : if lv _ type = ='thin': pool _ path ='% s / % s'% ( self. vg _ name, self. vg _ thin _ pool ) cmd = ['lvcreate ','- t ','- v ', size _ str,'- n ', name, pool _ path ] else : cmd = ['lvcreate ','- n ', name, ...
[ 0.23358409106731415, -0.46483519673347473, 0.7584241032600403, -0.2727913558483124, 0.1289934664964676, 0.3379185199737549, -0.28503477573394775, -0.7119652628898621, 0.01467204000800848, -0.06769783794879913, 0.32306554913520813, 1.11483633518219, 0.23067955672740936, 0.5802022814750671, ...
def test _ user _ no _ email _ raises _ error ( self ) : with self. assertraises ( valueerror ) : get _ user _ model ( ). objects. create _ user ( email = none, password = " somethingrandom " )
[ 0.12964366376399994, 0.9778102040290833, -0.19762356579303741, 0.10811886191368103, 0.7778399586677551, 0.03431783244013786, -0.28658267855644226, 0.36770954728126526, -0.47410812973976135, -0.3884955048561096, -0.8396396040916443, -0.2935871183872223, -0.14680705964565277, 0.5980270504951...
def send ( self, type _, entity ) : message = { " type " : str ( type _ ), " entity " : entity } yield from self. _ send _ queue. put ( json. dumps ( message ) )
[ -1.1919292211532593, 0.006930757779628038, 0.6299010515213013, -0.4940013885498047, 0.355990469455719, -0.4909868538379669, -0.63595050573349, -2.063244104385376, -0.7303061485290527, 0.7657246589660645, -0.40023288130760193, 1.6414477825164795, 0.2668948769569397, 1.2059468030929565, -0...
def process _ observation _ cb ( self ) : self. observed _ cb _ points = { } sleeper = rospy. rate ( 10 ) for j in xrange ( self. num _ cameras ) : tries = 10 while tries > 0 : pc = self. cameras. get _ pointcloud ( j ) rtn, points = cu. get _ corners _ from _ pc ( pc ) if rtn = = 0 : yellowprint ( " could not find all...
[ 0.0917406678199768, 1.0734807252883911, 0.5870481133460999, 0.1274041086435318, 0.11831377446651459, -0.10235268622636795, 0.3208867311477661, -0.3714280426502228, 0.18727342784404755, 0.8418923616409302, -0.4243232011795044, -0.3533363938331604, -0.3788334131240845, 0.4029071629047394, ...
def table _ load ( self, table _ uuid ) : q = db. session. query ( tableinfo ). filter _ by ( uuid = table _ uuid ) return q. all ( )
[ -0.2278432995080948, 0.037984929978847504, 0.514308512210846, 0.22733807563781738, -0.15856537222862244, -0.2723584473133087, -1.1406956911087036, 0.2789404094219208, -0.7707021832466125, 0.3800697326660156, 0.006523870397359133, -0.4921822249889374, -0.0607135072350502, 0.0841229557991027...
def uniquevalues ( table, field ) : with arcpy. da. searchcursor ( table, [ field ] ) as cursor : return sorted ( { row [ 0 ] for row in cursor } )
[ -0.08924663066864014, 0.640448272228241, 0.3175991177558899, 0.2727600336074829, -0.13363544642925262, -0.5876020789146423, -0.3885197639465332, -0.24073100090026855, -0.8487935066223145, -0.2409830540418625, -0.4591606557369232, 0.2829989194869995, 0.4770292341709137, -0.25055578351020813...
def menuitems ( self ) - > menuitemcollection :
[ -0.8302121758460999, -0.32380911707878113, 0.21811813116073608, 1.0246779918670654, -0.6604996919631958, 0.28512948751449585, 0.04486788809299469, 0.4299526512622833, -0.22221224009990692, -0.8545394539833069, -0.42103317379951477, -0.6157681345939636, 0.2715349793434143, 0.337256282567977...
async def get _ request _ handler ( request ) : return web. response ( text = await request. text ( ) )
[ -0.7595599293708801, -0.4014671742916107, 0.32488518953323364, 0.24589531123638153, -0.4607783555984497, -0.17242076992988586, -0.8271114826202393, -0.004679514095187187, -0.21404749155044556, -0.9779247045516968, 0.2653689682483673, -0.044867437332868576, -0.33595016598701477, -0.59528571...
def to _ string ( self, pretty _ print = true ) : etree = self. to _ element _ tree ( ) if pretty _ print : indent ( etree ) return self. et. tostring ( etree )
[ -0.7564659714698792, -0.2853820323944092, 0.47192835807800293, 0.1634223908185959, 0.058435969054698944, 0.8046731948852539, -0.6551806330680847, -0.1382300853729248, 0.050192154943943024, -0.27910465002059937, 0.4159420430660248, 0.3275700807571411, -0.24645493924617767, -0.47555494308471...
def display _ catalogue _ menu ( self ) : print ( " \ nwelcome to the catalogue! " ) print ( " - - - - - - - - - - - - - - - - - - - - - - - - " ) user _ input = none while user _ input! = 4 : print ( " \ nwhat would you like to do? " ) print ( " 1. find an item " ) print ( " 2. load items from file " ) print ( " 3. di...
[ -0.2081954926252365, -0.16323161125183105, 0.874108076095581, 0.44289493560791016, -0.13446520268917084, 0.31115078926086426, 0.9383976459503174, -0.6114618182182312, -0.5086305141448975, -0.6810594201087952, -0.0293929073959589, -0.050159092992544174, -0.5589113831520081, 0.41152349114418...
def print _ main _ menu ( ) : print ( " \ nselect from one of the following options : " ) print ( " 1 : play blackjack " ) print ( " 2 : view rules " ) print ( " 3 : change rules " ) print ( " 4 : quit " ) print ( " " )
[ 0.3571009635925293, -0.25603166222572327, 0.6841526031494141, 0.38010331988334656, 0.40074601769447327, 0.3674204349517822, -0.04495780169963837, -0.29720911383628845, 0.38862815499305725, 0.8612777590751648, 0.537807822227478, 0.5624590516090393, -0.8683403730392456, -0.29421332478523254,...
def display _ output ( self ) : print ( self. name. title ( ) + " displayed output! " )
[ 0.6068935990333557, -1.3572584390640259, 0.4951462745666504, 0.2579021453857422, -0.6488731503486633, 0.6146255135536194, 0.7344298958778381, -0.39239177107810974, -0.7386643290519714, -0.0852222740650177, 0.4256778657436371, 0.8504694104194641, 0.09360752254724503, 0.3686161935329437, -...
def gen _ random _ pass ( self, string _ type : str = " varchar ", size : int = 8 ) - > str : return self. sqldata. gen _ random _ pass ( string _ type, size )
[ -0.9422562122344971, -0.603904128074646, 0.5509873032569885, 0.022217370569705963, -0.4228461682796478, 0.5158438086509705, -0.4449962377548218, -0.6675205230712891, 0.2090430110692978, -0.01600032113492489, 0.02015356346964836, 0.45254427194595337, -0.6211687922477722, -0.3445043563842773...
def val _ step ( self, sample, raise _ oom = false ) : try : val _ loss = self. model. module. val _ loss ( sample ) # reduce val _ loss = reduce _ tensor ( val _ loss, self. cnf. world _ size ) except runtimeerror as e : if'out of memory'in str ( e ) and not raise _ oom : print ('| warning : ran out of memory, retryin...
[ -0.24469107389450073, 0.7510433197021484, 0.34411701560020447, 0.8356984257698059, -0.7425580024719238, -0.5071075558662415, 0.11606349796056747, -0.7383391857147217, -0.10697126388549805, 0.3819626569747925, 0.18333640694618225, 0.10736127197742462, -0.43141552805900574, 0.458730161190032...
def check _ metric ( actual : pd. series, prediction : pd. series, metric : str, round : int = 4 ) : # general dependencies import pycaret. containers. metrics. classification import pycaret. containers. metrics. regression globals _ dict = { " y " : prediction } metric _ containers = { * * pycaret. containers. metrics...
[ 0.02683214098215103, 0.04587806388735771, 0.6332069039344788, 0.7523518800735474, -0.03856206312775612, -0.0205235555768013, 0.5444158911705017, -1.0023112297058105, -1.2753667831420898, 0.6691671013832092, 1.1570638418197632, 0.23801745474338531, 0.6128538846969604, 0.24729128181934357, ...
def entry _ set ( self ) - > future [ typing. list [ typing. tuple [ keytype, valuetype ] ] ] : def handler ( message ) : entry _ data _ list = multi _ map _ entry _ set _ codec. decode _ response ( message ) return deserialize _ entry _ list _ in _ place ( entry _ data _ list, self. _ to _ object ) request = multi _ m...
[ -1.1229443550109863, 0.05764870345592499, 0.4014589190483093, 0.11080385744571686, -0.0022735954262316227, -0.7578161954879761, -0.8919219970703125, 0.006467257626354694, 0.007589934393763542, -0.5628491640090942, -0.9577560424804688, 0.608371376991272, 0.4463476538658142, 0.20505133271217...
def make _ gaussian _ regression ( n _ samples, d, noise _ sd ) : # generate independent gaussian features x = np. random. multivariate _ normal ( np. zeros ( d ), np. eye ( d ), n _ samples ) # generate random regression parameter t = np. random. poisson ( lam = 0. 1, size = d ) # the smaller the mean of the poisson t...
[ -0.41618600487709045, 0.0287919994443655, 0.668901264667511, -1.1787385940551758, -0.37589031457901, 0.24223174154758453, -0.19959339499473572, 0.43170011043548584, 0.31009912490844727, 0.18579648435115814, -0.10623743385076523, 0.6155205368995667, 0.017455101013183594, -0.4687663018703460...
def has _ ambiguity ( seq, offset, length ) : uniq _ chars = set ( seq [ offset : offset + length ] ) return ( len ( uniq _ chars - base _ set ) > 0 )
[ 0.11731622368097305, -0.5249266028404236, 0.43009841442108154, -0.5334787964820862, -0.08436310291290283, -0.3534574806690216, -0.5968719124794006, 0.9356533885002136, 0.2611410915851593, 0.4286893904209137, -0.41247785091400146, -0.026975782588124275, 0.01591263711452484, -0.7546639442443...
def save ( self, * args, * * kwargs ) : if self. geometry _ point or self. geometry _ line or \ self. geometry _ polygon or self. geometry _ multipolygon : # check if geometry is allowed if isinstance ( self. get _ geometry ( ), self. location _ type. get _ allowed _ geometry _ class ( ) ) : super ( locationsite, self ...
[ -0.4903467297554016, 0.4904018044471741, 0.6402716636657715, 0.852307140827179, 0.018126683309674263, 0.4077967703342438, 1.2338145971298218, -0.5532495379447937, -0.03011871688067913, 0.20521534979343414, 0.07901012897491455, 0.08526641875505447, -0.1754956990480423, 0.20605601370334625, ...
def checkwin ( self ) : for i in range ( self. width ) : for j in range ( self. width - self. wn + 1 ) : flags = [ true, true ] for k in range ( self. wn ) : if self. cells [ i ] [ j ]! = self. cells [ i ] [ j + k ] : flags [ 0 ] = false if self. cells [ j ] [ i ]! = self. cells [ j + k ] [ i ] : flags [ 1 ] = false if...
[ -0.3255314826965332, -0.8631982803344727, 1.0395361185073853, 0.557243287563324, -0.30983492732048035, 0.45222416520118713, 1.1477855443954468, -0.08765187114477158, 0.27519211173057556, 0.47434884309768677, -0.7814191579818726, 0.003991220146417618, -1.1274110078811646, 0.7839426398277283...
def _ set _ source ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = restrictedclasstype ( base _ type = unicode, restriction _ dict = {'pattern': u'( ( [ 0 - 9 ] | [ 1 - 9 ] [ 0 - 9 ] | 1 [ 0 - 9 ] [ 0 - 9 ] | 2 [ 0 - 4 ] [ 0 - 9 ] | 25 [ 0 - 5 ] ) \ \....
[ -0.678223729133606, 0.466350257396698, 0.3478598892688751, -0.43710795044898987, -0.6997286677360535, -0.19260205328464508, 1.889350414276123, 0.1409868746995926, 0.9424008131027222, 0.7013972401618958, -0.756578266620636, 0.07748232781887054, -1.0075459480285645, 0.0004954964388161898, ...
def get _ tile _ neighbors ( self, tile ) : neighbors = [ ] north _ neighbor = self. get _ tile _ north _ neighbor ( tile ) if north _ neighbor is not none : neighbors. append ( north _ neighbor ) east _ neighbor = self. get _ tile _ east _ neighbor ( tile ) if east _ neighbor is not none : neighbors. append ( east _ n...
[ -0.2184399962425232, -0.05513579025864601, 0.6538248658180237, 0.6275166869163513, -0.05932055786252022, 0.38674983382225037, -0.23690418899059296, -0.6661786437034607, 0.36406058073043823, 0.9483400583267212, -0.9402209520339966, 0.5436948537826538, -0.22770896553993225, 1.054194331169128...
def mol ( ) : # use temp directory to remove parametrisation files with temporarydirectory ( ) as temp : os. chdir ( temp ) molecule = ligand. from _ file ( file _ name = get _ data ( " chloromethane. pdb " ) ) openff ( ). run ( molecule ) ddec _ file _ path = get _ data ( " ddec6 _ even _ tempered _ net _ atomic _ cha...
[ 1.0110889673233032, -0.20301473140716553, 0.4281766712665558, -0.613593578338623, 1.162841796875, 0.045652952045202255, -0.3178825080394745, -0.3415294885635376, -0.2818489670753479, -1.0240229368209839, 0.4077684283256531, -0.13951465487480164, -0.05904913693666458, 0.23106451332569122, ...
def _ _ init _ _ ( self, * args ) : super ( ). _ _ init _ _ ( * args ) self. _ state = none self. _ battery _ level = none
[ 0.18448396027088165, -0.08561912178993225, 0.42793551087379456, 0.4321036636829376, 0.5699960589408875, 0.1965019702911377, -0.1424463838338852, 0.11562273651361465, -0.940100908279419, -0.6604384779930115, -0.7915670275688171, 0.18534864485263824, 0.07370094209909439, 0.7368573546409607, ...
def get _ offers ( html : str ) - > dict : soup = beautifulsoup ( html, features = " html. parser " ) try : live _ square _ section = soup. find ( " div ", class _ = " offer - detail _ _ section - item section _ type _ full - square " ) live _ square = live _ square _ section. find ( " div ", class _ = " offer - detail...
[ -0.28900811076164246, 0.39999890327453613, 1.1487737894058228, -0.6570674180984497, -0.701052188873291, -0.057486556470394135, 0.5629376769065857, 0.0849389061331749, -0.1726662963628769, 0.5874246954917908, -0.5113164782524109, 0.5372567176818848, 0.7281612157821655, 0.7506276965141296, ...
def _ human _ daterange ( beginning : datetime, end : datetime ) - > str : days = ( end - beginning ). days week _ word ='weeks'if days > 13 else'week'days _ word ='days'if days % 7 > 1 else'day'if days = = 1 : return'yesterday'elif days < 7 : return f'the last { days } { days _ word }'elif days = = 7 : return'the last...
[ -0.5210139155387878, 0.3922579884529114, 0.7163511514663696, -1.000523567199707, -0.4185959994792938, -0.0344318151473999, -1.2952122688293457, -0.6113399863243103, -0.689443051815033, 0.40900710225105286, 0.9249076843261719, 0.08406022191047668, 0.499358594417572, 0.37892547249794006, 0...