text
stringlengths
25
2.19k
embedding
listlengths
768
768
def main ( ) : # create an environment that handles running. # let's enable multiprocessing with 2 workers. filename = os. path. join ('hdf5 ','example _ 04. hdf5') env = environment ( trajectory ='example _ 04 _ mp ', filename = filename, file _ title ='example _ 04 _ mp ', log _ stdout = true, comment ='multiprocessi...
[ 0.34094104170799255, 0.5125796794891357, 1.1506998538970947, 0.4982862174510956, 0.2451840490102768, -0.3803863525390625, -0.1924765408039093, -0.2657496929168701, -0.9764041900634766, 0.6146919131278992, -0.6363884210586548, 0.16878460347652435, 0.5396968126296997, -0.2502351999282837, ...
def apply ( self, input, params = { } ) : pass
[ -0.45107439160346985, -0.46911171078681946, 0.2380516678094864, 1.314056634902954, 0.3617265820503235, 0.6321855783462524, 0.35856887698173523, 1.0351831912994385, -0.017194876447319984, -0.865524172782898, -0.2672184109687805, 0.24571943283081055, -0.6107809543609619, 0.9629678130149841, ...
def test _ size _ xl ( ) : test _ deque = deque ( long _ list ) assert test _ deque. size ( ) = = 30000
[ 0.7428956031799316, 1.2975504398345947, 0.28715577721595764, -0.7376010417938232, 1.2235273122787476, 0.49241262674331665, -1.3077847957611084, 0.5823957920074463, 0.4677588939666748, -1.0305800437927246, -1.6490530967712402, -0.11344452947378159, 0.290015310049057, 0.6725170016288757, -...
def shuffle _ keys ( self, start, stop, limit = 1 ) : import random result = list ( self. get _ range ( start, stop, values = false ) ) size = len ( result ) random. shuffle ( result ) return result [ : limit ]
[ -2.401996612548828, 0.32494693994522095, 0.5266494750976562, -0.23081918060779572, -0.13332657516002655, -0.4557324945926666, -0.7224646806716919, -0.30343857407569885, -0.155283123254776, 0.8985229730606079, 0.02834618091583252, 0.9419674277305603, -0.5294097065925598, -1.3525609970092773...
def task _ print _ user _ settings ( ) : # print user's defined settings _ logger. info ( " print user's defined settings " ) rsvis. utils. format. print _ data ( rsvis. config. settings. _ settings )
[ 0.37002256512641907, 0.5317496061325073, 0.4012880027294159, 1.2240533828735352, -0.0676879808306694, -0.22891317307949066, 0.9895200729370117, -0.9995309114456177, -0.9003667831420898, 0.596466064453125, -0.1683025360107422, 1.3033612966537476, 0.5776989459991455, -0.0494745597243309, -...
def sum _ array ( array ) : if len ( array ) = = 0 : return 0 else : return array [ 0 ] + sum _ array ( array [ 1 : ] )
[ -0.16055616736412048, 0.43760308623313904, 0.6294575333595276, 1.2929104566574097, 0.9721696376800537, 0.2051084339618683, 0.2517436146736145, 0.2801988124847412, 1.0559024810791016, 0.3943747580051422, -0.5354772210121155, 0.41174888610839844, -0.5952275395393372, 1.0983965396881104, 0....
def start _ frame ( self ) : return hou. playbar. framerange ( ) [ 0 ]
[ -0.09821319580078125, -0.09718514233827591, 0.4762558341026306, 1.4388772249221802, 0.432356059551239, -0.12909290194511414, 0.8843017816543579, -0.3344784677028656, 0.23639987409114838, -0.9673559069633484, 0.250026673078537, 0.4317223131656647, -1.0787204504013062, 0.014457951299846172, ...
def window _ plot ( self, polygons, colors, n _ splits ) : def interval _ overlaps ( interval1, interval2 ) : " " " true if interval1 has an intersection with interval2. " " " return not ( interval1 [ 1 ] < interval2 [ 0 ] or interval2 [ 1 ] < interval1 [ 0 ] ) def box _ overlaps ( box1, box2 ) : " " " true if box1 has...
[ -0.941582977771759, 0.5639023780822754, 0.6728764772415161, -0.1245676800608635, -0.9092752933502197, 0.03884035721421242, 0.8448399901390076, -0.9921583533287048, -0.020843785256147385, -0.489013135433197, -0.395408570766449, 0.6897156834602356, 0.27551132440567017, 0.013087174855172634, ...
def _ readimportssource ( self ) : ifpath = self. config. gettopimportsfilepath ( ) self. tablerows = [ ] with tablereaderfactory ( ifpath ) as ireader : for table in ireader : table. setrequiredcolumns ( required _ cols ) table. setoptionalcolumns ( optional _ cols ) for row in table : if not ( row ['ignore']. lower (...
[ -0.29661309719085693, 0.3298954963684082, 0.5734729766845703, -0.29701390862464905, -0.49753183126449585, 0.32428115606307983, 0.7517682313919067, 0.15503685176372528, -0.4249119758605957, 0.8210437893867493, 0.5079019665718079, -0.5228208303451538, -0.06549621373414993, 0.2800137102603912...
def head _ token ( self ) : return self. _ head _ token
[ -0.161042258143425, -0.923624575138092, 0.4620038568973541, 0.32776162028312683, 0.39204543828964233, 1.0653122663497925, -0.06947910785675049, -0.26862967014312744, 0.8311842679977417, -0.6561208367347717, -0.24148161709308624, 1.4179128408432007, 0.18214096128940582, -1.3422389030456543,...
def specifications ( self ) - > dict : specs = { " x " : { " dimension " : self. current _ file [ " features " ]. dimension }, " task " : self. task, } if self. allow _ overlap : specs [ " y " ] = { " classes " : self. segment _ labels _ } else : if self. lock _ speech : # when locking speech / non - speech status, # t...
[ -1.1576024293899536, -0.48423829674720764, 0.5691454410552979, -0.4907059073448181, -0.4071255922317505, 0.45023101568222046, 0.1034814789891243, -0.16942155361175537, -1.0059772729873657, 0.5866076350212097, -0.4902714788913727, -0.1670074611902237, 0.6280637979507446, 0.5998365879058838,...
def test _ addcallbacksextraargumentsonerrback ( self ) : failure = synchronousfailure ( runtimeerror ( ) ) sd = synchronousdeferred ( failure ) l = [ ] def eb ( r, extra, more = none ) : l. append ( ( r, extra, more ) ) sd. addcallbacks ( lambda ignored : none, eb, ( ), ( 1, ), { }, { " more " : " heyo " } ) self. ass...
[ 0.1856820285320282, 1.1377334594726562, 0.7854710817337036, 0.21597830951213837, 0.6147826910018921, 0.1524113118648529, -0.7092400193214417, 0.09556496143341064, 0.9070284366607666, -0.6749282479286194, -1.1848517656326294, -0.29574745893478394, -0.8333764672279358, 0.8109862804412842, ...
def towif ( self, compr _ pub _ key : bool = true ) - > str : wif _ net _ ver = self. m _ coin _ conf. wifnetversion ( ) return ( wifencoder. encode ( self. m _ priv _ key. raw ( ). tobytes ( ), compr _ pub _ key, wif _ net _ ver ) if wif _ net _ ver is not none else " " )
[ -0.1296093761920929, 0.3162443935871124, 0.34145528078079224, -0.17127123475074768, 0.08571746945381165, -0.2030503898859024, -0.20279523730278015, -0.13020695745944977, -0.31432098150253296, 0.36621659994125366, -0.4600706994533539, 0.34489041566848755, -0.9282405972480774, 0.549642622470...
def modified ( self, modified ) : self. _ modified = modified
[ -0.5389702916145325, -1.0031626224517822, 0.002752774627879262, 0.4104776978492737, 0.31257325410842896, 1.1756759881973267, 0.12083236128091812, 0.5501888990402222, 0.15076634287834167, -0.9379414319992065, -1.1837518215179443, -0.46850842237472534, -0.092130146920681, 0.3399870693683624,...
def hasreferences ( self ) : return bool ( self. _ _ refs )
[ -0.5380920171737671, -0.29089611768722534, 0.5246602296829224, -0.7132440209388733, 0.9644892811775208, 0.2722814679145813, 0.08930256217718124, -0.24014253914356232, -0.2952001690864563, -0.8099850416183472, -0.005115532781928778, -0.02177903614938259, -0.9126203656196594, 0.7992572784423...
def first _ arg _ dependent _ memoize ( func, cl _ object, * args ) : try : ctx _ dict = func. _ pyopencl _ first _ arg _ dep _ memoize _ dic except attributeerror : # fixme : this may keep contexts alive longer than desired. # but i guess since the memory in them is freed, who cares. ctx _ dict = func. _ pyopencl _ fi...
[ -0.31193041801452637, 0.43622636795043945, 0.7919752597808838, -0.1692705601453781, 0.6179837584495544, -0.5604817271232605, 0.7099996209144592, -0.4717791974544525, 0.14195793867111206, -0.09904398024082184, -0.3328370451927185, 0.1792270392179489, 0.5596093535423279, 0.3415820002555847, ...
def num _ trailing _ bits ( n ) : p = 0 if n = = 0 : return 24 while ( n > > p ) & 1 = = 0 : p + = 1 return p
[ -0.17202284932136536, 0.2924586832523346, 0.6815691590309143, 0.3900589346885681, 0.426418662071228, 1.1862913370132446, 0.685005784034729, -0.3573092222213745, -0.03444406017661095, -0.5744961500167847, -0.9655175805091858, 0.2629053592681885, -0.8104003071784973, 1.0198652744293213, 0....
def vectorize _ generic ( self, notes ) : vec = [ ] for i in range ( len ( notes ) - 1 ) : if notes [ i ]. note. isrest or notes [ i + 1 ]. note. isrest : interval _ obj = vectorinterval ( " rest ", notes [ i ], notes [ i + 1 ] ) vec. append ( interval _ obj ) else : interval _ semitones = interval. interval ( notes [ ...
[ -0.7284451127052307, -0.250923752784729, 0.7616381645202637, -0.08783584833145142, 0.8618451952934265, 0.4849107265472412, 0.3923147916793823, -0.75398850440979, -0.2682894170284271, 0.7777618765830994, 0.12320219725370407, 0.972683846950531, -0.7112589478492737, -0.24743400514125824, -0...
def _ _ init _ _ ( self, type, label = none, icon = none, accelerator = none, radio _ value = none, checkbox _ value = false, disabled = false, command = none ) : if ( ( type is menuitemview. separator and ( label is not none or icon is not none or accelerator is not none or radio _ value is not none or checkbox _ valu...
[ -0.18851828575134277, -0.44458386301994324, 1.082011342048645, 0.9309386014938354, -1.1527525186538696, 0.3961726725101471, -0.17508962750434875, 0.4182415306568146, 0.4867742955684662, -0.4088619351387024, 0.13407577574253082, 0.0315016433596611, -0.3430572748184204, 0.4912568926811218, ...
def hooks ( request, format = none ) : res = webhooks ( request ) return res
[ -0.8920096158981323, -0.6269210577011108, 0.3321762979030609, 0.52336585521698, 0.36729222536087036, -0.17043744027614594, -0.1303810179233551, -0.09130878746509552, 0.0712909996509552, -0.5233585238456726, 1.0847985744476318, 0.1416361778974533, -0.13818110525608063, -0.16796298325061798,...
def gen _ basic _ alignment ( self ) : # make a dictionary that goes from aa to a number for one - hot self. aa _ dict = { } for i, aa in enumerate ( self. alphabet ) : self. aa _ dict [ aa ] = i # do the inverse as well self. num _ to _ aa = { i : aa for aa, i in self. aa _ dict. items ( ) } ix = np. array ( [ self. a...
[ -0.5883442163467407, -1.2077621221542358, 0.7089918851852417, -0.32384586334228516, -0.4443492889404297, -0.3291747272014618, 0.32123538851737976, 0.6005234718322754, -0.40684494376182556, 0.24930396676063538, 0.05713137611746788, 0.05247783288359642, 0.17715772986412048, -0.19203267991542...
def _ entry _ test ( log, mdl, entry ) : try : status = mdl. solver. optimize ( ) if status = ='infeasible': raise infeasible ('cannot find solution') # test entries that require non - zero fluxes for rid in entry ['required _ reactions'] : try : reac = mdl. reactions. get _ by _ id ( rid ) log. assertion ( reac. flux ...
[ 0.27204686403274536, -0.583777904510498, 0.6472878456115723, -0.38358786702156067, 0.5615429282188416, -0.013581995852291584, 0.31651318073272705, -0.3599059283733368, -0.2815908193588257, -0.05002579838037491, 0.03758031874895096, -0.15071840584278107, -0.18280485272407532, 0.076845616102...
def end _ of _ episode ( self ) : # self. logger. debug ( f'encountered { len ( self. events ) } game event ( s ) in final step') for statestr, qvals in list ( self. statesindex. items ( ) ) : self. q _ mean + = np. sum ( qvals ) / len ( qvals ) self. q _ mean / = len ( self. statesindex ) # get the reward based on the...
[ -0.2611131966114044, -0.5846834182739258, 0.5880779027938843, -0.5292820930480957, 0.7647143602371216, -0.27075809240341187, 0.38109904527664185, 0.14599427580833435, -0.2852102816104889, 1.041151762008667, 0.0007730708457529545, -0.21507281064987183, 0.5527811646461487, 0.1627961099147796...
def _ timedelta _ to _ gbase ( self, value ) : ( hours, r ) = divmod ( value. seconds, 3600 ) ( mins, secs ) = divmod ( r, 60 ) hours = hours + ( value. days * 24 ) if value. microseconds : return'% 02d : % 02d : % 02d. % 06d'% ( hours, mins, secs, value. microseconds ) return'% 02d : % 02d : % 02d'% ( hours, mins, sec...
[ -0.7295878529548645, 0.620131254196167, 0.9292705655097961, -0.4857287108898163, -0.13478811085224152, 0.23085586726665497, -0.34964993596076965, -1.0255463123321533, -0.3865980803966522, 1.288853645324707, 0.08206891268491745, -0.2119208574295044, -0.4305432438850403, 0.1363981068134308, ...
def test _ hof _ tup ( a, b ) : def f ( gh, x, y ) : g, h = gh return scalar _ mul ( g ( x, y ), h ( x, y ) ) return f ( ( scalar _ add, scalar _ mul ), a, b )
[ 0.5135563611984253, 0.9446040391921997, 0.44403931498527527, 0.28760188817977905, 0.5890109539031982, 0.10773727297782898, 0.12364929169416428, -0.6949942111968994, -0.4626111388206482, 0.16142240166664124, 0.19035077095031738, -0.04660195857286453, 0.6648991703987122, -1.4523199796676636,...
def title ( self ) - > str : # remark : title is usually part of the metadata return self. _ get _ detail ( " title " )
[ 0.33479470014572144, 0.6281938552856445, 0.3418940007686615, 0.3393898010253906, 0.9310929775238037, 0.31043559312820435, -0.9059748649597168, -0.15491747856140137, 0.22754858434200287, 0.24193911254405975, 0.45841509103775024, 0.4481777846813202, 0.10081097483634949, -0.5871868133544922, ...
def add _ line ( self, lines = 1 ) : self. textlist + = ['' * self. width ] * lines
[ -0.6713339686393738, 0.6071878671646118, 0.5080253481864929, -0.15350554883480072, 0.33157187700271606, 0.6691826581954956, -1.4727259874343872, 0.6253619194030762, 0.789604127407074, -0.8128882050514221, -0.2479020357131958, -1.264548659324646, -0.6900912523269653, 1.059014916419983, -1...
def test _ reactorparametrizationinservermultiplestart ( self ) : reactor = memoryreactor ( ) factory = protocol. factory ( ) t = internet. tcpserver ( 1234, factory, reactor = reactor ) t. startservice ( ) self. assertequal ( reactor. tcpservers. pop ( ) [ : 2 ], ( 1234, factory ) ) t. stopservice ( ) t. startservice ...
[ -0.9747148156166077, 0.2553476393222809, 0.3456542193889618, -0.2638796269893646, 1.138859510421753, -0.4067176580429077, 0.00916473101824522, 0.17106539011001587, -0.04009845107793808, 0.16032224893569946, -0.6465638279914856, 0.0624946691095829, -0.5467977523803711, 0.31169191002845764, ...
def show ( self, mode = 0, level = 0, ident ='' ) : return'% s % s'% ( ident, self. name )
[ -0.18916411697864532, -0.7836244702339172, 0.4442735016345978, -0.9891660213470459, -1.1960949897766113, 0.7306721806526184, -0.6788099408149719, -0.14321590960025787, -0.40468963980674744, 0.3540072441101074, 0.1750650405883789, 0.4332472085952759, -0.18186280131340027, -0.273617684841156...
def get _ metadata _ from _ parquet ( self, store, label _ columns = ['label'], feature _ columns = ['features'] ) : raise notimplementederror ( )
[ -0.2559768259525299, -0.04398801177740097, 0.35032331943511963, 0.6730734705924988, 0.17784355580806732, 0.9788671135902405, -1.1215463876724243, 0.10382279008626938, -1.2527036666870117, 0.2451549470424652, -0.13756345212459564, 0.9105038046836853, 0.9616617560386658, -0.7430977821350098,...
def check _ max _ volume _ size ( vol _ size _ in _ mb, privileges ) : if privileges : max _ vol _ size _ in _ mb = privileges [ auth _ data _ const. col _ max _ volume _ size ] logging. debug ( " vol _ size _ in _ mb = % d max _ vol _ size _ in _ mb = % d ", vol _ size _ in _ mb, max _ vol _ size _ in _ mb ) # if max ...
[ -0.49317866563796997, -0.7024001479148865, 0.6098707318305969, 0.6574085354804993, -0.4423364996910095, 0.34309595823287964, -1.5955666303634644, 0.3043377101421356, 0.42574647068977356, -0.047881629317998886, 1.0417227745056152, 0.4955112934112549, -0.4144009053707123, 0.1115325391292572,...
def synth _ values ( self, time, radius, theta, phi, *, nmax = none, deriv = none, grid = none, extrapolate = none ) : if nmax is none : nmax = self. nmax elif nmax > self. nmax : warnings. warn ( f'supplied nmax = { nmax } is incompatible with number of'f'coefficients. using nmax = { self. nmax } instead.') nmax = sel...
[ -0.5134255886077881, 0.8498446941375732, 0.4432303011417389, 0.10085388273000717, -0.5573471188545227, -1.3597332239151, -1.0501688718795776, -0.3889959752559662, -0.6527060866355896, -0.29109203815460205, -0.8542054891586304, 0.6019299626350403, 0.3818002939224243, 0.5634477734565735, -...
def solve ( custom _ config ) : if not custom _ config : custom _ config = { } hdf5 _ file = utility. get _ setting ( settings. hdf5 _ file, custom _ config,'hdf5 _ file') n _ tabulatedx = utility. get _ setting ( settings. green _ tabulation _ numx, custom _ config,'green _ tabulation _ numx') n _ tabulatedz = utility...
[ 0.125881165266037, 0.34851837158203125, 0.6770240068435669, 0.5839396119117737, -0.03365793824195862, 0.05343348905444145, 0.5436221957206726, -0.1008642315864563, -0.8415574431419373, -0.014574523083865643, -0.27523094415664673, -0.19692131876945496, 0.5028892159461975, 0.1842634230852127...
def cbf _ reader ( path, is _ training ) : return minibatchsource ( cbfdeserializer ( path, streamdefs ( label = streamdef ( field ='label ', shape = num _ classes, is _ sparse = true ), pixels = streamdef ( field ='pixels ', shape = frame _ height * frame _ width * num _ channels, is _ sparse = false ) ) ), randomize ...
[ 0.6351772546768188, -0.25463271141052246, 0.40592074394226074, -0.42751646041870117, -0.8149695992469788, -0.5200106501579285, 0.42345094680786133, 0.6166403293609619, 0.6657746434211731, -0.19975657761096954, -0.11914722621440887, 0.35588976740837097, -0.6152796745300293, -0.9024361968040...
def getip ( ifname ) : # case where in a custom setup the global ip address is preconfigured # and does not necessarily bind to a network interface # eg : elasticip or custom dns routings if _ ip _ v4 _ regex. match ( ifname ) : return ifname # aws specific ip resolution method for the global ipv4 address if ifname = =...
[ -0.8924260139465332, 0.8695295453071594, 0.6040294170379639, 0.01701126992702484, -1.144931435585022, -0.650054931640625, 0.8024287223815918, 0.1583595722913742, 0.5869133472442627, 0.2546934485435486, 0.31977733969688416, 0.04470266029238701, -0.3889315724372864, -0.7482795119285583, 0....
def get _ created _ by ( self ) : return self. _ _ created _ by
[ 0.5976047515869141, -0.4173756539821625, 0.47546112537384033, 0.5910000801086426, 1.0403395891189575, 0.5826336145401001, 0.8810118436813354, -0.15508204698562622, -0.982467770576477, -1.2703882455825806, -0.02060537226498127, 0.40223923325538635, 0.7497128248214722, -0.41421058773994446, ...
def add _ plugins ( workdir, plugins ) : for p in plugins : edit _ cuberite _ config. add _ plugin ( workdir + " / settings. ini ", p )
[ -1.0781446695327759, -0.17320317029953003, 0.31688573956489563, 0.34509649872779846, 1.3210890293121338, -0.08490696549415588, 0.412662535905838, -0.3967728614807129, 0.09241360425949097, 1.1859043836593628, -0.9795165061950684, 0.24745269119739532, -0.9364245533943176, -0.5188813805580139...
def get _ query _ parameters ( self ) : return self. query _ parameters
[ -1.0126078128814697, -0.25697749853134155, 0.11205606907606125, -0.2093280702829361, 0.4446081519126892, 0.6229985356330872, -0.44624993205070496, 0.4884008765220642, 0.0011321939527988434, 0.3745863437652588, -0.2815067172050476, 0.4130566120147705, -0.8555843830108643, 0.0586085133254528...
def start ( self ) - > none : if self. _ start _ time is not none : raise timererror ( f " timer is running. use. stop ( ) to stop it " ) self. _ start _ time = time. perf _ counter ( )
[ 0.9463252425193787, -0.1319064050912857, 0.3242500126361847, 0.138178750872612, 0.9225370287895203, 0.4384448826313019, 0.5804142355918884, 1.0036042928695679, -0.9009440541267395, -0.11196435242891312, 0.16524283587932587, 0.8366636037826538, -0.23737695813179016, 1.4230929613113403, -0...
def test _ get _ location _ description ( self ) : description = self. strategy. get _ location _ description ( ) assert type ( description ) = = description assert description. data _ model is agent _ location _ model assert description. values. get ( " location ", " " ) = = location ( latitude = self. location [ " la...
[ 0.6437218189239502, -0.17193610966205597, 0.20666347444057465, -0.33957424759864807, 0.9774913191795349, 0.1244821697473526, -0.0793471485376358, 0.3629027307033539, 0.4873068332672119, -0.1987224966287613, 0.323908269405365, 0.4859081506729126, 0.8109506964683533, -0.26248037815093994, ...
def write ( rows, path, new _ scenes, new _ frames ) : output _ path = path. replace ('output _ pre ','output') pysp _ tracks = rows. filter ( lambda r : r. frame in new _ frames ). map ( trajnetplusplustools. writers. trajnet ) pysp _ scenes = pysparkling. context ( ). parallelize ( new _ scenes ). map ( trajnetpluspl...
[ 0.16934458911418915, -0.09825416654348373, 0.46781671047210693, 0.4832201302051544, 0.041292455047369, -0.2140902876853943, 0.00455684307962656, 0.4986729323863983, -0.1928236037492752, 0.30484700202941895, -0.07861623913049698, -0.9858049750328064, -0.21148058772087097, 0.1508103013038635...
def buy _ product ( args ) : buy _ date = open ('current _ date. txt'). read ( ) product = {'id': uuid4 ( ),'product _ name': args. product _ name,'buy _ price': args. buy _ price,'buy _ date': buy _ date,'expiration _ date': args. expiration _ date, } with open ('products. csv ','a ', newline ='' ) as csv _ file : fie...
[ -0.5261126160621643, -0.49137628078460693, 0.8482704162597656, 0.5428484678268433, 1.4537224769592285, 1.1199097633361816, -0.17884327471256256, 0.09044557064771652, -0.7327134013175964, 0.4355223774909973, -0.2755146622657776, 0.6583046317100525, 0.2848365902900696, -0.8509075045585632, ...
def _ add _ manual _ fields ( self, model ) : fields _ data = self. _ get _ manual _ field _ data ( model. _ name ) for name, field _ data in fields _ data. items ( ) : if name not in model. _ fields and field _ data ['state'] = ='manual': field = self. _ instanciate ( field _ data ) if field : model. _ add _ field ( n...
[ -0.5440745949745178, 0.34025701880455017, 0.7255492806434631, -0.26937177777290344, 0.02566300705075264, 0.23581591248512268, -0.24433831870555878, -0.6493450999259949, -0.8632000088691711, 0.7251025438308716, -0.8232253789901733, -0.4498765766620636, -0.45946991443634033, 0.65555322170257...
def train _ for _ one _ epoch ( self, models, store, dataset _ idx, feature _ col, label _ col, is _ train = true ) : raise notimplementederror ( )
[ -1.5569870471954346, 0.7018052935600281, 0.19167329370975494, 0.3015635907649994, 0.8807095885276794, 0.26095011830329895, -0.30283457040786743, 0.7592847943305969, -0.45577555894851685, 0.16894038021564484, -0.2980479300022125, 0.01349801104515791, 0.629209578037262, -0.45281824469566345,...
def on _ changed ( self, func ) : cid = self. cnt self. observers [ cid ] = func self. cnt + = 1 return cid
[ -0.35631614923477173, 0.48301729559898376, 0.5745249390602112, -0.5067737102508545, -0.043127696961164474, -0.9566240310668945, 0.5326789021492004, -0.4073198139667511, -0.08222507685422897, -0.5989815592765808, -1.3213037252426147, -0.02349642850458622, 0.2990472912788391, -0.136074960231...
def convert ( src, dst, filepattern ) : xmean, tris, c, names, indices, vmean, vscale = load _ splocs ( src ) mean = ( xmean * vscale + vmean ) # save mean mean _ mesh = pymesh. form _ mesh ( mean, tris ) if not os. path. exists ( dst ) : os. makedirs ( dst ) pymesh. save _ mesh ( os. path. join ( dst,'splocs _ mean'+ ...
[ 0.29612642526626587, 0.12054099887609482, 0.6322903633117676, -0.5980207324028015, -0.4718107581138611, 0.9205182790756226, 1.7506979703903198, -0.03061116859316826, 0.7337961196899414, 0.8545909523963928, -0.7138774394989014, 0.12353580445051193, 0.019728319719433784, 0.029406528919935226...
def putredactions ( redaction _ shapes, img ) : for shape in redaction _ shapes : bottom _ left _ corner = ( int ( shape [ 0 ] ), int ( shape [ 3 ] - 15 ) ) top _ left _ corner = ( int ( shape [ 0 ] ), int ( shape [ 2 ] ) ) bottom _ right _ corner = ( int ( shape [ 1 ] ), int ( shape [ 3 ] ) ) cv2. puttext ( img, " red...
[ -0.15765181183815002, -0.46221956610679626, 0.6649665236473083, -0.8234808444976807, 1.2780143022537231, 0.13644498586654663, 0.5211269855499268, -0.41562196612358093, 0.7510661482810974, 0.9322449564933777, -1.0373101234436035, 1.0161288976669312, 0.15305206179618835, 0.7080909013748169, ...
def test _ create _ alumno _ curso _ docente ( self ) : self. client. force _ authenticate ( user = self. user _ docente ) alumno = alumno. objects. get ( apellido = " 3 " ). pk curso = curso. objects. get ( nombre = " curso2 " ). pk anio _ lectivo = aniolectivo. objects. get ( nombre = " 2019 " ). pk data = { " alumno...
[ 0.471858412027359, 0.2414940893650055, 0.6412295699119568, -0.08982668817043304, -0.18926268815994263, 1.4836360216140747, -0.10625001788139343, -0.37842848896980286, -0.2735013961791992, 0.28396669030189514, -0.4441125988960266, 0.7513762712478638, 0.8969824910163879, -0.3920386731624603,...
def raw _ data _ to _ arg _ dict ( self, raw ) : # copy dictionary raw = dict ( raw ) # convert host and annex raw [ " host " ] = self. app. hosts. get ( raw [ " host " ] ) raw [ " annex " ] = self. app. annexes. get ( raw [ " annex " ] ) # build dictionary return raw
[ -1.0637388229370117, -0.45770561695098877, 0.558586061000824, -1.7450004816055298, -0.8201462030410767, 0.43567630648612976, -1.0259655714035034, 0.8606645464897156, -0.9363052248954773, 0.21605592966079712, -0.07102283090353012, 0.6784592270851135, 1.3444100618362427, 0.08746358007192612,...
def showaboutdialog ( self ) : qmessagebox. about ( self,'about phoplay ','phoplay \ n \ ( c ) 2012, 2015 ben sampson \ n \ license : bsd ( http : / / www. opensource. org / licenses / bsd - license. php ) \ n \ icons ( c ) jojo mendoza ( http : / / www. deleket. com )')
[ 0.852122962474823, -0.03352973982691765, 0.4975191056728363, -0.307783842086792, -0.9184126853942871, -0.16292543709278107, 0.6158166527748108, 0.3923974931240082, -0.07989425212144852, -0.43883463740348816, 0.0668872818350792, 0.861750066280365, 0.10287978500127792, 0.7694016098976135, ...
def _ _ currentchanged ( self, index ) : if index = = - 1 or not self. editors : return editor = self. activewindow ( ) if editor is none : return self. _ checkactions ( editor ) editor. setfocus ( ) fn = editor. getfilename ( ) if fn : self. changecaption. emit ( fn ) if not self. _ _ inremoveview : self. editorchange...
[ -0.588670551776886, -1.0356006622314453, 0.536341667175293, 0.24146345257759094, -0.22469055652618408, -0.9726125597953796, 0.7490653991699219, -0.17240579426288605, 0.2878648638725281, 0.04564620181918144, -0.3829854726791382, 0.5993572473526001, 0.25443583726882935, 1.0533661842346191, ...
def process _ image ( image, target _ shape, chanel _ 3d = false, type _ 0 = 0 ) : # load the image. h, w, _ = target _ shape image = load _ img ( image [ 0 ], target _ size = ( h, w ) ) img _ arr = img _ to _ array ( image ) # center = ( h / 2, w / 2 ) # a = 5 # if type _ 0 = = 1 : # img _ arr = cv2. flip ( img _ arr,...
[ -0.8921425938606262, 0.03202436491847038, 0.9605014324188232, -0.18444915115833282, 0.33301249146461487, -0.26809313893318176, 0.02051038295030594, -0.015440212562680244, 1.0642592906951904, 0.32556426525115967, 0.36616218090057373, 0.9379258155822754, 0.14014838635921478, 0.31694352626800...
def api _ get _ percentile ( id = none ) : auth _ func ( ) if not id : return jsonify ( { } ) query = db. session. query ( percentile ). filter _ by ( dataset _ id = id ) result = [ ] for elem in query : result. append ( elem. as _ dict ( ) ) return jsonify ( result )
[ -1.0174943208694458, 0.6402982473373413, 0.3986494243144989, -0.21538832783699036, -0.021795816719532013, -1.4011297225952148, -0.9537413120269775, -0.45279720425605774, 0.009468823671340942, 0.18316739797592163, 0.06808694452047348, -0.4230836033821106, -0.6296190023422241, 0.319826275110...
def compute _ volume ( box : np. ndarray, is _ radian : bool = false ) - > float : angles = box [ 3 : ] if not is _ radian : angles = np. deg2rad ( angles ) cos _ angles = np. cos ( angles ) return ( np. prod ( box [ 0 : 3 ] ) * np. sqrt ( 1 + 2 * np. prod ( cos _ angles ) - ( cos _ angles * * 2 ). sum ( ) ) )
[ -0.43405881524086, 0.6709420680999756, 0.6096500158309937, 0.1926928609609604, 0.27565428614616394, -0.06671301275491714, -0.4587012529373169, -0.15349552035331726, 0.46116775274276733, 0.33616799116134644, -0.025166645646095276, 0.05125363543629646, -0.10962288826704025, -0.48324972391128...
def x2polyphase ( x, n ) : # number of blocks in the signal : l = int ( np. floor ( max ( np. shape ( x ) ) / n ) ) print ( " l = ", l ) xp = np. zeros ( ( 1, n, l ) ) for m in range ( 0, l ) : xp [ 0, :, m ] = x [ m * n + np. arange ( n ) ] return xp
[ 0.35546109080314636, 0.2407243549823761, 0.651951014995575, -0.4968719482421875, -0.41668376326560974, -0.32734566926956177, -1.3027806282043457, -0.28415071964263916, 1.3610349893569946, 1.0643301010131836, -0.8917497396469116, -0.2469475418329239, 0.13942469656467438, -0.7053049206733704...
def literal _ rewrite _ distance ( question, candidate ) : return literal _ question _ distance ( rewritequestion ( question ), candidate )
[ 0.03338510915637016, -1.9046310186386108, 0.3549542725086212, -0.07477757334709167, -0.44670170545578003, 0.7762205004692078, -0.44233596324920654, 0.7808210849761963, -0.1650995910167694, 0.5984808802604675, 0.5340220928192139, 0.2717713713645935, 0.0963941439986229, -0.7867409586906433, ...
def run ( self ) : try : # hash of return codes for each step ret = { } ret [ " waitvm " ] = none ret [ " copyin " ] = none ret [ " runjob " ] = none ret [ " copyout " ] = none self. log. debug ( " run worker " ) vm = none # header message for user hdrfile = tempfile. mktemp ( ) self. appendmsg ( hdrfile, " received jo...
[ 0.03834839165210724, -0.613500714302063, 0.8442438840866089, -0.11926450580358505, 0.2915254831314087, 0.21484632790088654, 0.4737578332424164, 0.28868597745895386, -0.6920928359031677, 0.3472541570663452, -0.5836572051048279, 0.023171430453658104, -0.6954532861709595, 0.6583811044692993, ...
def decompress ( self, value ) : if value : values = json. loads ( value ) else : values = { } return [ values. get ( field ['name'], field ['default'] ) for field in self. fields ]
[ -1.2163399457931519, 0.3272078335285187, 0.5189418792724609, -0.6620291471481323, -0.32806140184402466, -0.9947412014007568, -1.0743621587753296, -0.31124937534332275, -0.1977529078722, 0.5097824335098267, -2.0683422088623047, -1.3501040935516357, -0.6369580626487732, 0.011574052274227142,...
def _ _ init _ _ ( self, path : str ) : self. path = path self. config = regconfig. load _ config ( path )
[ -0.05852339416742325, -0.4706803858280182, 0.2826853394508362, -0.3016788065433502, -0.033608559519052505, -0.23485271632671356, 0.6246369481086731, 1.4736148118972778, -0.22365787625312805, 0.13506945967674255, -0.749463677406311, 0.169390469789505, -0.0629272609949112, 0.2057267427444458...
def get _ moving _ mobjects ( self, * animations : animation ) : moving _ mobjects = super ( ). get _ moving _ mobjects ( * animations ) all _ moving _ mobjects = extract _ mobject _ family _ members ( moving _ mobjects ) movement _ indicators = self. renderer. camera. get _ mobjects _ indicating _ movement ( ) for mov...
[ -0.9432499408721924, -0.403328537940979, 0.6299058794975281, 1.7430028915405273, 0.4002937078475952, 0.03987037017941475, -0.630049467086792, -0.3624434769153595, 0.25075724720954895, -0.099310964345932, -0.4198925495147705, -0.37886178493499756, -0.4241314232349396, 0.7852824926376343, ...
def _ _ iter _ _ ( self ) : yield self. x yield self. y yield self. z
[ -0.37714457511901855, -0.8315184116363525, 0.20084509253501892, -0.9387522339820862, 0.5265934467315674, 0.874100387096405, 0.518955409526825, -0.653485119342804, -0.14436858892440796, -0.9946405291557312, 0.04264199361205101, 0.034634221345186234, 0.07284083217382431, -0.7882306575775146,...
def multiselect ( label, options, default, format _ func = str ) : options _ = { format _ func ( option ) : option for option in options } default _ = [ format _ func ( option ) for option in default ] selections = st. multiselect ( label, options = list ( options _. keys ( ) ), default = default _, format _ func = for...
[ -0.5350638628005981, -0.41358664631843567, 0.570622980594635, 0.7668353319168091, 0.9551700949668884, -0.8397096991539001, -1.1943219900131226, -0.5907383561134338, 0.32536762952804565, 0.8277828693389893, -0.31630489230155945, 0.25703534483909607, 0.35538625717163086, -0.38940131664276123...
def create _ javascript _ function ( self ) : return self. datatable. create _ javascript _ function ( )
[ -0.3528006076812744, 0.08987317979335785, 0.42270758748054504, -0.16409309208393097, -0.1900128573179245, -1.5088446140289307, 0.5858102440834045, -0.6723080277442932, -0.7309679985046387, -0.6660993695259094, -0.9095066785812378, 1.2583520412445068, 0.9352081418037415, -0.5052244067192078...
def test _ nfc _ wps _ password _ token _ ap ( dev, apdev ) : ssid = " test - wps - nfc - pw - token - init " hapd = hostapd. add _ ap ( apdev [ 0 ], { " ssid " : ssid, " eap _ server " : " 1 ", " wps _ state " : " 1 " } ) logger. info ( " wps configuration step " ) pw = hapd. request ( " wps _ nfc _ token ndef " ). rs...
[ -0.04940515756607056, 0.054450344294309616, 0.7194554805755615, -0.3006810247898102, 0.3413350284099579, 0.2644888758659363, -0.1283789426088333, 0.4043765664100647, 0.45302414894104004, -0.18154306709766388, -0.07980094105005264, 0.08250005543231964, 0.2965066730976105, 0.4835866689682007...
def _ _ ignore _ bmp _ changed ( self ) : return self. _ _ bump _ check _ box. is _ checked ( )
[ -0.7923582196235657, 0.15806101262569427, 0.6703457236289978, 0.7102062702178955, 0.07882963865995407, 0.9432379603385925, 0.9502672553062439, -0.455323725938797, 0.5373257994651794, 0.3911682069301605, -0.9957205057144165, 0.019225429743528366, -1.773809552192688, 0.5600922107696533, -0...
def data ( self, key = none ) : parent _ data = super ( localexplanation, self ). data ( key = key ) if key is none : return parent _ data elif key = = - 1 : num _ rows = self. num _ examples data _ dicts = [ ] perf _ list = [ ] for i in range ( 0, num _ rows ) : data _ dict = self. _ local _ data ( parent _ data, key ...
[ 0.09967546910047531, 0.15808634459972382, 0.627760648727417, -1.294423222541809, -0.9719305038452148, -0.2566538155078888, 0.05627255141735077, 1.3541525602340698, 0.02517620660364628, -0.2372949868440628, 0.22786414623260498, 0.045959342271089554, -0.018332745879888535, 1.1282033920288086...
def close ( self ) : # disconnect the interface with the scope self. controller. disconnect ( )
[ -0.10548943281173706, -0.6367173790931702, 0.5212252140045166, -0.9167502522468567, 0.07039234787225723, 0.4927554130554199, 0.5115640163421631, -0.34388598799705505, -0.17511098086833954, -0.25522997975349426, 0.5305853486061096, -0.1702849417924881, -0.9076721668243408, 0.520090401172637...
def twiml ( request, text ) : twiml = " " " <? xml version = " 1. 0 " encoding = " utf - 8 "? > < response > < gather timeout = " 10 " numdigits = 1 action = " mail - safe. appspot. com / resp / " > < say > hello, are you % s? press 1 if you are. press 2 otherwise. < / say > < / gather > < / response > " " " return htt...
[ 0.5577453374862671, -0.26440978050231934, 0.48860859870910645, 0.055541083216667175, -1.049866795539856, -0.12071910500526428, -0.06287319958209991, 0.4223686754703522, 0.4471364915370941, 0.4157753586769104, -0.15212440490722656, -0.28998446464538574, -0.3023746609687805, 0.51326745748519...
def _ register _ sender ( self, test, sender, codes = [ 201 ], fail = test. fail ) : # use the test data as a template for creating new resources # register device device _ data = deepcopy ( self. test _ data [ " device " ] ) device _ data [ " id " ] = sender [ " device _ id " ] device _ data [ " label " ] = " amwa tes...
[ -0.2516915798187256, 0.3842960596084595, 0.5907937288284302, -0.5901270508766174, 0.3016078770160675, -0.25587329268455505, 0.14390785992145538, -0.09150747954845428, -0.06262915581464767, -0.035027552396059036, -1.1850396394729614, -0.05061362311244011, -0.48334839940071106, 0.61378848552...
def datareceived ( self, data ) : if self. factory. tunnel _ type = ='tls - uni': data = self. process _ tls _ uni _ data ( data ) # now we can process the ccp _ messages in the data # self. read _ buffer + = data self. factory. ccp _ client. update _ rxbytes ( len ( data ) ) ( msgs, self. read _ buffer ) = ccpmessage....
[ 0.1260443478822708, -0.7464332580566406, 0.7096250653266907, -0.6129752993583679, 0.6612361669540405, 0.536088228225708, -0.13097941875457764, -0.4479079842567444, 0.1627710908651352, -0.5452852249145508, 0.017782311886548996, -0.009919586591422558, -0.7672459483146667, 0.27140292525291443...
def test _ 03 _ noon ( self ) : l _ time ='noon'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 03 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 13 * 60 + 31 ) * 60 + 41 )
[ 0.2614254057407379, 0.644957423210144, 0.3507887125015259, -0.09268468618392944, 0.11734369397163391, 0.11415161192417145, -0.4972780644893646, -0.7490898370742798, 0.11855606734752655, -0.053487930446863174, -0.724360466003418, 0.0353119857609272, 0.12142159789800644, 0.4237452745437622, ...
def conv _ single _ step ( a _ slice _ prev, w, b ) : s = np. multiply ( a _ slice _ prev, w ) z = np. sum ( s ) z = z + float ( b ) return z
[ 0.7186298966407776, 0.1880684196949005, 0.48964592814445496, 0.7197396755218506, -0.2513195872306824, -0.7818551659584045, 0.8752936124801636, 0.7473735213279724, 0.3921065926551819, 1.013070821762085, 0.2685471773147583, 0.6406370997428894, 0.1263027936220169, 0.06514392793178558, -1.00...
def params ( self ) : return [ sympy. symbol ('theta _ 0') ]
[ -0.865983247756958, -0.5480198860168457, 0.3160117268562317, -0.4433917999267578, 1.2546674013137817, 0.5141737461090088, -0.025280188769102097, 0.9506378173828125, -0.12525171041488647, 0.8860704302787781, -1.0127228498458862, 0.6600213646888733, 0.45926085114479065, 0.8050497174263, -1...
def main ( ) : # used to prefix vars in. config file. default is'config _ ', so we use '.'instead. os. environ ['config _'] = '.'# this is the only pre - defined var that is required # this var triggers an env config to fire in the makefile cloud _ provider = os. environ. get ('cloud _ provider') if not cloud _ provide...
[ 0.32716038823127747, 0.28989875316619873, 0.7397149205207825, 0.25794851779937744, 0.9527509808540344, 1.2050232887268066, 0.329395592212677, 1.1129602193832397, -1.383871078491211, 0.6115801930427551, -0.3783988654613495, 0.510507345199585, 0.7946540117263794, 0.41857093572616577, 0.810...
def test _ invalid _ page _ handling ( self ) : response = self. client. get ( reverse ('test - pagination ', kwargs = {'page': 42 } ) ) self. assertequal ( response. status _ code, 404 )
[ -0.25452378392219543, 0.08909449726343155, 0.611710786819458, -0.17156745493412018, 0.7529749870300293, 1.3849462270736694, 0.39906370639801025, 0.22196602821350098, 0.2590433955192566, -0.7875816822052002, 0.13744330406188965, -0.624620258808136, -0.3743738532066345, 0.49037301540374756, ...
def load _ data ( file _ name = " data / training _ data. txt " ) : with open ( file _ name ) as f : lines = f. readlines ( ) labels = list ( ) all _ dat = list ( ) for i, l in enumerate ( lines ) : labels. append ( int ( l [ 0 ] ) ) l = gensim. utils. any2unicode ( l ) all _ dat. append ( l. split ( " \ t " ) [ - 1 ]....
[ -0.8886286020278931, -0.5769925117492676, 0.6497835516929626, -0.8583400249481201, -0.09700468182563782, 0.8581722378730774, -0.9071346521377563, 1.6656074523925781, -0.9450065493583679, 0.5797420144081116, -0.2573736310005188, 0.08505959063768387, 0.3724607527256012, 0.24100060760974884, ...
def process _ events ( self, limit : int = default _ process _ events _ limit ) - > none : assert self. _ notifier before _ processed _ count = self. _ processed _ events _ count currently _ processed = 0 while currently _ processed < limit and self. _ notifier. check _ events ( timeout = 0 ) : self. _ notifier. read _...
[ -0.4702983796596527, 0.2930593490600586, 0.8906715512275696, -0.29538872838020325, 0.17447401583194733, -0.5655777454376221, 0.885168731212616, -0.04353315010666847, 0.0739525780081749, 0.3816203773021698, 0.4342692196369171, 0.15980806946754456, -0.2349393218755722, -0.6817123889923096, ...
def add _ query ( self, query ) : return uribuilder ( scheme = self. scheme, userinfo = self. userinfo, host = self. host, port = self. port, path = self. path, query = normalizers. normalize _ query ( query ), fragment = self. fragment, )
[ -0.49217700958251953, -0.08172431588172913, 0.5621530413627625, 0.33885008096694946, -0.7604843378067017, 0.5248363018035889, -0.6520638465881348, 0.4815131723880768, 1.5315974950790405, -1.5594594478607178, 0.6426030397415161, -0.4799838960170746, -1.1900737285614014, -0.5446769595146179,...
def hours _ per _ week ( self ) : total _ weeks = int ( self. total _ days / 7 ) if self. total _ days : return decimal ( round ( self. hours / total _ weeks, 2 ) ) return decimal ( 0 )
[ 0.1819479614496231, 0.9594331383705139, 0.5017966628074646, -1.0574921369552612, -0.22583650052547455, -0.08031328022480011, 0.2979297935962677, -0.4872928857803345, 0.6579270958900452, 0.10719775408506393, 1.1921955347061157, -1.667488694190979, 0.3042101562023163, 0.25621411204338074, ...
def hourly _ totals ( station, year ) : slist, changed = get _ hslist ( station, year, get _ hfname ) fd, si = build _ hdict ( station, year, slist ) left = build _ hleft ( si, fd, year ) df = make _ hdf ( left, fd, slist, station, year ) return df
[ 0.0025844601914286613, -0.13415168225765228, 0.49682652950286865, -0.44854265451431274, -0.6498342752456665, 0.0829862430691719, -0.6975905895233154, 0.10067937523126602, -0.03859429806470871, 0.36410292983055115, -0.503017783164978, -0.20891234278678894, 0.49903297424316406, -0.3281728625...
def add ( self, item, weight = 1 ) : self. total _ weight + = weight if item in self. item _ to _ position : self. weights [ self. item _ to _ position [ item ] ] + = weight else : self. items. append ( item ) self. weights. append ( weight ) self. item _ to _ position [ item ] = len ( self. items ) - 1
[ -0.44781389832496643, -0.4421268403530121, 0.6677021980285645, 0.5252124667167664, 0.7526023387908936, 0.7580583095550537, -0.26645025610923767, 0.1438891440629959, 0.4323827624320984, 0.49981972575187683, -0.5829932689666748, -0.8965058922767639, -0.5800279974937439, 0.10787755995988846, ...
def get _ day _ average _ price ( fsym, tsym, e ='all ', try _ conversion = true, avg _ type ='hourvwap ', utc _ hour _ diff = 0 ) : # load data url = build _ url ('dayavg ', fsym = fsym, tsym = tsym, e = e, try _ conversion = try _ conversion, avg _ type = avg _ type, utc _ hour _ diff = utc _ hour _ diff ) data = loa...
[ -2.274895191192627, 0.5702235102653503, 0.531916618347168, -0.21248434484004974, 0.06975099444389343, -0.2649725675582886, -0.6964980959892273, 0.1427249014377594, -1.1273983716964722, 1.134751319885254, 0.13384556770324707, 0.41951844096183777, 0.347677081823349, 0.38482531905174255, 1....
def _ variable _ with _ weight _ decay ( name, shape, stddev, wd ) : dtype = tf. float16 if flags. use _ fp16 else tf. float32 var = _ variable _ on _ cpu ( name, shape, tf. truncated _ normal _ initializer ( stddev = stddev, dtype = dtype ) ) if wd is not none : weight _ decay = tf. multiply ( tf. nn. l2 _ loss ( var ...
[ 0.8199567198753357, -0.722204864025116, 0.42839697003364563, -0.7630572319030762, -1.372596263885498, -0.2590622901916504, -0.5106093883514404, -0.4616764187812805, -0.07830425351858139, -0.22865936160087585, -0.03501502051949501, 0.704562246799469, 0.21320900321006775, 0.42160266637802124...
def open _ graph ( self ) : self. filename = filedialog. askopenfilename ( title = " select file ", filetypes = ( ( " graph files ", " *. json " ), ( " all files ", " *. * " ) ) ) self. window. destroy ( )
[ 0.09512031823396683, -0.3706132471561432, 0.5702691078186035, 0.2112703174352646, -0.412334680557251, 0.5536097884178162, 1.3433328866958618, 0.41428861021995544, -0.5933166742324829, -0.002253082813695073, 0.053585298359394073, 1.3383406400680542, 0.776106059551239, -0.4997384250164032, ...
def remove _ register ( self, reg : regsregister ) - > none : if not isinstance ( reg, regsregister ) : raise typeerror ( " the'reg'has invalid type. " ) self. registers. remove ( reg )
[ -0.6911397576332092, 0.8874908089637756, -0.06869448721408844, 0.15531399846076965, 0.25439390540122986, -0.2325754463672638, 0.17859575152397156, 0.23972411453723907, 0.2576446235179901, -0.3766966462135315, -0.7133306860923767, 0.625935971736908, -1.1745175123214722, 0.6282951235771179, ...
def usage1 ( ) : server = pyro4server ( name = " testflaskifyserver ", simulated = true ) app, _ = pyro4server. flaskify ( server ) app. run ( debug = true )
[ 0.18799762427806854, 0.7334641814231873, 0.4912041425704956, 0.35959210991859436, 0.5542892813682556, -0.3352569043636322, 0.13835535943508148, 0.4401912987232208, -0.5391427278518677, -0.7194521427154541, -1.3316189050674438, 0.6463152766227722, -0.6851821541786194, 0.8913007974624634, ...
def path2url ( path ) : parts = path. split ( os. path. sep ) return'{ { site. baseurl } } / notebooks /'+'/ '. join ( quote ( part ) for part in parts )
[ -0.5295799970626831, -0.6652345657348633, 0.5217174887657166, 0.42511337995529175, 0.060606759041547775, 0.7345267534255981, 0.06623406708240509, -0.6257872581481934, -0.4072527587413788, 0.47556471824645996, -0.3822341859340668, -0.10206478834152222, 0.33361366391181946, -0.83546143770217...
def shortest _ path ( self, source, dest ) : queue = collections. deque ( [ source ] ) path _ dict = { source : none } visited = set ( source ) while queue : curr = queue. popleft ( ) if curr = = dest : return _ path _ from _ path _ dict ( path _ dict, source, dest ) for edge in self. adj _ list [ curr ] : if edge not ...
[ 0.34161752462387085, -0.19519954919815063, 0.39349228143692017, -0.20967616140842438, -1.1967147588729858, -0.10901470482349396, -0.12511798739433289, -0.48580849170684814, 0.2367083579301834, 0.4980652630329132, -0.4598565995693207, -0.22629378736019135, -0.20323550701141357, -0.330534130...
def read _ buf ( fbuf ) : try : with open ( fbuf ) as f : content = f. read ( ) except : print ('\ n'+'fail to load the file " { : } " '. format ( fbuf ) ) return " " list = [ item for item in content. split ('\ n') ] newquery ='' for line in list : if line [ 0 : 2 ] = ='- -': continue newquery + ='' + line. split ('- ...
[ 0.41292670369148254, -1.0282872915267944, 0.7328754663467407, 0.3240363597869873, -0.7086910605430603, 0.2658415138721466, -0.7005282640457153, 0.5162578821182251, -0.7916929721832275, 0.09727168828248978, 0.30106285214424133, -0.3957488238811493, -0.5341275930404663, 0.4065406024456024, ...
def _ _ init _ _ ( self, container, node ) : self. _ container = container self. _ node = node
[ 0.412526935338974, 0.2352689504623413, 0.5558340549468994, -0.19880729913711548, 0.4091355502605438, -0.39050957560539246, -0.4754798114299774, 0.09337325394153595, -0.35890915989875793, -0.17322604358196259, 0.3599710166454315, 1.5073109865188599, 0.9070882201194763, 0.16921235620975494, ...
async def test _ flow _ works _ with _ authcode ( hass, aioclient _ mock ) : flow = config _ flow. hangoutsflowhandler ( ) flow. hass = hass with patch ( " homeassistant. components. hangouts. config _ flow. get _ auth " ) : result = await flow. async _ step _ user ( { conf _ email : email, conf _ password : password, ...
[ 0.26058900356292725, 0.34373071789741516, 0.3315337002277374, 0.6209973096847534, 0.7613831758499146, 0.2778303027153015, 0.4586886465549469, 0.18131214380264282, 0.5705329179763794, -0.2004443109035492, -0.2430485188961029, 0.1364419013261795, 0.3775682747364044, 0.06415172666311264, 0....
def _ _ showcontextmenu ( self, coord, index ) : if self. editors : widget = self. widget ( index ) if widget is not none : self. contextmenueditor = widget. geteditor ( ) if self. contextmenueditor : self. savemenuact. setenabled ( self. contextmenueditor. ismodified ( ) ) filename = self. contextmenueditor. getfilena...
[ -0.32603132724761963, -0.3254338204860687, 0.8747815489768982, -0.6460334658622742, -0.09529680758714676, 0.1831481158733368, 0.5085762143135071, 1.0713615417480469, -0.0982881411910057, 0.3751230239868164, 0.2116771638393402, 0.3013124465942383, -1.0131033658981323, 0.03894027695059776, ...
def create _ random _ time _ interval _ gaps ( days, gaps _ as _ percent, avg _ gap _ as _ percent ) : print " days ", days # first find the total number of gap days by calculating it as percent of the total days total _ size _ of _ missing _ days = round ( days * ( float ( gaps _ as _ percent ) / 100 ) ) print " total...
[ -0.6402922868728638, 1.009181261062622, 0.9021593332290649, -1.1642494201660156, -0.008609635755419731, 1.2285720109939575, 0.44272029399871826, -0.643624484539032, 0.30694475769996643, 0.24076533317565918, 0.7392858862876892, -0.5019385814666748, 0.25744372606277466, 0.7402370572090149, ...
def manage _ payment ( self ) : payment = self. driver. find _ element _ by _ css _ selector ( self. css _ manage _ paymentlink ) action = touchactions ( self. driver ) action. tap ( payment ). perform ( )
[ 0.12967944145202637, 0.3370620310306549, 0.4454556107521057, 0.4383648633956909, 0.6420897245407104, -0.8019997477531433, 0.7216174006462097, -0.35171812772750854, 1.4084272384643555, -0.43975138664245605, 1.1613233089447021, -0.7142256498336792, 0.3748973608016968, 0.41440415382385254, ...
def get _ scenarios ( self, uuid = none, * * kwargs ) : return self. request ('scenarios ', uuid = uuid, * * kwargs )
[ -1.0828559398651123, 0.3079138696193695, 0.05962546542286873, 1.471630334854126, 0.35567140579223633, -1.0660632848739624, -0.9986646771430969, -0.04403556510806084, -0.05893782526254654, -0.0914885625243187, -0.7869036793708801, -0.014741030521690845, -0.5374571681022644, -0.1589221656322...
def instance _ name ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " instance _ name " )
[ 0.19911430776119232, -0.3990139663219452, 0.525551974773407, -0.4563175141811371, -0.7157394289970398, 1.0630958080291748, 0.006533724255859852, 0.6702374815940857, -0.43749871850013733, 1.0016908645629883, 0.6833539605140686, 0.6141104698181152, -0.2404264211654663, -1.0231860876083374, ...
def newgeneration5 ( self ) : # print ( " printing child after iteration : { } ". format ( self. iteration ) ) for i in range ( 0, len ( self. population ) ) : " " " depending of your experiment you need to use the most suitable algorithms for : 1. select two candidates 2. apply crossover 3. apply mutation " " " ia, ib...
[ -0.3028615117073059, 0.026281123980879784, 0.5677497386932373, 0.9796345829963684, -0.503453254699707, 0.9963507652282715, 1.1119822263717651, -0.25255849957466125, -0.3495633900165558, 0.7170465588569641, -1.1643425226211548, -0.17638054490089417, -0.7211439609527588, 0.09932021051645279,...
def clean _ exit ( _ signo, _ stack _ frame ) : print ( " exiting " ) _ _ mqttc _ _. loop _ stop ( ) _ _ mqttc _ _. disconnect ( ) sys. exit ( 0 )
[ 0.014464919455349445, -0.7164579033851624, 0.34887880086898804, 0.13569757342338562, -0.09519971162080765, 0.3621777892112732, -0.12907925248146057, -0.6544231176376343, -0.756860613822937, 0.6307429075241089, -0.7170296907424927, -0.07210823148488998, -0.3082866668701172, 1.27673149108886...
def searchislands ( self, func _ ea, range _ start, range _ end ) : island _ guess = none func = sark. function ( func _ ea ) flow = idaapi. flowchart ( func. func _ t ) for block in flow : if range _ start < = block. startea and block. endea < = range _ end : if island _ guess is none or block. startea < island _ gues...
[ 0.40228596329689026, -1.0992062091827393, 0.6500385999679565, 0.5054064393043518, -0.36589953303337097, 0.20274367928504944, 0.31003209948539734, -0.45192816853523254, 0.057424094527959824, -0.3033786118030548, 0.18404780328273773, 1.2856981754302979, -0.539434552192688, 0.3396393358707428...
def parse _ aiml _ to _ jsonbot ( ) : for filename in glob. glob ( os. path. join ( aiml _ corpus _ dir,'*. xml') ) : result = [ ] tree = et. parse ( filename ) root = tree. getroot ( ) for child in root : # category mini _ unit = { } pattern = child. find ('pattern') template = child. find ('template') template _ list...
[ -0.437893807888031, 0.08997499197721481, 0.8720133304595947, -0.8027050495147705, -0.6574503183364868, 0.16579100489616394, 0.5287268757820129, -0.0484192855656147, 0.14290767908096313, 0.09507329761981964, -1.0644539594650269, -0.11366187781095505, 0.42135152220726013, 0.30014586448669434...