text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ delete _ static _ route ( self, network ) : try : osutils = osutils _ factory. get _ os _ utils ( ) log. debug ('deleting route for network : % s ', network ) args = ['route ','delete ', network ] ( out, err, ret _ val ) = osutils. execute _ process ( args ) if ret _ val or err : raise exception. cloudbaseinitexc...
[ -0.1027972549200058, 0.22633858025074005, 0.4180704951286316, 0.23840272426605225, 0.8980981111526489, 0.1725545972585678, 0.062111884355545044, -0.22642798721790314, -0.9092355370521545, 0.40063026547431946, -0.08041472733020782, -0.3314495384693146, -0.14749176800251007, 1.26989018917083...
def nmse _ components ( measured, observed, weights = none, is _ averaged = none ) : if weights is none : weights = get _ coslat ( measured ) if ( is _ averaged is not none ) : if is _ averaged : do _ average = false time _ mean _ m = measured time _ mean _ o = observed else : do _ average = true else : do _ average = ...
[ 0.6165208220481873, -0.03629595786333084, 0.9483818411827087, -0.15225598216056824, 0.14148519933223724, 0.2144828885793686, 0.2613595426082611, 0.24589794874191284, -0.1594059020280838, 0.6049255132675171, 0.36130738258361816, -0.08716300874948502, 0.2426474243402481, 0.8380771279335022, ...
def genstr ( self ) : str = " " str + = self. name str + = " " if self. status = = 0 : str + = " released " if self. status = = 1 : str + = " pressed " return str
[ -0.8913038969039917, -1.0022711753845215, 0.8907332420349121, -0.9756238460540771, -1.0115950107574463, 1.186105489730835, -0.5763949751853943, -0.21230508387088776, -0.3848051428794861, 0.4500845670700073, -0.5764633417129517, -0.44378387928009033, -0.3445548713207245, 0.1854618638753891,...
def next _ page ( self, driver : webdriver ) - > bool : current _ page = int ( driver. find _ element _ by _ id ('ctl00 _ contentplaceholder1 _ ucncdlist _ ucpagination _ lblcurrentpagenum'). text ) total _ page = int ( driver. find _ element _ by _ id ('ctl00 _ contentplaceholder1 _ ucncdlist _ ucpagination _ lbltotal...
[ -0.5805793404579163, -0.11303827166557312, 1.0139827728271484, 0.031009061262011528, -0.010159391909837723, 0.8250107169151306, 0.3823111355304718, -0.4321339428424835, -0.014269743114709854, 0.47498854994773865, -0.21773019433021545, -1.1717808246612549, -0.2553047239780426, 0.09293344616...
def sort _ sentence ( sentence ) : words = break _ words ( sentence ) return sort _ words ( words )
[ 0.28345757722854614, -0.04657759889960289, 0.20025523006916046, 0.04567616805434227, -0.5282732248306274, -1.558800458908081, -0.13440455496311188, -1.2115846872329712, -0.3161197006702423, 1.0052130222320557, -0.26156893372535706, -0.5460154414176941, -0.7322374582290649, 0.36762219667434...
def test _ list _ integer _ max _ length _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 1. xsd ", instance = " nistdata / list / inte...
[ -0.3553142249584198, -0.09512162208557129, 0.1541101038455963, 0.8407564759254456, -0.4690907299518585, 0.09004691243171692, -0.4027092456817627, 0.21973596513271332, 1.3013343811035156, 0.6925597190856934, -0.8543714880943298, -0.5874567627906799, -0.7552159428596497, 0.9079194664955139, ...
def test _ atomic _ base64 _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 2. xsd ", instance ...
[ -0.24423646926879883, -0.6866624355316162, 0.49098920822143555, 1.414774775505066, -0.16053038835525513, 0.03335031494498253, 0.6679350733757019, -0.1288052201271057, -0.8542174696922302, 0.436477392911911, -0.8589285016059875, 0.41988736391067505, -0.2823130786418915, 0.39003226161003113,...
def getlichess ( self ) : return self. lichess
[ 0.7987221479415894, -0.43193694949150085, 0.29442504048347473, -0.6188240051269531, -0.3208201825618744, 1.2756174802780151, -1.2162458896636963, -0.5945577621459961, 1.1125640869140625, -0.7350562810897827, -0.4427463710308075, 0.7197169661521912, -0.22629274427890778, 0.275810569524765, ...
def multiply ( self, factor ) : # 中 “ ” 的 var _ intersection = sorted ( list ( set ( self. varlist ) & set ( factor. varlist ) ) ) # factor 的 new _ var _ list = self. varlist + [ var for var in factor. varlist if var not in var _ intersection ] tup _ index1 = [ self. varlist. index ( x ) for x in var _ intersection ] t...
[ -0.5832369327545166, 0.4221729636192322, 0.9852095246315002, 0.025106064975261688, -0.8482353091239929, -0.009707673452794552, 0.1557421088218689, 0.2736976742744446, -0.06155179440975189, 0.5640897154808044, -0.6435347199440002, -0.3237391412258148, -0.9054505228996277, 0.4469564557075500...
def findkeywordoption ( self, key ) : for line in self. cfg : if key in line : return line
[ 0.6128765344619751, -0.2618498206138611, 0.5357198119163513, 0.39617156982421875, -0.2734582722187042, -0.38774922490119934, -0.30391791462898254, -0.3830704987049103, -0.9628936052322388, 1.0431015491485596, 0.9112670421600342, -0.42916494607925415, -1.2518752813339233, 1.0571421384811401...
def flattened _ size ( self ) - > int : return self. _ specs. continuous _ size + sum ( self. _ specs. discrete _ branches )
[ 0.8332468867301941, 0.9840792417526245, 0.4377223253250122, -0.2438015639781952, 0.33252957463264465, 0.8661253452301025, 1.4446923732757568, 0.3327914774417877, 0.18272686004638672, -0.8471971750259399, -0.04622536525130272, -0.21137800812721252, -0.7752997875213623, 0.036466192454099655,...
def cache _ time _ based ( caches ) : return caches ['time - based']. cache
[ -0.24337799847126007, 0.1617719978094101, 0.32716885209083557, 0.953900933265686, -0.3294012248516083, 0.29286667704582214, -0.5514946579933167, -0.7434697151184082, -0.054423969238996506, 1.5624483823776245, -0.12578906118869781, -1.0773664712905884, 0.25521063804626465, 0.571100354194641...
def find _ possible _ teams ( self, taken : datetime ) - > iterable [ iterable [ teaminfo ] ] : if taken > datetime. now ( ) : logging. warning ('future taken date : { }. '. format ( taken ) ) matches = self. _ category. match _ category. filter ( match _ term _ _ start _ _ time _ _ range = ( ( taken - matchterm. stand...
[ -0.33574771881103516, -0.04889891669154167, 0.4365634322166443, -0.22138142585754395, -0.3152526915073395, 0.1926686018705368, -0.3282471299171448, -0.686459481716156, -1.010446548461914, -0.34417033195495605, -0.17369258403778076, -0.24360957741737366, 0.9522832036018372, 0.27217537164688...
def name ( self ) : return self. _ nuki _ device. name
[ -0.25519639253616333, -0.20885363221168518, 0.3079793453216553, 0.5040063858032227, -0.787278413772583, 0.3540363907814026, 0.7696022391319275, -1.0252234935760498, 0.02661769650876522, -0.16486740112304688, -0.03577236831188202, -0.07306605577468872, 0.22511303424835205, 0.121483206748962...
def _ _ init _ _ ( self, ai _ settings, screen ) : super ( ). _ _ init _ _ ( ) self. ai _ settings = ai _ settings self. screen = screen # load the alien's image, and set up its rect attribute self. image = pygame. image. load ('alien. bmp') self. rect = self. image. get _ rect ( ) # each alien is on the top left corne...
[ -0.4321223497390747, -0.45722341537475586, 0.526744544506073, -0.3275083899497986, 0.6202600598335266, 0.1623224914073944, -0.27448970079421997, -0.18033738434314728, -0.0383613184094429, 0.44833609461784363, -0.20728179812431335, -0.7696955800056458, 0.5016332268714905, 1.0340240001678467...
def _ set _ ipv4 _ network _ details ( self, network, nic ) : nic. address = network [ " ip _ address " ] nic. netmask = network [ " netmask " ] for route in network. get ('routes ', [ ] ) : if route [ " network " ] = = " 0. 0. 0. 0 " : nic. gateway = route [ " gateway " ]
[ 0.12675535678863525, -0.7469592094421387, 0.324967622756958, -0.16887734830379486, 1.1599498987197876, -0.5555129051208496, -0.32253357768058777, -0.025655454024672508, -0.2854245603084564, -0.13035166263580322, -0.407868891954422, -0.7648110389709473, 0.07220131158828735, 0.65372312068939...
def play _ against _ player ( ) : endgame = keyboard = none while endgame! = " n " : board = np. zeros ( ( 2, 3, 3 ) ) # determines the first player to start while keyboard! = " y " and keyboard! = " n " : keyboard = str ( input ( " \ tsouhaitez vous commencer? ( y / n ) " ) ). upper ( ) endgame = none computer = 1 if ...
[ 0.25020548701286316, -0.01871185377240181, 0.870150089263916, 0.092112235724926, 0.093655526638031, 0.07395056635141373, 0.5216353535652161, -0.6235916018486023, -0.7579987645149231, 0.06025271862745285, 0.02191915735602379, 0.2526756525039673, -1.0539096593856812, 0.587546169757843, 0.8...
def test _ atomic _ language _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 5. xsd ", instance = " nistdata / atomic ...
[ -0.0745077133178711, -0.25503191351890564, 0.35226133465766907, 0.8009080290794373, -0.5302342772483826, 0.2650987505912781, 0.4710371494293213, -0.1990484595298767, -0.048180606216192245, 1.0871201753616333, -0.4371999204158783, -0.18360985815525055, -0.6206656098365784, -0.01351586543023...
def _ _ init _ _ ( self, an, i, j ) : self. _ attribute = an self. _ elements = dict ( ) self. _ ipe = 1 self. _ nump = i self. _ attnumb = j
[ -0.21562989056110382, -0.39510178565979004, 0.2695762515068054, 0.0029161237180233, -0.7827437520027161, 0.33379673957824707, 1.263380527496338, 0.6796486377716064, -0.25020313262939453, -0.05214614048600197, -0.4177866578102112, 0.17443819344043732, 0.055677786469459534, -0.06943085044622...
def test _ undirected _ edge _ has _ attr ( self ) : v0 = undirectedvertex ( val ='v0') v1 = undirectedvertex ( val ='v1') e01 = undirectededge ( ( v0, v1 ), attrs = {'weight': 5, 0 : 1 } ) self. asserttrue ( e01. has _ attr ('weight') ) self. assertfalse ( e01. has _ attr ('length') ) e01. del _ attr ('weight') self. ...
[ 0.09187609702348709, -0.3404744267463684, 0.4821844696998596, -0.7741054892539978, -0.31289616227149963, 0.8356340527534485, 0.20459552109241486, 1.0075002908706665, -0.2826556861400604, -0.10516493767499924, -0.029313206672668457, -0.44923511147499084, 0.533411979675293, 0.608301639556884...
def get _ maps ( us _ map, state _ map ) : # remove unwanted states drop = ['72 ','78 ','69 ','66 ','60'] us _ map = us _ map [ ~ us _ map ['statefp']. isin ( drop ) ]. copy ( deep = true ) state _ map = state _ map [ ~ state _ map ['statefp']. isin ( drop ) ]. copy ( deep = true ) # coordinate reference system simplef...
[ 0.297014057636261, 0.23368702828884125, 0.8004113435745239, -0.28660863637924194, -0.4901261031627655, 0.4423350989818573, -0.3320663869380951, -0.2089492231607437, 0.7174248099327087, 0.6408466100692749, -0.008705773390829563, 0.21379108726978302, 1.344439148902893, -0.5652904510498047, ...
def sample _ gibbs ( self, tqdm = none ) : z = self. sample _ z ( tqdm = tqdm ) new _ parameters = self. message _ helper. parameters _ gibbs _ sample ( observations = self. observations, latent _ vars = z, forward _ message = self. forward _ message, backward _ message = self. backward _ message, prior = self. prior, ...
[ -0.6588148474693298, -0.08189310878515244, 0.4670959413051605, -0.7108657956123352, -0.3410964906215668, -0.2870441973209381, 0.17168176174163818, -0.5223127007484436, 0.20506255328655243, 0.3305417597293854, 0.6206101775169373, 1.4398905038833618, -1.0280777215957642, 0.37253299355506897,...
def warn ( msg ) : from fabric. state import output, env if not env. colorize _ errors : magenta = lambda x : x # noqa : e731 else : from fabric. colors import magenta if output. warnings : msg = _ encode ( msg, sys. stderr ) sys. stderr. write ( magenta ( " \ nwarning : % s \ n \ n " % msg ) )
[ 0.31096363067626953, 0.21124142408370972, 0.5148399472236633, -0.3508395850658417, 0.2497739940881729, -0.380684494972229, -0.4358687400817871, -0.7831680774688721, -0.17389455437660217, 0.05742078647017479, 0.8141812086105347, 0.9382902979850769, 0.9223681092262268, 0.7857912182807922, ...
def update _ confusion _ matrix ( self, true _ tags, predicted _ tags ) : assert len ( true _ tags ) = = len ( predicted _ tags ) for i in range ( len ( true _ tags ) ) : self. confusion _ dict [ ( true _ tags [ i ], predicted _ tags [ i ] ) ] + = 1
[ -0.29330480098724365, -0.48689037561416626, 0.23756450414657593, -0.21884961426258087, -0.22070781886577606, -0.13791997730731964, 0.1814984232187271, 0.5416592359542847, -1.4246220588684082, 0.48683369159698486, -0.9296014308929443, 0.08363910764455795, 0.28079742193222046, 0.519331216812...
def all _ iterator ( self ) : queue = self. loop. run _ until _ complete ( super ( ). all ( ) ) while true : # give time to the event loop so cursor reads have time to # complete. self. loop. run _ until _ complete ( asyncio. sleep ( 0 ) ) try : yield queue. get _ nowait ( ) except asyncio. queueempty : pass except end...
[ 0.2261355221271515, -0.9965766668319702, 0.6460781693458557, 0.1589984893798828, 0.14009089767932892, 0.07938262820243835, -0.8617002964019775, -0.5581130981445312, -0.7294935584068298, 0.22535182535648346, 0.485795795917511, -0.15925772488117218, 0.060554590076208115, 0.4054105281829834, ...
def parse ( cls, php _ source ) : # extract function names and parameters func _ params = cls. re _ public _ function _ param. findall ( php _ source ) # extract extended version with additional doc doc _ func _ params = cls. re _ doc _ public _ function _ param. findall ( php _ source ) # check if there is a doc found...
[ -0.1844923347234726, -0.12574729323387146, 0.6651228666305542, -0.1583898812532425, 0.14718712866306305, -0.14307597279548645, -0.6293447613716125, 0.018155081197619438, -0.5399487018585205, -0.5211222171783447, -0.5601855516433716, -0.21943111717700958, -0.052600547671318054, 1.4453814029...
def find ( self, sub ) : pos = self. tell ( ) if pos % 8! = 0 : raise exception ('find ( ) method requires bit position to be a multiple of 8') byte _ pos = pos / / 8 if hasattr ( self. byte _ source,'getbuffer') : data = bytes ( self. byte _ source. getbuffer ( ) ) [ byte _ pos : ] else : data = self. byte _ source. r...
[ 0.22671757638454437, 0.22033731639385223, 0.8464268445968628, -0.5779497623443604, -0.8708435893058777, 0.5259690880775452, 0.7550257444381714, -0.9526849389076233, -0.04846639931201935, -0.1578136533498764, -0.10829440504312515, 0.8388837575912476, -1.1595784425735474, 0.34031417965888977...
def flip ( self, flip ) : self. data. d = flip _ array ( self. im, flip )
[ -1.980748176574707, 0.1771567463874817, 0.2991319000720978, 0.3299783170223236, -0.5857798457145691, 0.9520189762115479, 0.35722675919532776, 0.64323490858078, 0.27239111065864563, -0.13738101720809937, -0.14434361457824707, 0.9213139414787292, 0.5393393635749817, 0.7889819145202637, 0.9...
def set _ to _ draft ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context ) : rec. write ( {'state':'draft'} ) return true
[ -1.274725079536438, 0.18145646154880524, 0.3410169780254364, -0.6956031322479248, 0.9977090954780579, 0.13229313492774963, 0.547397255897522, 0.3747338354587555, 0.4091750681400299, 0.26857203245162964, -0.12316737323999405, 0.7877838611602783, -0.01586170308291912, -0.32603442668914795, ...
def test _ atomic _ language _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 4. xsd ", instance = " nistda...
[ -0.38349834084510803, -0.9517993927001953, 0.4239564538002014, 0.3226776421070099, -0.6240935921669006, -0.11190017312765121, -0.12697160243988037, -0.210143581032753, -0.13970297574996948, 0.7058035135269165, -0.4683627784252167, -0.426015168428421, 0.09528131037950516, -0.111031599342823...
def sentences ( s ) : i, j, n = 0, 0, len ( s ) while j < n : if s [ j ] in ".?! " : try : if s [ j + 1 ] = = " " and s [ j + 2 ]. isupper ( ) : # punctuation that is immediately followed by a space # and an upper - case letter is assumed to mark the end # of a sentence. this simple heuristic works most of # the time, ...
[ 0.0167692843824625, -0.4433339536190033, 0.8099854588508606, 0.4742003083229065, -0.5802971720695496, -1.1828365325927734, 0.23966632783412933, -0.2972535789012909, 0.9376197457313538, 0.3570294976234436, -0.3839476704597473, 0.013022778555750847, -0.4783218204975128, -0.05992217734456062,...
def lm _ corpus _ splits ( corpus _ name, split = 0. 0, pos _ tagged = true ) : # convert to a split split = ( 100. 0 - split ) / 100. 0 train, pos _ train, heldout, pos _ heldout = none, none, none, none # print " splitting ", corpus _ name corpus = open ( corpus _ name ) reader = csv. reader ( corpus, delimiter = ','...
[ 0.004028074909001589, -0.1544523388147354, 0.7554715275764465, -0.14820514619350433, -0.2219475507736206, -0.2132890373468399, 0.21160247921943665, 0.8735166192054749, -0.8242944478988647, 0.4975566267967224, -0.2664543688297272, -0.9363930821418762, -0.3440224826335907, 0.2513057887554168...
def is _ report _ complete ( self ) : expected _ fields = ['time ','lat ','lon ','speed ','heading ','h _ error'] if self. active _ report. get ('fix _ type')! ='2d': expected _ fields. extend ( ['alt ','v _ error'] ) expected _ fields = self. device _ policy. expected _ fields ( expected _ fields ) sufficient _ tags =...
[ 0.016546502709388733, -0.11553029716014862, 0.6576608419418335, -0.3978450298309326, 0.10987062752246857, 0.1595137119293213, -0.08773447573184967, 0.05182064697146416, -0.613086998462677, 0.13527047634124756, -0.621369481086731, -0.37108296155929565, -0.678534746170044, 0.0044386028312146...
def print _ user _ profile ( dbname, colname ) : db = dbt. db _ connect _ no _ auth ( dbname ) com = db [ colname ] for user in com. find ( { }, ['id ','id _ str ','screen _ name ','description'] ) : print user ['id _ str'], user ['screen _ name'],''. join ( user ['description']. split ( ) ). encode ('utf - 8')
[ 0.5899659991264343, 0.3723331093788147, 0.6622174978256226, 0.26707592606544495, 0.034231822937726974, 0.3623162508010864, -0.33885303139686584, -0.8821603655815125, -0.8132911324501038, 0.6464189887046814, -0.699363112449646, 0.36085018515586853, -0.5773060917854309, 0.1593703329563141, ...
def rotate _ deprecated ( image, angle ) : x, y = image. shape [ : 2 ] m = cv2. getrotationmatrix2d ( ( x / / 2, y / / 2 ), angle, 1. 0 ) return cv2. warpaffine ( image, m, ( x, y ), flags = cv2. inter _ cubic )
[ -0.24629320204257965, 0.4722534120082855, 0.628967821598053, 0.10837486386299133, 0.014996175654232502, -1.2879420518875122, -0.5501062273979187, -0.8418277502059937, -0.1056489571928978, 0.04084446281194687, 0.2944912314414978, 0.06860284507274628, 0.11887548118829727, -0.2337878197431564...
def test _ example _ input _ one _ clone _ duplicate _ names ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ one " ) input _ page...
[ -0.20738664269447327, 0.7835242748260498, 0.6780890226364136, 0.7968130707740784, 0.46777647733688354, 0.6091409921646118, 0.4013560712337494, -0.6977057456970215, 0.6047407984733582, 1.007226586341858, -0.42191070318222046, -0.16788582503795624, -0.05169402062892914, 0.09179605543613434, ...
def create _ dataset ( data _ path, batch _ size = 32, repeat _ size = 1, rank _ id = 0, rank _ size = 1, num _ parallel _ workers = 1 ) : # define dataset mnist _ ds = ds. mnistdataset ( data _ path, num _ shards = rank _ size, shard _ id = rank _ id ) resize _ height, resize _ width = 32, 32 rescale = 1. 0 / 255. 0 s...
[ 0.27693256735801697, 0.16415086388587952, 1.0395079851150513, 0.02217504009604454, -0.3252975344657898, -0.1147671714425087, 0.4411693811416626, 0.44508272409439087, 0.9488409757614136, -0.14965294301509857, -0.13387401401996613, 0.27422574162483215, 0.27653932571411133, 0.1704353988170623...
def s3 _ stacta ( minio _ testdata _ bucket ) : return prepare _ s3 _ testfile ( minio _ testdata _ bucket, " cleantopo / cleantopo. json " )
[ 0.8738332986831665, -1.1805919408798218, 0.33377957344055176, -0.8569336533546448, -0.29628464579582214, 0.5232201218605042, 0.7256303429603577, 0.4200976490974426, 0.3610926866531372, 0.4258870780467987, -0.1968785524368286, 0.8308443427085876, 0.4011462330818176, -1.850253939628601, -0...
def recordtickers ( self, colname, printwarnings = true ) : self. tics = self. data [ colname ]. unique ( ). tolist ( ) if printwarnings : print ( " database ticker setup done " )
[ -0.09638184309005737, 0.9841967225074768, 0.3410618305206299, -0.7995151877403259, 0.771914541721344, -0.40790489315986633, 0.4553828239440918, -0.3236449360847473, -0.49195390939712524, 0.9615126848220825, -0.9590145945549011, 0.35401830077171326, -0.5043932795524597, 0.2852422595024109, ...
def _ _ init _ _ ( self, first _ name, last _ name, age, gender, privileges ) : super ( ). _ _ init _ _ ( first _ name, last _ name, age, gender ) self. privileges = privileges ( privileges )
[ -0.0318145751953125, 0.4584953486919403, 0.6303790807723999, 0.12046382576227188, 0.11773977428674698, 0.4831799864768982, -1.6338037252426147, 0.588093638420105, -0.45797988772392273, -0.7095853090286255, -0.7833223342895508, 0.13856081664562225, 0.2674284875392914, 0.9271993041038513, ...
def reconnect ( cls ) : logging. getlogger ( _ _ name _ _ ). info ( " reloading'{ }'". format ( cls. _ _ name _ _ ) ) if ( cls. _ connection and _ version. _ lt ('3. 0. 0') ) : cls. _ connection. disconnect ( ) cls. _ connection = cls. _ new _ connection ( )
[ -1.2333970069885254, -0.7412696480751038, 0.5443210005760193, 0.31677424907684326, -0.009088968858122826, -0.33278700709342957, -0.3630698323249817, -0.06804205477237701, -0.2776361107826233, 0.856442928314209, -0.04479851573705673, 0.3027171492576599, -0.32415148615837097, -0.374295860528...
def test _ call _ output _ to _ file ( self ) : result _ path = get _ tmp _ filename ( prefix ='blasttaxonassignertests _ ', suffix = '. fasta') self. _ paths _ to _ clean _ up. append ( result _ path ) p = blasttaxonassigner ( {'reference _ seqs _ filepath': self. reference _ seqs _ fp,'id _ to _ taxonomy _ filepath':...
[ 0.27733033895492554, -1.13096022605896, 0.7109304070472717, -0.22975976765155792, 0.31899458169937134, 0.14250527322292328, 0.8336367607116699, -0.21342065930366516, -0.516627848148346, -0.1957608312368393, 0.14067864418029785, -0.35259079933166504, -0.4249039888381958, -0.2592610716819763...
def transform ( self, y, normalization _ const = 32768. 0 ) : if y. data. min ( ) < = - 1 or y. data. max ( ) > = 1 : y _ norm = y / normalization _ const else : y _ norm = y magnitudes, _ = self. stft _ fn. transform ( y _ norm ) magnitudes = magnitudes. data mel _ output = self. mel _ basis. matmul ( magnitudes ) mel...
[ -0.4541025757789612, 0.21355777978897095, 0.6417711973190308, 0.36575278639793396, -0.9334250688552856, -0.3482751250267029, 0.05594770610332489, 0.0971788763999939, 0.8252952098846436, 0.0016451539704576135, -0.4576367139816284, -0.012880432419478893, 0.05066901445388794, 0.82345491647720...
def getmainapplicationwindow ( self ) : return self. mainapplicationwindow
[ 0.6717778444290161, -1.1818708181381226, 0.5820752382278442, 0.9599747657775879, -1.1183991432189941, 1.0386428833007812, 1.0241025686264038, 0.08656097948551178, 0.635673999786377, -1.1459726095199585, 1.9750699996948242, 1.1233876943588257, -0.43294253945350647, 1.0786195993423462, -0....
def perform ( self, user _ id, driver ) : matching _ requests = ( user _ id = = r. passenger. user _ id for r in driver. drive _ requests ) if any ( matching _ requests ) : self. publish ('authorized ', user _ id, driver ) else : self. publish ('unauthorized ', user _ id, driver )
[ -0.012954799458384514, -0.6566073894500732, 0.3427850902080536, 1.4254977703094482, 0.032467689365148544, -0.3412538170814514, -0.5286810994148254, 0.9188464283943176, -0.04036763310432434, 0.20453853905200958, 1.1258221864700317, 0.5310249328613281, -0.9728688597679138, 0.5220382213592529...
def tree ( ) : console. log ('of course it can...') tree = tree ( " alister burt ", guide _ style = " bold bright _ black " ) python _ tree = tree. add ( " open source packages ", guide _ style = " bright _ black " ) python _ tree. add ( " [ bold link = https : / / scikit - lego. netlify. app / ] napari [ / ] - [ brigh...
[ 0.23158349096775055, -0.01176594477146864, 0.4993540942668915, -0.27333566546440125, 0.2801913917064667, 0.18872828781604767, -0.5447933077812195, 0.6714486479759216, 0.2594665586948395, -0.6404573321342468, -0.647244393825531, 0.9948061108589172, -0.2184039205312729, 1.5814518928527832, ...
def process ( self ) : allsic = self. sicbuild ( ) # do peak finding per sic for sic in allsic : if sic. mass = = none : self. totali [ mass ]. append ( 1 ) self. gaussi [ mass ]. append ( 1 ) continue sic. prune ( ) # record unsmoothed curve for graphing. self. chromatogramfeatures [ sic. mass ] ['chromatogram'] = ( s...
[ 0.5531006455421448, 0.06464850157499313, 0.6363184452056885, 0.4195987582206726, 0.45346277952194214, -0.3632333278656006, 0.9226070642471313, -0.22935986518859863, 0.11404865980148315, -0.1001681461930275, 0.14200185239315033, 0.44158241152763367, 0.16767273843288422, 0.48161759972572327,...
def deprecated ( fn, replacement ) : @ functools. wraps ( fn ) def wrapped ( * args, * * kwargs ) : warnings. warn ('% s is deprecated ; use % s instead'% ( fn. _ _ name _ _, replacement ), pygideprecationwarning, stacklevel = 2 ) return fn ( * args, * * kwargs ) return wrapped
[ 0.35202327370643616, 0.5253128409385681, 0.45753392577171326, -0.4053134620189667, 0.10687363147735596, -1.217551589012146, -1.1569446325302124, 0.5235019326210022, 0.021367136389017105, -0.0783170759677887, 0.19212469458580017, 0.609836757183075, 0.8113453984260559, -0.32983386516571045, ...
def inference _ ad3plus ( l _ unary _ potentials, l _ pairwise _ potentials, l _ edges, relaxed = false, verbose = 0, return _ energy = false, branch _ and _ bound = false, constraints = none, inference _ exception = none ) : import ad3 # n _ states, pairwise _ potentials = \ # _ validate _ params ( unary _ potentials,...
[ -0.42011719942092896, 0.4477404057979584, 0.9031870365142822, -0.37462446093559265, -0.16682782769203186, 0.05054297670722008, -0.6750921607017517, 0.4694143831729889, 0.5779997706413269, 0.5724253058433533, 0.7564126253128052, 0.3127698004245758, -0.2719317376613617, -0.011593705043196678...
def rlc _ download ( self, download = true ) : if download : self. download _ data ('rlc')
[ 1.0374172925949097, -0.7330095767974854, 0.35424721240997314, 0.4477323889732361, -0.0004902150831185281, 0.1854548454284668, 0.14848171174526215, -0.5627223253250122, 0.0312763936817646, 0.3437305688858032, 0.4270075559616089, -0.36476975679397583, -0.7551296949386597, 0.6254109740257263,...
def parse _ request _ uri _ response ( self, * args, * * kwargs ) :
[ -1.3270007371902466, -1.0228959321975708, 0.40214815735816956, 0.7264874577522278, 0.47314226627349854, -0.10597144812345505, 0.1671731024980545, -0.05661334469914436, 0.18511366844177246, -1.2096467018127441, 0.2898288071155548, -0.6928834915161133, -0.632220447063446, -1.2820892333984375...
def get _ player _ by _ name ( name : str ) : return player. query. filter _ by ( name = name ). first ( )
[ -0.06187400221824646, -0.5517663359642029, 0.048528220504522324, -0.2941744029521942, 0.518526554107666, -0.7714921236038208, -0.35130876302719116, -1.4931318759918213, -0.2893748879432678, 1.2987985610961914, 0.094437375664711, -0.2099706381559372, -0.7603796720504761, -0.5054894685745239...
def remove _ url ( text ) : urlfree = [ ] for word in text. split ( ) : if not word. startswith ( " www " ) : urlfree. append ( word ) elif not word. startswith ( " http " ) : urlfree. append ( word ) elif not word. endswith ( ". html " ) : urlfree. append ( word ) urlfree = " ". join ( urlfree ) urls = re. finditer ( ...
[ 0.2749217450618744, -0.435161828994751, 0.8275830745697021, -0.40294450521469116, -0.5875917673110962, 0.35658884048461914, 0.23795361816883087, 1.3075222969055176, 0.13737225532531738, 0.3718363046646118, -0.4482226073741913, 0.4222925007343292, -1.6011545658111572, 1.090377688407898, -...
def fibonacci _ iterative ( n ) : arr = [ 0, 1 ] for i in range ( 2, n ) : arr. append ( arr [ i - 1 ] + arr [ i - 2 ] ) return arr [ n ]
[ -0.15254530310630798, -0.03204549103975296, 0.3203812539577484, 0.4141765236854553, 0.15832985937595367, -0.549832820892334, 0.19700683653354645, -0.9583670496940613, -0.5556590557098389, -0.22099603712558746, -0.21547414362430573, -0.03581848740577698, -0.3597570061683655, 0.3976846337318...
def setup ( self, source _ url : str ) - > none : self. _ url _ source = source _ url return self
[ -0.4751324951648712, 0.5561683177947998, 0.28412166237831116, -0.5004602670669556, -0.36525294184684753, -0.10793111473321915, 0.5853390693664551, 1.3510396480560303, 0.6560789346694946, -0.4688972234725952, -1.2174034118652344, 0.19766542315483093, 0.3205200433731079, 0.7765434980392456, ...
def atomic _ save ( target _ path, data, encoding = " utf - 8 " ) : if platform. system ( ) = ='windows': with open ( target _ path, " w ", encoding = encoding, newline ='' ) as outfile : outfile. write ( data ) return real _ path = os. path. realpath ( target _ path ) new _ path = real _ path + '. new'with open ( new ...
[ 0.3155198395252228, -0.5398065447807312, 0.8146514296531677, 0.14852920174598694, 0.4085236191749573, 0.0032156219240278006, -0.487380713224411, 0.008497857488691807, -0.615026593208313, 0.6014521718025208, -0.4677079916000366, 0.611710250377655, 0.13112632930278778, 0.07680001109838486, ...
def trim _ coeff ( coeff, tol = 1. e - 3 ) : dim = coeff. ndim # cuts out the high diagonals as much as possible to minimize polynomial degree. if abs ( coeff [ tuple ( [ - 1 ] * dim ) ] ) < tol : coeff [ tuple ( [ - 1 ] * dim ) ] = 0 deg = np. sum ( coeff. shape ) - dim - 1 while deg > 2 : mons = mon _ combos _ limite...
[ 0.20249296724796295, -0.2729870080947876, 0.7320353388786316, -0.443096786737442, -1.1220033168792725, 0.22301076352596283, 0.7766017913818359, 0.3664361536502838, 0.891619861125946, 0.9352757930755615, -0.19625259935855865, 0.505469024181366, 0.08740188181400299, -1.6523547172546387, -0...
def repeat ( l, n ) : return [ x for x in l for i in range ( n ) ]
[ -1.012759804725647, 0.3504335284233093, 0.32849034667015076, 0.3057972192764282, -0.15963757038116455, 0.542194128036499, -1.8092409372329712, 0.09194469451904297, 0.21274720132350922, 0.18217594921588898, -1.526045560836792, -0.6831566095352173, 0.3322410583496094, 0.024318063631653786, ...
def save _ algo _ df ( algo _ name, key, df, environ = none, rel _ path = none ) : folder = get _ algo _ folder ( algo _ name, environ ) if rel _ path is not none : folder = os. path. join ( folder, rel _ path ) ensure _ directory ( folder ) filename = os. path. join ( folder, key + '. csv') with open ( filename,'wt') ...
[ 0.20429112017154694, 0.27829474210739136, 0.5809662342071533, 0.4400104284286499, -0.06497126072645187, 0.06308846920728683, 0.4559781551361084, 0.5061604380607605, -1.3177688121795654, 1.0133049488067627, -0.12629374861717224, 0.6470546722412109, 0.2632037401199341, 0.07027217000722885, ...
def viewportoff ( func ) : @ functools. wraps ( func ) def wrap ( * args, * * kwargs ) : try : # turn $ gmainpane off, only possible in gui mode cmds. panelayout ( getmayaglobals ('gmainpane'), edit = true, manage = false ) disabled = true except : disabled = false # decorator will try / except running the function. # ...
[ 0.35878926515579224, 0.10454142093658447, 0.8282384276390076, 0.10523167252540588, -1.6801542043685913, 1.075354814529419, 0.4883325397968292, 0.25807854533195496, 0.9631362557411194, 0.22984015941619873, 0.4728756546974182, 0.66086345911026, -0.7657158970832825, 0.1327914148569107, 0.88...
def prestage _ packages ( context, subcloud, payload ) : # ansible inventory filename for the specified subcloud ansible _ subcloud _ inventory _ file = \ utils. get _ ansible _ filename ( subcloud. name, ansible _ prestage _ inventory _ suffix ) prestage _ software _ version = payload. get ( consts. prestage _ request...
[ -0.8473264575004578, 0.23362497985363007, 0.6186474561691284, 0.42274168133735657, 0.009331944398581982, 0.2362123429775238, 0.2936038672924042, 0.2216847985982895, 0.08251012116670609, 0.9247013926506042, -0.6617284417152405, -0.24311892688274384, -0.49725714325904846, 0.5091541409492493,...
def expm _ pade ( a ) : # if the one norm is sufficiently small, # pade orders up to 13 are well behaved. scale = 0 size = a. shape [ 0 ] pade _ order = none one _ norm _ = one _ norm ( a ) for pade _ order _ in pade _ orders : if one _ norm _ < theta [ pade _ order _ ] : pade _ order = pade _ order _ # endif # endfor ...
[ -0.0435589961707592, 0.42109960317611694, 0.5743083953857422, -0.515377402305603, -0.6251163482666016, -0.4930168390274048, 0.26536259055137634, 0.43452343344688416, 0.8722033500671387, 0.9299781322479248, 0.525640070438385, -0.5056372284889221, -0.7096458673477173, 0.26829469203948975, ...
def test _ settings _ page _ loads _ for _ logged _ in _ user ( self ) : # create test user and login as them. createtestuser ( username ='testuser') login = self. client. login ( username ='testuser ', password ='12345') # attempt to get to settings page. desired _ url = reverse ('users : settings') response = self. c...
[ -0.5943729281425476, 0.653634786605835, 0.14847040176391602, 0.6374350786209106, 0.7183642983436584, 0.3531542122364044, 0.14238977432250977, -0.967193603515625, -0.7007653713226318, -0.018017398193478584, -0.2629002034664154, -0.08573949337005615, 0.3290165662765503, -0.27633222937583923,...
def zipfit ( v, p, q, vn = 240. 0, solver ='slsqp ', par0 = par0 ) : # estimate nominal power. sn = estimatenominalpower ( p = p, q = q ) # massage into standard polynomial format. vbar = v / vn pbar = p / sn qbar = q / sn # solve. if solver = ='fmin _ powell':'''sol = my. fmin _ powell ( zipobjective, args = ( vbar, p...
[ 0.00422830693423748, -0.5621792078018188, 0.7519499063491821, -0.09520373493432999, -0.2608363628387451, -0.29646188020706177, -0.2743082642555237, -0.3993532657623291, 0.6702853441238403, -0.10480435192584991, -0.4603886604309082, 0.23620913922786713, -0.4253288805484772, -0.0395810045301...
def find _ file ( service, profile _ id, report _ id ) : target = none request = service. reports ( ). files ( ). list ( profileid = profile _ id, reportid = report _ id ) while true : response = request. execute ( ) for report _ file in response ['items'] : if is _ target _ file ( report _ file ) : target = report _ f...
[ 0.9259554743766785, -0.4096756875514984, 0.5596100687980652, -0.3444444239139557, 0.9748029708862305, -0.6184536814689636, -0.30637237429618835, -0.7102463841438293, -0.7867317795753479, -0.6250733733177185, 1.3892707824707031, 0.32853078842163086, -1.0872350931167603, -0.5519595146179199,...
def billing _ postal _ code ( self ) : return self. _ billing _ postal _ code
[ 0.3241959512233734, -0.0713985487818718, 0.36025765538215637, 0.5646533966064453, -0.20286689698696136, 1.1455409526824951, 0.2561790943145752, 1.1675766706466675, 0.6444866061210632, -0.9150022268295288, 0.2427377998828888, 0.13110899925231934, -0.1019492894411087, 0.8719652891159058, -...
def test _ left _ channel _ 2 ( ) : assert numpy. array _ equal ( harvard. left _ channel ( ), harvard. data [ :, 0 ] )
[ 0.6038680076599121, -0.8219350576400757, 0.30142268538475037, -0.7334660291671753, 1.9103916883468628, 0.7625647783279419, -0.4426809847354889, -1.3214086294174194, 0.1900710016489029, -0.20574907958507538, -0.533273458480835, 1.0854233503341675, -0.42526498436927795, 1.232836127281189, ...
def get _ app _ id ( ) : if profile is none : raise eikonerror ('401 ','appid is missing. did you forget to call set _ app _ id ( )?') return profile. get _ application _ id ( )
[ 1.4229635000228882, -0.014921882189810276, 0.2628802955150604, 1.4072537422180176, 0.0008697401499375701, 1.1993207931518555, 0.8049889206886292, 0.04398457705974579, 0.9421789646148682, 0.7834064960479736, 0.02460451051592827, 0.4511101543903351, -0.10468011349439621, 0.6260688900947571, ...
def compute _ relational _ message ( receiver, senders, senders _ mask, f, g ) : sr _ relations = [ ] num _ senders = senders. size ( 1 ) for s in range ( num _ senders ) : sender = senders [ :, s ] x _ sr _ pairwise = torch. cat ( [ receiver, sender ], dim = - 1 ) sr _ relation = g ( x _ sr _ pairwise ) * senders _ ma...
[ -0.3894300162792206, 1.2899974584579468, 0.5932620167732239, 0.04673898220062256, 0.22649146616458893, -0.9564449191093445, 0.5928053855895996, 0.21448728442192078, -0.12954865396022797, 0.38863956928253174, -0.12582063674926758, 0.20105664432048798, -0.21417148411273956, -0.42519274353981...
def calc _ ali ( subject, show _ plot = false ) : ctl _ left _ roi _ left _ cue = \ mne. read _ source _ estimate ( tf _ folder + " bp _ % s _ ctl _ left _ occipital _ lh _ dspm " % ( subject ) ) ctl _ right _ roi _ left _ cue = \ mne. read _ source _ estimate ( tf _ folder + " bp _ % s _ ctl _ left _ occipital _ rh _ ...
[ 0.821000874042511, -0.29051050543785095, 0.8083803653717041, -0.8912029266357422, -0.18498939275741577, 0.43601474165916443, 0.7770074605941772, 0.02885349653661251, -0.18725983798503876, 0.7889368534088135, -0.15427982807159424, 0.5160912871360779, 0.12261959165334702, 0.34427526593208313...
def local _ storage ( self ) : current _ index = self. ui. storage _ select _ combo. currentindex ( ) # this will return none if not a storage item return self. ui. storage _ select _ combo. itemdata ( current _ index, self. _ storage _ model. storage _ data _ role )
[ -0.030820487067103386, -0.6568074822425842, 0.2980882227420807, 0.4766928553581238, 0.03094886988401413, 0.4827915132045746, 0.335938036441803, -0.6650554537773132, 0.7286596894264221, -0.07037694752216339, 0.016143295913934708, 0.06362756341695786, -0.5265194177627563, -0.7752689719200134...
def get _ relevant _ indices _ h _ atoms _ only ( traj _ frames _ df, atom _ indexes ) : frame _ 1 = traj _ frames _ df [ 0 ] local _ indexes = [ ] fragments = [ ] for atom _ index in atom _ indexes : local _ index = frame _ 1. loc [ atom _ index ] ['local index'] local _ index _ split = list ( local _ index ) if local...
[ -0.28678104281425476, -0.4790410101413727, 0.5771929621696472, -0.41026797890663147, -0.365679532289505, -0.23260539770126343, 0.8743957877159119, 1.164695143699646, -0.21122580766677856, 0.19133076071739197, 0.14587150514125824, 0.5748119950294495, 0.10730806738138199, -0.3255934715270996...
def creategrouphierarchy ( path ) : tmppath ='' for i in path. strip ('|'). split ('|') : if cmds. objexists ( tmppath +'|'+ i ) : pass else : group = cmds. group ( empty = true, name = i ) if tmppath : parented = cmds. parent ( group, tmppath ) cmds. rename ( parented, i ) tmppath = tmppath +'|'+ i
[ -0.5453193187713623, 0.12597936391830444, 0.7987552285194397, 0.3480749726295471, -0.19876578450202942, 0.7212924361228943, 0.9122791886329651, -0.634611189365387, -0.6449782252311707, -0.2618771195411682, -0.1528579145669937, -0.4133303761482239, -0.03169235959649086, 0.2812216579914093, ...
def timeevo ( self, temps ) : # single pulse if self. ptype = ='pulse': # release time, after tf if temps > = self. tf : if self. release = ='exponential'and self. tdmod > self. mintd : self. tdmod - = ( self. d. dt / self. taud ) * self. tdmod self. input = self. tdmod * self. smod elif self. release = ='instantaneous...
[ -0.26830410957336426, 0.09599030762910843, 0.669370174407959, -0.2862635552883148, 0.12719407677650452, 0.9354631304740906, 0.07758400589227676, 0.9035040736198425, -0.6506783366203308, 0.8507953882217407, -0.2628304660320282, -0.18638457357883453, 0.0010179197415709496, 0.370333194732666,...
def square _ wave ( self, sqw = 0, out = 0 ) : rs0 = 1 if sqw = = 4 or sqw = = 32 else 0 rs1 = 1 if sqw = = 8 or sqw = = 32 else 0 out = 1 if out > 0 else 0 sqw = 1 if sqw > 0 else 0 reg = rs0 | rs1 < < 1 | sqw < < 4 | out < < 7 self. i2c. writeto _ mem ( self. addr, control _ reg, bytearray ( [ reg ] ) )
[ -0.43422457575798035, 0.0640401765704155, 0.7249870300292969, 0.03336826711893082, -0.2199614942073822, -0.3155246376991272, 0.16188760101795197, -0.6800494194030762, 0.9307423233985901, -0.6009643077850342, -0.6584278345108032, 0.4571458399295807, -0.6131725907325745, 0.3414754569530487, ...
def test _ are _ labels _ overlapping ( self ) : lbl1 = audacitylabel ( 0. 0, 10. 0,'' ) lbl2 = audacitylabel ( 11. 0, 13. 0,'' ) self. assertfalse ( waveditor. are _ labels _ overlapping ( lbl1, lbl2 ) ) " " " | - - - - - - - - - | lbl1 | - - - - - - - - | lbl2 " " " lbl1 = audacitylabel ( 10. 0, 12. 0,'' ) lbl2 = aud...
[ -0.4559166133403778, -0.27773317694664, 1.129563570022583, -0.3356921672821045, 0.33235833048820496, 0.9146652817726135, 0.23785604536533356, -0.0865606814622879, -0.5294000506401062, -0.4019765555858612, -0.5258136987686157, -0.35669469833374023, -0.5731775760650635, 0.6700414419174194, ...
def postprocess _ output ( gen _ question ) : gen _ question = gen _ question [ : gen _ question. find ( '?') + 1 ] return postprocess ( gen _ question )
[ -0.1793583780527115, -1.4866305589675903, 0.555061399936676, 0.1779654175043106, -1.181228518486023, -0.06303029507398605, 0.29810816049575806, -0.06801442801952362, -0.6351498365402222, -0.5173448324203491, -0.37351560592651367, -0.5805104374885559, -0.4008135497570038, -0.105859309434890...
def cal _ for _ ss ( df _ option, cal _ method ='mean ', col _ names = [ ], ss _ time = 900 ) : # check if the dataframe is defined appropriately df _ option. check _ type ( pd. core. frame. dataframe, inspect. stack ( ) [ 0 ] [ 3 ] ) df = df _ option. get ( ) if time _ col _ name not in df. details : raise typeerror (...
[ 0.11454576253890991, 0.8188926577568054, 0.8365902304649353, 0.27299049496650696, -0.09244664013385773, -0.665199875831604, 0.3552592694759369, -0.31869667768478394, -0.8585764169692993, 0.14610177278518677, -0.7374700903892517, 0.42183202505111694, 1.0293067693710327, 0.2990674078464508, ...
def slit _ nanoflyscan _ cal ( scan _ id _ list = [ ], interp _ range = none, orthogonality = false, plotme = none, bin _ low = 934, bin _ high = 954, normalize = true ) : numline = len ( scan _ id _ list ) slit _ range = np. zeros ( ( numline, ), dtype = np. float64 ) line _ pos _ seq = np. zeros ( ( numline, ), dtype...
[ -0.20190070569515228, 0.10763982683420181, 0.8305498957633972, -0.008495483547449112, -0.3056522607803345, 0.1703212708234787, 0.5095049738883972, -0.13493545353412628, -0.35681819915771484, -0.1991412341594696, -0.027972910553216934, 0.400858074426651, -0.6634356379508972, 1.0139844417572...
def diff _ outputs ( torch _ outputs, ort _ outputs, index ) : expected _ outputs = torch _ outputs [ index ]. cpu ( ). numpy ( ) diff = numpy. abs ( expected _ outputs - ort _ outputs [ index ] ) return numpy. amax ( diff )
[ -0.42744946479797363, -0.9605976939201355, 0.486169695854187, -0.18097318708896637, 0.2319667786359787, -0.3432665169239044, 0.5044348835945129, -0.1981934905052185, 0.17440055310726166, -0.04535359516739845, 0.7669711709022522, 0.0396125391125679, 0.5701290369033813, -0.5760639905929565, ...
def robustfov ( self ) : if self. _ _ overlay is none : return try : result = fslrun. runfsl ('robustfov ','- i ', self. _ _ overlay. datasource ) # robustfov returns two lines, the last # of which contains the limits, as : # # xmin xlen ymin ylen zmin zlen limits = list ( result. strip ( ). split ('\ n') [ - 1 ]. spli...
[ -0.16126391291618347, 0.1851654052734375, 0.44828298687934875, -0.11556980013847351, -0.2586978077888489, -1.338130235671997, -0.21883127093315125, -0.5039379596710205, 0.4103868901729584, -0.19161544740200043, 0.0820494219660759, 0.27111873030662537, 0.163845956325531, 0.14283764362335205...
def test _ ensure _ device _ role _ not _ exist ( self ) : test _ role _ name = " mytestrole " onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : test _ role _ name, " netdev _ nb _ role _ color " : plugin _ settings [ " default _ device _ role _ color " ], " netdev _ vendor " ...
[ -0.5177944898605347, 1.1345120668411255, 0.4008123278617859, -0.11644303053617477, 0.8959360718727112, 0.6832132935523987, 0.4747996926307678, -0.7575368881225586, -0.43839946389198303, -0.08416285365819931, -0.25794097781181335, -0.798843502998352, -0.23016734421253204, 1.2178454399108887...
def history ( ) : id _ session = session [ " user _ id " ] range _ size = db. execute ( " select count ( * ) as count from history where history _ id = : id _ session ", id _ session = id _ session ) size = range _ size [ 0 ] ['count'] db _ history = db. execute ( " select * from history where history _ id = : id _ ses...
[ 0.4840889275074005, 1.1570919752120972, 0.6169135570526123, -0.40457358956336975, 0.30292534828186035, -0.2792759835720062, 0.2917514741420746, 0.24788257479667664, 0.024526791647076607, 0.18913951516151428, 0.23166212439537048, 0.22796165943145752, 0.5479434728622437, 0.509994626045227, ...
def test _ hawkessumexpkern _ solver _ basic _ settings ( self ) : for solver in solvers : # tol learner = hawkessumexpkern ( self. decays, solver = solver, tol = self. float _ 1, * * test. specific _ solver _ kwargs ( solver ) ) self. assertequal ( learner. tol, self. float _ 1 ) self. assertequal ( learner. _ solver ...
[ -0.6387633085250854, -0.1394476592540741, 0.6511092782020569, 0.17134304344654083, 0.3560720682144165, -0.06974455714225769, -0.20430561900138855, -0.015942178666591644, 0.22824625670909882, -0.3614010214805603, -1.0599017143249512, -0.21082797646522522, 0.33903947472572327, 0.683087050914...
def retrieval _ collate ( data ) : # separate source and target sequences t2i _ batch, i2t _ batch = list ( zip ( * data ) ) # t2i def generate _ inputs ( _ batch ) : sent, att _ feats, img _ masks, box _ feats, obj _ labels, pos _ labels, img _ ids, langs = zip ( * _ batch ) # sent = np. array ( sent ) _ sent = [ ] _ ...
[ -0.46604427695274353, -0.722954511642456, 0.9940686225891113, -0.9727245569229126, -0.3498408794403076, -0.7018234729766846, 0.2600659430027008, -0.37740203738212585, -0.41844484210014343, 0.31268414855003357, -0.042385201901197433, 0.10848335176706314, 0.5131293535232544, 0.23840531706809...
def movements _ enaction ( self, movements _ enaction : movementsenaction ) : self. _ movements _ enaction = movements _ enaction
[ -0.09176331013441086, -0.5464156866073608, 0.07579034566879272, 0.01239646878093481, 0.44417670369148254, 0.5600765347480774, 0.7509815096855164, 0.05374487116932869, 0.03831925988197327, 0.4392837584018707, -1.170116662979126, 0.4419626295566559, 0.31831613183021545, 0.7013927102088928, ...
def set _ pin ( self, value ) : self. pin = value logging. debug ( " user's pin code received " )
[ -0.35211896896362305, 0.23542024195194244, 0.17568902671337128, -0.09513366967439651, 0.384584903717041, 0.9948288202285767, 0.6862825751304626, -0.21531015634536743, 0.29324042797088623, 0.4399619996547699, -1.0695146322250366, 0.3718288540840149, -0.21324516832828522, 0.20419174432754517...
def preprocess _ query ( query : str ) - > str : # 0. remove newlines query = query. replace ( " \ n ", " " ) # 1. remove aliases # from ` dimension _ wikis ` ` dw ` # inner join ` fact _ wam _ scores ` ` fwn ` query = re. sub ( r " ( \ s ( from | join ) \ s ` [ ^ ` ] + ` ) \ s ` [ ^ ` ] + ` ", r " \ 1 ", query, flags ...
[ 0.334059476852417, -0.2738232910633087, 0.7802658081054688, -0.22261878848075867, -0.9373334050178528, 0.44721129536628723, 0.2975795269012451, 0.5775495171546936, -0.15503980219364166, 0.2837972939014435, 0.6786496639251709, -0.020620841532945633, -0.04414329305291176, 0.3909538686275482,...
def search _ unread ( self, term ) : self. unread = self. obj. inbox ( ). mail ( unread = true ) term = term. lower ( ) result = [ ] for mail in self. unread : mail. fetch ( ) subject = mail. subject sender = mail. fr if term in subject. lower ( ) or term in sender : result. append ( mail. subject ) return self. _ form...
[ -0.871381938457489, -0.8289464116096497, 0.5967371463775635, -0.7473536729812622, -0.7855985164642334, -0.27572929859161377, -1.1747645139694214, -0.4861980676651001, -0.45026907324790955, -0.458855539560318, 0.3610498309135437, 0.7004020810127258, -1.1039263010025024, -0.06535980850458145...
def make _ qpfile ( clip : vs. videonode, path : anypath, /, mode : scm = scm. wwxd _ scxvid _ union ) - > qpfile : path = vpath ( path ) if path. exists ( ) : status. fail ( f'make _ qpfile : a qpfile already exists at { path. resolve ( ). to _ str ( ) }') scenes = find _ scene _ changes ( clip, mode ) with path. open...
[ 0.3609148859977722, -0.7126165628433228, 0.5765964984893799, -0.08332756161689758, -1.337307095527649, 0.13287970423698425, -0.20449450612068176, -0.6438097357749939, 0.3978395462036133, 0.37012431025505066, -0.27688390016555786, 0.4452492892742157, 0.41363808512687683, -1.2133899927139282...
def test _ switchplayer ( ) : gc = gamecontroller ( width, height ) board = board ( grid _ col _ row _ count, cell _ w _ h, width, height, gc ) pm = playermanager ( board, gc, more _ difficult ) assert pm. player _ turn = = human assert pm. player _ turn! = computer pm. switchplayer ( ) assert pm. player _ turn = = com...
[ -0.5786505341529846, 0.07006093114614487, 0.6257622241973877, 0.04972556233406067, 0.4993768632411957, 0.38527101278305054, 0.5973337292671204, -0.3063203692436218, 0.02826468087732792, -0.5644363164901733, -0.4738977551460266, -0.2239091545343399, -0.6847450137138367, 0.4313744604587555, ...
def debug ( self, debug ) : if debug in ( true, false ) : self. _ debug = debug else : raise valueerror ('debug must be " true " ( set debug on ) or " false " ( set debug off ), not " { 0 } " '. format ( debug ) ) if self. _ debug : print ( self. _ debug _ info, " set debug on " ) self. left _ wheel. debug = true self....
[ 0.3232879638671875, 0.40251219272613525, 0.5096169710159302, -0.16199849545955658, 0.8531593680381775, 0.7409261465072632, -0.08364840596914291, 0.38502880930900574, -0.4108573794364929, -0.2258148193359375, -0.3333737552165985, -0.5273370146751404, -0.7176668047904968, 1.7504594326019287,...
def drawboxorellipse ( inputs, class _ name, axe, color, mode = " box " ) : if mode = = " box " : for box in inputs : y1, y2, x1, x2 = box r = rectangle ( ( x1, y1 ), x2 - x1, y2 - y1, linewidth = 1. 5, alpha = 0. 5, linestyle = " dashed ", edgecolor = color, facecolor = " none " ) axe. add _ patch ( r ) # axe. text ( ...
[ -0.8841918706893921, -0.10870783776044846, 1.4478858709335327, -0.4920628070831299, -0.1615547388792038, 1.1983543634414673, 0.39228758215904236, -0.01757766865193844, 0.5190377235412598, 0.5636065006256104, 0.30596259236335754, 0.11428258568048477, 0.4346851408481598, 0.4201297163963318, ...
def viewallstories ( request ) : userstories = userstory. objects. all ( ) return render _ to _ response ('viewstories. html ', {'userstories': userstories, }, context _ instance = requestcontext ( request ) )
[ 0.8545026183128357, 0.06015036255121231, 0.2561197876930237, 0.39026308059692383, -0.6442883610725403, 0.651654839515686, 0.19251874089241028, 0.4630435109138489, -0.24735410511493683, -0.9479062557220459, 1.115435242652893, -0.07423659414052963, 1.0116381645202637, 0.4553125202655792, -...
def getmassavvstime ( self, ctype, tstep = 1 ) : if self. comm. get _ rank ( ) = = 0 : if ctype not in self. cldict. keys ( ) : raise notimplementederror ( " unknown cluster type. " ) clsnaps = self. clsnaps [ ctype ] mu2vtime = float ('nan') * np. ones ( [ 2, len ( clsnaps ) ] ) ind = 0 for clsnap in clsnaps : if not ...
[ -1.1853396892547607, 0.07434485852718353, 0.8679822087287903, 0.02542499080300331, -0.7077385783195496, -0.11077472567558289, -0.3303307294845581, -0.26749610900878906, -0.07418720424175262, 1.4935673475265503, -0.17682982981204987, 0.4034644067287445, 0.6145742535591125, 1.678200721740722...
def _ _ init _ _ ( self, session ) : self. session = session
[ 0.3121873140335083, -1.3659443855285645, 0.12618030607700348, -0.0778794139623642, -0.3269142210483551, -0.22245438396930695, 0.3435163199901581, 0.12177275121212006, 1.6471705436706543, -0.4346458613872528, -0.8233044147491455, -0.028303252533078194, 0.9844432473182678, 0.4637832641601562...
def index ( ) : return render _ template ( " index. html ", debug = app. config ['debug'], default _ config = app. config ['default _ config']. flatten ( ), plugin _ templates = get _ plugin _ templates ( ) )
[ 0.7451475262641907, -0.07979750633239746, 0.19593164324760437, 0.30984050035476685, 0.27766650915145874, -0.803350567817688, 0.17072562873363495, 0.4228511154651642, -0.019861049950122833, 0.5297977924346924, -0.25914809107780457, 0.22063615918159485, -0.3557274639606476, 0.051262810826301...
def test _ ensure _ device _ type _ strict _ missing ( self ) : plugin _ settings [ " object _ match _ strategy " ] = " strict " onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : plugin _ settings [ " default _ device _ role " ], " netdev _ vendor " : " cisco ", " netdev _ mod...
[ 0.44413989782333374, 0.7195283770561218, 0.5167446732521057, 0.8799543380737305, 1.199114203453064, 0.398999959230423, 0.5747585296630859, -0.6470109224319458, 0.019148292019963264, -0.13825634121894836, -0.7099090218544006, -0.39757218956947327, 0.05601905286312103, 1.3843084573745728, ...
def feedlocalizerxytheta ( self, actual _ dist, abs _ heading ) : sensor _ data = self. getsensordata ( ) self. logger. debug ( " about to put data into qnav _ loc, object { } ". format ( str ( self. qnav _ loc ) ) ) self. qnav _ loc. put ( { " dtheta " : self. angletolocuc ( abs _ heading ), " dxy " : self. disttolocu...
[ -0.6724822521209717, -0.6004065871238708, 0.5648288130760193, -1.480161190032959, 0.12806805968284607, 0.28015121817588806, -0.18510356545448303, -0.2639310657978058, -0.6474271416664124, -0.10312361270189285, -0.8036490082740784, 0.04431184008717537, 0.9490564465522766, -0.503373503684997...
def low _ resolution _ support ( img _ path, result, scale = ( 224, 224 ) ) : img = cv2. imread ( img _ path ) if img is none : print ( " unable to locate file! " ) return img _ height, img _ width = img. shape [ : 2 ] ret = [ ] for count, ( left, top ), ( right, bot ), pixel _ area in result : center = ( ( left + righ...
[ -0.2447635680437088, -0.5727605819702148, 1.2178467512130737, -0.009977205656468868, -0.08662474155426025, -0.805683434009552, 0.22164519131183624, -0.08461785316467285, 0.34667250514030457, 0.13022559881210327, -0.15096139907836914, -0.26836860179901123, -0.23329247534275055, 0.2412139475...