text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ 08 _ 7 _ plusdays ( self ) : self. m _ schedule _ obj. dayofweek = 0 l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) # print ( prettyformatany. form ( l _ days,'b1 - 08 - a - days') ) self. assertequal ( l _ days, 10 )
[ -0.20915108919143677, 0.7826600074768066, 0.38774561882019043, -1.451705813407898, 0.5927398204803467, -0.5999996066093445, -0.17289100587368011, -0.47997552156448364, 1.0411456823349, -0.43265268206596375, 0.23270326852798462, -0.2995005249977112, 0.2582017779350281, 0.006823041941970587,...
def convert _ lat _ long ( lat, long ) : x _ diff = map _ right - map _ left y _ diff = map _ top - map _ bottom return ( long - map _ left ) / x _ diff, ( lat - map _ bottom ) / y _ diff
[ -0.5070039629936218, -1.0794806480407715, 0.7279420495033264, -0.7057837843894958, -0.5944622159004211, 0.8125146627426147, -1.2479252815246582, 0.11172764003276825, -0.13619941473007202, 0.4915522038936615, -0.6569244265556335, -0.18488091230392456, 0.31268370151519775, 0.8892499804496765...
def installation _ view ( request, pk ) : customer = customer. objects. get ( id = pk ) requirement = requirement. objects. filter ( customer _ id = customer. id ). first ( ) # set context. # leads, sales _ people, roof _ types, storeys, electric _ powers, payments, installers are default options loaded in django admin...
[ 0.09319386631250381, -0.055648382753133774, 0.9410892128944397, 0.1803445816040039, -0.46376827359199524, -0.05482911318540573, 0.5842154622077942, 0.21379029750823975, 0.03346721827983856, 0.6709052920341492, 0.22936105728149414, -0.44590872526168823, -0.014791869558393955, 1.264012932777...
def select _ entries ( self, query ) : conn = self. conn cur = conn. cursor ( ) cur. execute ( query ) rows = cur. fetchall ( ) for row in rows : print ( row ) return rows
[ 0.37565258145332336, -0.5481979250907898, 0.46796485781669617, 0.5463327169418335, 0.20493635535240173, -0.35383141040802, -1.1218781471252441, 0.06223735958337784, 0.32422706484794617, 0.1853688508272171, 0.9164980053901672, 0.10412601381540298, -0.1313823163509369, 0.7698982954025269, ...
def test _ redetect _ one _ with _ bbox _ option ( self ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detection = detector. detectone ( image = vlimage _ one _ face ) redetect = detector. redetectone ( image = vlimage _ one _ face, bbox = detection. boundingbox. re...
[ -0.10052457451820374, 0.3045797348022461, 0.5946462154388428, 0.9010923504829407, 1.925783395767212, -0.3929790258407593, 0.42096683382987976, -0.41826754808425903, 1.3086187839508057, -0.5812325477600098, -0.4789775013923645, -0.35717713832855225, 0.24295556545257568, 0.8587554097175598, ...
def test _ get _ constant _ value _ non _ constant ( self ) : # setup x = np. array ( range ( 5 ) ) expected _ result = none # run result = univariate. _ get _ constant _ value ( x ) # check assert result is expected _ result
[ -0.14952293038368225, 0.8758734464645386, 0.3385903537273407, 0.9835895895957947, -0.19738063216209412, 0.6147971749305725, 0.10334324091672897, -0.036021217703819275, -0.3766222298145294, -0.33040300011634827, -0.41083014011383057, 0.1719297170639038, -0.3649192452430725, -0.5542017221450...
def remove _ punctuation ( string : str ) - > str : for punctuation in [ '. ', ', ', '? ', '!'] : string = string. replace ( punctuation,'' ) return string
[ -0.08691980689764023, -0.9485103487968445, 0.3138764798641205, 0.4938001036643982, -0.5220535397529602, -0.22576990723609924, 0.3238460123538971, 1.2313756942749023, 0.6872999668121338, 0.09030134975910187, -0.11048083007335663, -0.25520986318588257, -0.7326401472091675, -1.049035191535949...
def fixed _ model ( self, ie, bz, carb, il _ case, t ) : korrekturregel = [ 40, 60 ] carb _ increase _ rate = 22 # bz erhoehung 22mg / dl per carb carb _ factors = { 0 : 0, 1 : 1. 5, 2 : 0. 5, 3 : 1. 0 } # carb _ factor varies by period / # of the day, assumed carb _ factor at night is as in the evening bzc = none # pr...
[ 0.0957639291882515, -0.5659101605415344, 0.8041425347328186, 0.7804865837097168, 0.26795411109924316, 0.48152637481689453, 0.525092363357544, 0.5859015583992004, -0.8632254600524902, 0.40975767374038696, -0.4146755635738373, 0.6925152540206909, -0.876833975315094, 0.16080805659294128, 0....
def test _ total _ time ( self ) : if hardwarethread. _ hardwarethread _ _ singleton is not none : hardwarethread. _ drop ( ) # get current original value ( none ) and ensure getter returns the same original _ total _ time = \ hardwarethread. _ hardwarethread _ _ total _ time self. assertequal ( original _ total _ time...
[ -0.2754475772380829, -0.07326217740774155, 0.6074094772338867, -0.7712597846984863, 0.9950728416442871, 0.36517134308815, 0.5337728261947632, -0.09254235774278641, 0.23585769534111023, 0.03914907947182655, -0.4497099220752716, -0.0762123242020607, -0.3508506417274475, 0.6708630919456482, ...
def delete _ product ( product, token : optional [ str ] = header ( none ) ) : token _ decoded = decode _ token ( token ) if ( token _ decoded = = none ) : return {'msg':'token is required'} if ( not product ) : return json. dumps ( {'msg':'body is required'} ) controller = productcontroller ( ) return controller. dele...
[ -0.5096421241760254, -0.29234778881073, 0.26169300079345703, 0.856886088848114, 0.10991857945919037, -0.06335903704166412, -0.28556257486343384, -0.4525577127933502, 0.7385363578796387, 0.20954638719558716, -0.7054368257522583, 0.5718370676040649, -0.3383181393146515, -0.2639283835887909, ...
def sample ( self ) : self. proc. expect ( ". * any other key to take a reading : " ) self. proc. send ( " " ) self. proc. expect ( " result is xyz : ( -? \ d + \. \ d + ) ( -? \ d + \. \ d + ) ( -? \ d + \. \ d + ), " ) x, y, z = [ float ( x ) for x in self. proc. match. groups ( ) ] return xyz ( x, y, z )
[ 0.16108117997646332, -0.6945920586585999, 0.5128631591796875, -0.3993942141532898, -1.004783272743225, -0.47633591294288635, 0.35972997546195984, -0.565919041633606, -0.3975087106227875, -0.8968883752822876, 0.3547310531139374, 0.26233604550361633, -1.2060556411743164, -0.40127649903297424...
def extract _ masters ( ) : good _ masters = [ ] for master in config _ bootstrap. master. get _ all _ masters ( ) : host = getattr ( master,'master _ host ','' ) local _ config _ path = getattr ( master,'local _ config _ path ','' ) build _ dir = os. path. basename ( os. path. abspath ( os. path. join ( local _ config...
[ -0.8344419598579407, -0.8828884959220886, 0.6782374978065491, -0.33698809146881104, -0.5027719736099243, 0.04300634190440178, -0.4942935109138489, 0.7008218169212341, -0.6020104885101318, 0.5271203517913818, -1.0466318130493164, 0.0681004598736763, 0.4453243315219879, 0.9303691983222961, ...
def aliasreverse ( what ) : for i, j in aliases. data. iteritems ( ) : if what = = j : return i
[ -0.8376670479774475, -0.35358238220214844, 0.30607712268829346, -1.038161039352417, -0.39967915415763855, 0.24349892139434814, 0.34404027462005615, 0.9617660045623779, -0.9633945822715759, 0.3869691789150238, -0.30752405524253845, 0.9283155202865601, -0.21255293488502502, -1.34453368186950...
def max _ run _ time _ secs ( self, max _ run _ time _ secs ) : if ( self. _ configuration. client _ side _ validation and max _ run _ time _ secs is not none and max _ run _ time _ secs < 0 ) : # noqa : e501 raise valueerror ( " invalid value for ` max _ run _ time _ secs `, must be a value greater than or equal to ` ...
[ -0.6981328725814819, -0.07730007916688919, -0.0677645355463028, 0.339560866355896, -0.20712696015834808, 1.3259669542312622, -0.1015717163681984, -0.6015588641166687, -0.6270595788955688, 0.022874118760228157, -0.28397417068481445, 0.16427969932556152, -0.702651858329773, 0.185020998120307...
def stdin _ listener ( ) : while true : selection = input ( " press q to quit \ n " ) if selection = = " q " or selection = = " q " : print ( " quitting... " ) break
[ 0.2201036661863327, -1.3680622577667236, 0.3519095480442047, 0.26675906777381897, -0.09461376070976257, 1.1748411655426025, -0.11843429505825043, -1.2175536155700684, 0.2820341885089874, 0.5603954792022705, -0.1496022641658783, 0.5016558170318604, -0.12539565563201904, -0.1393260359764099,...
def help ( update, context ) : update. message. reply _ text ('help!')
[ 0.627652645111084, 0.19993673264980316, 0.4921684265136719, 0.06832639127969742, 0.21351931989192963, 0.693803071975708, -0.1934109628200531, 0.4358234405517578, 0.7016564607620239, 0.672933042049408, 0.07053965330123901, 0.8521626591682434, -1.1466172933578491, -0.9760520458221436, -2.2...
def shannon _ wiener _ index ( clone _ counts ) : total _ clone _ counts = float ( sum ( clone _ counts ) ) sw _ index = 0. 0 for clone in clone _ counts : clone _ freq = clone / total _ clone _ counts sw _ index - = ( clone _ freq * numpy. log ( clone _ freq ) ) return sw _ index
[ 0.5170546174049377, -0.24041777849197388, 0.40212562680244446, 0.3960036337375641, -0.6866572499275208, 0.5023890137672424, 1.0780994892120361, -0.6567939519882202, 0.706468403339386, 0.275705486536026, 0.15885762870311737, 1.3587431907653809, -0.2720017433166504, -0.33288007974624634, -...
def to _ time _ series ( ts ) : ts _ out = _ arraylike _ copy ( ts ) if ts _ out. ndim = = 1 : ts _ out = ts _ out. reshape ( ( - 1, 1 ) ) if ts _ out. dtype! = numpy. float : ts _ out = ts _ out. astype ( numpy. float ) return ts _ out
[ -0.6067180037498474, 0.9374854564666748, 0.6820139288902283, 0.18431401252746582, -0.051077309995889664, -0.40872427821159363, -0.28797411918640137, -0.5570560693740845, 1.058929443359375, 0.7750700116157532, -0.3851737082004547, 0.6562328338623047, 0.10919281840324402, -0.3992463052272796...
def new _ connection ( self, handler, user _ code ) : if self. connections. get ( user _ code, false ) : self. destroy _ connection ( user _ code ) user _ id, user _ name = self. odoo _ con. get _ user _ by _ code ( user _ code ) self. user _ name = user _ name self. user _ id = user _ id self. connections [ user _ cod...
[ -0.828100323677063, 0.03569411486387253, 0.267581582069397, 0.4206717312335968, 0.3213588297367096, -0.034771520644426346, -0.025316763669252396, 0.0357595756649971, -0.1935378462076187, -0.33104386925697327, -0.5412315726280212, -0.38881322741508484, -0.1739848554134369, 0.842086195945739...
def _ store _ as _ config _ map ( self, data ) : log. info ( " storing deployment status as kubernetes configmap " ) # read and parse shipyard. conf config = configparser. configparser ( ) config. read ( self. shipyard _ conf ) name = config. get ('deployment _ status _ configmap ','name') namespace = config. get ('dep...
[ -0.8338154554367065, -0.8592749834060669, 0.5382758975028992, -0.48059898614883423, -0.4166114628314972, 0.32205328345298767, -0.3894023299217224, 0.2900334298610687, 0.4407343864440918, 0.7202627658843994, -0.8219391107559204, -0.09912891685962677, 0.5757012963294983, 0.7310962080955505, ...
def is _ downloadable ( url ) : h = requests. head ( url, allow _ redirects = true ) header = h. headers content _ type = header. get ('content - type') if'text'in content _ type. lower ( ) : return false if'html'in content _ type. lower ( ) : return false return true
[ -0.2563617527484894, -0.48879387974739075, 0.6867963075637817, 0.41512495279312134, -1.186504602432251, 0.058847635984420776, -0.5251207947731018, -0.1530233770608902, 1.0147262811660767, -0.14008648693561554, 0.22404782474040985, 0.03838910907506943, -0.868333101272583, 1.2053966522216797...
def test _ get _ textures _ location _ subdir ( rotterdam _ subset, data _ dir ) : d = rotterdam _ subset. get _ textures _ location ( ) loc = os. path. join ( data _ dir,'rotterdam ','appearances') assert d = = loc
[ 0.6202847957611084, -0.2544294595718384, 0.42175835371017456, -1.436065673828125, 0.011851749382913113, -0.010063055902719498, 1.6573137044906616, 0.3349262475967407, 0.5364769101142883, -0.9317118525505066, 0.23122870922088623, 0.9822785258293152, 0.14373046159744263, -0.5572313666343689,...
def index ( self, row, column, parent _ index ) : if not parent _ index. isvalid ( ) : # ie. if parent ( ) returned an empty qmodelindex ( ) and there is no parent parent _ node = self. _ root _ node else : parent _ node = parent _ index. internalpointer ( ) node = parent _ node. child ( row ) if not node : # i mean wh...
[ 0.15978187322616577, -0.055094484239816666, 0.4643959403038025, -0.35291415452957153, 0.13324253261089325, 0.4141000211238861, 0.3613305687904358, -0.7817102074623108, -0.032968670129776, -0.42223498225212097, 0.5269671678543091, 0.37195125222206116, -0.43385472893714905, -0.55540227890014...
def tree _ to _ code ( self, out _ python ) : # translate clf _ tree. features from feature labels to feature strings feature _ name = [ ] for idx _ feature in self. clf _ tree. feature : if idx _ feature! = tree _ undefined : feature _ name. append ( self. feature _ names [ idx _ feature ] ) else : feature _ name. app...
[ -0.4948939383029938, -0.4294441044330597, 0.7560811638832092, -0.04524930566549301, 0.7317125201225281, -0.08717090636491776, 0.11143853515386581, -0.0840655192732811, -0.9004748463630676, 0.45624998211860657, 0.18548710644245148, 0.36168333888053894, 0.7489018440246582, 0.8571138978004456...
def test _ has _ group _ address ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", value _ type = " temperature ", group _ address = " 1 / 2 / 3 " ) assert expose _ sensor. has _ group _ address ( groupaddress ( " 1 / 2 / 3 " ) ) assert not expose _ sensor. has _ group _ address ( groupa...
[ 0.2580706477165222, 0.4791902005672455, 0.3720979392528534, 0.33849623799324036, 0.2133004069328308, -0.34929364919662476, 0.8740865588188171, -0.4595576226711273, 0.43598347902297974, -0.05906817689538002, 0.35784757137298584, 0.21911156177520752, -0.5540757179260254, 0.3763508200645447, ...
def test _ register _ input _ and _ everything _ works ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# email ','test _ frontende @ te...
[ -0.6634712815284729, 0.4009162485599518, 0.8042740225791931, 0.9392250776290894, 0.6454216837882996, 0.5043590664863586, 0.16092050075531006, -0.045586831867694855, -0.03796028718352318, -0.7567543983459473, -0.5856055617332458, 0.10454205423593521, -0.4091472029685974, 0.4542945623397827,...
def _ _ init _ _ ( self, height, width, root _ path, num _ classes = 19, split ='', transform = none, ignore _ index = 250 ) : if num _ classes not in [ 7, 19 ] : raise valueerror ( " # of classes must be either 7 or 19 but got { } ". format ( num _ classes ) ) self. height = height self. width = width self. root = roo...
[ -0.2926517724990845, -0.10697104036808014, 0.6759658455848694, -0.2957365810871124, 0.5481962561607361, -0.3696579933166504, 0.715948224067688, 0.41435763239860535, 0.26600030064582825, -0.07745879143476486, -0.03031432069838047, -0.24555882811546326, 0.39490458369255066, 0.970112979412078...
def add _ id ( self, name, * ids ) : if name not in self. _ id : # find the initial sequence and set up list initial = self. _ get _ sequence ( name ) utils. logger. info ( f " setting sequence for { name } to { initial } " ) self. _ id [ name ] = indexlist ( initial = initial ) new _ id = self. _ id [ name ]. add ( tu...
[ -1.313978672027588, -0.5779879689216614, 0.45701169967651367, -0.5189830660820007, -0.19600915908813477, -0.2239130437374115, -0.9519870281219482, 0.2877815067768097, 0.6676648259162903, 0.42371290922164917, -1.1244105100631714, -0.38058528304100037, -1.1543740034103394, 0.1050899922847747...
def gettnbeerlists ( userid, n = 10 ) : baseurl = constructbeerlisturl ( userid ) urls = [ baseurl + str ( i ) + " / 5 / " for i in range ( n ) ] return urls
[ -1.1240718364715576, 1.0321991443634033, 0.31914111971855164, -0.00716695562005043, 0.16616420447826385, -0.34273064136505127, -0.2764420509338379, -0.29034578800201416, 0.1900562345981598, 0.37237825989723206, -1.8569881916046143, -0.36034414172172546, -0.2698979079723358, 1.1146650314331...
def test _ sample _ data ( self ) : sampler = sampler ( session = self. session, table = user ) sample _ data = sampler. fetch _ sqa _ sample _ data ( ) assert len ( sample _ data. columns ) = = 6 assert len ( sample _ data. rows ) = = 30 # order matters, this is how we'll present the data names = [ str ( col. _ _ root...
[ 0.3514930307865143, 0.06696067005395889, 0.2149737924337387, -0.1716906577348709, -0.43263840675354004, 0.3086135983467102, -0.48290351033210754, -0.7884126901626587, 0.8012717366218567, -0.49982360005378723, -0.23375430703163147, -0.19704744219779968, 0.23875848948955536, 0.19947780668735...
def get _ 5 _ 1 _ data _ 1 ( self, entry : entry ) : # index _ list = industry. all _ 5p1 _ field _ name _ code ( ) index _ list = [ ( in _ re. field _ name, in _ re. field _ code ) for in _ re in industry. ind _ 5p1 _ all ] for i in index _ list : # 金 ( 本 ) sql = f'''select static _ month,'{ i [ 1 ] }'as industry _ 5 ...
[ -0.22496971487998962, -0.013508778065443039, 0.9593760967254639, 0.5589333176612854, 0.031027700752019882, 0.11414455622434616, 0.5034788846969604, -0.242431640625, 0.02716965414583683, 1.0017352104187012, -0.0983327254652977, 0.3640214502811432, -0.5208975076675415, 0.08799193054437637, ...
def save ( self, path ) : self. build _ dataset ( ) self. plot ( ) plt. savefig ( path )
[ 0.4645867943763733, -0.23517833650112152, 0.11219263076782227, -0.2164127081632614, 0.25497597455978394, 0.8098627924919128, 1.1896460056304932, 0.2805618941783905, -0.5494226813316345, -0.7553735375404358, -0.9458908438682556, 0.6976528167724609, 0.3754788935184479, -0.1848021298646927, ...
def rand _ window _ color ( ) - > optional [ tuple [ int, int, int, int ] ] : choice = randint ( 0, 5 ) if choice < = 2 : return none elif choice = = 3 : return window _ color1 elif choice = = 4 : return window _ color2 else : return window _ color3
[ -0.5573503971099854, -0.3392844796180725, 0.720177948474884, 0.08519919961690903, -0.3034328818321228, 0.6475261449813843, 0.8859427571296692, -1.01318359375, 0.1872372180223465, 0.07685183733701706, -0.03581705316901207, 0.9231460690498352, -1.2866878509521484, 0.35566219687461853, -0.6...
def randodd ( l : int, h : int ) - > int : return 2 * randint ( ceil ( ( l - 1 ) / 2 ), floor ( ( h - 1 ) / 2 ) ) + 1
[ -1.0511045455932617, -0.7120854258537292, 0.5031313300132751, -0.7764571309089661, -0.8656671643257141, 0.8500998616218567, 0.05736079439520836, 0.11054769903421402, 0.047672342509031296, -0.41822370886802673, 0.07121305167675018, 0.2544507086277008, -0.27582740783691406, 0.370254665613174...
def unit _ timestamps _ concatenated _ across _ recordings ( self, i, position _ sample _ gap = true ) : if position _ sample _ gap and not self. check _ if _ all _ recordings _ have _ same _ position _ sampling _ rate ( ) : raise exception ('all recordings must have same position sampling rate to use position _ sample...
[ -0.5229882597923279, 0.774629533290863, 0.8410393595695496, 0.2671762704849243, 0.6150062084197998, 0.4072226881980896, 0.510026752948761, -0.38550621271133423, 1.2846457958221436, 0.7690497636795044, 0.2362954467535019, -0.5348960161209106, -0.13350658118724823, 0.6014436483383179, -0.2...
def get _ path ( dataset ) : if dataset in _ available _ files : return os. path. abspath ( os. path. join ( _ module _ path, _ available _ files [ dataset ] ) ) else : msg = " the dataset'{ data }'is not available. ". format ( data = dataset ) msg + = " available datasets are { } ". format ( ", ". join ( available ) )...
[ -0.24667194485664368, 0.21427561342716217, 0.24579544365406036, -0.6410278677940369, -0.22393441200256348, 0.4481395184993744, 0.3752913475036621, 0.3548106849193573, 0.003469773568212986, 0.4215245544910431, 1.1154370307922363, 0.679977297782898, -0.15358227491378784, 0.301913321018219, ...
def _ get _ error ( exc ) : return {'id': get _ random _ string ( ),'links': {'about': getattr ( exc,'link ','' ) },'status': str ( exc. status _ code ),'code': getattr ( exc,'code ', exc. _ _ class _ _. _ _ name _ _ ),'title': getattr ( exc,'title ', str ( exc ) ),'detail': getattr ( exc,'detail ', str ( exc ) ),'sour...
[ -0.8887545466423035, -0.5312498211860657, 0.6261376738548279, -1.6019487380981445, -0.9199081063270569, -0.8192371726036072, -0.7003882527351379, 0.34627535939216614, 0.9124084711074829, -0.2740646004676819, -0.46382370591163635, -0.05234123021364212, 0.7809106111526489, -0.016227260231971...
def test _ form _ submit ( self ) : # pass strings for form submittal and add stage variable to # show we previously saw first stage of the form. self. test _ data. update ( {'stage': 2 } ) response = self. client. post ( self. url, self. test _ data ) self. assertnotequal ( response. content, success _ string ) form _...
[ -0.11411632597446442, 0.03530412167310715, 0.4900673031806946, -0.011079804971814156, 0.16198928654193878, 0.7792251110076904, -0.5367439389228821, -0.11360583454370499, -0.5786465406417847, -1.0341182947158813, -0.8582121729850769, -0.3329377770423889, 0.33620157837867737, 0.4158327579498...
def test _ addcallbackextraarguments ( self ) : l = [ ] def cb ( r, extra, more = none ) : l. append ( ( r, extra, more ) ) synchronousdeferred ( " foo " ). addcallback ( cb, 1, more = " heyo " ) self. assertequals ( l, [ ( " foo ", 1, " heyo " ) ] )
[ 0.28960785269737244, 1.2862590551376343, 0.6851540207862854, 0.15854519605636597, 0.5934306383132935, 0.33563920855522156, -0.9538090229034424, 0.014064299874007702, 0.9362998604774475, -0.6761364340782166, -1.2306575775146484, -0.05656120181083679, -0.30340689420700073, 1.018958568572998,...
def spherical _ parameters ( self ) : phi _ mu _ list = [ ] theta _ mu _ list = [ ] for mu in self. mu _ list : r, phi, theta = t _ cartesian _ to _ spherical ( x = mu [ 0 ], y = mu [ 1 ], z = mu [ 2 ] ) phi _ mu _ list. append ( phi ) theta _ mu _ list. append ( theta ) return np. array ( phi _ mu _ list ), np. array ...
[ -1.234765648841858, -0.6139922142028809, 0.535923957824707, -0.8899751305580139, -0.4119955003261566, 0.2943980097770691, -0.6299667358398438, 0.14610250294208527, -0.17354367673397064, 1.774193525314331, -0.849111795425415, 1.191758394241333, -0.7615765333175659, 0.8295678496360779, 0.7...
def get _ raw _ explanation ( self, feature _ maps, raw _ feature _ names = none, eval _ data = none ) : raw _ kwargs = _ get _ raw _ explainer _ create _ explanation _ kwargs ( explanation = self ) raw _ kwargs [ explainparams. features ] = raw _ feature _ names raw _ kwargs [ explainparams. is _ raw ] = true raw _ kw...
[ -0.3272373080253601, 0.2612725794315338, 0.6396749019622803, -0.0042875055223703384, -0.5906873345375061, 0.1381417214870453, 0.4707302749156952, 1.2143754959106445, -0.24856430292129517, -0.5549335479736328, -0.45879414677619934, 0.6584275960922241, 0.24309399724006653, 0.4988201856613159...
def classchange ( self, classnametext ) : if ( classnametext = = " barbarian " ) : self. strengthlabel. settext ( " strength : 14 " ) self. dexteritylabel. settext ( " dexterity : 8 " ) self. constitutionlabel. settext ( " constitution : 12 " ) self. intellectlabel. settext ( " intellect : 6 " ) self. inventorylabel. s...
[ -1.253415584564209, -1.02336847782135, 0.8077423572540283, -0.3409560024738312, 0.31160789728164673, 0.6403427720069885, 0.35390570759773254, -0.03428906947374344, 0.2220890074968338, 0.9591633677482605, 0.23016203939914703, -0.11527300626039505, -0.19256164133548737, 0.921649158000946, ...
def dot ( vec _ 1, vec _ 2 ) : # using cartesian coordinates, calculate the dot product dot _ product = vec _ 1 [ 0 ] * vec _ 2 [ 0 ] + vec _ 1 [ 1 ] * vec _ 2 [ 1 ] + vec _ 1 [ 2 ] * vec _ 2 [ 2 ] return dot _ product
[ 0.9204785227775574, -0.6337927579879761, 0.7745517492294312, -0.5686682462692261, 0.577640175819397, 0.3915754556655884, -0.2525004744529724, -0.7084649205207825, -0.9516223073005676, 0.12172982841730118, -0.3559022545814514, 1.030266523361206, 0.14945991337299347, -0.5604419708251953, 0...
def _ _ init _ _ ( self, amsn _ core, parent ) : # is it needed in ncurses? pass
[ 0.9367215633392334, 0.005068236496299505, 0.4440791606903076, 0.33328813314437866, -0.7048949599266052, 0.21599003672599792, -0.15508002042770386, -0.5898506045341492, 1.5461909770965576, -0.24214449524879456, -0.7627509832382202, 0.20077648758888245, 0.26920002698898315, 1.116895914077758...
def make _ partition _ slices ( ixs ) : ix _ x = [ none ] + ixs ix _ y = ixs + [ none ] for x, y in zip ( ix _ x, ix _ y ) : yield slice ( x + 1 if x else x, y )
[ -0.4333379864692688, 0.12179520726203918, 0.5846394300460815, -0.08695780485868454, -0.2916671931743622, -0.20209135115146637, -0.07426559925079346, -0.3560164272785187, 0.8000465035438538, -0.8524602055549622, 0.08010263741016388, -0.3325018286705017, 0.23247309029102325, -0.9486485719680...
def get _ subfield _ if _ 4 ( jline, key, entity ) : # e. g. split " 551 ^ 4 : orta " to 551 and orta marcfield = key. rsplit ( " ^ " ) [ 0 ] subfield4 = key. rsplit ( " ^ " ) [ 1 ] data = [ ] for sset in get _ subsets ( jline, marcfield,'*') : if sset. get ( " 4 " ) and subfield4 in sset. get ( " 4 " ) : newrecord = c...
[ -0.04339764639735222, -0.4491388201713562, 0.7185567617416382, 0.11225537210702896, -0.5130321383476257, -0.4016077220439911, 0.2578953504562378, -0.13812923431396484, -0.9198434352874756, 0.34392353892326355, -0.6807768940925598, 0.2320038080215454, -0.520357072353363, -0.5414955615997314...
def test _ tdm _ print ( self, stateful, capfd ) : samples = np. ones ( ( 2, 3, 4 ) ) result = result ( samples, is _ stateful = stateful ) print ( result ) out, err = capfd. readouterr ( ) assert " spatial _ modes = 3 " in out assert " shots = 2 " in out assert " timebins = 4 " in out assert f " contains state = { sta...
[ -0.12254267930984497, -0.2601495385169983, 0.31129980087280273, 0.2942468225955963, 0.306659996509552, -0.20790527760982513, -0.4922029972076416, -0.6527206301689148, -0.5336940884590149, -0.03031674213707447, 0.07860314100980759, -0.22400039434432983, 0.46679967641830444, -0.3215809166431...
def _ split _ data ( x, y, split _ size = 0. 2 ) : print ('splitting data in train and test set...') x _ train, x _ test, y _ train, y _ test = train _ test _ split ( x, y, test _ size = split _ size ) return x _ train, x _ test, y _ train, y _ test
[ -0.16819505393505096, 0.05278856307268143, 0.48060938715934753, -0.6180277466773987, -0.2907537817955017, -0.028047002851963043, -0.41279664635658264, -0.07511215656995773, -0.5727270841598511, -0.34151217341423035, 0.19112521409988403, 0.7133583426475525, -0.2780992090702057, -0.784556329...
def _ _ init _ _ ( self, options ) : self. p2s = { papyon. presence. online : " online ", papyon. presence. busy : " busy ", papyon. presence. idle : " idle ", papyon. presence. away : " away ", papyon. presence. be _ right _ back : " brb ", papyon. presence. on _ the _ phone : " phone ", papyon. presence. out _ to _ l...
[ 0.12854480743408203, -0.5535657405853271, 0.702953577041626, 0.12047747522592545, -0.44257375597953796, 0.4673021137714386, -0.7260950207710266, -0.8522303104400635, 1.5494550466537476, -1.142567753791809, -0.5222654938697815, -0.28610682487487793, 0.5351100564002991, 0.7391464710235596, ...
def _ read _ file ( fname ) : return pickle. loads ( secfs. fs. get _ inode ( secfs. store. tree. find _ under ( secfs. fs. root _ i, fname ) ). read ( ) )
[ 0.35961365699768066, -0.20396731793880463, 0.38183239102363586, -0.26240724325180054, -0.8479623198509216, -0.5869258642196655, 0.007751500234007835, 0.3759022355079651, -0.9676016569137573, 0.0433875136077404, 0.7520113587379456, -0.702622652053833, -0.2387516051530838, -1.587237715721130...
def iteration _ step ( den ) : # - - step 1 : build effective kohn - sham potential - - # determine w ( r ) via poisson's equation for initial or mixed density w, r = solve _ poisson ( den ) # find hom. sol. w _ hom ( r ) = a * r to match bc w ( r _ max ) = q _ tot = z beta = ( z - w [ - 1 ] ) / r [ - 1 ] w + = beta * ...
[ 0.14104755222797394, -0.40214037895202637, 0.6164077520370483, -0.18302394449710846, -0.22538481652736664, -0.5367421507835388, 0.2528954744338989, 0.2429688572883606, -0.4088696241378784, 0.221080482006073, 0.15857765078544617, -0.4556175470352173, 0.044468559324741364, -0.133039191365242...
def reversestring ( self, s : list [ str ] ) - > none : for i in range ( len ( s ) / / 2 ) : s [ i ], s [ len ( s ) - 1 - i ] = s [ len ( s ) - 1 - i ], s [ i ]
[ -1.2331475019454956, -0.3841856122016907, 0.4206428825855255, -0.8775819540023804, 0.05265536531805992, -0.5479485392570496, 0.09851254522800446, 1.144831657409668, -0.6124768853187561, 0.3982778489589691, -0.821996808052063, 1.143609881401062, -0.6049451231956482, -0.8184858560562134, 0...
def tile _ image _ to _ file ( root, tile, image ) : out _ path = os. path. join ( os. path. expanduser ( root ), str ( tile. z ), str ( tile. x ) ) os. makedirs ( out _ path, exist _ ok = true ) if image. shape [ 2 ] > 3 : ext = " tiff " else : ext = " webp " return cv2. imwrite ( os. path. join ( out _ path, " { }. {...
[ 0.39844778180122375, -0.26018187403678894, 0.5315601825714111, 0.5390786528587341, -0.2671297490596771, 0.2588505744934082, 0.4157656133174896, -0.22960986196994781, 0.08338041603565216, 0.7413443326950073, 0.07877390831708908, 0.7008741497993469, 0.22846505045890808, 0.49109306931495667, ...
def maximum _ bytes _ per _ packet ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " maximum _ bytes _ per _ packet " )
[ 0.2611810863018036, 0.7790944576263428, 0.641512393951416, 0.24536071717739105, 0.18503102660179138, 1.1200981140136719, -0.2277410626411438, 0.19469594955444336, 1.272141933441162, -0.8940644860267639, -0.2339562326669693, 0.47423335909843445, -0.5330929756164551, -0.6961939334869385, -...
def pop ( self ) : if self. head is none : raise indexerror value = self. head. data self. head = self. head. next _ node return value
[ 0.3530457615852356, 1.1084524393081665, 0.5628397464752197, 0.04672196879982948, -0.4870169758796692, 0.035443976521492004, 0.12320682406425476, -0.27219700813293457, 0.06498590856790543, 0.048070650547742844, -0.00012628774857148528, 0.4801788926124573, -0.8199723958969116, -0.21442197263...
def moment1d ( xax, data ) : m0 = np. max ( data ) m1 = np. average ( xax, weights = data ) m2 = sqrt ( np. average ( xax * * 2, weights = data ) - m1 * * 2 ) return m0, m1, m2
[ 0.08783175051212311, -0.4992717504501343, 0.2919290363788605, -0.19920797646045685, -0.1676243096590042, 0.12695109844207764, -0.5948035717010498, -0.43086478114128113, -0.44199541211128235, 0.676629900932312, -0.48109832406044006, 0.24636705219745636, -0.11680785566568375, 0.7815077304840...
def test _ string _ showed _ by _ vector ( self ) : self. assertequals ( " [ 1, 2, 3 ] ", str ( self. vector ) )
[ 0.08137471973896027, -0.8643568158149719, -0.009239111095666885, -0.3178901672363281, 0.04796529933810234, 0.7516396641731262, 0.5449205636978149, -0.2863403260707855, 0.6336323618888855, 0.6740981936454773, -0.02774910442531109, 0.8094116449356079, -0.13250666856765747, -0.577394247055053...
def formatted _ as ( self, type : optional [ str ] = none, columns : optional [ list ] = none, output _ all _ columns : bool = false, * * format _ kwargs, ) : old _ format _ type = self. _ format _ type old _ format _ kwargs = self. _ format _ kwargs old _ format _ columns = self. _ format _ columns old _ output _ all ...
[ -0.39407891035079956, -0.5858542323112488, 0.7325794100761414, 0.2690873146057129, -0.31967103481292725, -1.1026815176010132, -0.8179112076759338, -0.7462242841720581, 0.22395579516887665, -0.0680675208568573, 0.4101056754589081, 0.8980516195297241, 0.8814421892166138, 0.7458330988883972, ...
def _ prompt _ save ( ) : # pragma : no cover b = prompt ( " do you want to save your changes before quitting? ", buttons = ['save ','cancel ','close'], title ='save') return show _ box ( b )
[ -0.38621169328689575, -0.07525480538606644, 0.3068217933177948, 0.2785913348197937, -0.49879732728004456, -0.4164975583553314, -0.2662343680858612, -0.6223742961883545, 0.2568197250366211, 0.5421646237373352, -0.08215437829494476, 0.5990816950798035, -0.18922396004199982, -0.13149012625217...
def delete _ qr _ code _ file ( doc, method ) : region = get _ region ( doc. company ) if region not in ['saudi arabia'] : return if hasattr ( doc,'qr _ code') : if doc. get ('qr _ code') : file _ doc = frappe. get _ list ('file ', {'file _ url': doc. qr _ code,'attached _ to _ doctype': doc. doctype,'attached _ to _ n...
[ 0.9799588918685913, -0.3805272877216339, 0.4885299503803253, -0.27479255199432373, 0.2815992534160614, -0.1977231353521347, 0.1405819207429886, -0.018781105056405067, 0.07514304667711258, 0.08019967377185822, 0.6514270901679993, -0.4462623596191406, 0.019670868292450905, 0.6694048047065735...
def test _ directory _ clean _ exclude ( file, tmp _ path, test ) : if test is true and is _ windows : pytest. skip ( " skipped on windows " ) name = tmp _ path / " directory _ clean _ dir " name. mkdir ( ) strayfile = name / " strayfile " strayfile. touch ( ) straydir = name / " straydir " straydir. mkdir ( ) strayfil...
[ 0.03731749579310417, 0.30103179812431335, 0.705634593963623, 0.2611767053604126, -0.38749605417251587, 1.3864469528198242, 1.2806864976882935, -0.2426120638847351, -0.022047556936740875, -0.528049111366272, -0.7157990336418152, -0.17296777665615082, -0.24773423373699188, 0.6568773984909058...
def fixture _ balsamic _ observations _ input _ files ( balsamic _ observations _ input _ files _ raw : dict, ) - > balsamicobservationsinputfiles : return balsamicobservationsinputfiles ( * * balsamic _ observations _ input _ files _ raw )
[ 0.055638134479522705, -0.05830758810043335, 0.4739833176136017, 0.09604707360267639, -0.48269063234329224, 0.8056096434593201, 0.5132579803466797, 0.4824928939342499, -0.3273818790912628, 0.22016015648841858, 0.4261174201965332, 0.05775829032063484, 0.7253285050392151, -1.273119568824768, ...
def get _ revision ( revision ) : return revision [ : 12 ] if revision else revision
[ 0.9315304160118103, 0.6358944773674011, 0.24522431194782257, -0.0735861212015152, 0.5630956888198853, -0.3903297185897827, -0.37694627046585083, 0.07495302706956863, 0.42563706636428833, -0.32283148169517517, 0.14796072244644165, 0.08685486763715744, -0.14332450926303864, -1.88747262954711...
def inbox _ messages ( ser ) : ser. write ('at + cmgf = 1 \ r') res = wait _ for _ strs ( ser, ['ok'] ) ser. write ('at + cmgl = all \ r') res = wait _ for _ strs ( ser, ['ok'] ) return _ parse _ cmgl ( res )
[ -0.773190975189209, -0.3559013605117798, 0.4766722619533539, 0.025516308844089508, -0.636178731918335, -0.5569235682487488, -0.2683294415473938, -1.0869499444961548, -0.2994806170463562, -0.4829096496105194, -0.6662726998329163, 0.4458296000957489, -0.9311521649360657, 0.25094327330589294,...
def test _ insert _ line ( self ) : # this gets covered by test _ writer. test _ modify _ server _ config ( )...
[ -0.3458946645259857, 0.7949222326278687, 0.28828269243240356, 0.5552199482917786, 1.7132270336151123, 0.15455475449562073, 1.020314335823059, 0.5039463043212891, 0.2418709248304367, -0.26663219928741455, -1.1161627769470215, -0.546994149684906, -0.6951338052749634, 0.6339088678359985, 0....
def vswitch _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " vswitch _ id " )
[ 0.951008141040802, -0.22220300137996674, 0.36509937047958374, 1.1860450506210327, 0.3232775032520294, 1.3440194129943848, -0.08063135296106339, 0.32443439960479736, 1.155795931816101, 0.259677529335022, -0.10020753741264343, 1.3066380023956299, 0.11110395193099976, -0.8158659338951111, -...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none ) - >'datastore': opts = pulumi. resourceoptions. merge ( opts, pulumi. resourceoptions ( id = id ) ) _ _ props _ _ = datastoreargs. _ _ new _ _ ( datastoreargs ) _ _ props _ _. _ _ dict _ _ [ " datastore _ n...
[ 0.5961704850196838, 0.0267140232026577, 0.3042648136615753, -0.8318986892700195, -0.18948927521705627, -0.03872350603342056, -1.042356014251709, 0.23485805094242096, 0.6025462746620178, -0.37800154089927673, -0.3808562755584717, 0.9459832906723022, 0.027130763977766037, -0.5323241353034973...
def write ( self, path = none, relative = false ) : if relative : relative = str ( path ) xml _ ele = _ make _ vrt _ element ( self. shape [ 1 ], self. shape [ 0 ], self. transform, self. crs, self. bands, relative _ to _ vrt = relative ) xmlstr = _ make _ vrt _ str ( xml _ ele ) if path is not none : with open ( str (...
[ 0.5564953684806824, -0.450240820646286, 0.6368995308876038, -0.260803759098053, -0.2844613492488861, 0.8303489685058594, 0.4530084729194641, -0.1397826224565506, -0.09655218571424484, -0.34485194087028503, 0.4165988564491272, -0.4655372202396393, -0.6553377509117126, -0.9837692975997925, ...
def detectandfilter ( self, image, centroidsmessage ) : try : centroidsarray = centroidsmessage rgb _ image = self. bridge. imgmsg _ to _ cv2 ( image, " bgr8 " ) except cvbridgeerror, e : print e if self. viz or self. pub : for c in centroidsmessage. data : rgb _ image = self. drawcentroidonimag ( rgb _ image, c ) # on...
[ 0.17282184958457947, -0.8460515737533569, 0.8678052425384521, 0.8384678363800049, -0.03415108472108841, -0.26517823338508606, -0.18525373935699463, -0.3815981447696686, 0.42819944024086, 0.04446316137909889, -0.28505203127861023, 0.3915172517299652, -0.09780938923358917, 0.6932404041290283...
def run ( self ) : while not self. _ task _ queue. empty ( ) : target, command _ or _ config = self. _ task _ queue. get ( ) # this is a workaround. the base _ device. basedevice class requires # loopback _ ipv4 for ultimately passing on to sshclient. connect - yet this # can be a hostname that resolves to a aaaa, kook...
[ -0.966816246509552, -0.767966091632843, 0.6556593179702759, 0.314105749130249, -0.054490234702825546, -0.229904904961586, 0.5542026162147522, -0.16607648134231567, -0.5362700819969177, -0.017769666388630867, 0.2296358197927475, 0.11030105501413345, -0.03818719834089279, 0.4129539430141449,...
def _ callback _ wrapper ( self, callback, res ) : if not res : # no result yet return elif isinstance ( res, exception ) : # error self. log. error ('error trying to send metrics : % s'% str ( res ) ) elif not res. ok ( ) : # bad result, log error self. log. error ('failed reporting metrics : % s'% str ( res. meta ) )...
[ 0.014068197458982468, 0.5395848751068115, 0.5943004488945007, 0.1250966638326645, -0.08229174464941025, -0.34379681944847107, -0.017554935067892075, -0.39793264865875244, 0.45687249302864075, 0.02208055928349495, 1.1595594882965088, -0.7806233763694763, -0.20718112587928772, -0.27407097816...
def _ _ str _ _ ( self ) : if self. alarm _ temp ( self. _ temp ) : print ( " * * * urgent : attend immediately * * * " ) return f " patient name : { self. _ name }, id : { self. _ id }, " \ f " temperature : { self. _ temp } ° \ n "
[ 0.7307299375534058, -2.0373568534851074, 0.7855979800224304, -1.0601803064346313, -0.9653881192207336, 0.8550790548324585, -0.44744157791137695, -0.2983918786048889, -0.23310931026935577, 0.20190687477588654, 0.4320921003818512, 0.858024001121521, 0.6500384211540222, -0.5247767567634583, ...
def apply _ gabor _ kernels ( grey _ image, gabor _ kernels _ gpu ) : original _ rows, original _ cols = grey _ image. shape energies _ rows = original _ rows - gabor _ filter _ kernel _ size + 1 energies _ cols = original _ cols - gabor _ filter _ kernel _ size + 1 grey _ image _ gpu = cuda. mem _ alloc ( grey _ image...
[ -0.29655489325523376, -0.19994458556175232, 0.8627661466598511, -0.5760079026222229, -0.032611992210149765, -0.44528713822364807, 0.6093361377716064, -0.910770058631897, 0.3187333643436432, 0.5405271053314209, 1.0416873693466187, 0.4102883040904999, 0.03914177417755127, 0.00534130167216062...
def _ _ init _ _ ( self, s ) : self. _ s = s
[ 0.012347936630249023, -0.7493302226066589, 0.09618885815143585, -0.330372154712677, -0.8912898898124695, -0.36295008659362793, 0.4365968704223633, 0.10038752108812332, 0.8858529329299927, -0.8539056181907654, -1.0085519552230835, 0.38782641291618347, 0.5883777737617493, 0.07901820540428162...
def list _ to _ string ( list _ of _ strings ) : if type ( list _ of _ strings ) = = str : if re. match ( r " ^ [ \ d ] + $ ", list _ of _ strings ) : list _ of _ strings = int ( list _ of _ strings ) elif re. match ( r " ^ [ \ d,. ] + $ ", list _ of _ strings ) : list _ of _ strings = float ( list _ of _ strings. repl...
[ 0.06301956623792648, -1.178375244140625, 0.8539971113204956, 0.0616188682615757, 0.3348018229007721, -0.39380237460136414, -0.2962592542171478, 0.26179754734039307, 0.9263119101524353, 0.26524096727371216, 0.05674950033426285, 0.1926771104335785, -0.25454074144363403, 0.3494124710559845, ...
def get _ reg _ names ( self ) - > list [ str ] : return [ x. name for x in self. registers ]
[ -0.5341699719429016, 0.8609765768051147, 0.3138106167316437, 0.4255443513393402, 1.3025699853897095, 0.20293819904327393, -1.3097354173660278, 0.34236177802085876, 0.48968756198883057, 0.46007028222084045, -1.0777686834335327, 0.7494605779647827, -0.18398384749889374, 0.5932221412658691, ...
def setimage ( self, image ) : self. _ main. send ( " setimagesplashscreen ", [ "... " ] ) pass
[ -1.0023454427719116, 0.9859490394592285, 0.4104854166507721, 0.9419129490852356, 0.271851509809494, 0.6694434285163879, 0.9110568761825562, -0.008967991918325424, 0.3811434209346771, -0.28287675976753235, -0.5290622711181641, 0.3552590608596802, -0.3861941993236542, 1.5405343770980835, -...
def retrieveplaylistinfobyid ( self, playlistid ) : request = requests. get ( " https : / / www. googleapis. com / youtube / v3 / playlists ", timeout = 10. 0, params = {'key': globalstore. commandhandler. apikeys ['google'],'part':'snippet ','id': playlistid } ) if request. status _ code! = 200 : self. logerror ( " [ ...
[ -0.601719319820404, -0.09722238034009933, 0.5130507946014404, -0.4776687026023865, -0.12811756134033203, -0.22528423368930817, -0.24138769507408142, -0.8899311423301697, 0.4316380023956299, 0.8875394463539124, -1.1534011363983154, -0.14976994693279266, -1.5138965845108032, 0.61082649230957...
def save _ work _ backlog ( self ) : self. work _ backlog. to _ csv ( self. backlog _ csv _ filepath, sep = " ; " )
[ 0.026087936013936996, -0.6008785367012024, 0.42387208342552185, 0.41436514258384705, 0.5088693499565125, 0.4225596487522125, 0.46243706345558167, -0.2557844817638397, -0.5984463691711426, 0.6523066759109497, -0.9757208824157715, 0.5264632105827332, -1.0945714712142944, -0.5494341850280762,...
def _ _ str _ _ ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. _ _ str _ _ ( self )
[ -0.6507803201675415, -1.8425127267837524, 0.6712350845336914, -1.0487086772918701, -0.8845399022102356, 0.28469935059547424, -0.5021315217018127, -0.4880182445049286, 0.1307617723941803, -0.04134110361337662, -0.6837697625160217, 0.6556314826011658, 0.0075916750356554985, -0.60024535655975...
def test _ multiplication _ matrix _ by _ scalar ( self ) : non _ matrix _ numeric = [ ['a ','bb ','c'], [ [ 1 ], 2,'foo bar'] ] non _ matrix = [ [ 2, 4, 6 ], [ 8, 10 ], [ 12 ] ] self. assertraises ( nonmatrixerror, self. matrix. _ _ mul _ _, non _ matrix ) self. assertraises ( nonnumericerror, self. matrix. _ _ mul _ ...
[ -0.2842218279838562, -0.0985725075006485, 0.6273627281188965, 0.7032604217529297, -0.25042495131492615, 0.006990038324147463, 0.747427761554718, -0.4914950728416443, 0.36718547344207764, -0.05810648947954178, -0.5411693453788757, -0.08488330990076065, -0.10849624872207642, 0.63951456546783...
def topods _ face ( * args ) : return _ topods. topods _ face ( * args )
[ -0.8393273949623108, 0.32023346424102783, 0.5882934331893921, 0.45083796977996826, 0.16934682428836823, -0.019395384937524796, 0.9614991545677185, -1.4105583429336548, -0.29527801275253296, 0.17411382496356964, -0.29529622197151184, -0.8235762715339661, -0.41865217685699463, -0.06252206861...
def instance _ to _ key ( instance ) : cls = instance. _ _ class _ _ return': '. join ( [ cls. _ _ module _ _, cls. _ _ name _ _, str ( instance. pk ) ] )
[ -1.2462356090545654, -1.087153673171997, 0.7177110910415649, -1.3284242153167725, 0.2538006007671356, 0.7743431925773621, 0.17230650782585144, -0.09950752556324005, -0.07085073739290237, 1.5911051034927368, -0.8725067973136902, 0.7088289260864258, 0.3550977408885956, -0.005522659979760647,...
def move _ lasers ( self, vel, objects ) : self. cool _ down ( ) for laser in self. lasers : # move laser. + vel moves down and - vel moves up laser. move ( vel ) # remove laser if it is off screen if laser. off _ screen ( 750 ) : # 750 is display height self. lasers. remove ( laser ) else : # remove laser if hit enemy...
[ -0.22624477744102478, -1.2789386510849, 0.8192486763000488, 0.580392599105835, -0.31673577427864075, 0.0983375534415245, 0.8881985545158386, -0.2508188784122467, 0.44748297333717346, 1.1914013624191284, -0.6338438987731934, -0.9930433630943298, -0.17636297643184662, 0.4403848648071289, -...
def test _ cancel _ free _ without _ block _ does _ create _ transfer _ block ( self ) : self. assertfalse ( block. objects. exists ( ) ) event = baker. make _ recipe ('booking. future _ pc ', cost = 10 ) # free ( without block ) does create transfer free _ booking = baker. make _ recipe ('booking. booking ', user = se...
[ 0.7176127433776855, 0.9886042475700378, 0.6826717853546143, 0.8010119199752808, -0.5672472715377808, 1.09682035446167, 0.13290844857692719, -0.250213086605072, 0.155634343624115, -0.3084205090999603, -1.1464412212371826, -0.24269911646842957, -0.09106441587209702, 0.4807245433330536, 0.6...
def _ set _ port _ state ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = restrictedclasstype ( base _ type = unicode, restriction _ type = " dict _ key ", restriction _ arg = { u'port - offline': { }, u'port - faulty': { }, u'port - healthy': { }, u'po...
[ 0.24624598026275635, -0.062043268233537674, 0.49656033515930176, -0.3956616520881653, -0.12648698687553406, 0.20397040247917175, 0.8982036709785461, -0.0060823834501206875, 0.7900021076202393, 0.40429672598838806, -0.43467605113983154, -0.13414238393306732, -0.7288370728492737, 0.243102163...
def check _ for _ setup _ error ( self ) : vip = self. vmem _ vip. basic if len ( self. container ) = = 0 : raise invalidbackendconfig ( reason = _ ('container is missing') ) bn = " / vshare / config / iscsi / enable " resp = vip. get _ node _ values ( bn ) if resp [ bn ]! = true : raise invalidbackendconfig ( reason =...
[ 0.584121823310852, 0.2003360539674759, 0.5936049222946167, 0.8324720859527588, 0.3459625840187073, 0.086370550096035, -0.4304127097129822, 0.5654621720314026, -0.29599156975746155, 1.2539862394332886, 0.5356548428535461, -0.12322725355625153, -0.9230637550354004, 0.20102787017822266, 0.2...
def get _ next _ token ( self ) : while self. c _ char is not none : if self. c _ char. isspace ( ) : self. ignorespace ( ) continue if self. c _ char. isdigit ( ) : return token ( integer, self. integer ( ) ) if self. c _ char = ='+': self. advance ( ) return token ( plus,'+') if self. c _ char = ='-': self. advance (...
[ -0.05246821790933609, -0.7689115405082703, 0.8285346627235413, 0.20246504247188568, -1.123374104499817, 0.11361195892095566, 0.24665862321853638, 0.04499434307217598, -0.2832929790019989, -1.5463160276412964, -0.14242956042289734, 0.12175088375806808, -0.399760365486145, -0.009473464451730...
def getddgintelligate ( ) : andor _ solis. getddgintelligate. restype = ctypes. c _ uint state = ctypes. c _ int ( ) result = andor _ solis. getddgintelligate ( ctypes. byref ( state ) ) check _ status ( result ) return int ( state. value )
[ -0.8261479735374451, 1.629156470298767, 0.3954642415046692, -0.2655230462551117, -0.45168888568878174, -1.1465593576431274, -0.13842354714870453, -0.5034741163253784, 0.287765771150589, -0.7689273953437805, 0.14881499111652374, -0.2774111032485962, -0.8593425750732422, -0.5795028805732727,...
def vnf _ from _ internal ( internal ) : ext = { } ext [ " vnfid " ] = internal [ " vnf _ name " ] ext [ " processing _ latency " ] = internal [ " processing _ time " ] if " failure _ rate " in internal : ext [ " failure _ rate " ] = internal [ " failure _ rate " ] else : ext [ " failure _ rate " ] = 0 if " cp " in int...
[ -0.7037566304206848, -0.6550378203392029, 0.5558172464370728, -1.0763942003250122, -1.5415798425674438, -0.5560895204544067, -0.7025136351585388, -0.07121738791465759, -0.18582803010940552, 0.8332259058952332, -0.8015958070755005, 0.01838580146431923, -0.2109183520078659, -0.04031148180365...
def to _ json _ string ( list _ dictionaries ) : if list _ dictionaries is none or list _ dictionaries = = " " : return " [ ] " else : new _ str = json. dumps ( list _ dictionaries ) return new _ str
[ -0.9887136816978455, -0.9569538831710815, 0.3249526023864746, -0.6278993487358093, 0.13850772380828857, -0.28351888060569763, -0.97056645154953, 0.14879614114761353, 0.783377468585968, 0.8346195816993713, -0.3049187660217285, 0.5470290184020996, -0.43061840534210205, 0.5747230052947998, ...
def generate _ letter ( name = none ) : template = " dear { name }, \ n \ n " + \ " thank you for your most recent donation of " + \ " $ { last _ donation :. 2f }. we greatly appreciate it. \ n \ n " + \ " ~ the treasurer " donor _ info = {'name': name. title ( ),'last _ donation': db [ name ] [ - 1 ] } letter = templa...
[ -0.28185534477233887, -0.5745716691017151, 0.6432470679283142, -0.6616303324699402, -0.44855526089668274, -0.2978549599647522, -0.1970917135477066, 0.07284842431545258, 0.14171625673770905, 0.18670424818992615, -0.4249468147754669, -0.43629586696624756, 0.6268082857131958, -0.1852900087833...
def cellsegmentationat ( self, time _ point : int, binary : bool = false ) - > optional [ np _. ndarray ] : if self. segm _ channel is none : raise runtimeerror ( " segmentation - related function called before segmentation " ) frames = self. frames [ self. segm _ channel ] # get the segmentation channel frames frame =...
[ -0.5726292133331299, -0.40182560682296753, 0.6532171964645386, 0.71406489610672, 1.226624608039856, -1.3887234926223755, 0.07563768327236176, -1.4650436639785767, 0.09405025094747543, 0.4530270993709564, -0.31365692615509033, -0.11753647029399872, -0.3972965180873871, 0.6473450660705566, ...
def generate ( output _ dir, myname, yourname, pair _ loaders, func _ validate = none, size _ limit _ kb = none ) : if not os. path. exists ( output _ dir ) : os. makedirs ( output _ dir ) corpus _ store = corpus _ utils. corpusstore ( func _ validate = func _ validate ) def process ( pairs ) : " " " loop through the l...
[ 0.32141056656837463, 0.6770503520965576, 0.7691860795021057, 0.2615589499473572, -0.9269000887870789, -0.4502742886543274, 0.6062362790107727, 0.5723344087600708, 0.14962898194789886, -0.43411654233932495, -0.31955084204673767, -0.047077763825654984, -0.5021962523460388, 0.5051206350326538...
def literal _ signature ( self ) - > str : # may already be quoted if loading from database or sql file name, remainder = self. signature. split ( " ( ", 1 ) return'"'+ name +'" ('+ remainder
[ 0.5895256996154785, -1.2344223260879517, 0.5367725491523743, -0.889086902141571, -0.43552109599113464, -0.017451534047722816, -1.6295232772827148, 0.5318312644958496, 0.08984670042991638, 1.1957430839538574, -0.8943482637405396, -0.7747452855110168, -0.4274120628833771, -0.1197280883789062...
def is _ mapping _ type ( tp : type ) - > bool : # all type hints for mappings satisfy : # * being an instance of the typing. _ genericalias class # * having an _ _ origin _ _ that extends collections. abc. mapping # * the value type is the second ( of two ) item in _ _ args _ _ return ( isinstance ( tp, typing. _ gene...
[ -1.442698359489441, -0.07256875932216644, 0.929302453994751, 0.064383365213871, -0.30772972106933594, 1.2873574495315552, 0.5081193447113037, -0.58833247423172, 0.2450305074453354, 0.8338911533355713, -0.19390968978405, 0.11378184705972672, -0.11134738475084305, 0.9004015922546387, -0.02...
def removepoints ( self, idxs ) : # we have to delete one by one from back to front idxs. sort ( ) idxs. reverse ( ) ren = self. slice3dvwr. _ threedrenderer for idx in idxs : # remove the sphere actor from the renderer ren. removeactor ( self. _ pointslist [ idx ] ['sphereactor'] ) # then deactivate and disconnect the...
[ -0.7780030965805054, -0.19003209471702576, 0.25211477279663086, 0.09919986128807068, -0.8729245066642761, -0.29530176520347595, 0.20396830141544342, 1.0703707933425903, 1.3501677513122559, 0.7978968620300293, -0.3637356162071228, 0.24864709377288818, -0.9298514127731323, -0.088638432323932...
def test _ see _ state ( self, mock _ set _ vendor ) : self. asserttrue ( setup _ component ( self. hass, device _ tracker. domain, test _ platform ) ) params = {'mac':'aa : bb : cc : dd : ee : ff ','dev _ id':'some _ device ','host _ name':'example. com ','location _ name':'work ','gps': [. 3,. 8 ],'gps _ accuracy': 1...
[ -0.3503497540950775, 0.21012213826179504, 0.6439767479896545, -0.6966277360916138, -0.10216186195611954, 0.07244854420423508, 0.242084339261055, 0.4183206856250763, 0.42126309871673584, -0.4159305691719055, -0.3377927243709564, -0.28765687346458435, 0.517054557800293, 0.028920862823724747,...
def calculate _ confidence ( self, data ) : # if we have a two - four word " name " here we boost its # confidence since this is something of a giveaway if len ( data ) in range ( 2, 4 ) : self. confidence + = ( 5 * len ( data ) ) # adding confidence for initials vs words, # if we have greater than one word if len ( da...
[ 0.6903151273727417, -0.40102529525756836, 0.46538347005844116, -0.5870638489723206, 0.008610771968960762, -0.5006666779518127, -0.3195056915283203, -0.2821926772594452, -0.4123972952365875, 0.27029353380203247, -0.6223870515823364, 0.2349027693271637, -0.7439969182014465, 1.014195799827575...
def test _ fit _ existing _ model _ optimize ( ) : fset = sample _ featureset ( 10, 1, ['amplitude ','maximum ','minimum ','median'], ['class1 ','class2'] ) model = build _ model. models _ type _ dict ['randomforestclassifier'] ( ) model _ options = { " criterion " : " gini ", " bootstrap " : true } params _ to _ optim...
[ -0.4545265734195709, -0.04211373254656792, 0.5376511812210083, 0.9014385938644409, 0.9734475612640381, -0.24683310091495514, -0.2899646461009979, -0.32011833786964417, -0.5376065969467163, -0.16389232873916626, -0.47899264097213745, -0.196933314204216, 0.24325238168239594, -0.0271984711289...