text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ file _ name ( mode, parent, title, url, filters, suffix = none, dflt _ filter = none ) : dlg = q. qfiledialog ( parent ) urls = [ ] urls. append ( q. qdir. homepath ( ) ) urls. append ( osp. dirname ( q. qapplication. arguments ( ) [ 0 ] ) ) dlg. setsidebarurls ( [ q. qurl. fromlocalfile ( i ) for i in urls ]...
[ 0.3154377043247223, -0.3174988031387329, 0.9080960750579834, -0.662010669708252, -0.9816346168518066, 0.06821159273386002, 0.31451767683029175, 0.39836403727531433, -0.4740354120731354, -0.1326170265674591, -0.16397155821323395, -0.0008783183875493705, 0.24723273515701294, 0.38188523054122...
def mle ( self, y, param ='p') : if param = ='p': return y. mean ( ) else : raise valueerror ('param must be " p ".')
[ -0.6131229400634766, 0.30784207582473755, 0.3979444205760956, 0.4001903533935547, 0.35244861245155334, 0.6417065262794495, -0.1553584635257721, -0.3649013638496399, 0.3281041383743286, 0.8199559450149536, 0.2318814992904663, 0.3353516757488251, -0.5633371472358704, 0.7809432744979858, -0...
def log _ power _ spherical _ density ( x, mu, k ) : dim = x. shape [ 1 ] alpha = ( dim - 1 ) / 2 + k beta = ( dim - 1 ) / 2 log _ normalizer = - ( ( alpha + beta ) * math. log ( 2 ) + torch. lgamma ( alpha ) - torch. lgamma ( alpha + beta ) + beta * math. log ( math. pi ) ) return log _ normalizer + k * torch. log1p (...
[ 0.6050046682357788, -0.7017896175384521, 0.7794284224510193, -0.2651701867580414, -1.4555628299713135, 0.13029949367046356, -1.3681166172027588, 0.9611720442771912, 0.005832615774124861, -0.11954180151224136, 0.6271162033081055, 0.3672444820404053, 0.18286672234535217, -0.4369359016418457,...
def degree ( self ) : return self. _ cache. degree ( )
[ 0.03756878525018692, 0.4213222563266754, 0.37942981719970703, 0.8014729619026184, -0.4071359634399414, 0.7052634358406067, 0.567916989326477, 0.506177544593811, 0.49624139070510864, -0.3938990831375122, -0.040871381759643555, 0.6042534112930298, -0.40640532970428467, -0.34165364503860474, ...
def full _ train ( n _ epochs = 100, batch _ size = 200, save _ prefix = none ) : # load initial data print " loading data... " data = load _ data ( ) # estimate the gps clusters print " estimating clusters... " clusters = get _ clusters ( data. train _ labels ) # set up callbacks callbacks = [ ] if save _ prefix is no...
[ 0.045919932425022125, 0.4762466549873352, 0.7961350679397583, 0.9404889345169067, 0.3747401237487793, -0.3166292607784271, -0.04439852386713028, 0.23209834098815918, 0.03885262459516525, 0.19697126746177673, -0.36323994398117065, 0.17416700720787048, 0.37730586528778076, -0.329490631818771...
def profile ( method ) : def profiled ( * args, * * kwargs ) : logger = get _ logger ( method. _ _ module _ _ ) if logger. isenabledfor ( system _ logging. debug ) : msg = " { 0 }... ". format ( method. _ _ name _ _ ) logger. debug ( msg ) temp _ start _ time = time. time ( ) result = method ( * args, * * kwargs ) end ...
[ 0.4670340120792389, 0.34453141689300537, 1.0457173585891724, -0.0646485835313797, -0.07610248774290085, -0.7252916693687439, 0.49966371059417725, -0.7676628232002258, 0.3312321603298187, 0.5736078023910522, -0.12297235429286957, 0.557940661907196, 0.025504205375909805, 1.0442579984664917, ...
def add ( self, elm : union [ object, source, lumpedelement, detector, boundary ] ) : elm. _ register _ grid ( self ) if isinstance ( elm, object ) : self. objects. append ( elm ) elif isinstance ( elm, source ) : self. sources. append ( elm ) elif isinstance ( elm, lumpedelement ) : self. lumped _ elements. append ( e...
[ -0.48429352045059204, 0.3375098705291748, 0.748961865901947, 0.8176805973052979, 0.8200775980949402, 0.6829036474227905, -0.363426148891449, 0.2659981846809387, 0.7321118116378784, -0.6202935576438904, -0.7226818203926086, 0.9280209541320801, -0.18393278121948242, 0.9375333786010742, 0.4...
def is _ timed _ out ( self ) : if time. time ( ) - start _ time > 45 : self. timed _ out = true return true return false
[ 0.18344873189926147, 0.606456995010376, 0.4133641719818115, -0.30752676725387573, -0.4530585706233978, 1.010634422302246, 0.07702134549617767, 0.19455604255199432, -0.49815863370895386, 0.02835286408662796, -0.6655735969543457, 0.5202478766441345, -0.5577635765075684, 0.23667795956134796, ...
def field ( self, field ) : shape = ( self. nrepeats. max ( ), ) + self. shape field3d = np. full ( shape, - 999. 9 ) # value should be overwritten below field3d = field3d. tolist ( ) # lists leave none as none, as opposed to a float ndarray. # and tabulate uses none to identify'missingval '. # so we stick with lists h...
[ 0.2963392734527588, 0.4689013659954071, 0.4407411813735962, -0.5083768367767334, 0.11087729781866074, -0.09643805027008057, -0.18314078450202942, -0.4143325984477997, 0.3201439380645752, 0.08175697922706604, 0.193544402718544, 0.029796887189149857, -0.5958375930786133, -0.2802649438381195,...
def encode ( self, message ) : buffer = base64. b64encode ( message. encode ('utf - 8') ) return b " % " + buffer + b " $ "
[ 0.4660349190235138, 0.37284576892852783, 0.4706936776638031, 0.9711767435073853, -0.16591620445251465, 0.5735242962837219, -0.5117074251174927, -0.07094715535640717, 0.01897207647562027, 0.5356915593147278, 0.8155470490455627, 0.3167416453361511, -1.5128685235977173, 0.5696577429771423, ...
def _ _ str _ _ ( self ) : return'token ( { type }, { value } ) '. format ( type = self. type, value = repr ( self. value ) )
[ -0.671032726764679, -1.6941161155700684, 0.48830267786979675, -1.0501863956451416, -0.4872410297393799, 0.16564227640628815, -0.30376967787742615, -0.08421999961137772, 0.09952392429113388, -0.3058333396911621, 0.5346530079841614, 1.5240217447280884, 0.6287437677383423, -0.4600505828857422...
def create _ price _ info _ table ( self, symbol, start, end ) : for i in range ( start, end + 1 ) : table _ name = " price _ of _ { } _ { } ". format ( symbol, i ) sql = " create table if not exists { } ". format ( table _ name ) sql + = " ( price double, amount double, volume double, time bigint ( 8 ) unsigned, prima...
[ -0.2819632589817047, 0.11300381273031235, 0.5442599654197693, 0.4821503162384033, 0.793129563331604, -0.12241831421852112, 0.3974266052246094, -0.8089408278465271, -1.598374843597412, 0.954626739025116, -0.14054344594478607, -0.40134429931640625, 0.4522477984428406, 0.5469899773597717, 0...
def choose ( bot, msg, choose _ string ) : choose _ string = util. flatten _ incoming _ text ( bot, choose _ string, flatten _ notice = false ) success, choose _ list = _ parse _ shuffle _ set ( bot, choose _ string ) if not success : bot. reply ('\ n '. join ( choose _ list ) ) return bot. reply ( " { } ". format ( ra...
[ -0.23976394534111023, 0.6389943361282349, 0.4024885594844818, -0.4655158817768097, -0.07361915707588196, 0.06582938879728317, -0.17129598557949066, -0.32519447803497314, 0.24239249527454376, -0.21620018780231476, 0.0074019362218678, 0.93312007188797, -1.139441967010498, -0.2089096903800964...
def command _ ban ( self, bot : bot, update : update ) - > none : if not self. _ is _ admin ( bot, update. message. from _ user. id ) : bot. send _ message ( chat _ id = update. message. chat. id, text = messages. unauthorized, parse _ mode = " html ", reply _ to _ message _ id = update. message. message _ id, ) return...
[ -0.5319374203681946, -0.4386378824710846, 0.8530269265174866, 0.5321813821792603, -0.05603773519396782, 0.2780415713787079, 0.26395201683044434, -0.2849067747592926, -0.37457042932510376, 0.2609877586364746, 0.3763652741909027, 1.3199528455734253, -0.6764817833900452, -0.4608421325683594, ...
def setaccumulationcycletime ( time ) : return none
[ 0.29522374272346497, -0.1958039402961731, 0.5943871140480042, 0.20461466908454895, 0.22426369786262512, 0.6019469499588013, 0.9240806102752686, -0.5353510975837708, 0.1506454050540924, 0.22787430882453918, -0.18928202986717224, 0.5372005701065063, 0.8256150484085083, 1.0512707233428955, ...
async def async _ set _ native _ value ( self, value : float ) - > none : await self. entity _ description. command ( self. coordinator. api, self. entity _ description. key, value ) await self. coordinator. async _ request _ refresh ( )
[ -0.29170718789100647, 0.7011972665786743, 0.4239880442619324, -0.1557682901620865, -0.05459210276603699, 0.27404773235321045, -0.901577353477478, -0.7479174137115479, -0.9446932077407837, 0.6130963563919067, 0.5431729555130005, 0.6562842130661011, 0.20154070854187012, 0.7057945132255554, ...
async def test _ process _ callback ( self ) : xknx = xknx ( ) after _ update _ callback = asyncmock ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", group _ address = " 1 / 2 / 3 ", value _ type = " temperature " ) expose _ sensor. register _ device _ updated _ cb ( after _ update _ callback ) await expose _...
[ 0.4967995882034302, 0.979480504989624, 0.6247196793556213, 0.21021388471126556, 0.014760170131921768, 0.138742595911026, 0.09461168944835663, 0.2065940499305725, 0.9123623371124268, 0.25324562191963196, -0.0445525236427784, -0.16164974868297577, -0.23585110902786255, 0.26658663153648376, ...
def fetch _ statistics ( self, deadline = 10 ) : _ validatedeadline ( deadline ) rpc = create _ rpc ( deadline ) self. fetch _ statistics _ async ( rpc ) return rpc. get _ result ( )
[ -0.09752574563026428, 1.0638636350631714, 0.5894581079483032, 0.6672629117965698, 0.2554006576538086, 0.268235445022583, -1.1009752750396729, -0.9623162150382996, 0.14156274497509003, -0.31435126066207886, -0.03799673542380333, -0.04411899298429489, -0.062002915889024734, -0.42724397778511...
def _ _ scale _ to _ radius ( self, img ) : x = img [ img. shape [ 0 ] / / 2, :, : ]. sum ( 1 ) r = ( x > x. mean ( ) / 10 ). sum ( ) / 2 scale _ factor = float ( self. radius ) / r return cv2. resize ( img, ( 0, 0 ), fx = scale _ factor, fy = scale _ factor ), scale _ factor
[ -0.5670679807662964, -0.2213614135980606, 0.7412452697753906, -0.9682056903839111, -0.04548384249210358, -0.35871315002441406, 0.021853454411029816, -0.48619645833969116, -0.16767951846122742, 1.4421738386154175, 0.19829526543617249, 0.1580105572938919, 0.12649744749069214, 0.7262624502182...
def device _ state _ attributes ( self ) : attrs = { } attrs ['battery'] ='{ } % '. format ( self. _ airqualitymonitor. status ( ). battery ) attrs ['usb power'] ='on'if self. _ airqualitymonitor. status ( ). usb _ power else'off'return attrs
[ -0.7973490953445435, -0.5901387929916382, 0.42250949144363403, -0.07456889003515244, -0.5116952061653137, 0.2917938530445099, -0.39455533027648926, 0.17763027548789978, -0.435992032289505, -0.13184942305088043, -0.36097514629364014, -0.4269062280654907, 0.39203670620918274, 0.4208713769912...
def add ( self, child ) : self. children. append ( child ) child. parent = self # process tags # first, collect all fo the tags of the child including its own. tags _ to _ process = dict ( ( key, child. tagged _ containers [ key ] ) for key in child. tagged _ containers. keys ( ) ) if child. tag is not none : tags _ to...
[ 0.4916074872016907, 0.31576067209243774, 0.8883609771728516, -0.25919076800346375, -0.4733082354068756, -0.14632755517959595, 0.7161581516265869, -0.8765484690666199, -0.02899014949798584, -1.3546892404556274, -0.9361825585365295, -0.2906479835510254, 0.3823550343513489, 0.1920415610074997...
def teardown ( self ) : db. session. rollback ( )
[ 1.0300740003585815, -0.019555186852812767, 0.4658117890357971, -0.46504002809524536, 1.0761524438858032, 0.39602425694465637, 1.584749460220337, 0.6574591994285583, 0.6843608617782593, 0.0712207555770874, 0.8028147220611572, 0.1937798708677292, -0.5011807084083557, -1.020398736000061, -0...
def get _ city _ name ( mascot ) : team _ url = " http : / / www. nba. com / teams / " + mascot. lower ( ) # to make sure its lowercase print ( team _ url ) response = requests. get ( team _ url ) if response. status _ code = = 404 : print ( " for the team ", team, " there was a problem with getting the page " ) print ...
[ 0.27426040172576904, 0.43533992767333984, 0.5977013111114502, -0.47496938705444336, -0.5461368560791016, -0.12348092347383499, -0.7119370698928833, 0.21747832000255585, 0.2676774859428406, 0.23004509508609772, 0.23950538039207458, -0.1676320731639862, 0.35360005497932434, -0.33604121208190...
def mcgroupcountstep ( self ) : if self. force _ auto _ sync : self. get ('mcgroupcountstep') return self. _ mcgroupcountstep
[ -0.2925390601158142, 0.4500315487384796, 0.4207361042499542, 0.7940893769264221, -0.38233014941215515, 0.19057609140872955, 1.236863374710083, -0.017174817621707916, -0.9318453669548035, -0.5814083218574524, -0.8027418255805969, 0.24873001873493195, -0.5340297818183899, 0.4909663498401642,...
def generate _ plot ( ls ) : fig = plt. figure ( ) ax = fig. add _ subplot ( 111 ) numbins = 25 ax. hist ( ls, numbins, color ='green ', alpha = 0. 8 ) plt. show ( )
[ 0.7683154940605164, 0.9444402456283569, 0.5125951170921326, -0.5764262080192566, -0.055447325110435486, 0.7725670337677002, 0.653239905834198, 1.1751729249954224, 0.3498706519603729, -1.0041905641555786, -0.5080859661102295, 1.0399625301361084, 0.8782150745391846, 0.8187291622161865, 0.4...
def test _ saved _ title ( self ) : report _ airflow _ variable = variable. get ( " rb _ status _ " + self. report _ form _ sample. report _ title. data, deserialize _ json = true, ) self. assertequal ( self. report _ form _ sample. report _ title. data, report _ airflow _ variable [ " report _ title " ], )
[ 0.8587017059326172, -0.18073977530002594, 0.36689674854278564, -0.38810232281684875, 0.9938768744468689, -0.1894693225622177, -0.703196108341217, -0.5310590863227844, 0.509208083152771, -0.4058336019515991, -0.974449872970581, 0.08894950151443481, -0.6264369487762451, -0.6928927898406982, ...
def selection _ argsort ( arr ) : n = len ( arr ) indices = list ( range ( 0, n ) ) # for every position in the array for i in range ( 0, n - 1 ) : # find next smallest element imin = i for j in range ( i + 1, n ) : if arr [ indices [ j ] ] < arr [ indices [ imin ] ] : imin = j # put it in the correct position by swapp...
[ -1.2883541584014893, -0.8713774681091309, 0.6156371831893921, -0.15678703784942627, -0.9790955781936646, -0.16700154542922974, 1.0443905591964722, -0.6050764918327332, 0.9377990365028381, 1.0133877992630005, 0.0050829011015594006, -0.0029148291796445847, -0.022812431678175926, 0.3068054914...
def test _ devicemanager _ load _ json _ check _ services _ 01 ( device _ manager _ from _ data ) : dm = device _ manager _ from _ data assert dm. services = = { } # still empty # run scan ( ) should fill the services : dm. scan ( ) assert dm. services! = { }
[ -1.1403374671936035, 0.7387129664421082, 0.3337307870388031, -0.9768289923667908, -0.6263698935508728, 0.10098320990800858, -0.14078736305236816, -1.037057876586914, 0.4187126159667969, -1.4690996408462524, -0.016851933673024178, -0.31662365794181824, 0.08324218541383743, 0.582158863544464...
def test _ pos _ close ( self ) : self. client = testbaseclass. get _ new _ connection ( ) self. closeobject = self. client. close ( ) assert self. closeobject is none
[ -0.046276580542325974, -1.173771619796753, 0.4270366132259369, 0.08505447208881378, 0.01921164244413376, 0.7237532734870911, 0.45812341570854187, -0.8065690398216248, -0.9382434487342834, -0.6099181771278381, -0.04455215483903885, -0.8578587174415588, -1.2940845489501953, -0.09592273086309...
def test _ access _ denied ( self ) : cache = cache ( self. wsdir ) cache. set _ object ( " test ", 1, " data " ) os. chmod ( os. path. join ( self. wsdir, ". rosrepo ", " cache " ), 0 ) cache. set _ object ( " test ", 1, " changed " ) self. assertequal ( cache. get _ object ( " test ", 1 ), " changed " ) cache. reset ...
[ -0.22511129081249237, 0.11367107182741165, 0.857067346572876, -0.4271674156188965, 0.05610030144453049, -0.047232735902071, 0.9427258372306824, -0.7768834233283997, 0.21730898320674896, -0.5638352036476135, 0.2904808521270752, 1.002945899963379, 0.031941190361976624, 0.014289798215031624, ...
def wide _ resnet101 _ 2 ( pretrained = false, progress = true, * * kwargs ) : kwargs ['width _ per _ group'] = 64 * 2 return _ resnet ('wide _ resnet101 _ 2 ', bottleneck, [ 3, 4, 23, 3 ], pretrained, progress, * * kwargs )
[ -0.6886847615242004, 0.17917105555534363, 0.5806629657745361, 0.4263637065887451, -0.06001705303788185, -0.577360212802887, 0.059042446315288544, 0.6740297675132751, -0.3973681926727295, -0.5085742473602295, -0.5197826623916626, 0.34786778688430786, -0.01707419566810131, -0.297050982713699...
def generate _ haplotypes ( alphabet, lensequences, numsnp, numhaplotypes ) : snps = generate _ snps ( alphabet, numsnp ) snp _ positions = generate _ snp _ positions ( numsnp, lensequences ) snp _ combos = list ( product ( * snps ) ) base _ amplicon = [ choice ( alphabet ) for _ in range ( lensequences ) ] haplotypes ...
[ -0.489407479763031, -0.13845179975032806, 0.6756102442741394, 0.298646479845047, -0.3039868474006653, -0.002463284181430936, 0.2930259108543396, 0.637199342250824, 1.5667378902435303, 0.8746069073677063, -1.2042362689971924, -0.25535014271736145, -0.6450472474098206, -0.2288251519203186, ...
def showmenujson ( rest _ id ) : menuitems = session. query ( menuitem ). filter _ by ( restaurant _ id = rest _ id ). all ( ) for i in menuitems : i. price = sub ('\ $ ','', i. price ) return jsonify ( menuitems = [ i. serialize for i in menuitems ] )
[ -1.1190236806869507, -0.8611901998519897, 0.43392497301101685, 0.31566092371940613, -1.034592866897583, -1.0026401281356812, -1.0572073459625244, 0.20706966519355774, -0.2118288278579712, 0.6160332560539246, -0.9617248773574829, -0.11497484147548676, -0.21162445843219757, 0.700538873672485...
def observation _ model ( self, x : jaxarray ) - > jaxarray : raise notimplementederror
[ -0.7129098176956177, 0.04674464091658592, 0.6323397755622864, -0.13437287509441376, -0.3367292284965515, 0.6155827641487122, 0.04308357089757919, -0.5735859870910645, 0.07898221164941788, 0.6992743611335754, -0.0015499414876103401, -0.34105560183525085, 1.2729238271713257, -0.4237275421619...
def addsolver ( self, solver _ type = " small " ) : # todo : solver name convention needs major improvements name = " solver " + str ( len ( self. _ solvers ) + 1 ) + \ " _ " + str ( self. _ current _ day ) + ". 1 " if solver _ type = = " small " : self. _ solvers. append ( createsolver ( " small ", name, self. _ solve...
[ -1.354296088218689, 0.10542583465576172, 0.5259003639221191, 0.10960521548986435, 0.16045531630516052, 0.5881163477897644, -0.31330937147140503, -1.1730139255523682, 0.45228639245033264, -0.8355516791343689, -0.6958463191986084, -0.12101208418607712, -0.6615676283836365, 1.0585800409317017...
def uncapped _ flatprice _ goal _ reached ( chain, uncapped _ flatprice, preico _ funding _ goal, preico _ starts _ at, customer ) - > contract : time _ travel ( chain, preico _ starts _ at + 1 ) wei _ value = preico _ funding _ goal uncapped _ flatprice. transact ( { " from " : customer, " value " : wei _ value } ). b...
[ -1.0870174169540405, 0.04257183149456978, 0.41147878766059875, 1.1212587356567383, -0.7836257219314575, 0.19370785355567932, -0.5020992755889893, 0.1826930195093155, -0.7822872400283813, 0.4552112817764282, -0.13373349606990814, 0.47187671065330505, 0.08773767203092575, -0.7182714939117432...
def filename ( cls, name = " main ", nocache = false ) : fileobj = cls. file ( name, nocache ) return fileobj. name
[ -0.533105731010437, -0.3883037567138672, 0.5047539472579956, -0.20485074818134308, -1.4718064069747925, 0.25867894291877747, 0.7162274718284607, 0.1208655908703804, -0.7073001265525818, 0.16896431148052216, -0.21159200370311737, -0.5093362331390381, 0.6994960904121399, 0.4118557572364807, ...
def printe ( exception ) : print ( str ( exception ). strip ('\'' ) )
[ 1.4148865938186646, -0.3982085883617401, 0.49491673707962036, -0.9830725193023682, -0.09246166795492172, 0.5299345254898071, -0.8832335472106934, 0.6516958475112915, 0.016925396397709846, 0.6748997569084167, 0.5762093663215637, 1.3924591541290283, -0.4009101688861847, -0.4580495357513428, ...
def health _ check ( self ) : raise notimplementederror # pragma : no cover
[ 0.03109743818640709, -0.8019705414772034, 0.660054087638855, 0.7894526124000549, 0.4298708438873291, 1.7575690746307373, 0.18180832266807556, -0.05390625074505806, -0.1439620554447174, -0.5615531206130981, 0.7323560118675232, 0.6124258637428284, 0.5301293134689331, 0.3727872371673584, -0...
def plot _ cross _ correlation ( y, preds, fname, lag _ width = 80, figsize = ( 8, 6 ) ) : lag _ width = np. abs ( lag _ width ) if len ( y )! = len ( preds ) : raise valueerror ('len ( y )! = len ( preds )') lag _ vec = np. arange ( - lag _ width, lag _ width + 1 ) # cc _ vec = np. copy ( lag _ vec ) # # for i in rang...
[ 0.645535409450531, -0.38521018624305725, 0.8086640238761902, -0.09891191124916077, -0.3766518831253052, 0.09880568832159042, 0.7806478142738342, 0.902055561542511, -0.2351805865764618, 0.47813403606414795, 0.5493154525756836, 1.1758049726486206, 0.548693835735321, 0.34000489115715027, 0....
def echo ( update, context ) : update. message. reply _ text ( update. message. text )
[ 0.2879543900489807, -0.12165314704179764, 0.5319593548774719, -0.12760639190673828, -0.690680980682373, 0.1985752433538437, -1.3661003112792969, -0.3370555639266968, 0.17548446357250214, 0.3872084319591522, 0.4578617811203003, 1.100138783454895, -1.1916499137878418, -0.41046142578125, -2...
def get _ field ( field, line, splits ) : return line. split ( none, splits ) [ field ]
[ 0.2102670520544052, 0.21332068741321564, 0.2105896919965744, -0.3214033842086792, 0.20134329795837402, -0.8708996176719666, -0.7795624732971191, 0.3066342771053314, -0.7705509066581726, -0.7181733250617981, -0.28128841519355774, 0.24754361808300018, -0.4064798355102539, -1.473818302154541,...
def setmenu ( self, menu ) : print " amsnwindow. setmenu " pass
[ -0.2763988971710205, -0.40478771924972534, 0.2594064474105835, 1.3036381006240845, 0.042275432497262955, 0.2860850989818573, -0.5902640223503113, 0.5312145352363586, 1.0338261127471924, -1.072770118713379, -0.536760687828064, 0.8973685503005981, -0.786270797252655, 1.2128992080688477, -0...
def gettrfdata ( self, num : int = 10, turn _ num : int = 100 ) : lendata = torch. multinomial ( self. pi, num, true ) n = 0 # fixme ( huahuan ) : why here quantize the lendata to integer? maxlendata = int ( max ( lendata ) ) # sentence slected in trf _ data trfdata = torch. zeros ( [ num, maxlendata ], device = next (...
[ 0.43385183811187744, 0.09163732826709747, 0.641205906867981, -0.15192058682441711, 0.6505259275436401, -0.629632294178009, 0.033925727009773254, -0.06699058413505554, -0.020880386233329773, 0.1569468080997467, -0.4542708396911621, 0.5552558302879333, -0.2078428864479065, -0.370571106672287...
def _ _ init _ _ ( self, request _ adapter : requestadapter, path _ parameters : optional [ union [ dict [ str, any ], str ] ] = none ) - > none : super ( ). _ _ init _ _ ( request _ adapter, " { + baseurl } / users / { user % 2did } / calendars / { calendar % 2did } / calendarpermissions {? % 24top, % 24skip, % 24filt...
[ -0.4847339391708374, 0.425528347492218, 0.6082295775413513, 0.7565765380859375, -0.9036492109298706, -0.399932861328125, 0.35022133588790894, -0.6447283625602722, 0.16693077981472015, 0.033098530024290085, 0.9537885785102844, -0.14269302785396576, 0.0027652233839035034, -0.7040192484855652...
def projection ( img ) : # array to store projection value of each column img = cropimg ( img ) w = [ 0 ] * img. shape [ 1 ] # 一 # 一 上 加 , 大 的 一 的 for y in range ( img. shape [ 1 ] ) : for x in range ( img. shape [ 0 ] ) : w [ y ] = w [ y ] + img [ x ] [ y ] return max ( w )
[ -0.5989711284637451, 0.5137985348701477, 1.2026218175888062, 0.7787806391716003, -0.5361887216567993, -0.595136284828186, 0.6849713325500488, -0.15126658976078033, 0.46932440996170044, 1.152383804321289, 0.0883142501115799, -0.43362054228782654, -0.2587853670120239, 0.41418352723121643, ...
def prod _ of _ other _ nums ( num _ list ) : # edge cases : 0 or one elements. if num _ list = = [ ] : return [ ] elif len ( num _ list ) = = 1 : return [ 1 ] # build an array of products of nums before each item. start w / 1 # as there's nothing before the first item in the list. prod _ array = [ 1 ] current _ prod =...
[ -0.38788262009620667, 0.03096260502934456, 0.9573768973350525, 1.3960598707199097, 0.22171545028686523, 0.06059015542268753, 1.4901365041732788, -0.01788724958896637, 1.1941583156585693, 0.12074808776378632, -0.8904243111610413, 0.7559750080108643, -0.6255395412445068, 0.8580642342567444, ...
def read ( self, size = 1 ) : if not self. is _ open : raise serialutil. portnotopenerror # not checking if the config is ok, so will try to read from a possibly # empty queue if using the wrong baudrate, etc. this is deliberate. response = bytearray ( ) timeout _ obj = serialutil. timeout ( self. timeout ) while true ...
[ -0.4434133768081665, 0.2262057214975357, 0.7035039067268372, -0.017389751970767975, -0.46273818612098694, -0.24622513353824615, -0.06949058175086975, -0.8593196868896484, 0.5003827214241028, -0.46044284105300903, 0.5764865875244141, 0.44301164150238037, -1.1798609495162964, -0.756622850894...
async def completed _ games ( self, ctx : ctx, username : str = none ) : if username : user = self. bot. client. get _ user ( username = username ) else : session _ model = models. session. get _ by _ ctx ( ctx ) if not session _ model : await ctx. send ('you are not logged in, please specify a user.') return user = se...
[ -0.621877133846283, 0.40227335691452026, 0.7118561267852783, 0.6198172569274902, -0.10622904449701309, -0.029229387640953064, 0.16504359245300293, -0.41439858078956604, -0.06373271346092224, 0.32433632016181946, -0.5602714419364929, 0.2546166479587555, -0.22806720435619354, 0.4376800060272...
def _ dispatch _ without _ catching _ api _ errors ( self, request ) : # note that request. post is a magic variable that loads the data on # demand when you access it. for whatever reason, django's engine # might not read the post data. in this case, don't bother to generate # an error trigger an email to be sent to t...
[ -0.3613862693309784, -0.31200817227363586, 0.5991891622543335, -0.416618287563324, -0.4035487771034241, -0.0023347330279648304, -0.14460010826587677, -0.5403884053230286, -0.33547598123550415, -0.22598136961460114, 0.42330488562583923, -0.021798763424158096, 0.33004602789878845, -0.1712424...
def _ _ init _ _ ( self, lyrics ) : self. lyrics = lyrics
[ 0.058168187737464905, -0.08577200770378113, 0.12451492249965668, -0.24459797143936157, -0.7461718320846558, 0.3839726150035858, 0.5147643089294434, 0.4552619755268097, -0.10953043401241302, 0.008569236844778061, -0.10986396670341492, -0.23221158981323242, -0.5403457880020142, 0.66003894805...
def test _ corrupted ( self ) : os. makedirs ( os. path. join ( self. wsdir, ". rosrepo ", " cache " ) ) with open ( os. path. join ( self. wsdir, ". rosrepo ", " cache ", " broken1 " ), " w " ) as f : f. write ( " garbage " ) with open ( os. path. join ( self. wsdir, ". rosrepo ", " cache ", " broken2 " ), " wb " ) as...
[ -0.32944777607917786, -0.3073351979255676, 0.6903150081634521, -0.2018735557794571, 0.6689409613609314, 0.6998561024665833, 0.15389007329940796, -0.00835308525711298, -0.08225054293870926, 0.029490754008293152, -0.24085630476474762, -0.09334687888622284, -0.46344441175460815, -0.3755917251...
def listen _ func ( msgs, sock, agent ) : if agent = = none : agent _ id ='no agent'else : agent _ id = agent. id print str ( agent _ id ) +': begin listen _ func'while true : # the'data'which is received should be the pickled string # representation of a tuple. # the first element of the tuple should be the data title...
[ 0.8563718199729919, -0.7155120968818665, 0.6511483192443848, -1.1823650598526, 0.14209647476673126, -0.44071733951568604, 0.048241741955280304, -0.17202895879745483, -0.10055572539567947, 0.2581513822078705, -0.10041499882936478, 0.5333627462387085, -0.23459143936634064, 0.0633843094110488...
def find _ flight ( date, from _, to, return _, shortest ) : payload = {'v': 3,'datefrom': date,'dateto': date,'flyfrom': from _,'to': to,'affilid':'picky ','typeflight':'return'if return _ else'oneway ','sort':'duration'if shortest else'price'} if return _ : payload ['daysindestinationto'] = return _ payload ['daysind...
[ -0.7485631108283997, 0.16625328361988068, 0.8694769740104675, 0.6644542217254639, -0.26847538352012634, -0.1642092913389206, -0.4053318202495575, -0.5977733135223389, -1.1487661600112915, 0.026459982618689537, 0.20009122788906097, 0.4149813652038574, -0.17938460409641266, 0.061455305665731...
def get _ ampsettings ( self ) : expp = self. get _ 5gnr _ exppwr ( ) user = self. get _ 5gnr _ usermargin ( ) exta = self. get _ 5gnr _ extattn ( ) mixr = self. get _ 5gnr _ mixeroff ( ) return f'{ expp : 7. 3f }, { user : 7. 3f }, { exta : 7. 3f }, { mixr : 2d } '
[ -0.3602530360221863, -0.7282099723815918, 0.39041605591773987, -0.4279063642024994, -0.8840036392211914, -0.2629663646221161, -0.2054346352815628, -1.2256842851638794, 0.025543618947267532, 1.0153954029083252, 0.25512880086898804, 0.48048678040504456, -0.6855846047401428, 0.352756649255752...
def show ( self, req, tenant _ id, id ) : context = req. environ [ wsgi. context _ key ] volume _ type = models. volumetype. load ( id, context = context ) return wsgi. result ( views. volumetypeview ( volume _ type, req ). data ( ), 200 )
[ 0.1214054599404335, -0.6662418246269226, 0.42183876037597656, -0.11026721447706223, 0.4911344349384308, -0.7330169677734375, -0.7072981595993042, -0.06181475520133972, 0.31544122099876404, 0.49832624197006226, 0.5904293060302734, 1.4880732297897339, -0.30815085768699646, 0.2731695771217346...
def dfs ( self, starting _ vertex, destination _ vertex ) : stack = [ [ starting _ vertex ] ] visited = [ false for x in range ( len ( self. vertices ) ) ] while len ( stack ) > 0 : path = stack. pop ( - 1 ) v = path [ - 1 ] if not visited [ v - 1 ] : visited [ v - 1 ] = true if v = = destination _ vertex : return path...
[ 0.08111181855201721, 0.7061238884925842, 0.7592921257019043, 0.5608261823654175, -0.5736489295959473, -0.025565627962350845, 0.5078188180923462, -0.7319653034210205, -0.4719695448875427, 0.7928014397621155, 0.5490947365760803, 0.7591259479522705, -0.283452570438385, -0.5745719075202942, ...
def add _ monitor ( description, stock _ icon ) : if not monitors : box. show ( ) monitor = progressmonitor ( description, stock _ icon ) box. pack _ start ( monitor, false, false, 0 ) monitors. append ( monitor ) return monitor
[ -0.38264337182044983, 0.7374297976493835, 0.4656572937965393, 0.0007061617798171937, 0.5465707182884216, 0.1722363382577896, -0.6180968284606934, -0.7892571091651917, 0.8984550833702087, -1.3518016338348389, 0.3509528934955597, -0.23270201683044434, -1.4589544534683228, 0.6785009503364563,...
def printforces ( self ) : for force in self. _ forces : print ( force. getdescription ( ) )
[ 0.44838404655456543, -0.5392606258392334, 0.5234678983688354, -0.2027534544467926, 1.5201103687286377, -0.08312290161848068, -0.6350569725036621, -0.8681788444519043, -0.7674421668052673, -1.089655876159668, 0.6046046018600464, 0.8504727482795715, -0.36426326632499695, 1.3279601335525513, ...
def single _ post ( post _ id ) : post _ d = mongo. db. posts. find _ one ( post _ id ) if post _ d is none : abort ( 404 ) post = post ( bson = post _ d ) return jsonify ( * * post. to _ dict ( ) )
[ -0.14641253650188446, 0.13417524099349976, 0.54974365234375, 0.480331689119339, 0.4802262783050537, -0.03945467248558998, -0.2981618344783783, 0.3240147829055786, 0.19761553406715393, 0.021321328356862068, -0.3237192928791046, 0.11467994004487991, 0.1010790467262268, 0.3837912976741791, ...
def fit ( self, data, weights = none ) : # sets self. data super ( ). fit ( data, weights ) return self
[ 0.6786922812461853, 0.20357707142829895, 0.19421027600765228, 0.4966946244239807, -0.03406220301985741, 0.21924255788326263, -0.6054915189743042, 0.1767255812883377, -0.004305835347622633, -1.2522625923156738, -0.661766529083252, 0.47823333740234375, -0.8623254895210266, 0.5757662057876587...
def roi _ feature _ histogram ( img, x0, y0, x1, y1, ranges = none, nbins : int = 64 ) : h, w, d = img. shape vals = img [ y0 : y1, x0 : x1, : ] # [ n, d ] array rst = [ ] for i in range ( d ) : if ranges is not none : r = ( ranges [ i, 0 ], ranges [ i, 1 ] ) else : r = ( np. min ( img [ :, :, i ] ), np. max ( img [ :,...
[ 0.5608470439910889, -0.04876362904906273, 0.5478764176368713, 0.6360955238342285, 0.40902093052864075, -0.5733410716056824, 0.3759104311466217, 0.6485267877578735, 0.4338339865207672, 0.7639901041984558, -0.2046159952878952, 0.2627768814563751, -0.020745543763041496, 0.2957184612751007, ...
def welcome ( ) : mars _ info = list ( db. mars. find ( ) ) print ( mars _ info ) return render _ template ( " index. html ", dict = mars _ info )
[ 1.1233993768692017, 0.7429533004760742, 0.25839027762413025, -0.31464147567749023, 0.33673611283302307, 0.7893934845924377, -0.681893527507782, 0.607395589351654, -0.8172996640205383, -0.12350624799728394, 0.2352982610464096, -0.4463019371032715, 0.104050412774086, 0.7860646843910217, -0...
def get _ nodes _ offsets ( node _ holder, platforms2count ) : nodes _ offsets = defaultdict ( dict ) nodes _ count = node _ holder. nodes _ count ( ) for platform, items _ count in platforms2count. items ( ) : iterations _ count = ( items _ count / / limit ) + ( items _ count % limit and 1 or 0 ) avg _ iterations = it...
[ -0.20888438820838928, 0.6101762652397156, 0.48899221420288086, -0.5867841839790344, -0.8587989807128906, 0.304545134305954, 1.032416820526123, -0.1511828452348709, -1.4765561819076538, 0.6266536712646484, 0.6055765748023987, 0.5641763806343079, 0.566595733165741, 0.2799501419067383, 0.54...
def from _ element _ tree ( self, tree ) : if self. _ _ class _ _. _ namespace : match = " { % s } % s " % ( self. _ namespace, self. _ tag ) else : match = self. _ tag print tree. tag, match if tree. tag = = match : self. _ harvest _ element _ tree ( tree ) ret = true else : print'from _ element _ tree ( ) : unknown e...
[ -0.3423926830291748, -0.2000523805618286, 0.715774416923523, 0.3994450271129608, -0.6972882747650146, 0.36352211236953735, -0.9440065622329712, -0.7305879592895508, 0.8374746441841125, 0.11089558154344559, -0.03655962273478508, -0.3777365982532501, 0.08286064863204956, 0.9129530191421509, ...
def _ fill _ missing _ values ( df ) : df. update ( df. groupby ('geoid'). confirmedcases. apply ( lambda group : group. interpolate ( limit _ area ='inside') ) ) # drop country / regions for which no number of cases is available df. dropna ( subset = ['confirmedcases'], inplace = true ) df. update ( df. groupby ('geoi...
[ 0.15303272008895874, 0.07913490384817123, 0.46720921993255615, -0.6894664764404297, 0.7246125340461731, 0.777925431728363, -0.08593305200338364, -0.1902003288269043, -0.3605550229549408, 0.29535022377967834, 1.0250918865203857, -0.13534677028656006, 1.3658688068389893, 0.9631189107894897, ...
def match ( self, request : request ) - > optional [ union [ request, responsetemplate ] ] : matches = false url _ params : kwargs = { } _ request = decode _ request ( request ) if self. pass _ through : return request if self. _ match _ func : response = self. response. clone ( context = { " request " : _ request } ) ...
[ -0.8980621695518494, -0.21323765814304352, 0.9372971653938293, 0.5072727799415588, -0.5929949283599854, -0.0055703334510326385, 0.5179115533828735, -0.5907362103462219, 0.8815200924873352, -0.724389374256134, 0.4993340075016022, -0.45583295822143555, -0.6119810342788696, -0.174727141857147...
def authed ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " authed " )
[ 0.6404345631599426, 0.7121057510375977, 0.4449944496154785, 0.8384934067726135, 0.8555958867073059, 1.8173073530197144, 0.00907942932099104, -0.3217543363571167, 0.728289008140564, 0.05788584426045418, 0.4797513782978058, 1.2724723815917969, -0.3516693711280823, -0.7168226838111877, -0.6...
def quats ( self, new _ quats ) : self. _ rots = rotation. from _ quat ( new _ quats )
[ -0.7865778803825378, -0.11916867643594742, 0.18959322571754456, -0.9652293920516968, -0.2804584503173828, 0.11101894825696945, -0.7046981453895569, -1.2510859966278076, 0.6408148407936096, -0.15825481712818146, -0.840713381767273, 0.3548906445503235, 0.46697089076042175, -0.699689984321594...
def add ( self, key, val, minutes ) : return self. _ memcache. add ( self. _ prefix + key, val, minutes * 60 )
[ -0.6240044832229614, 0.47494637966156006, 0.46537792682647705, -0.6559916138648987, -0.9975459575653076, 0.36262354254722595, -2.29559588432312, -1.035218358039856, 0.7023589015007019, 0.23581117391586304, -0.5328066945075989, 0.09731437265872955, -0.6673483848571777, -0.5768006443977356, ...
def writefile ( filepath, thedictionary ) : thekeys = list ( thedictionary. keys ( ) ) fields = thekeys # list ( thedictionary [ thekeys [ 0 ] ]. keys ( ) ) thewriter = csv. dictwriter ( filepath, fieldnames = fields ) thewriter. writeheader ( ) thewriter. writerow ( thedictionary )
[ -1.2746447324752808, -0.4007982909679413, 0.1407054364681244, -0.49579209089279175, 0.6075699925422668, 0.4458024799823761, -0.2857434153556824, 1.0820331573486328, -0.4596984386444092, 0.2407064288854599, -0.05781514570116997, -0.3808532655239105, 0.22262080013751984, 0.25983503460884094,...
def findenumtypebyname ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.7144240736961365, -0.5060365200042725, 0.46620362997055054, 0.6575461030006409, 0.7058865427970886, -0.2762954533100128, 0.45401838421821594, -1.1248252391815186, 0.11767879873514175, 0.630580484867096, -1.2275243997573853, -0.19984930753707886, -1.2997334003448486, 0.9839140176773071, ...
def _ _ init _ _ ( self, capacity : int = 10000, storage _ unit : str = " timesteps ", * * kwargs ) : if storage _ unit = = " timesteps " : self. _ store _ as _ sequences = false elif storage _ unit = = " sequences " : self. _ store _ as _ sequences = true else : raise valueerror ( " storage _ unit must be either'seque...
[ 0.0999596044421196, 0.0409129299223423, 0.7145596742630005, 0.6942122578620911, -0.037489648908376694, -0.3588160276412964, 0.6235580444335938, -0.2089347094297409, 0.46102502942085266, -0.3071126341819763, -0.8797348737716675, 0.10367751866579056, -0.021859390661120415, -0.060627181082963...
def to _ python ( self, value ) : value = super ( yearmonthfield, self ). to _ python ( value ) return datetime. date ( value. year, value. month, 1 )
[ 0.6962064504623413, -0.6047157645225525, 0.45228421688079834, 0.08188509196043015, -0.29490476846694946, 1.0220203399658203, -0.4804396331310272, -0.3178889751434326, 0.576453447341919, -0.23820851743221283, -0.8606319427490234, 0.3475840985774994, -0.5107176303863525, 0.08440551161766052,...
def on _ batch _ begin ( self, net, batch = none, training = none, * * kwargs ) :
[ 0.24939507246017456, -0.21087664365768433, 0.591941773891449, 1.012880802154541, 0.8477171659469604, 0.36657512187957764, -0.22456063330173492, 0.22046950459480286, 0.45661938190460205, -0.4028967618942261, -0.8627780079841614, 0.49364838004112244, 0.46983689069747925, 0.6543744802474976, ...
def _ _ getitem _ _ ( self, key ) : # check if the calalogue has been already created. if key not in self. _ groups : self. _ groups [ key ] = cataloguegroup ( key, self. _ callback _ group ) return self. _ groups [ key ]
[ -0.4980691969394684, 0.7580012083053589, 0.3090837597846985, -0.6476733684539795, -0.28516802191734314, -0.19885338842868805, -0.415183961391449, -1.3020167350769043, 0.12329977750778198, -0.3715263605117798, 0.7144349217414856, -0.10115091502666473, -0.9224947094917297, 0.2497305870056152...
def _ _ init _ _ ( self, pos, transform = false ) : self. init ( ) self. pos = vec ( pos ) self. point _ type ='clear'self. transform = transform self. obtype = " point " self. sharp = true self. control = false
[ 0.4230460226535797, -0.36909571290016174, 0.6064491868019104, 0.20577478408813477, -0.1409313678741455, 0.18130476772785187, -0.33299681544303894, 0.07782593369483948, 0.670445442199707, -0.1340915411710739, -1.0670311450958252, -0.3457501530647278, 0.6731477379798889, 0.43856388330459595,...
def dict _ to _ stgraph ( data, seuil, ratio, modulo ) : stgraph = none for frame in data : if frame [ " frame " ] % ratio = = modulo : if type ( frame [ " keypoints " ] [ " pose _ keypoints _ 2d " ] )! = float : onegraph = oneframe _ to _ onegraph ( frame [ " keypoints " ], seuil ) stgraph = add _ onegraph _ to _ stgr...
[ -0.3368293344974518, 1.1090600490570068, 0.4742463529109955, 0.14170631766319275, -1.1696785688400269, -0.4393039345741272, -0.0882834792137146, -0.028398409485816956, 1.3494857549667358, 1.3387233018875122, -0.5872219800949097, -0.7492948174476624, -0.46122831106185913, 0.0094927921891212...
def test _ room _ light _ duration ( self ) : if hardwarethread. _ hardwarethread _ _ singleton is not none : hardwarethread. _ drop ( ) # get current original value ( none ) and ensure getter returns the same original _ room _ light _ duration = \ hardwarethread. _ hardwarethread _ _ room _ light _ duration self. asse...
[ -0.25479090213775635, -0.24660682678222656, 0.532965362071991, 0.17734886705875397, 0.5809875726699829, 0.6535250544548035, 0.32548636198043823, -0.13277140259742737, -0.028594790026545525, -0.6122065782546997, -0.7576210498809814, 0.31377974152565, -0.1811896413564682, 1.1721179485321045,...
def read _ routes ( route _ file ) : routes _ df = gpd. read _ file ( route _ file ) commands = ( " drop table if exists { } ", " create table { } ( route _ name varchar, tripst varchar, tripend varchar, service varchar, longitude numeric, latitude numeric ) " ) conn = none try : # read the connection parameters params...
[ -0.3054887652397156, 0.15580777823925018, 1.1468924283981323, -0.26975762844085693, 0.6686111688613892, 0.3054960072040558, 0.2809397876262665, 0.6448037028312683, -1.7440167665481567, 0.7088989615440369, 0.6296053528785706, -0.3691616654396057, 0.007628739345818758, 0.18122929334640503, ...
def kendall _ tau ( predicted _ rank _ vector, original _ rank _ vector, * * kwargs ) : import itertools ties _ handling = kwargs. setdefault ('ties ','ceiling') # do necessary normalization of rank vectors predicted _ rank _ vector = predicted _ rank _ vector. normalize ( ties = ties _ handling ) original _ rank _ vec...
[ -0.4663303792476654, -0.2559373378753662, 0.75014728307724, -0.26081976294517517, -0.6524335741996765, -0.09002942591905594, 0.9199768304824829, 0.054760340601205826, -0.26786008477211, 0.33869946002960205, 0.47142210602760315, 0.9953382015228271, -0.1856170892715454, 0.02827676758170128, ...
def getoldestimage ( shape ) : andor _ solis. getoldestimage. restype = ctypes. c _ uint size = np. prod ( shape ) arr = ( ctypes. c _ int32 * size ) ( ) result = andor _ solis. getoldestimage ( ctypes. pointer ( arr ), ctypes. c _ ulong ( size ) ) check _ status ( result ) return np. ctypeslib. as _ array ( arr )
[ -0.310820996761322, -0.07855866104364395, 0.6833427548408508, -0.2219887375831604, -0.5779300332069397, -0.2869878113269806, 0.14196427166461945, -0.9491959810256958, 0.6709997057914734, 0.15658223628997803, 0.17505133152008057, 0.5433414578437805, -0.06435324251651764, 0.7293065786361694,...
def finddefs ( node, definingname, topdef ) : tag = etree. qname ( node. tag ). localname name = node. get ( " name " ) abstract = node. get ( " abstract " ) = = " true " mixed = node. get ( " mixed " ) = = " true " subs = node. get ( " substitutiongroup " ) if definingname : if topdef : if tag in types : definitions [...
[ -0.2651790678501129, 0.2288348525762558, 0.8144922852516174, -0.21472561359405518, -0.38845211267471313, -0.4752386510372162, -0.5616313219070435, -0.071950264275074, -0.3276441991329193, 0.01353625487536192, -0.5957553386688232, 0.20839768648147583, 0.46767091751098633, 2.144488573074341,...
def test _ set _ parameter _ type _ raw _ value ( self ) : pass
[ -1.4186941385269165, 0.4243980050086975, 0.651901125907898, 0.13930267095565796, -0.010853590443730354, 0.1838243454694748, 0.6856989860534668, -0.26086902618408203, -0.26992371678352356, 0.02179373800754547, -0.9380717873573303, 0.4117281138896942, 0.3859163224697113, 0.7466567158699036, ...
def get _ sections _ for _ instructor ( self, svc, course : course ) - > optional [ list ] : # pragma : nocover return none
[ -0.3402138352394104, 0.4319199025630951, 0.23118552565574646, 0.2757796347141266, 0.5374251008033752, 0.03482149913907051, 0.22846823930740356, -1.0834681987762451, 0.02513277530670166, -0.1534162312746048, 0.33748605847358704, -0.3272932767868042, -0.18690010905265808, 0.42626047134399414...
def _ extract _ gh _ params ( params, parnames ) : deggh = len ( parnames ) p = np. zeros ( deggh, dtype = np. float64 ) for i in range ( deggh ) : p [ i ] = params [ parnames [ i ] ]. value return p
[ -0.3576163053512573, 0.4281138479709625, 0.49129876494407654, -0.11578104645013809, 0.57625412940979, 0.5258638262748718, -0.4968836009502411, 0.058821603655815125, -1.0535809993743896, 1.5488028526306152, 0.04417093098163605, 0.3701692819595337, -0.8419492244720459, 0.7261167764663696, ...
def forever ( self, key, value ) : self. put ( key, value, 0 )
[ 0.36715254187583923, 0.786919116973877, 0.36216092109680176, 0.07338180392980576, -0.11267419159412384, 0.737833559513092, -0.4133462905883789, -0.3236142694950104, -1.203779697418213, 0.19428811967372894, -0.30019739270210266, -0.4381696283817291, -0.8212372064590454, -0.383481502532959, ...
def is _ pending ( self ) : return np. any ( [ self. _ is _ rung _ pending ( i ) > 0 for i, _ in enumerate ( self. budgets ) ] )
[ -1.115045189857483, -0.2281271070241928, 0.5331692695617676, 0.631804347038269, 0.481063574552536, 0.25672823190689087, -0.45401352643966675, 0.15631185472011566, 0.07014088332653046, -0.3966570198535919, 0.26649123430252075, 0.6791855692863464, -0.7314285635948181, 1.6934207677841187, -...
def testdeletetaginstancepermissiondenied ( self ) : userapi ( ). create ( [ ( u'fred ', u'password ', u'user ', u'fred @ example. com') ] ) user = getuser ( u'username') permissions = cachingpermissionapi ( user ) tagapi ( user ). create ( [ ( u'fred / bar ', u'description') ] ) tag = gettags ( paths = [ u'fred / bar'...
[ 0.045080117881298065, 0.9892842769622803, 0.4694531559944153, -0.03814506530761719, 0.08857261389493942, 0.8037103414535522, 0.3985038101673126, -0.37972399592399597, -0.6364263892173767, -0.6812602877616882, 0.09895346313714981, -0.05349750071763992, -0.10050535947084427, 0.73400443792343...
def enlarge _ array ( arr, size = - 1 ) : if size < 0 : size = arr. size * 2 elif size < arr. size : raise valueerror ( " final size less than current size. " ) ret = np. empty ( size, dtype = arr. dtype ) ret [ : arr. size ] = arr return ret
[ -0.16849000751972198, 0.6399953961372375, 0.5472228527069092, 0.4408297836780548, -0.2974836230278015, -0.02798847295343876, 0.26376187801361084, -0.33970916271209717, 0.7999071478843689, 0.07066576927900314, 0.18462851643562317, 0.8340768218040466, 0.05077977478504181, 0.6822916865348816,...
def llh ( self, y, mu, var = none, opt _ for _ minimise = false ) : if opt _ for _ minimise : return - np. power ( y - mu, 2 ) else : return - np. log ( 2 * math. pi * var ) / 2 - np. power ( y - mu, 2 ) / ( 2 * var )
[ 0.8752846121788025, -0.25580090284347534, 0.5130174160003662, 0.13087128102779388, -0.309916228055954, 0.7078169584274292, -1.3384979963302612, -0.2680544853210449, 0.006414875388145447, -0.11604328453540802, 0.18545785546302795, 1.2014076709747314, -0.49365872144699097, 0.0292280875146389...
def name ( self ) : return os. path. basename ( self. path )
[ 0.4036650061607361, -1.9940054416656494, 0.5546482801437378, -0.2266819179058075, -0.6812731623649597, 1.0524754524230957, 0.8673796057701111, -0.058931365609169006, -0.2563803195953369, 0.24461796879768372, 0.33833250403404236, 0.0065850745886564255, 0.304375022649765, -0.5258113741874695...
def lease _ tasks _ by _ tag ( self, lease _ seconds, max _ tasks, tag = none, deadline = 10 ) : _ validatedeadline ( deadline ) rpc = create _ rpc ( deadline ) self. lease _ tasks _ by _ tag _ async ( lease _ seconds, max _ tasks, tag, rpc ) return rpc. get _ result ( )
[ 0.28810426592826843, 0.7666741609573364, 0.5260377526283264, 0.8366553783416748, -0.08463679254055023, -0.35448935627937317, -0.2838188707828522, 0.39903542399406433, -0.5221919417381287, 0.09391968697309494, -0.9870728254318237, 0.008995521813631058, -0.11403442919254303, -0.0893957912921...
def error _ name ( error _ code, return _ bool = false ) : if error _ code is none or not isinstance ( error _ code, int ) : return " error code : invalid type : % d " % error _ code exit _ code _ name _ = http _ status _ phrase _ dict. get ( error _ code, none ) if exit _ code _ name _ is not none : return exit _ code...
[ -1.037903070449829, -0.02688906341791153, 0.8926001787185669, -0.11549780517816544, -0.0835275799036026, -0.21602721512317657, -0.23601862788200378, 0.34213876724243164, 0.18301206827163696, 1.56100594997406, 0.09269426763057709, -0.44386401772499084, 0.14690250158309937, 0.313087165355682...
def client ( self ) - > client : return self. _ client
[ 0.00866177212446928, -0.4801052510738373, -0.14044763147830963, -0.18941199779510498, 0.040306977927684784, 0.7086657285690308, 1.2464784383773804, -0.401079922914505, 0.15926191210746765, -1.823599100112915, 0.3000085651874542, 1.2664042711257935, -0.24167600274085999, -1.7508695125579834...
def find _ violation _ rate ( carray, limits ) : tot = len ( carray ) ftot = float ( tot ) yl = find _ num _ of _ elements ( carray, limits [ 0 ], side = 0 ) yu = find _ num _ of _ elements ( carray, limits [ 1 ], side = 1 ) rl = find _ num _ of _ elements ( carray, limits [ 2 ], side = 0 ) ru = find _ num _ of _ eleme...
[ 0.20732440054416656, 0.3832551836967468, 0.6293792724609375, -0.36502233147621155, 0.3381099998950958, -0.7594667077064514, 0.13720421493053436, 0.060036901384592056, 0.5887622833251953, 0.4680744707584381, 0.062240514904260635, -0.4394834637641907, -0.6254088878631592, 0.11805053800344467...
def get _ scores ( self ) : return sklearnmodel. evaluate _ regression _ metrics ( self. y _ test, self. predictions )
[ 0.04155910015106201, -0.1217983290553093, 0.387562096118927, 0.5990933179855347, 1.0432908535003662, 0.4293278455734253, 0.10344599187374115, -0.19758084416389465, -1.0561867952346802, -0.1596972942352295, 0.23031237721443176, -0.19606834650039673, 0.11235451698303223, 0.18590739369392395,...
def station _ stats ( df ) : print ('\ ncalculating the most popular stations and trip... \ n') start _ time = time. time ( ) # display most commonly used start station common _ s _ station = df ['start station']. mode ( ) [ 0 ] print ('the most common used start station is : ', common _ s _ station ) # display most co...
[ -0.5150485038757324, 0.053397681564092636, 0.8250077366828918, -0.24934931099414825, 0.3206518292427063, -0.09943052381277084, 0.9962944388389587, -0.33309245109558105, -0.5731918811798096, -0.08374638855457306, 0.04517563432455063, -0.09175441414117813, 0.9114812612533569, 0.7540349960327...
def _ uninstallvboxonsolaris ( self ) : reporter. flushall ( ) ; if utils. processcall ( ['pkginfo ','- q ','sunwvbox'] )! = 0 : return true ; srsp = self. _ generateautoresponseonsolaris ( ) ; frc, _ = self. _ sudoexecutesync ( ['pkgrm ','- n ','- a ', srsp,'sunwvbox'] ) ; return frc ;
[ -0.18851318955421448, 0.046116624027490616, 0.6113858819007874, 0.6716862916946411, -0.11994457244873047, -0.01959266886115074, 0.1876024603843689, 0.40604448318481445, 0.6914480924606323, 0.0245050135999918, -0.6131812930107117, -0.11586005240678787, -0.8699901700019836, 0.563585937023162...
def trees ( self ) : if self. _ trees is none : self. _ plant _ trees ( ) return self. _ trees
[ 0.02417971007525921, 0.07555177807807922, 0.5622522830963135, 0.29482129216194153, 0.7911124229431152, -0.34789374470710754, -0.3254539668560028, -0.25618302822113037, 0.39711451530456543, -0.29732421040534973, -0.29936832189559937, -0.2824785113334656, -0.4215165674686432, 0.4027636349201...