text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ place _ multiple _ orders ( self ) : # usera # buy 10 stock shares ( 95 ) stock _ name = self. test _ stock _ a order _ quantity = 10 order _ type ='buy'trader = self. login _ user ( username = usera. get ('username') ). profile d = self. place _ order ( stock _ name, order _ quantity, order _ type, trader )...
[ -0.028565427288413048, 0.07719377428293228, 0.8654738664627075, 0.5485629439353943, 0.9204097986221313, -0.30356693267822266, 0.5014775991439819, -0.7499946355819702, 0.38019275665283203, -0.40736833214759827, -1.1401761770248413, -0.5945637822151184, 0.39474067091941833, -0.07732515037059...
def alter _ drop ( self, name ) : index = self. _ _ columns. drop ( name ) for row in self. _ _ data _ area. values ( ) : del row [ index ]
[ -1.3391107320785522, -0.298674076795578, 0.6623695492744446, -0.9944475293159485, -0.7567700743675232, 0.40176236629486084, 0.08180626481771469, -0.13415981829166412, -0.9060002565383911, 0.3868624269962311, -0.3054921627044678, 0.5394330024719238, 0.7795637249946594, 0.4289124011993408, ...
def bokeh _ features _ table ( feature _ names : list [ str ], feature _ values : iterable [ float ] ) - > layoutdom : source = columndatasource ( {'feature _ values': feature _ values,'feature _ names': feature _ names } ) columns = [ tablecolumn ( field ='feature _ names ', title ='feature'), tablecolumn ( field ='fe...
[ 0.9554598927497864, 0.8106807470321655, 0.5522871613502502, -0.4213998019695282, -0.262245237827301, -0.5184319019317627, 0.2849959135055542, 0.2996337413787842, -1.3372387886047363, -0.5587551593780518, -0.27775952219963074, 0.6334953308105469, 0.9796921014785767, -0.016281871125102043, ...
def next ( self, x ) - > union [ " branch ", " leaf " ] :
[ -0.19571051001548767, 0.7166386842727661, 0.3613036274909973, 1.5062379837036133, -0.7751847505569458, 0.9009829759597778, -0.5921952128410339, -1.3974416255950928, 0.936618983745575, -1.0901588201522827, -0.5221694111824036, 0.7191526293754578, 0.4234400689601898, 0.041239723563194275, ...
def update _ intro ( self ) : self. intro = " - " * self. get _ term _ width ( ) + " \ n trezor server \ n " if self. creds : self. intro + = " \ n account address : % s " % self. creds. address. decode ( " utf8 " ) else : self. intro + = " \ n account not initialized, call new _ wallet " self. intro + = ( ( " \ n runn...
[ 0.0964982807636261, -0.668048620223999, 0.8376942873001099, -0.541344165802002, -0.7464935779571533, 0.49891960620880127, -0.3867536187171936, 0.7272375822067261, -0.15588247776031494, 0.8732591867446899, 0.4607287049293518, 1.0344421863555908, -1.1349037885665894, -0.011240052059292793, ...
def test _ push _ docker _ image _ to _ local _ registry ( controller ) : test _ image ='busybox'reg _ addr = container. local _ docker _ reg host = controller _ precheck ( controller ) controllers = system _ helper. get _ controllers ( availability = ( hostavailstate. available, hostavailstate. degraded, hostavailstat...
[ 0.618360698223114, 0.7072988748550415, 0.6697291731834412, -0.07873329520225525, 0.7203099727630615, -0.18971726298332214, 0.8028839826583862, 0.3504619002342224, 0.18779124319553375, 0.24223166704177856, -0.6944031715393066, 0.3367865979671478, 0.3559121787548065, 0.6599131226539612, 0....
def firstnonmatch ( self, other ) : if ( len ( self. seq ) = = len ( other. seq ) ) : i = - 1 j = 0 while ( i < 0 ) : if ( self. seq [ j ]! = other. seq [ j ] ) : i = j j = j + 1 return i else : print ( " sorry length of two sequence not equal " ) sys. exit ( )
[ -0.530280590057373, -0.3625530004501343, 0.7314885258674622, -0.009332123212516308, -0.24963177740573883, -0.021905554458498955, 0.8124784827232361, 0.16890980303287506, 0.1507195681333542, 0.4381784498691559, -0.5305927395820618, 0.09749042987823486, -1.0562622547149658, 0.813323318958282...
def get _ ramp ( hdu, pix _ x, pix _ y, int _ num, min _ dn = 0. 0, rampoffval = 0. 0 ) : ngrps = hdu. header [ " ngroups " ] k1 = int _ num * ngrps k2 = k1 + ngrps gnum = np. array ( range ( ngrps ) ) ydata = ( hdu. data [ k1 : k2, pix _ y, pix _ x ] ). astype ( float ) ydata + = rampoffval return ( gnum, ydata )
[ -0.5189387798309326, -0.0013310856884345412, 0.5044683814048767, -0.47082051634788513, -0.4402589499950409, -0.16663752496242523, -1.2451870441436768, -0.46867653727531433, 0.017917901277542114, -0.31056731939315796, 0.03937913104891777, 0.9152936935424805, -0.03938915580511093, -0.1479228...
def months ( year ) : sql = f " " " select extract ( month from rdate ) month, convert ( sum ( suma ), unsigned ) as suma, count ( * ) as cnt from ` mybudj ` where 1 = 1 and extract ( year from rdate ) = { year } { um _ not _ my _ expspense } group by extract ( month from rdate ) order by 1 desc " " " # print ( sql ) r...
[ 0.012100578285753727, -0.2247987985610962, 0.7331506609916687, -0.10297771543264389, -1.0246022939682007, -0.24496954679489136, 0.19706398248672485, -0.42189478874206543, 0.5803065299987793, 0.07876883447170258, -0.1992979198694229, -0.2870364487171173, -0.29135948419570923, 0.464451491832...
def admin _ create _ user ( userpoolid = none, username = none, userattributes = none, validationdata = none, temporarypassword = none, forcealiascreation = none, messageaction = none, desireddeliverymediums = none ) : pass
[ -0.4579543471336365, 0.22442838549613953, 0.2607799768447876, 0.3370928466320038, 0.1260490119457245, 0.5842376351356506, 0.861304759979248, -0.8891476392745972, 0.28956663608551025, 0.14320944249629974, -0.9218730926513672, 0.9216927289962769, -0.18552663922309875, 0.5909469723701477, -...
def _ zeros _ like _ bool ( x ) : return false
[ -0.48921433091163635, -0.43244755268096924, 0.4180878698825836, 0.5528768301010132, -1.255968451499939, 1.1578704118728638, -0.3157387971878052, -0.15333102643489838, 0.08548486977815628, -0.5540900826454163, -0.2778182327747345, -0.1191861629486084, -0.15217556059360504, -0.23226770758628...
def do _ set _ token ( self, args ) : global token token = args print ( " token = " + token )
[ -0.34185102581977844, -0.25792771577835083, 0.3221302628517151, -0.2642999291419983, 1.0429720878601074, 0.2954733073711395, 0.7719091176986694, 0.5973201394081116, -1.1776057481765747, -0.2734980285167694, -1.2454540729522705, 1.9708325862884521, 0.0658629760146141, 0.5593538880348206, ...
def get _ interactive _ deposit ( request : request ) - > response : err _ resp = check _ middleware ( ) if err _ resp : return err _ resp transaction, asset, err _ resp = interactive _ args _ validation ( request ) if err _ resp : return err _ resp form = rdi. form _ for _ transaction ( transaction ) ( ) url _ args = ...
[ 0.4101977050304413, 0.3314030170440674, 0.6992879509925842, -0.3144473731517792, -0.4163336157798767, -0.010711629875004292, 0.9130734801292419, -0.5661954879760742, -0.18023130297660828, -0.3334980905056, 0.2663179039955139, -0.24302081763744354, -0.24751006066799164, -0.17475727200508118...
def test _ atomic _ qname _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 5. xsd ", instance = " nistdata / atomic ...
[ 0.294095516204834, -0.04572272300720215, 0.2310606837272644, -0.055629145354032516, -0.7454179525375366, 0.3004629611968994, -0.4759218692779541, -0.8038679361343384, 0.4015786051750183, 0.533385157585144, -0.6936259269714355, -0.40165936946868896, -0.3645334243774414, -0.21124595403671265...
def find _ files _ matching ( root _ dir, filename _ pattern ) : paths = [ ] for path, dirnames, fnames in os. walk ( root _ dir ) : matched = filter ( fnames, filename _ pattern ) if not matched : continue for fn in matched : paths. append ( os. path. join ( path, fn ) ) return paths
[ 0.6271110773086548, -0.3781699538230896, 0.5844663381576538, 0.6365756988525391, 0.0018629921833053231, -0.4317012131214142, 0.555444598197937, 0.6206807494163513, -0.17905262112617493, -0.4187680184841156, 0.20061072707176208, 0.1138819083571434, -0.3221266567707062, 1.2514283657073975, ...
def get ( self, topic _ name : str ) - > none : self. values. update ( {'topic _ name _ exists': ( topic _ services. does _ topic _ with _ name _ exist ( topic _ name ) ) } ) self. render _ json ( self. values )
[ -0.6973581910133362, -0.14914433658123016, 0.2176152467727661, -0.7633241415023804, 0.3041478991508484, -0.05946321785449982, -0.8384422063827515, -0.21894749999046326, -0.6708952188491821, 0.9626537561416626, 0.4977372884750366, -0.26435989141464233, 0.3385527729988098, -0.250730663537979...
def _ _ str _ _ ( self ) : return self. site _ ref
[ -0.0717008113861084, -0.8728772401809692, 0.49323055148124695, -1.718456745147705, -0.26847249269485474, 0.7550725340843201, 0.6506432890892029, -0.38324928283691406, 0.6816306114196777, 0.3683569133281708, 0.8585225939750671, 1.0181329250335693, -0.10990332067012787, -0.1037278026342392, ...
def sign _ hmac _ sha1 ( base _ string, client _ secret, resource _ owner _ secret ) : # the hmac - sha1 function variables are used in following way : # text is set to the value of the signature base string from # ` section 3. 4. 1. 1 ` _. # #.. _ ` section 3. 4. 1. 1 ` : http : / / tools. ietf. org / html / rfc5849 #...
[ -0.47826650738716125, -0.5431455373764038, 0.6075844168663025, 0.03634088486433029, -0.2669357359409332, -0.5869266390800476, 0.026060065254569054, 0.1941453069448471, -0.3782552182674408, 0.8518015146255493, 0.27856433391571045, 0.31468117237091064, -0.3446269631385803, -0.966334998607635...
def get _ messages ( self ) : if hasattr ( request, " _ messages " ) : return request. _ messages else : return [ ]
[ -1.2940912246704102, 0.3571428656578064, 0.8133165836334229, 0.7223755717277527, 1.2053583860397339, -0.23158004879951477, -0.6468462347984314, -1.701642394065857, 0.5726553797721863, -0.6042011976242065, 0.27775394916534424, -0.21458247303962708, 0.07525143027305603, 1.241878867149353, ...
def get _ parameter _ from _ yaml ( parameter : str, config _ file : str ) : value = json. loads ( config _ file ) # workaround for the.. within the params in the yaml file ugly _ param = parameter. replace ( ".. ", " # # " ) for element in ugly _ param. split ( ". " ) : value = value. get ( element. replace ( " # # ",...
[ 0.2927546203136444, -0.9803992509841919, 0.5689534544944763, -0.2115228772163391, -0.35094523429870605, -0.5465490221977234, 0.15669433772563934, 0.34682101011276245, -0.8733729720115662, 0.8089611530303955, 0.03043285943567753, 1.1055774688720703, 0.09236720204353333, 0.6937357783317566, ...
def convert ( self, s, numrows ) : result = ['' ] * numrows index, step = 0, 1 for e in s : # print ( index ) result [ index ] + = e if index = = 0 : step = 1 if index + 1 = = numrows : step = - 1 index + = step return''. join ( result )
[ -0.44397711753845215, 0.16838382184505463, 0.6651821136474609, 0.07705357670783997, -0.3794587254524231, -1.2439464330673218, 0.630652129650116, 0.5244156122207642, 1.1205906867980957, 0.39850306510925293, -0.31211981177330017, -0.3792741596698761, -0.17275869846343994, -0.1332876384258270...
def stack _ df ( df, index _ ='datetime') : df _ = df. copy ( ) df _ = df _. set _ index ('datetime'). stack ( ). reset _ index ( ) df _. columns = [ index _,'stop _ id ','value'] return df _
[ -1.0695501565933228, 1.5863319635391235, 0.5528534650802612, 0.07116515189409256, 0.26016953587532043, -0.4883044362068176, -0.15905384719371796, -0.4066949784755707, -1.1623358726501465, 0.8941783905029297, 0.04177224263548851, 0.4292939603328705, 0.9643042683601379, -1.542457103729248, ...
def execute ( self, context ) : addon _ data = bpy. context. scene. maplus _ data addon _ data. easy _ angle _ diff _ axr _ is _ first _ press = true maplus _ geom. set _ item _ coords ( addon _ data. easy _ axr _ angle _ guide1, ('line _ start ','line _ end'), [ [ 0, 0, 0 ], [ 0, 0, 0 ] ], ) maplus _ geom. set _ item ...
[ -0.6353961825370789, -0.06492691487073898, 0.5317359566688538, -0.18225383758544922, 0.5636621117591858, 0.19584493339061737, 0.04399850592017174, -0.34109431505203247, -0.33878737688064575, 0.5803369879722595, -0.6379684805870056, 0.10934605449438095, 0.31460702419281006, 0.35342100262641...
def scripttestcontrols ( ) : print ( colors. bold + " appel du script de check des contraintes d'activity " + colors. endc ) data = const. defaultdata ( activityname = " generatedactivitywitherrors " ) rmurray = sessionserpico ( const. rmurray, affichage = false ) rmurray. createactivity ( data. datacreationactivity, a...
[ 0.7140267491340637, -0.7064236402511597, 0.9388186931610107, -0.2508060336112976, 0.8430850505828857, 0.17382201552391052, 0.7431854009628296, -0.8730361461639404, 0.05985052138566971, -0.2878657579421997, 0.07051097601652145, 1.1202913522720337, -0.649716854095459, -0.23450690507888794, ...
def subgraph ( self, entities ) : pass
[ 0.33546146750450134, 0.17275813221931458, -0.14804856479167938, 0.23400180041790009, -0.39025551080703735, 0.2651190161705017, 0.08562158048152924, 0.5155921578407288, 0.06854857504367828, -0.002679282333701849, 0.2705479562282562, 0.21741600334644318, -0.1427314579486847, -0.4984787106513...
def run ( self ) : total _ elements = len ( self. pipeline _ elements ) parallel _ elements = [ x for x in self. pipeline _ elements if isinstance ( x, parallelexecutor ) ] num _ parallel _ elements = len ( parallel _ elements ) num _ threads = self. num _ threads if num _ parallel _ elements > self. num _ threads else...
[ 0.272724986076355, -0.16293175518512726, 0.5452120304107666, 0.06319979578256607, 1.118960976600647, 0.16597911715507507, 0.9107363820075989, 0.6693087816238403, -0.05407870188355446, -0.42479994893074036, -0.27395379543304443, 0.05199463665485382, -0.3756358325481415, 0.8740103244781494, ...
def test _ atomic _ id _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 2. xsd ", instance = " nistdata / atomic / id / schema + instance...
[ 0.051192980259656906, -0.5967315435409546, 0.47784143686294556, 0.717073380947113, -0.4381670653820038, 0.23169994354248047, 0.7896528840065002, -0.2667924165725708, -0.31119003891944885, 0.737332820892334, -0.5708508491516113, 0.4654782712459564, 0.2831549048423767, 0.1628984659910202, ...
def new _ uninstantiated ( cls, * args, * * kwargs ) : with self. _ lock : if not self. _ instance : self. _ instance = self. _ old _ cls. _ _ new _ _ ( cls ) cls. _ _ new _ _ = classmethod ( new _ instantiated ) return self. _ instance
[ -0.8328427672386169, -0.5132604241371155, 0.5737100839614868, -0.6614416241645813, 0.016774043440818787, -0.3168295621871948, 0.5990509986877441, -0.710344135761261, -0.08292946219444275, -0.729598879814148, -0.13272038102149963, -0.4937436282634735, -0.16852261126041412, 0.227738097310066...
def lnprior ( self, alpha ) : if config. nparams = = 4 : # return photo _ model _ auv _ lnprior ( alpha, config ) return photo _ collision _ model _ lnprior ( alpha, config ) elif config. nparams = = 5 : return jv _ model _ lnprior ( alpha, config ) elif config. nparams = = 3 : return photo _ model _ lnprior ( alpha, c...
[ -0.9456226825714111, -0.37226176261901855, 0.6548188328742981, -0.1255045235157013, 0.03080158308148384, -0.07960880547761917, 0.06831694394350052, -0.4684484899044037, 0.47438308596611023, 0.043863438069820404, -0.019637439399957657, -0.8408175110816956, 0.07914499938488007, 1.09067881107...
def merge _ aug _ vote _ results ( self, aug _ bboxes, aug _ labels, img _ metas ) : recovered _ bboxes = [ ] for bboxes, img _ info in zip ( aug _ bboxes, img _ metas ) : img _ shape = img _ info [ 0 ] ['img _ shape'] scale _ factor = img _ info [ 0 ] ['scale _ factor'] flip = img _ info [ 0 ] ['flip'] bboxes [ :, : 4...
[ -0.5940815806388855, -0.8241649270057678, 0.7053855657577515, -0.06686563044786453, 0.6408878564834595, 0.1487199068069458, -0.7916970252990723, 0.34457334876060486, 0.5458064675331116, 0.0324043408036232, 0.24215929210186005, 0.273983895778656, 0.484639436006546, 0.09474251419305801, -0...
def test _ request _ do _ calculate ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) dut. request _ do _ select ( 1 ). method _ id = 2 dut. request _ do _ select ( 1 ). change _ factor _ 1 = 0. 75 dut. re...
[ -0.4891362190246582, 0.7645899057388306, 0.8371358513832092, 0.892910897731781, 0.7155182957649231, -0.06791152060031891, 0.33465996384620667, -0.6328780055046082, -0.30105507373809814, -0.6376644372940063, -0.5533972978591919, -0.38207826018333435, -0.1031167283654213, -0.1575686484575271...
def approve ( self, cr, uid, ids, context = none ) : self. write ( cr, uid, ids, {'state':'approve'}, context = context ) return true
[ -1.3794101476669312, -0.006896114908158779, 0.35346677899360657, 0.06720719486474991, -0.12576621770858765, 0.10318607091903687, -0.4138384163379669, 0.6477091312408447, 0.1934177130460739, 0.54840487241745, -0.09695295989513397, 0.31841179728507996, -0.700410783290863, -0.3385743796825409...
def hostname ( self ) - > optional [ str ] : return self. _ _ hostname
[ 0.5558574795722961, -0.4973981976509094, 0.3627761900424957, 0.6561670899391174, -0.09780201315879822, 0.4481211304664612, 0.25894656777381897, 0.49436870217323303, 0.251544326543808, -0.5656834840774536, 0.6934652924537659, -0.08207941055297852, -0.3414965271949768, -0.7650455236434937, ...
def show _ with _ led _ light ( self ) : try : import rpi. gpio as gpio except importerror : logger. info ('could not import modules to show messages with led light.') return gpio. setmode ( gpio. board ) gpio. setup ( 7, gpio. out ) gpio. setup ( 11, gpio. out ) for i in range ( 0, 5 ) : gpio. output ( 7, true ) sleep...
[ 1.2756189107894897, 0.3401922583580017, 0.5275737047195435, -0.36429649591445923, -0.09317418932914734, 0.5328645706176758, 0.6256558299064636, -0.8590781092643738, 0.2683718204498291, 0.052239131182432175, -0.2513125538825989, -0.1618918627500534, -0.6698654890060425, 1.125504732131958, ...
async def test _ options _ flow _ with _ no _ selection ( hass : homeassistant ) - > none : config _ entry = mockconfigentry ( domain = domain, title = " nina ", data = deepcopy ( dummy _ data ), ) config _ entry. add _ to _ hass ( hass ) with patch ( " homeassistant. components. nina. async _ setup _ entry ", return _...
[ -0.7165711522102356, -0.21375428140163422, 0.41754820942878723, -0.17546021938323975, 1.0941249132156372, -0.45180994272232056, 0.45128974318504333, -0.5531327128410339, 0.2788498103618622, -0.693021833896637, -0.6290644407272339, 0.12960562109947205, 0.35105976462364197, 0.544170856475830...
def traverse _ subtree _ level _ order ( self, position : _ position ) - > generator : if not position. is _ owned _ by ( self ) : raise valueerror ( " position doesn't belong to this tree " ) def helper ( root _ node, level ) : if root _ node is not none : if level = = 1 : yield tree. _ position ( self, root _ node ) ...
[ -0.15008194744586945, 0.18351665139198303, 0.7936450839042664, 0.7984575033187866, -0.45194777846336365, -0.25694581866264343, -0.18139050900936127, -0.7263546586036682, -0.7369260191917419, 0.08171658962965012, -0.48188316822052, -0.2865505516529083, 0.008380405604839325, 0.57505857944488...
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefilteriul3diul3 _ superclass. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 1.2024413347244263, 0.711506187915802, 0.6386212110519409, -0.4250790476799011, -1.333960771560669, 1.1617933511734009, -0.20031113922595978, 1.3376740217208862, 0.2761772572994232, -1.0985714197158813, -1.1120595932006836, -0.133138969540596, 0.5929591059684753, -0.8288769125938416, 0.2...
def run _ cmd _ output ( * args, * * kwargs ) : myprint ('cmd : ', * args ) p = subprocess. popen ( * args, stdout = subprocess. pipe, stderr = subprocess. pipe, * * kwargs ) output, error = p. communicate ( ) return ( p. returncode, output. decode ('utf - 8'), error. decode ('utf - 8') )
[ -0.07539565116167068, -1.5481194257736206, 0.7130216360092163, -0.21949811279773712, -0.9173271059989929, -0.6043117642402649, -0.2931426465511322, 0.19322067499160767, -1.0441672801971436, -0.5278515219688416, -0.041856247931718826, 0.10627858340740204, -0.44144079089164734, -0.5391396880...
def _ has _ qual ( item ) : return ( item ['qualid'] is not none ) and ( item ['qual'] is not none )
[ 0.09399424493312836, -1.3997615575790405, 0.3667446970939636, 0.015472528524696827, 0.1846182942390442, 0.06476239114999771, -1.1318693161010742, 1.2460801601409912, 0.15236550569534302, 0.9182316660881042, -0.8698491454124451, -0.3922247886657715, 0.18645638227462769, -0.24929745495319366...
def stop _ worker _ session ( self, wait _ on _ join = true, join _ timeout = 5 ) : pass
[ -0.6469689607620239, -0.9109273552894592, 0.5109192132949829, 0.7269108295440674, -0.05047253519296646, 0.4222038686275482, 0.5214834809303284, -0.005888936575502157, -0.8841739296913147, 1.0842493772506714, -1.2929470539093018, -0.4407966434955597, -1.2646275758743286, -0.9728976488113403...
def main ( args ) : from gan. gan import conditionalgan from data _ processing. dataloader import get _ transform, get _ data _ loader, \ rawtextface2textdataset from gan import losses as lses from gan. textencoder import pretrainedencoder from gan. conditionaugmentation import conditionaugmentor base _ dir = os. envir...
[ 0.27901384234428406, 0.08025434613227844, 0.8242745399475098, 0.4432608187198639, -0.38631168007850647, -0.3844916522502899, 0.5289983749389648, 0.4625149667263031, -0.3010657727718353, -0.2862568199634552, -0.11372501403093338, 0.8450455665588379, 0.2624270021915436, 0.23551127314567566, ...
def get _ link _ position _ function ( self, link : str, base _ link : str, n : int = 1, numpy _ output : bool = false, ) - > cs. function : return self. make _ function ( " p ", link, self. get _ link _ position, n = n, base _ link = base _ link, numpy _ output = numpy _ output, )
[ -0.24551400542259216, -0.3495863974094391, 0.37375152111053467, 0.623113214969635, 0.4421462118625641, -1.5062682628631592, 0.11928511410951614, -0.30750948190689087, -0.30467134714126587, -0.7415093183517456, -0.08062583953142166, 0.3252609074115753, -0.0646260678768158, -1.08954608440399...
def plot _ mcwd _ composite ( composite, wmm = 100, hmm = 80, axes = none, proj = none, lon0 = 0, save = none, transparent = false ) : # noqa # plot settings oplot. plot _ settings ( ) # get cyclic values and coords cval, clon = oplot. get _ cyclic _ values ( composite ) lat = composite. latitude. values # get projecti...
[ 0.21424607932567596, 0.04191136732697487, 1.007826328277588, -0.719519853591919, -0.6967892646789551, 0.5433133244514465, 1.2560977935791016, -0.021017564460635185, 0.6610899567604065, -0.11898666620254517, 0.9358768463134766, 0.3497973382472992, -0.3749028146266937, 0.989617645740509, 0...
def read _ csv ( filename ) : with open ( filename ) as f : reader = csv. dictreader ( f ) data = [ r for r in reader ] return data
[ -1.0148831605911255, -0.4203389585018158, 0.2577240467071533, -0.6657555103302002, -0.0983826071023941, 0.6893251538276672, -1.3107010126113892, 1.3928861618041992, -0.331570565700531, -0.03586987033486366, -0.15205872058868408, 0.12512190639972687, 0.4726707935333252, -0.182399719953537, ...
def known _ stimulus _ keys ( cls ) : raise notimplementederror ( )
[ -0.2101992666721344, -0.5533345937728882, 0.6421120166778564, 0.05870659649372101, -0.34756654500961304, 0.7356372475624084, 0.7525485157966614, -0.6487388610839844, 0.6502295136451721, -0.0031577504705637693, -1.7023935317993164, 0.5866392850875854, 0.21721585094928741, 0.6151670813560486...
def pxbounds ( self, geom, clip = false ) : try : if isinstance ( geom, dict ) : if'geometry'in geom : geom = shape ( geom ['geometry'] ) else : geom = shape ( geom ) elif isinstance ( geom, basegeometry ) : geom = shape ( geom ) else : geom = wkt. loads ( geom ) except : raise typeerror ( " invalid geometry object " )...
[ -0.6409352421760559, -0.19487033784389496, 0.725355863571167, -0.005649832542985678, -1.654630184173584, 0.21217523515224457, -0.9525761604309082, -0.8513439893722534, 0.40194544196128845, 0.32197457551956177, 0.4981617331504822, 0.47400128841400146, 0.26536962389945984, 0.1806486397981643...
def sum _ pending ( array _ tasks ) : # remove a possible'%...'part subjobstr = array _ tasks. split ( " % " ) [ 0 ] # split into chunks chunks = subjobstr. split ( ", " ) n = 0 for chunk in chunks : if " - " not in array _ tasks : n + = 1 else : start, end = chunk. split ( " - " ) n + = int ( end ) - int ( start ) + 1...
[ -0.26970982551574707, -0.18830087780952454, 0.86623215675354, 0.406992644071579, -0.7065227031707764, 0.30122697353363037, 0.6447026133537292, 0.4599251449108124, -0.18984632194042206, 0.12128137797117233, -0.6725910305976868, -0.36188146471977234, -0.6074824333190918, 0.11799923330545425,...
def carga _ csv ( file _ name ) : valores = read _ csv ( file _ name, header = none ). values # suponemos que siempre trabajaremos con float return valores. astype ( float )
[ 0.33470818400382996, 0.12029324471950531, 0.4879327416419983, 1.0727739334106445, 0.010417241603136063, 0.036929018795490265, -1.148013949394226, 0.0475098192691803, -1.6017498970031738, 0.2630055248737335, 0.05569968372583389, 0.18597956001758575, -0.38688987493515015, 0.5874585509300232,...
def print _ bio _ sequence ( sequences, delimiter = " \ t ", file = sys. stdout ) : for sentence in sequences : for i, [ position, token, part _ of _ speech, tag ] in enumerate ( sentence. tokens ) : print ( " % s " % ( delimiter. join ( [ token, " % s, % s " % position, part _ of _ speech, tag ] ) ), file = file ) if ...
[ 0.3959064185619354, -0.6858963966369629, 0.6632721424102783, 0.5721297264099121, -0.033245570957660675, 0.05288149416446686, -0.7119841575622559, 0.07997617870569229, -0.8475236892700195, 0.41425156593322754, 0.33910590410232544, -0.2362619936466217, -0.10295876860618591, 0.117872141301631...
def assign _ subnet ( source, dest, subnets ) : i1 = source. subnet i2 = dest. subnet if i1 is none and i2 is none : raise valueerror ( " no subnet for added destination particle " ) if i1 = = i2 : # if a and b are already in the same subnet, do nothing return if i1 is none : # source did not belong to a subset before ...
[ -0.2148863673210144, 0.2899087071418762, 0.6824240684509277, 0.17665228247642517, -0.18905103206634521, 0.5484275221824646, -0.5470331907272339, 0.13149793446063995, 0.3033415973186493, 0.3617432713508606, -0.4538085460662842, 0.3106014132499695, 0.31723037362098694, -0.4435964822769165, ...
def test _ atomic _ language _ min _ length _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 1. xsd ", instance = " nistdata /...
[ 0.2197105884552002, -0.7295372486114502, 0.38970157504081726, 0.6130247712135315, -0.7030547261238098, 0.046876706182956696, -0.26306626200675964, -0.26907968521118164, 0.29155340790748596, 0.5802958607673645, -0.4085482954978943, 0.2878458797931671, -0.21433253586292267, 0.178507313132286...
def switch _ case ( branch : any, expressions : dict [ any, any ] ) - > symbolicexpression | any : def _ switch _ fn ( branch, * expressions ) : # todo : support lazy evaluation. assert len ( expressions ) % 2 = = 0 keys = expressions [ : : 2 ] values = expressions [ 1 : : 2 ] for key, value in zip ( keys, values ) : i...
[ 0.18563462793827057, -0.11639486253261566, 0.5058352947235107, 0.8638073801994324, -0.37086713314056396, -0.5085841417312622, 0.22866789996623993, 0.2581629753112793, -0.2333848774433136, 0.23078559339046478, 0.33741629123687744, 0.3530257046222687, -0.0771736428141594, 0.00474921613931655...
def from _ json ( cls, json _ str ) : json _ dict = json. loads ( json _ str ) return cls ( * * json _ dict )
[ -0.029248569160699844, -1.1577067375183105, 0.07182161509990692, -0.6092416644096375, -1.6444486379623413, 0.14242972433567047, -0.552022397518158, -0.28010135889053345, 0.17130810022354126, -0.04229732230305672, -0.25104278326034546, 0.08358904719352722, 0.4968840777873993, -0.09816667437...
def record _ to _ arkiquery ( self, rec ) : # todo : less verbose implementation q = { " reftime " : [ ], " area " : { }, " product " : { }, } d1, d2 = rec. date _ extremes ( ) if d1 : q [ " reftime " ]. append ( " > = { } ". format ( d1 ) ) if d2 : q [ " reftime " ]. append ( " < = { } ". format ( d2 ) ) for k in [ " ...
[ -0.1386769562959671, -0.4568849503993988, 0.8717007637023926, -0.7601146101951599, -0.35184815526008606, -0.33320778608322144, -0.2430954873561859, -0.342451274394989, -0.5704485774040222, 1.2855689525604248, -0.13771788775920868, 1.3050378561019897, 0.70427006483078, 0.22455447912216187, ...
def va _ deceptionserver _ in _ running ( self, config = none ) : logger. info ( " we are in : : " + sys. _ getframe ( ). f _ code. co _ name ) if not config : raise valueerror ( " policy name is mandatory for setting policy " ) cmd ='show running | grep deception server'logger. info ( " executing show command " + str ...
[ -0.7448433041572571, -0.03573411703109741, 0.8334498405456543, -0.11023272573947906, 0.473995566368103, 0.6170321106910706, 0.06560388207435608, 0.7004268765449524, 0.0013552780728787184, 1.1397194862365723, -0.4388546049594879, 0.5983522534370422, -0.871036171913147, 0.6078081130981445, ...
def get _ code _ slots _ list ( data : dict [ str, int ] ) - > list [ int ] : return list ( range ( data [ conf _ start ], data [ conf _ start ] + data [ conf _ slots ] ) )
[ -0.4920670986175537, 0.2550944983959198, 0.1990148425102234, -0.4257887899875641, -0.3165209889411926, -0.055109817534685135, 0.46880507469177246, 0.9146335124969482, 0.0321679525077343, 0.6140093803405762, -0.5408230423927307, 0.34281501173973083, 0.20533572137355804, 0.8012222051620483, ...
def n65 ( self ) : vdf = self. dataframe ( ['age _ head ','age _ spouse ','elderly _ dependents'] ) return ( ( vdf ['age _ head'] > = 65 ). astype ( int ) + ( vdf ['age _ spouse'] > = 65 ). astype ( int ) + vdf ['elderly _ dependents'] )
[ -1.6729720830917358, 0.31252604722976685, 0.6104494333267212, -0.734993577003479, -0.3162841796875, 0.4921415150165558, -0.3136756420135498, -0.49002164602279663, -0.056312937289476395, 0.5050286650657654, 0.0947180762887001, 0.18941573798656464, 0.6160420179367065, -0.19910602271556854, ...
def _ task _ dir ( self, task _ id ) : return os. path. join ( self. _ data _ dir ( ), task _ id )
[ 0.2432848960161209, -0.19869589805603027, 0.36607736349105835, -0.47606825828552246, -0.25707170367240906, 0.6094185709953308, 0.9081629514694214, -0.2686693072319031, -0.18147194385528564, -0.05892157554626465, 0.45971789956092834, 0.2976667284965515, 1.1653203964233398, 0.358165323734283...
def print _ position ( self ) : return f'{ self. location. x }, { self. location. y }, { self. direction. get _ label ( ) } '
[ -0.5194099545478821, -2.2120487689971924, 0.4415442645549774, -1.1481276750564575, 0.6421952843666077, 0.7911111116409302, -0.4832164943218231, -0.1475478708744049, -0.44149965047836304, 0.3881511688232422, 0.23499996960163116, -0.17121845483779907, -0.01654381863772869, -0.759876132011413...
def questionscreen ( self, question, questionno ) : self. canvas. delete ( " all " ) # clear the screen self. canvas. create _ image ( 300, 300, image = self. bimage ) # displaying the background image self. canvas. create _ text ( 300, 50, # displaying question number text = " question { } ". format ( questionno ), fo...
[ 0.4022783935070038, -0.25425848364830017, 0.8397725820541382, -0.2647911608219147, -0.20219120383262634, 0.6418383717536926, 0.4561034142971039, -1.0896981954574585, 0.37415048480033875, -0.2875783443450928, 0.6830688118934631, 0.6064771413803101, 0.08285483717918396, 1.2048224210739136, ...
def create _ revocation _ response ( self, uri, http _ method ='post ', body = none, headers = none ) : request = request ( uri, http _ method = http _ method, body = body, headers = headers ) try : self. validate _ revocation _ request ( request ) log. debug ('token revocation valid for % r. ', request ) except oauth2...
[ -0.13778620958328247, -0.23667128384113312, 0.6443244814872742, 0.36790159344673157, -0.2492019683122635, -1.0826106071472168, -0.24563749134540558, -0.15790468454360962, 0.4084583520889282, -0.03184799477458, -0.10955651849508286, 0.45456361770629883, -0.1926509588956833, -0.7043212056159...
def webhook ( self ) - > webhook : return self. _ client. webhook ( self. webhook _ id )
[ 1.5190956592559814, -0.02695629745721817, -0.12618842720985413, 0.76125568151474, 1.1192169189453125, -0.026833202689886093, -0.09331424534320831, 0.2522795498371124, 0.34737661480903625, -1.373969554901123, 0.23440447449684143, 1.6832618713378906, -0.18670740723609924, -0.7804830074310303...
def power ( x, y ) : return x * * y
[ 0.2768908739089966, -0.4125939607620239, 0.5828162431716919, 0.10828458517789841, 0.05868470296263695, 0.006651066709309816, -2.301790475845337, -1.252459168434143, -1.5788400173187256, 0.7161245942115784, 0.5635942816734314, 0.30111896991729736, 0.2411208301782608, -0.8116418123245239, ...
def nearest _ films ( your _ location, films _ year ) : distances = [ ] your _ location = your _ location. split ( ", " ) lat = float ( your _ location [ 0 ] ) long = float ( your _ location [ 1 ] ) for i in range ( len ( films _ year ) ) : cords = interprite _ names _ into _ coordinates ( films _ year [ i ] [ 1 ] ) if...
[ -0.4188430607318878, -1.6608785390853882, 0.6605486869812012, -0.46864792704582214, -0.1268414407968521, 0.2583712637424469, -0.32394492626190186, 0.227361261844635, -0.03320573270320892, 0.8799752593040466, -1.2321712970733643, 0.4391535818576813, -0.6089329719543457, -0.2594289183616638,...
def from _ rep ( u ) : if isinstance ( u, pyversion. string _ types ) : return uuid. uuid ( u ) # hack to remove signs a = ctypes. c _ ulong ( u [ 0 ] ) b = ctypes. c _ ulong ( u [ 1 ] ) combined = a. value < < 64 | b. value return uuid. uuid ( int = combined )
[ -0.25394514203071594, -0.17973023653030396, 0.48045554757118225, 0.0966213196516037, -0.8505308628082275, 0.6089823842048645, 0.2087489366531372, 0.9728010296821594, 1.4790726900100708, 0.28649207949638367, -0.416485995054245, 0.5883520245552063, -0.5474788546562195, -1.488631248474121, ...
def test _ atomic _ qname _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 5. xsd ", instance = " nistdata / atomic / qname / sc...
[ 0.01967628486454487, -0.5657098293304443, 0.35791969299316406, 0.07724209129810333, -0.4583163857460022, 0.09877490252256393, 0.20958976447582245, -1.1183923482894897, -0.18548470735549927, 0.418240487575531, -0.5569195747375488, -0.26022931933403015, -0.6026378273963928, -0.06751354038715...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, invoiceresource ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ 0.07062619924545288, -1.1033897399902344, 0.6792500019073486, -0.6595479846000671, -0.343525230884552, -0.16541901230812073, -0.499388724565506, -0.359902560710907, 0.8799967765808105, -0.31071045994758606, -0.21561849117279053, -0.346810907125473, -0.3133050501346588, -0.12692096829414368...
def sparse _ segment _ sum _ v2 ( data, indices, segment _ ids, num _ segments = none, name = none ) : return sparse _ segment _ sum ( data, indices, segment _ ids, name = name, num _ segments = num _ segments )
[ -0.30519598722457886, -0.48058968782424927, 0.38085511326789856, 0.28602737188339233, 0.19401700794696808, -0.7148175835609436, 0.0994514673948288, 0.05847614258527756, 1.0136771202087402, 1.0936260223388672, -0.7886940836906433, 0.3552135229110718, 0.04325579106807709, -1.3357855081558228...
def _ _ init _ _ ( self, proportion = 1. 0, n _ neighbors = 5, *, nn _ params = none, ss _ params = none, n _ jobs = 1, random _ state = none, * * _ kwargs ) : ss _ params _ default = {'n _ dim': 2,'simplex _ sampling':'random ','within _ simplex _ sampling':'random ','gaussian _ component': none } ss _ params = coales...
[ 0.9342953562736511, 0.5566111207008362, 0.6879452466964722, 0.6395383477210999, -0.23093754053115845, -0.04772729426622391, -0.24935205280780792, 0.3006046414375305, 0.3162912130355835, -0.5012303590774536, -0.1493237167596817, -0.3864094316959381, 0.19968019425868988, 0.3583991527557373, ...
def render ( self, mode ='human') : if mode = ='rgb _ array': users _ vec = np. array ( [ u. embedding for uid, u in self. users. items ( ) ] ) items _ vec = np. array ( [ i. embedding for iid, i in self. items. items ( ) ] ) # build dimensionality reduction if dims > 2 if items _ vec. shape [ 1 ] > 2 : if not hasattr ...
[ 0.04591268673539162, -0.12713982164859772, 0.9583634734153748, -0.30619314312934875, -0.18505741655826569, 0.5379239320755005, 0.9458903074264526, -0.05953841656446457, 0.025902951136231422, -0.018467064946889877, 0.7975984215736389, 1.1758099794387817, 0.2761602997779846, -0.1655063778162...
def add _ account ( self, account _ name ) : if self. account _ exists ( account _ name ) : note = " add account rejected. an account named { } already exists " self. report ( note. format ( account _ name ) ) return false else : self. accounts [ account _ name ] = account ( account _ name ) note = " added an account n...
[ -0.38791629672050476, 0.802152156829834, 0.6223543286323547, -0.37473371624946594, 0.5551645159721375, 0.5367817282676697, 0.43992093205451965, 0.20823217928409576, 0.900648832321167, -0.23447991907596588, 0.0011653266847133636, -0.3987250328063965, -0.7601736187934875, 0.22462822496891022...
def compute _ rel _ obj _ diff ( prev _ obj _ value, cur _ obj _ value ) : return np. abs ( prev _ obj _ value - cur _ obj _ value ) / np. maximum ( np. finfo ( dtype = np. float64 ). eps, max ( np. abs ( prev _ obj _ value ), np. abs ( cur _ obj _ value ) ) )
[ 0.5550562739372253, -0.9626290202140808, 0.7676159739494324, 0.23181858658790588, -0.4116639792919159, 0.46151405572891235, 0.9217013716697693, -0.04145313426852226, -0.3255338966846466, 0.17556755244731903, 0.7826684713363647, 0.7417758703231812, -0.10111796110868454, -0.7133074402809143,...
def onaddbuttonclicked ( self ) : filename = self. _ view. getmodelloadedfile ( ) self. _ pandacontroller. addentityfromfile ( filename )
[ 0.566642165184021, -0.5127260088920593, 0.37355589866638184, -0.33747708797454834, 0.9282666444778442, 1.5328881740570068, 0.15688160061836243, -0.287355899810791, -0.6199586987495422, -1.2010526657104492, -0.006160765420645475, -0.4327363073825836, 0.8233914375305176, 0.0685349777340889, ...
def _ _ rpow _ _ ( self, other ) : return _ create _ and _ connect _ node ( " pow ", other, self )
[ -0.47439518570899963, 0.029228923842310905, 0.7787274122238159, 0.5900519490242004, -0.07222378253936768, -0.10931868106126785, -0.40279728174209595, -0.7558920383453369, 0.08932015299797058, 0.15832480788230896, -0.0945233702659607, -0.5736370086669922, -0.42663800716400146, -0.1688888818...
def encode _ params _ utf8 ( params ) : encoded = [ ] for k, v in params : encoded. append ( ( k. encode ('utf - 8') if isinstance ( k, unicode _ type ) else k, v. encode ('utf - 8') if isinstance ( v, unicode _ type ) else v ) ) return encoded
[ -1.0696698427200317, -0.3508775532245636, 0.12947550415992737, 0.7071726322174072, 0.6439074277877808, 0.10046590119600296, -0.6158903241157532, 0.14702244102954865, -0.224193274974823, 1.6934776306152344, 0.08108081668615341, -0.2927021086215973, -0.7017707824707031, 1.4205490350723267, ...
def load _ config _ file ( path = " conf / citiroc _ sc _ profile1. txt ", febs = [ ] ) : # we need a list of febs, if only one is given, # generate a list witha single element if type ( febs ) = = int : febs = [ febs ] # use all connected febs if the given list is empty if not len ( febs ) : febs = _ configs. keys ( )...
[ -0.12473554164171219, 0.1739310771226883, 0.32783403992652893, 0.8599320650100708, -0.0848991721868515, 0.3161744475364685, 0.06348731368780136, 0.28768524527549744, -0.8153143525123596, 0.36448678374290466, -0.8923177719116211, 0.04657544195652008, -1.009207010269165, 0.22581495344638824,...
def manhattan _ distance ( params ) : current, target, solution = params if not solution : return - 100 dist = abs ( target [ 0 ] - current [ 0 ] ) + abs ( target [ 1 ] - current [ 1 ] ) target _ reached = dist = = 0 return - dist + ( 100 * target _ reached )
[ -1.2050668001174927, -0.6865726113319397, 0.6483548283576965, 0.23536719381809235, 0.2683655321598053, 0.32542556524276733, -0.33630847930908203, 0.0745232105255127, -0.34185221791267395, 0.9503843784332275, 0.5203519463539124, 0.3439275324344635, 0.29158714413642883, -0.005296050570905209...
def setallowedtics ( self, allowed ) : self. allowed _ tics = allowed
[ 0.3526255488395691, 0.05939163640141487, 0.07573802769184113, -0.31227222084999084, -0.8146879076957703, 1.0374901294708252, 1.1618191003799438, -0.6120586395263672, -0.2525108754634857, 0.16848447918891907, 0.016640454530715942, 0.3839518427848816, -0.9179247617721558, -0.7890653014183044...
async def showing _ dictionaries ( message : message ) : user _ id = message. from _ user. id # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # database queries # select _ dictionaries = await db. select _ dictionaries ( use...
[ -0.00604982441291213, -0.11831136047840118, 0.9306591153144836, -0.4387652575969696, -1.0434699058532715, 0.19775231182575226, 1.1175334453582764, 0.29865965247154236, -0.2850278913974762, 0.8919495344161987, -0.4942913353443146, 0.3896063566207886, 0.34259459376335144, 0.6733312010765076,...
def getsettings ( self, table ) : self. logger. debug ( " entering getsettings " ) cursor = self. conn. cursor ( ) cursor. execute ( " select * from % s " % ( table ) ) results = cursor. fetchall ( ) settings = { } for row in results : settings [ row [ " key " ] ] = row [ " value " ] return settings
[ -1.1139971017837524, 0.4637971818447113, 0.3971441090106964, 0.9434424042701721, -0.6280420422554016, -0.671918511390686, -0.5741117000579834, -0.9077922105789185, -1.009732961654663, 1.156933069229126, -0.4939878284931183, -0.9808576107025146, -0.28232651948928833, 0.36779817938804626, ...
def log _ exception ( logger ) : def decorator ( func ) : def wrapper ( * args, * * kwargs ) : try : return func ( * args, * * kwargs ) except : # log the exception err = " there was an exception in " err + = func. _ _ name _ _ logger. exception ( err ) # re - raise the exception raise return wrapper return decorator
[ -0.2569960057735443, 0.027583623304963112, 0.5933245420455933, -0.384427011013031, -0.3927779495716095, -0.49890825152397156, -0.8059235215187073, 0.9130346775054932, 0.6981094479560852, 0.32807525992393494, 0.18186987936496735, 0.1082461029291153, 0.18665404617786407, 0.3430274426937103, ...
def read _ var ( self, ncvar ) : ncf = dataset ( self. fname ) dat = ncf. variables [ ncvar ] [ : ] ncf. close ( ) return dat
[ -0.8061926364898682, -0.3848712742328644, 0.4428138732910156, -0.670832097530365, -0.33960625529289246, 0.8418050408363342, -0.4543711543083191, -1.3132152557373047, -0.6438783407211304, -0.2861829102039337, 0.1639356017112732, 0.7906259894371033, -0.3855803310871124, -0.7159208655357361, ...
def contact _ center ( self, contact _ center ) : self. _ contact _ center = contact _ center
[ -0.24938440322875977, -1.3654475212097168, 0.01590096391737461, 0.28792765736579895, -0.33866938948631287, 0.7432457208633423, 0.4471510946750641, 0.6551685929298401, 0.09220042824745178, 0.510959804058075, -0.2627997100353241, -0.5403895974159241, 0.37402379512786865, 0.09281828254461288,...
def nball _ volume ( r, k = 3 ) : return ( np. pi * * ( k / 2. 0 ) / gamma ( k / 2. 0 + 1. 0 ) ) * r * * k
[ 0.7601423859596252, -0.38757917284965515, 0.4663519561290741, -0.036271099001169205, -0.5110501646995544, 0.2107420414686203, -0.6145995855331421, -0.5138917565345764, -0.1152876764535904, 0.6746312379837036, 0.02094118297100067, -0.4526480734348297, -0.1399589478969574, 0.2501570582389831...
def getobjecttime ( timestamp ) : return dateutil. parser. parse ( timestamp )
[ -0.32160457968711853, -0.1856783777475357, 0.714927077293396, -0.024860206991434097, 0.14034107327461243, -0.3709932565689087, -0.8469234704971313, -0.9438982605934143, 1.0764111280441284, 0.003859641496092081, -0.779399573802948, -0.5225280523300171, 0.8169612884521484, -2.124083995819092...
def calculate _ adjacency _ matrix ( branches, index _ set _ branch, index _ set _ bus ) : _ len _ bus = len ( index _ set _ bus ) _ mapping _ bus = { i : index _ set _ bus [ i ] for i in list ( range ( 0, _ len _ bus ) ) } _ len _ branch = len ( index _ set _ branch ) _ mapping _ branch = { i : index _ set _ branch [ ...
[ -1.0728809833526611, -0.3269834518432617, 0.7147781252861023, -0.04271916300058365, -0.4036375880241394, -0.3138768672943115, 0.8146843910217285, 0.3901151120662689, -0.08027805387973785, -0.004048479255288839, 0.6907322406768799, 0.4794125258922577, -0.5540497303009033, -0.446591943502426...
def get _ point _ info ( self, pt ) : if not self. getrect ( ). contains ( pt ) : return none x, y = pt r, i = self. compute. coords _ from _ pixel ( x, y ) if self. compute. pix is not none : rgb = self. compute. pix [ y, x ] color = " # % 02x % 02x % 02x " % ( rgb [ 0 ], rgb [ 1 ], rgb [ 2 ] ) else : color = none cou...
[ -0.12428469955921173, -0.10749881714582443, 0.5631974339485168, -0.9457889795303345, -0.5676387548446655, -0.11786165088415146, 0.16074028611183167, -1.0231728553771973, -0.5266268849372864, 0.06125492975115776, -0.2776538133621216, -0.20570148527622223, 0.37566423416137695, 0.245976492762...
def save _ verifier ( self, token, verifier, request ) : raise notimplementederror ( " subclasses must implement this function. " )
[ -0.4381325840950012, -0.8734468221664429, 0.49134397506713867, 0.6612998247146606, 0.6235517263412476, 0.370708167552948, -0.4089204668998718, 0.010454148054122925, -0.2948404848575592, -0.2641884386539459, -2.4074935913085938, 0.24005970358848572, -0.4544941484928131, 0.6334540247917175, ...
def _ key ( self, * parts ) : key = [ self. namespace ] for part in parts : key. append ( str ( part ) ) return " / ". join ( key ). encode ( self. encoding )
[ -0.5042126178741455, -0.1250835359096527, 0.30919235944747925, -0.4269205629825592, -0.2833051085472107, 0.5434888005256653, -1.1639915704727173, -1.028366208076477, -0.0004202828567940742, 0.617704451084137, 0.028609570115804672, -0.5950329303741455, -0.8914199471473694, -0.22909736633300...
def test _ create _ directed _ edge ( self ) : v0 = directedvertex ( ) v1 = directedvertex ( ) e00 = directededge ( ( v0, v0 ), attrs = {'weight': 5, 0 : 1 } ) e01 = directededge ( ( v0, v1 ) ) self. assertequal ( e00. v _ from, v0 ) self. assertequal ( e00. v _ to, v0 ) self. assertequal ( e00. attrs, {'weight': 5, 0 ...
[ -0.10831386595964432, -0.6311318874359131, 0.35492071509361267, -0.37868332862854004, 0.4166052043437958, 1.2627249956130981, 0.1652192324399948, 0.29920339584350586, -0.37652599811553955, -0.7357814908027649, -0.4895710051059723, -0.14959613978862762, 0.13721056282520294, 0.08130633085966...
def crossreference ( self, melname ) : factories. apitomeldata [ ( self. classname, melname ) ] = self. data
[ -0.9370750188827515, -0.3057718575000763, 0.460541307926178, -1.159380316734314, -0.24338887631893158, 0.8960661888122559, -0.6635662317276001, -0.03504446893930435, 0.5277173519134521, -0.0466889962553978, -0.39643117785453796, 0.6833330988883972, -0.5027835369110107, 0.43699049949645996,...
def _ sort _ candidates ( self ) : if isinstance ( self. _ picked _ candidates, dict ) : for pool, candidates in self. _ picked _ candidates. iteritems ( ) : sorted _ candidates = self. _ _ sort _ candidate _ list ( candidates ) self. _ picked _ candidates [ pool ] = sorted _ candidates else : self. _ picked _ candidat...
[ -0.7282169461250305, -0.9260498881340027, 0.36763864755630493, -0.06498046964406967, -0.6221957206726074, 0.33357253670692444, 1.0252389907836914, -0.09703518450260162, -0.4844314157962799, -0.1474698781967163, 0.14321012794971466, 0.44094741344451904, -0.12443890422582626, 0.6016935706138...
def unit _ of _ measurement ( self ) : return self. var _ units
[ -0.36274513602256775, -0.30674219131469727, 0.5018791556358337, -0.2781974673271179, 0.8155380487442017, -0.26496678590774536, 0.2962990403175354, -0.11528760194778442, 0.7967864274978638, -0.6919679641723633, 0.1029297411441803, 0.26873117685317993, -0.5194756984710693, 0.0812173262238502...
def fold _ in _ large ( self, folded _ branch, fold _ onto _ branch, fold _ direction ) : # adding the intersections with the folded branch to fold _ onto _ branch.. self. append _ in _ large ( branch, fold _ onto _ branch, branch, folded _ branch ) #... and also the left - or rightmost interval at a switch lg _ sw = s...
[ -0.06972363591194153, 0.3094021677970886, 0.7649350762367249, 0.14388900995254517, -0.5379214286804199, 0.36214858293533325, -0.07506504654884338, 1.302619218826294, 0.47406870126724243, 0.16100755333900452, -0.5399283170700073, -0.3948597311973572, 0.020487533882260323, 0.9042865037918091...
def nslits ( self ) : return self. slitid. size
[ 0.737768828868866, 0.5004962682723999, 0.20443467795848846, -1.564489722251892, -0.9755452275276184, 0.28515195846557617, 0.021584540605545044, -0.11283208429813385, 0.7805248498916626, -1.2510788440704346, -0.3630298972129822, 0.6375331282615662, -0.2569151818752289, 0.8378303647041321, ...
def parse _ arguments ( self ) : parser = argparse. argumentparser ( ) parser. add _ argument ('filepath ', help ='file name of text to summarize') parser. add _ argument ('- l ','- - length ', default = 7, help ='number of sentences to return') return parser. parse _ args ( )
[ 0.6083034873008728, 0.4899158179759979, 0.5800880193710327, -1.1515862941741943, 0.4505015015602112, 0.1707693487405777, -0.25536274909973145, 0.9261199831962585, -0.42440617084503174, 0.6129886507987976, 0.26558738946914673, -0.66790372133255, -0.48244422674179077, 0.674903929233551, -0...
def _ _ init _ _ ( self, host ='', port = lmtp _ port, local _ hostname = none, source _ address = none ) : smtp. _ _ init _ _ ( self, host, port, local _ hostname = local _ hostname, source _ address = source _ address )
[ 0.45192837715148926, -0.0354728028178215, 0.575893223285675, -0.38408350944519043, -0.5793420672416687, -0.6768779754638672, -0.5717772245407104, 1.2654401063919067, 0.019322356209158897, -0.1686599999666214, -1.2246099710464478, 1.0199602842330933, -0.0010016988962888718, 0.17119184136390...
def import _ csv ( self, row, session ) : # check dataframe # create a temporary dataframe containing only not null values tmpdf = self. df. iloc [ row, list ( self. c2smap. values ( ) ) ]. dropna ( ) ncols = tmpdf. size # iterate on keys from tmp table and add them to the sample table s = sample ( ) for col in tmpdf. ...
[ -0.2723477780818939, -0.32304897904396057, 0.6752640008926392, 0.3595309853553772, -0.6436749696731567, -0.4155987501144409, 0.7601021528244019, -0.052175071090459824, 0.14530904591083527, 0.3956760764122009, -0.42134904861450195, 0.3076079785823822, 0.38523977994918823, 0.1647648811340332...
async def test _ step _ user _ connection _ error ( hass : homeassistant ) - > none : with patch ( " pynina. baseapi. baseapi. _ makerequest ", side _ effect = apierror ( " could not connect to api " ), ) : result : dict [ str, any ] = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : ...
[ -0.9859633445739746, 0.33383676409721375, 0.3435266613960266, 0.2949220836162567, 0.2961827516555786, 0.2220425009727478, 0.09867353737354279, 0.14569875597953796, 0.07335654646158218, -0.5275334715843201, -0.7346696257591248, 0.08224775642156601, 0.39252614974975586, 0.06559652835130692, ...
def wrap ( s, n = 80 ) : res = [ ] if len ( s ) > n : num = int ( len ( s ) / n ) for i in range ( num ) : res. append ( s [ i * n : ( i + 1 ) * n ] ) res. append ( s [ num * n : ] ) return " \ t \ n ". join ( res ) else : return s
[ -0.9523740410804749, 0.8351004719734192, 0.3636890947818756, -0.08992322534322739, -1.1670184135437012, -0.13247524201869965, -0.23466503620147705, -0.37159183621406555, 0.6462650299072266, -0.0393071286380291, 0.28320565819740295, 0.3182227909564972, 1.0278888940811157, -0.190728470683097...