text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ eventsecurity ( self ) : # sale division self. login ( user _ name = sale _ login _ id ) # try to acceed the event module through restrictedtraverse # this will test the security of the module event _ module _ id = self. portal. getdefaultmoduleid ( portal _ type ='fax message') event _ module = self. portal...
[ 0.5253972411155701, -0.17034776508808136, 0.7326575517654419, 0.8146520256996155, 0.7612757086753845, 0.7140485644340515, 0.984061598777771, -0.2666943669319153, 0.5186523795127869, -0.1970554143190384, -0.5400658249855042, 0.21427413821220398, -0.7510896921157837, -0.02214883454144001, ...
def timeline _ json _ date ( date ) : # perform the sql query query = db. session. query ( globaltemperaturebymajorcity. date, globaltemperaturebymajorcity. latitude, globaltemperaturebymajorcity. longitude, globaltemperaturebymajorcity. city, globaltemperaturebymajorcity. country, func. avg ( globaltemperaturebymajorc...
[ -0.2887377142906189, 0.005481925792992115, 0.8190649747848511, -0.8091930747032166, -1.0053811073303223, -0.29511183500289917, -0.3263513445854187, -0.0036217127926647663, -0.7941552400588989, 1.1147726774215698, -1.1466662883758545, -0.08572553843259811, 0.9966654777526855, 0.989519417285...
def repair _ range ( keyspace, start, end ) : success, return _ code, cmd, stdout, stderr = \ run _ command ( " nodetool ", " repair % s - local - snapshot - pr - st % s - et % s " % ( keyspace, start, end ) ) return success, cmd, stdout, stderr
[ -0.7708722949028015, -0.1195007860660553, 0.32106107473373413, -0.5747134685516357, -0.540300726890564, -0.21531637012958527, -0.6684311032295227, 0.20330655574798584, -0.5992045402526855, -0.3160637319087982, -0.013027084991335869, 1.1898565292358398, -0.5410932898521423, -0.5908662080764...
def top _ five _ count ( ) : entries = get _ entries ( ) count _ dict = entries. countbyvalue ( ) count _ tuples = count _ dict. items ( ) sorted _ data = sorted ( count _ tuples, key = lambda entry : entry [ 1 ], reverse = true ) top _ five = sorted _ data [ : 5 ] with open ( file, " w " ) as f : for item in top _ fiv...
[ 0.14000454545021057, -0.7562097907066345, 0.6130329966545105, -0.0912599042057991, 0.4274771809577942, 0.10441871732473373, 1.2750849723815918, 0.019599376246333122, -1.0981264114379883, -0.09337277710437775, -0.29821425676345825, 0.0072479587979614735, 0.7519848346710205, -0.4775049984455...
def mark _ job _ as _ errored ( job _ id, error _ object ) : update _ dict = { " status " : " error ", " error " : error _ object, " finished _ timestamp " : datetime. datetime. now ( ), } _ update _ job ( job _ id, update _ dict )
[ -0.6859540343284607, -1.0670850276947021, 0.36477193236351013, 0.4659365117549896, 0.3551267087459564, 0.20601458847522736, -0.3586932122707367, 0.6527571678161621, 0.362091988325119, 0.4711669087409973, -1.0310348272323608, 1.00582754611969, 0.38146960735321045, 0.30181455612182617, 0.4...
def register ( self, username, password ) : message = dict ( ) if ( self. checkuserexists ( username ) ) : log. warning ( " could not register % s. username already taken. " % ( username ) ) message [ " success " ] = false message [ " error " ] = " username already taken. " return ( json. dumps ( message ) ) if ( len (...
[ -1.3764824867248535, 0.9050091505050659, 0.7372809052467346, -0.19765226542949677, 0.3641807436943054, 0.03923472762107849, 0.04991070181131363, -0.568961501121521, -0.3534393310546875, 0.6892185807228088, -1.5809298753738403, 0.19336020946502686, -0.3231995105743408, 0.4768015742301941, ...
async def test _ availability _ poll _ state ( hass : homeassistant, mqtt _ client _ mock : mqttmockpahoclient, mqtt _ mock : mqttmockhaclient, setup _ tasmota, ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) poll _ topic = " ...
[ 0.033738505095243454, 0.03954840824007988, 0.2593649923801422, -0.08552462607622147, 0.021366503089666367, 1.3798203468322754, 0.18005511164665222, 0.4710880517959595, 0.9508209228515625, 0.17876113951206207, -0.05108590051531792, -0.4873557388782501, 0.4676765203475952, 0.3730067312717438...
def total _ income ( self ) : value = 0 for category in self. categories : if category. category _ income > 0 : value + = category. category _ income return value
[ -0.2381439208984375, -0.2589394152164459, 0.5821144580841064, 0.5380818843841553, 0.6737651228904724, 0.2677399516105652, 0.5184690356254578, 0.6981585025787354, -0.420582115650177, -0.3388325273990631, 0.190556600689888, -0.6336557269096375, -0.41710981726646423, -0.36928385496139526, -...
def have _ same _ partitioning ( self, asset _ key1 : assetkey, asset _ key2 : assetkey ) - > bool : return self. get _ partitions _ def ( asset _ key1 ) = = self. get _ partitions _ def ( asset _ key2 )
[ -0.24787747859954834, -0.09863755851984024, 0.5414409637451172, 0.43994221091270447, -0.44786137342453003, -0.2534008026123047, -0.1374177485704422, -0.31716620922088623, -0.6405031681060791, 0.8859878778457642, -0.1307758092880249, -0.05338062345981598, -0.280337929725647, -0.016757050529...
def _ _ dir _ _ ( self ) : return get _ public _ attributes _ and _ methods ( self )
[ -1.284326195716858, -0.6248043179512024, 0.46284908056259155, -0.05824017897248268, -0.8022796511650085, 0.29312437772750854, 0.6062880754470825, -0.1909453570842743, 0.3143352270126343, -1.0599349737167358, -0.29926416277885437, 0.4832242429256439, 0.7494392395019531, 0.7205568552017212, ...
def update ( self, mouse _ pos, mouse _ up ) : if self. rect. collidepoint ( mouse _ pos ) : self. mouse _ over = true if mouse _ up : return self. action else : self. mouse _ over = false
[ -0.2527316212654114, -1.1061699390411377, 0.7147765755653381, 0.6814045310020447, -0.4815349876880646, 0.10345578193664551, -0.3222324550151825, -0.338852196931839, 0.3482694625854492, 1.1495933532714844, -0.0432097427546978, -0.14462509751319885, -0.3032204508781433, -0.33088356256484985,...
def convert _ string _ to _ list ( string ) : if type ( string ) not in [ str, list ] : return string if ( string. count ( " [ " ) = = 1 ) and ( string. count ( " ] " ) = = 1 ) : string = str ( sanitize _ string _ for _ list ( string ) ) try : new _ list = ast. literal _ eval ( str ( string ) ) except valueerror : retu...
[ -0.02669217623770237, -1.0333434343338013, 0.44086533784866333, 0.17503288388252258, -0.15134499967098236, -0.3208903968334198, -0.5174989104270935, 0.4169941544532776, 1.1453144550323486, 0.7550725936889648, -0.6216415762901306, 0.8558232188224792, -0.3577468693256378, 0.2039058953523636,...
def parse _ test _ data ( best _ result, vocab ) : test _ docs, test _ labels = read _ data ( os. path. join ('data ','test') ) tokens _ list = [ tokenize ( d, keep _ internal _ punct = best _ result ['punct'] ) for d in test _ docs ] x _ test, vocab = vectorize ( tokens _ list, best _ result ['features'], min _ freq =...
[ -0.19945599138736725, -0.5451039671897888, 0.413387268781662, -0.31050804257392883, 0.6815012097358704, -0.6205780506134033, -0.11171378940343857, 0.19629274308681488, -0.3597322106361389, -0.02278056927025318, -0.32315853238105774, -0.09985906630754471, -0.2437245100736618, -0.68439179658...
def inventory _ item _ id ( self ) - > optional [ str ] : return pulumi. get ( self, " inventory _ item _ id " )
[ 0.6859739422798157, -0.06610362976789474, 0.21644124388694763, 1.2188843488693237, 1.2702723741531372, 1.7069672346115112, -0.12184689939022064, 0.04924649000167847, 0.47132429480552673, 0.4048810303211212, 0.5392748713493347, 1.062718152999878, -0.4678709805011749, -1.455466866493225, -...
def _ _ init _ _ ( self, movie _ title, poster _ image, trailer _ youtube ) : self. title = movie _ title self. poster _ image _ url = poster _ image self. trailer _ youtube _ url = trailer _ youtube
[ -0.4498840570449829, -0.6831347346305847, 0.41428837180137634, 0.7052512168884277, 0.07047703862190247, 0.22783610224723816, -1.659481167793274, 0.8654248118400574, -0.5614892244338989, 0.4514429271221161, -0.0801922157406807, 0.504981517791748, 0.38508450984954834, 0.9145844578742981, 0...
def move _ by ( self, angle, rpm = none ) : diff _ angle = angle - self. angle self. rotate ( steps = angle / self. step _ angle, rpm = rpm )
[ -0.23522165417671204, 0.3307505249977112, 0.4937106966972351, 0.04828159138560295, 0.14031890034675598, -0.40237000584602356, 0.8842755556106567, -0.22564008831977844, -0.322827011346817, -0.5081139802932739, -0.5624843835830688, -0.9414095878601074, -0.961585283279419, -0.265136182308197,...
def value _ iteration ( mdp, epsilon = 0. 001 ) : u1 = { s : 0 for s in mdp. states } r, t, gamma = mdp. r, mdp. t, mdp. gamma while true : u = u1. copy ( ) delta = 0 for s in mdp. states : u1 [ s ] = r ( s ) + gamma * max ( sum ( p * u [ s1 ] for ( p, s1 ) in t ( s, a ) ) for a in mdp. actions ( s ) ) delta = max ( de...
[ -0.15914811193943024, -0.0697394609451294, 0.7293861508369446, 0.034909848123788834, -0.5309077501296997, 0.16382500529289246, 0.6370192170143127, 0.20877157151699066, -0.21620921790599823, 0.8169348835945129, 0.5210268497467041, -0.4429653584957123, -0.1473444402217865, -0.373530268669128...
def _ extractmetadata ( a, axes = none, attributes = none, id = none, omit = none, omitall = false ) : resultgrid = none if isinstance ( a, abstractvariable ) : if axes is none : axes = a. getaxislist ( omit = omit ) if omitall : axes = none if attributes is none : attributes = a. attributes if id is none : id = " vari...
[ 0.37106719613075256, -0.19434049725532532, 0.724275529384613, -0.6153148412704468, 0.013126295991241932, -1.1657037734985352, 0.0018780204700306058, -0.005293246358633041, 0.3794821798801422, 0.8232595324516296, 0.24625572562217712, 0.6414452791213989, 0.44620320200920105, -0.0259491950273...
def launch _ ec2 ( *, cluster _ name, num _ slaves, modules, key _ name, identity _ file, instance _ type, region, availability _ zone, ami, spot _ price = none, vpc _ id, subnet _ id, placement _ group, tenancy = " default ", ebs _ optimized = false, instance _ initiated _ shutdown _ behavior = " stop " ) : connection...
[ -0.30691686272621155, 0.08682219684123993, 0.5106645822525024, 0.08441197127103806, 0.8141010403633118, -0.8091270327568054, 0.1943081021308899, -0.3131180703639984, 0.010056122206151485, 0.6237594485282898, -0.30594179034233093, 0.8644928336143494, -0.30308640003204346, 0.0536858998239040...
def get _ email ( self ) : if self. email! ='' : return self. email return self. person. get _ email ( )
[ 0.6350964903831482, -0.00827222689986229, 0.29968351125717163, 0.6986344456672668, 0.09471339732408524, -0.023200353607535362, -0.09609650075435638, 0.2719823718070984, -0.3543018102645874, -0.8457815051078796, 1.1880173683166504, 0.6331292390823364, -0.15469913184642792, -0.35556632280349...
def _ _ init _ _ ( self, request _ url, client, options ) : super ( fileattachmentrequest, self ). _ _ init _ _ ( request _ url, client, options )
[ -0.2422798126935959, -0.38479337096214294, 0.521232545375824, 0.6307526230812073, -0.3264549672603607, 0.002916936995461583, 0.05514343082904816, 0.3965224325656891, 0.10178328305482864, -0.9173334240913391, 0.6216108202934265, 0.013383460231125355, 0.15701326727867126, 0.585752546787262, ...
def make _ baby ( cb _ settings, herd, screen ) : mouse _ x, mouse _ y = pygame. mouse. get _ pos ( ) cow _ 1 _ exists = false # get mating pair for cow in herd : if cow. drag = = true : cow _ 1 = cow cow _ 1 _ exists = true break for cow in herd : if cow. drag = = false and cow. rect. collidepoint ( mouse _ x, mouse _...
[ -0.43803998827934265, 0.14771637320518494, 0.8866209387779236, 0.7172132730484009, 0.8265434503555298, 0.4607948064804077, 0.5040579438209534, -1.3755226135253906, -0.6516181826591492, -0.1943061798810959, -0.7408645153045654, -0.40135934948921204, -0.15957306325435638, 0.9784497618675232,...
def marshal ( self ) : return'amqp'+ struct. pack ('bbbb ', 0, self. major, self. minor, self. revision )
[ 1.0521255731582642, -0.5006234049797058, 0.49886733293533325, -0.6483356356620789, -0.39107030630111694, 0.8270156383514404, -1.516416072845459, -0.31243398785591125, 0.9145764708518982, 0.37697169184684753, -0.04422653838992119, 0.8119980692863464, -0.8284398913383484, -0.4180020689964294...
def main ( ) : parser = argparse. argumentparser ( description = " converts fonts to fixed - width fonts. " ) parser. add _ argument ( " - o ", " - - output ", help = " output folder ", default = " output " ) parser. add _ argument ( " input ", help = " input font file ", nargs = " + " ) args = parser. parse _ args ( )...
[ 0.09897183626890182, -0.3526511490345001, 0.9760150909423828, 0.3590086102485657, 0.04567987099289894, -0.2535129487514496, 1.2473582029342651, 0.7246074080467224, -0.10414418578147888, -0.3976011872291565, 0.0577266551554203, -0.23006413877010345, -0.308963418006897, 0.9818233847618103, ...
def recoatwd ( self, w, ch, bias ) : lenw = len ( w ) u = array ( w,'d') if lenw < 128 : u = concatenate ( ( zeros ( 128 - lenw,'d'), u ) ) v = self. atwd _ intercept [ ch ] + self. atwd _ slope [ ch ] * u - bias # trim v to correct length v = v [ 128 - lenw : ] / self. ampgain [ ch % 4 ] return v [ : : - 1 ]
[ 0.34303683042526245, 0.10901863127946854, 0.4226037859916687, -1.5437630414962769, -0.5758786797523499, -0.0758911743760109, 0.3763183355331421, -0.7600767612457275, 0.5213977098464966, 0.14289651811122894, 0.726195752620697, 0.980103611946106, -0.2691064178943634, -0.914097785949707, 0....
def setupclass ( cls ) : cls. _ trhph = os. getenv ('uw _ trhph') cls. _ timeout = 30 timeout _ str = os. getenv ('timeout') if timeout _ str : try : cls. _ timeout = int ( timeout _ str ) except : log. warn ( " malformed timeout environment variable value'% s'", timeout _ str ) log. info ( " generic timeout set to : %...
[ -0.5116829872131348, 0.11169225722551346, 0.6440955996513367, -0.21310275793075562, 0.22001296281814575, 0.6537496447563171, 0.274387001991272, -0.03568504750728607, -0.453151673078537, 0.7076259255409241, 0.3547336459159851, -0.09137270599603653, 0.1250571608543396, 0.9430153965950012, ...
def _ _ getattr _ _ ( self, name ) : if hasattr ( self. wrappedfactory, name ) : return getattr ( self. wrappedfactory, name ) else : raise attributeerror ( "'% s'object has no attribute'% s'" % ( self. _ _ class _ _. _ _ name _ _, name ) )
[ -0.5974540710449219, -0.9344865083694458, 0.7039474844932556, -0.19020968675613403, -0.6591320037841797, -0.22480522096157074, 0.7538673281669617, -0.9952873587608337, 1.0708394050598145, -0.15430986881256104, 0.4071812629699707, 0.31960660219192505, 1.335065245628357, 0.3539208471775055, ...
def dot _ and _ sum ( lx, a ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy as np np _ lx = np. array ( lx ) np _ a = np. array ( a ) return ( np. dot ( np _ lx. t, np _ a ). t )
[ 0.23257534205913544, -1.4425783157348633, 0.995193600654602, -1.1700239181518555, -0.5216522216796875, 0.04929206520318985, 0.28958627581596375, 0.05867892503738403, 1.2397891283035278, 0.733771026134491, 0.017067817971110344, 0.8950340151786804, 0.7833541035652161, -0.004518706351518631, ...
def get _ triangles ( self, me : bool = false ) - > union [ triangle64, triangle32 ] : # form the column and row labels cols, rows = np. meshgrid ( * [ np. arange ( - int ( self. size ), int ( self. size ) + 1 ) ] * 2 ) # get the vectors in the maplet frame map _ vecs = self. scale * np. vstack ( [ cols. flatten ( ), r...
[ 0.3868521451950073, 0.7153140902519226, 0.9612838625907898, -0.8861494660377502, -0.383378267288208, 0.49552205204963684, -0.47883203625679016, -0.7936792969703674, 0.04934782534837723, -0.12577609717845917, -0.1216253787279129, -0.23058608174324036, 0.32521235942840576, -0.196590915322303...
def test _ unit _ editform ( self ) : with patch ('user _ auth. auth _ forms. forms') as form : form. charfield = magicmock ( return _ value = " charfield " ) form. imagefield = magicmock ( return _ value = " imagefield " ) ins = editform ( ) ins. cleaned _ data = magicmock ( return _ value = " cleaned _ data " ) with ...
[ -0.8521913290023804, 0.24552978575229645, 0.5326722860336304, -0.38942232728004456, 0.9063674211502075, 0.7837243676185608, 0.6352653503417969, 0.09358812868595123, 0.27982354164123535, -1.2044405937194824, -0.9693335294723511, 0.06948848068714142, 0.2523370683193207, -0.30121809244155884,...
def rasterize _ mesh _ with _ shape _ image ( self, mesh ) : return self. rasterize _ mesh _ with _ f3v _ interpolant ( mesh, per _ vertex _ f3v = none )
[ -0.01477719284594059, 0.34279289841651917, 0.6173348426818848, 0.5152781009674072, 0.11173006147146225, 0.23457399010658264, -0.452597439289093, -0.4852149784564972, 0.1681002378463745, -0.21533754467964172, 0.09847991168498993, 0.06234380975365639, -0.7427291870117188, 0.6449510455131531,...
def gf _ sub _ const ( f, a, p ) : if not f : a = - a % p else : a = ( f [ - 1 ] - a ) % p if len ( f ) > 1 : return f [ : - 1 ] + [ a ] if not a : return [ ] else : return [ a ]
[ 0.30369311571121216, 0.21129995584487915, 0.5720433592796326, 0.45786044001579285, 0.4214971959590912, 0.8997095227241516, -0.4014357030391693, 1.3424513339996338, -0.26103475689888, 0.6784818768501282, 0.22041702270507812, 0.465511679649353, -0.8027288317680359, -0.7656571865081787, 0.2...
def enable ( self, * names : str ) - > none : for name in names : self. get _ plugin ( name ). enable ( )
[ -0.8659980297088623, -0.6182727217674255, 0.3380177915096283, 0.3894747793674469, 1.1865410804748535, 0.03445228189229965, -0.5646669864654541, 0.3538950979709625, 0.05106808990240097, 0.23880994319915771, -1.603943109512329, 0.35014608502388, -0.5247461795806885, 0.09324108064174652, -0...
def prepare ( options, replacements ) : if not isinstance ( options, dict ) and not isinstance ( options, str ) : return options if isinstance ( options, str ) : value = replacements. get ( options ) if value : return value if options. find ('<') > 0 or options. find ('{') > 0 : for key, value in replacements. items ( ...
[ -0.22790175676345825, 0.3975112736225128, 0.6106168627738953, -0.35828104615211487, -0.8901447653770447, -0.9736313223838806, -0.006317084189504385, -0.7106900215148926, 0.8174313902854919, -0.1915684938430786, 0.11971886456012726, 0.028294408693909645, 0.0902128517627716, 0.40591907501220...
def _ assign _ to _ class _ scan ( fields _ dict, mass _ centers, var _ names = ('dbz ','zdr ','kdp ','rhohv ','h _ iso0'), weights = np. array ( [ 1., 1., 1., 0. 75, 0. 5 ] ), t _ vals = none ) : # prepare data nrays = fields _ dict [ var _ names [ 0 ] ]. shape [ 0 ] nbins = fields _ dict [ var _ names [ 0 ] ]. shape ...
[ -0.8913440704345703, -0.49930340051651, 0.884562075138092, -0.4824984073638916, 0.08421202749013901, 0.6232789158821106, 0.5417991280555725, 0.02732708863914013, -1.024885654449463, 0.48519018292427063, 0.15706418454647064, 0.24268966913223267, 0.5627041459083557, 0.7300583720207214, 0.4...
def pred _ input ( self, pred _ year, games ) : # initialize dataframe for storing current year stats on teams playing. also obtain ratings and # initialize number of game to update user on progress. all _ games = pd. dataframe ( ) ratings = cfb ( pred _ year, self. year2 ). ratings ( ) game _ num = 1 # loop through ea...
[ -0.35831642150878906, 0.30655381083488464, 0.741494357585907, -0.8843421936035156, -0.14924673736095428, 0.47556835412979126, 0.4572523236274719, -0.5846999883651733, -0.5011600852012634, 0.0015384972793981433, 0.4983411133289337, 0.4422166049480438, 0.4581814706325531, 0.08658367395401001...
def scheme ( request ) : return request. param
[ -1.2407442331314087, -0.07173038274049759, 0.38550272583961487, -0.23087920248508453, 0.6392988562583923, -0.18512873351573944, 0.08115383982658386, -0.610194981098175, 0.3480243384838104, 0.37146711349487305, 1.097773790359497, 0.45170849561691284, 1.196845531463623, 0.5059952139854431, ...
def sort _ key _ for _ asset _ partition ( asset _ graph : assetgraph, asset _ partition : assetkeypartitionkey ) - > int : partitions _ def = asset _ graph. get _ partitions _ def ( asset _ partition. asset _ key ) time _ partitions _ def = get _ time _ partitions _ def ( partitions _ def ) if time _ partitions _ def ...
[ -0.42911043763160706, -0.4064060151576996, 0.6908878087997437, -0.793328046798706, -0.5641759037971497, -0.6693589091300964, 0.38713085651397705, -0.5325184464454651, -0.7769312262535095, 0.492954283952713, 0.42641451954841614, 0.013854705728590488, -0.01968357153236866, 0.1726025491952896...
def get _ cumulative _ returns ( self ) : returns = self. get _ returns ( ) prev _ return = 1 for month, percentage in returns. items ( ) : returns [ month ] = prev _ return * ( 1 + percentage ) prev _ return = returns [ month ] return returns
[ 0.41812288761138916, -0.05801086127758026, 0.6632975935935974, 0.37125667929649353, 0.05555275082588196, -0.08597727864980698, 0.3092328906059265, 0.20696982741355896, -0.2585849165916443, 0.10345720499753952, 0.0830223560333252, 0.15552090108394623, -0.4955883026123047, 0.2935945391654968...
def get _ length ( self ) : # o ( n ) this _ len = 0 this _ node = self. root if this _ node = = none : # edge case = empty queue return this _ len this _ len + = 1 traversed _ list = false while not traversed _ list : if this _ node. next = = none : traversed _ list = true else : this _ node = this _ node. next this _...
[ 0.20564953982830048, 0.28267136216163635, 0.8811016082763672, -0.547974169254303, 0.09149225801229477, -0.6379097104072571, 0.8393033146858215, 1.2198668718338013, 1.304787039756775, 0.2985372841358185, -0.7439807057380676, 0.38992512226104736, -0.8425833582878113, 1.2952150106430054, -0...
def y _ min ( self ) - > float : return 0
[ 0.7134795784950256, -0.7206082940101624, 0.3350280225276947, 0.9892730712890625, 0.3700507879257202, 0.4835621118545532, -0.36074894666671753, -0.7868604063987732, 0.13637685775756836, -1.2622977495193481, -0.11594966799020767, -0.11459492892026901, -0.06741457432508469, 0.6750726103782654...
def full _ name ( first, last ) : return first + " " + last
[ 1.3251359462738037, -0.8158929944038391, 0.7158934473991394, -0.6167672276496887, -0.21322938799858093, 0.19497959315776825, -2.0174574851989746, -0.26228848099708557, -1.0934267044067383, 0.39931246638298035, 0.0016008265083655715, 0.2841196060180664, 0.18383407592773438, -0.3292480409145...
def optimize ( nn _ last _ layer, correct _ label, learning _ rate, num _ classes ) : # todo : implement function # get classification with argmax # loss as classification, pixel - wise with correct label return none, none, none
[ -1.0675945281982422, -0.060195375233888626, 0.6897839903831482, 0.6224945783615112, 1.5645979642868042, -0.7054914832115173, -0.32437053322792053, -0.7774842381477356, -0.1217440515756607, 0.7767025828361511, 0.3389665484428406, -0.3014015853404999, 0.2764274775981903, 0.23270836472511292,...
def getindices ( len _ dataset : int, perc _ train : float = 0. 7, perc _ valid : float = 0. 1, seed = none ) - > union [ tuple [ list [ int ], list [ int ] ], tuple [ list [ int ], list [ int ], list [ int ] ] ] : if perc _ train < 0 or perc _ valid < 0 or perc _ train + perc _ valid > 1 : raise valueerror ('error - p...
[ -0.497363805770874, -0.13445036113262177, 0.7178062796592712, -0.12151321023702621, -0.5412768125534058, 0.23657502233982086, 0.782747209072113, 0.02023060992360115, 0.2632667124271393, -0.1923687607049942, 0.325650691986084, -0.24636948108673096, -0.4518704116344452, -1.3152267932891846, ...
def save _ conversations _ list ( client, file _ name _ prefix = " " ) : team _ domain = get _ team _ info ( client ) [ " domain " ] os. makedirs ( team _ domain, exist _ ok = true ) file _ name = " conversations _ list. json " file _ path = os. path. join ( team _ domain, file _ name ) with open ( file _ path, mode = ...
[ -0.44874852895736694, -0.6221696734428406, 0.5999171733856201, -0.5749354958534241, 0.5574741959571838, 0.1668223738670349, 0.0645570158958435, -0.3729137182235718, -0.21790353953838348, 0.46739599108695984, -1.2062737941741943, 0.48632097244262695, 0.3990928530693054, 0.25077149271965027,...
def a ( self ) : return self. _ a
[ -0.4047725796699524, -0.9309946298599243, 0.44678783416748047, -0.806864321231842, 0.24441523849964142, 0.9065163135528564, 2.008707046508789, 0.2546485960483551, 0.5887119770050049, -1.5013056993484497, 0.7140138745307922, 0.8686416745185852, 0.537499189376831, -0.11603081971406937, 0.0...
def files _ exist ( self, file _ paths ) : results = { } def exist _ thunk ( paths, interface ) : results. update ( interface. files _ exist ( paths ) ) if len ( self. _ threads ) : for block in scatter ( file _ paths, len ( self. _ threads ) ) : self. put ( partial ( exist _ thunk, block ) ) else : exist _ thunk ( fil...
[ -0.3778425455093384, 0.4749337136745453, 0.5244410037994385, 0.3126832842826843, 1.1385834217071533, -0.09891503304243088, 0.7367376089096069, 0.12697215378284454, -0.9161922335624695, 0.7295940518379211, 0.12732070684432983, -1.790867567062378, -1.1573679447174072, 0.909774124622345, -0...
def addpipedbrowser ( self, browser, pipedmessage ) : if pipedmessage is not none : self. pipedbrowsers. append ( ( browser, pipedmessage ) )
[ -1.2187626361846924, 0.05430116876959801, 0.41035187244415283, 0.22861723601818085, 0.4135122299194336, 0.10183228552341461, -0.47365114092826843, -0.2752782106399536, 0.5528913736343384, 0.10065552592277527, 0.4344094395637512, 0.7061577439308167, -1.6413214206695557, 1.339382290840149, ...
def baseline ( config _ file, session _ file ) : cfg = load _ config ( config _ file ) @ contextmanager def path _ or _ temp ( path ) : if path is none : with tempfile. temporarydirectory ( ) as tmpdir : yield path ( tmpdir ) / " session. sqlite " else : yield path with path _ or _ temp ( session _ file ) as session _ ...
[ 0.3993834853172302, -0.018903672695159912, 0.7115570306777954, 0.48368629813194275, 1.1751823425292969, 0.31854552030563354, 0.8187796473503113, 0.15949663519859314, -0.15144343674182892, 0.5884101390838623, -0.10782691091299057, 0.19287672638893127, -0.6171781420707703, -0.260653346776962...
def bootstrap ( ) : bootstrapper = bootstrapperthread ( ) bootstrapper. daemon = true bootstrapper. start ( ) while len ( addressbook. addresses ) = = 0 : try : current _ seed = random. choice ( addressbook. seed _ addresses ) client = addressclient ( current _ seed ) bootstrapper. seed _ client = client client. handsh...
[ -0.22465722262859344, 0.026055876165628433, 0.5067918300628662, 0.15254941582679749, 0.9175534844398499, -0.322771281003952, 0.41259801387786865, -0.5025964379310608, -0.37682443857192993, -0.2337948977947235, 0.2636606693267822, 0.40747711062431335, -0.6344597339630127, 0.1751312762498855...
def post ( self ) : app _ id = app _ identity. get _ application _ id ( ) user _ key = ndb. key ( urlsafe = self. request. get ('user _ id') ) subject ='this is a reminder!'body = ('hello { }, it is your turn. please complete your'' tic tac toe with gameid = { }! '. format ( user _ key. get ( ). name, self. request. ge...
[ 0.0001489389396738261, 0.36883556842803955, 0.4585053026676178, -0.10515038669109344, 0.6522460579872131, 0.07611025124788284, -0.3659828007221222, -1.092960000038147, 0.10946780443191528, 0.561968982219696, -0.18852421641349792, 0.8225311636924744, -0.9176816344261169, -0.0259551387280225...
def generate _ cert _ and _ key ( tmpdir ) : if not isinstance ( tmpdir, py. path. local ) : tmpdir = py. path. local ( tmpdir ) key _ file = str ( tmpdir. join ( " email - server - key. pem " ) ) cert _ file = str ( tmpdir. join ( " email - server. pem " ) ) # make a new key key = rsa. generate _ private _ key ( publi...
[ 0.5249494910240173, 0.3104638159275055, 0.75093013048172, -0.34624922275543213, -0.6119093894958496, -0.05093168467283249, -0.0895729511976242, 0.2995448708534241, 0.027810120955109596, 0.03574787452816963, -0.7700849771499634, 0.235090434551239, 0.08217084407806396, 0.5187492370605469, ...
def get _ link _ soup ( link ) : viewpageres = requests. get ( link ) viewpageres. raise _ for _ status ( ) # make soup of view page viewpagesoup = bs4. beautifulsoup ( viewpageres. text,'html. parser') return viewpagesoup
[ -0.46491825580596924, 0.4717395603656769, 0.36945369839668274, -0.24305997788906097, -0.07967134565114975, -0.4951065480709076, 0.0889611467719078, -0.23966072499752045, 1.4007445573806763, -0.7417527437210083, 0.8565621972084045, 0.12665922939777374, 1.0245805978775024, -0.689828097820282...
def test _ add _ edge _ recorded ( gr ) : gr. add _ edge ('a ','b') assert gr. edges _ list = = [ ('a ','b ', 1 ) ]
[ -0.03624509274959564, 1.0590232610702515, 0.412352055311203, 0.43159371614456177, 1.829177737236023, 0.40468263626098633, -0.625532329082489, 0.6562392711639404, 0.023061055690050125, 0.41325414180755615, 0.06958704441785812, 0.13509027659893036, -0.7707151174545288, -0.012662687338888645,...
def get _ nonfile _ names ( self ) : res = [ ] for part in self. parts : filename = self. get _ part _ ct _ param ( part, " filename ", none ) if filename is none : name = self. get _ part _ name ( part ) if name : res. append ( name ) return res
[ -0.25574302673339844, -1.1643261909484863, 0.5498048663139343, 0.27128908038139343, 0.28730717301368713, 0.38165849447250366, -0.11412657052278519, -0.06348105520009995, -0.777449905872345, 0.583693265914917, 0.025601541623473167, -0.328007310628891, -0.9997317790985107, 1.359780192375183,...
def writeoutput ( self, i = 0, forceoverwrite = false, filename = " ", * * kwargs ) : if self. writer is not none : self. writer. write ( self, i, forceoverwrite, filename, * * kwargs )
[ -1.2538710832595825, -0.04844576120376587, 0.2684690058231354, 0.5033482313156128, 1.0004489421844482, -0.1788221001625061, 1.1756700277328491, 0.4401717185974121, -0.651523232460022, -0.5562533140182495, -0.46251529455184937, -1.0448172092437744, -0.7211047410964966, 0.01135274488478899, ...
def _ _ init _ _ ( self, scaler, test _ split = 0. 1, val _ split = 0. 2, preimputation = true, noise = true, * * kwargs ) : args = { " noise _ args " : { " distribution " : " uniform ", " size " : 0. 5, " before _ scaler _ fit " : true, " return " : true }, " preimpute _ args " : { " fn " : " zero " } } update _ kwarg...
[ -0.17210710048675537, 0.31933504343032837, 0.6914196014404297, -0.049208302050828934, -0.5699913501739502, -0.0150722311809659, 0.5207197666168213, 0.36901384592056274, -0.4303940236568451, 0.34510740637779236, -0.796479344367981, -0.3121587336063385, -0.4856414198875427, 0.864359319210052...
def from _ discovery _ message ( cls, device _ config : dict, sensor _ config : dict, platform : str, sensor _ name : str, value _ path : list [ str | int ], quantity : str, ) - > tasmotasensorconfig : unit = sensor _ unit _ map. get ( quantity, " " ) if quantity in sensor _ dynamic _ unit _ map : key, supported _ unit...
[ 0.5080722570419312, -0.2516785264015198, 0.37373489141464233, -0.005523223429918289, -0.3067740797996521, -0.3368130028247833, -0.28425419330596924, -0.3205447793006897, 0.021062498912215233, 0.29146936535835266, -0.20461443066596985, -0.11139241605997086, 0.6761494874954224, 0.40396195650...
def make _ regressor ( n _ hidden _ layers = 3, hidden _ layer _ size = 100, activation ='tanh ', dropout _ prob = 0. 0, learning _ rate = 1. e - 3 ) : # inputs input _ layer = input ( shape = ( settings. n _ thetas _ features, ) ) # network hidden _ layer = dense ( hidden _ layer _ size, activation = activation ) ( in...
[ 0.33515849709510803, 0.20788122713565826, 0.9631820321083069, 0.2500934302806854, -0.21792760491371155, 0.054923441261053085, -0.3474532663822174, -0.3261408507823944, -0.03223036229610443, 0.38257139921188354, -0.4890504777431488, -0.3896070420742035, 0.16639858484268188, -0.4523020386695...
def distance ( self, start, destination ) : logger. debug ( " start : % s, dest : % s ", start, destination ) diffx = destination [ 0 ] - start [ 0 ] diffy = destination [ 1 ] - start [ 1 ] distance = min ( abs ( diffx ), abs ( diffy ) ) + abs ( diffx - diffy ) logger. debug ( " diffx : % d, diffy : % d, distance : % d...
[ -0.8081477880477905, -0.9103851318359375, 0.7163596749305725, -0.21592383086681366, -0.5397118330001831, 0.21057187020778656, -0.184776172041893, -0.1467795968055725, 0.07453447580337524, 0.3964422345161438, -0.3419068455696106, 0.5192993879318237, 0.17529429495334625, -0.6857855319976807,...
def to _ output ( self, value ) : return json. loads ( resolwe _ runtime _ utils. save _ file ( self. name, value. path, * value. refs ) )
[ -0.9816963076591492, -1.056207299232483, 0.31919553875923157, -1.1745473146438599, -0.20958520472049713, -0.7669616937637329, 0.08323268592357635, -1.4178450107574463, -0.6480977535247803, 1.0494970083236694, -0.4526810646057129, -0.35071995854377747, -0.27803099155426025, -0.3268304169178...
def bcd2int ( dat ) : ret = 0 f = 1 while dat! = 0 : val = dat & 0x0f if val > 9 : warnings. warn ( " pseudo - tetrade encountered in bcd conversion. " ) ret + = f * val f * = 10 dat = dat > > 4 return ret
[ 0.6435160636901855, 0.36462271213531494, 0.5292778015136719, -0.8064508438110352, 0.421909898519516, -0.923098087310791, 0.18814685940742493, -0.6809582114219666, -0.5518348217010498, -0.4613127112388611, -0.49469661712646484, -0.04989767074584961, -1.0131338834762573, 0.07083017379045486,...
def allow _ methods ( self ) - > sequence [ str ] : return pulumi. get ( self, " allow _ methods " )
[ 0.07372377812862396, 0.6879485845565796, 0.4687553644180298, 0.8430122137069702, 0.6690554022789001, 1.1015838384628296, -0.05873240903019905, -0.5083073973655701, 0.5602156519889832, 0.3332293927669525, -0.3867180049419403, 0.31065255403518677, -0.31217271089553833, -0.24504674971103668, ...
def recursion _ fact ( n ) : if n = = 1 : return n else : return n * recursion _ fact ( n - 1 )
[ 0.3431553244590759, 1.7186744213104248, 0.20935359597206116, 1.03951895236969, 0.4099043905735016, -0.31415048241615295, 1.0798633098602295, 0.37329980731010437, 0.6012549996376038, -1.2006218433380127, 0.06287679076194763, 0.5490950345993042, -0.04106602445244789, 0.6091282963752747, 0....
def get _ word ( ) : for word in word _ list : words = word. strip ( ) my _ list = [ ] my _ list. append ( words ) secret _ word = random. choice ( my _ list ) return secret _ word
[ 0.2027878761291504, 0.1514502465724945, 0.4532274603843689, 0.4500468969345093, 0.7864795327186584, 0.6227718591690063, -1.1601336002349854, 1.0705318450927734, 0.2431587278842926, 0.6387895941734314, -1.0934078693389893, 1.1791468858718872, -0.9240392446517944, 1.4233062267303467, -0.14...
def analyze _ seq ( description, seq ) : numcys = 0 for res in seq : if res. pdb _ name = ='cys': numcys + = 1 print " % s contains % d residues, of which % d are cys " \ % ( description, len ( seq ), numcys )
[ 0.5019866824150085, 0.285334050655365, 0.48124003410339355, -0.5551286935806274, 0.7006906270980835, -1.0055230855941772, 0.2648731768131256, 0.9649682641029358, -0.08409929275512695, -0.01963607221841812, -0.6703411936759949, 0.28757598996162415, 0.21936345100402832, 0.9488887786865234, ...
def status ( self ) - > str : return pulumi. get ( self, " status " )
[ 0.628982424736023, -0.5512087345123291, 0.2471575140953064, 0.35810336470603943, 0.7170640826225281, 1.4131439924240112, -0.727906346321106, 0.6225358843803406, 0.5962852835655212, 0.14849665760993958, 0.04228444769978523, 0.8075445294380188, 0.6863017082214355, -1.1018552780151367, -0.5...
def getslice ( fp ) : fv = [ ] line = ensure _ string ( fp. readline ( ) ) while not line. startswith ('t') and line! ='' : # print'skipping line :'+ line # don't want to skip the part of bbv files at the end which give # information on the basic blocks in the file. if'block id :'is # found, then back up the file point...
[ 0.12445172667503357, -1.5180648565292358, 0.75380539894104, 0.18038484454154968, 0.06434021145105362, -0.370361328125, 0.25297126173973083, 0.3956387937068939, -0.9936646223068237, 0.5251749753952026, -0.34253716468811035, -0.4527314305305481, 0.19168736040592194, 0.17220589518547058, -0...
async def ignore _ channel ( self, ctx : commands. context, channel _ str : str ) : # searches for channel id in string like'< # 546528012430999552 >'channel _ id = re. search ( r'\ d + ', channel _ str ) if not channel _ id : return await ctx. send ( f'invalid channel : { channel _ str }') channel _ id = int ( channel...
[ -0.0574922189116478, -0.04974238947033882, 0.7381339073181152, -0.5032511353492737, 0.9007045030593872, 1.0600465536117554, 0.1089620292186737, -0.6724963784217834, 0.7378516793251038, -0.14945672452449799, 0.003408396150916815, 1.407804250717163, -1.0058938264846802, 0.06606798619031906, ...
def gf _ div ( f, g, p ) : df = gf _ degree ( f ) dg = gf _ degree ( g ) if not g : raise zerodivisionerror ( " polynomial division " ) elif df < dg : return [ ], f inv = zp _ inv ( g [ 0 ], p ) h, dq, dr = f [ : ], df - dg, dg - 1 for i in xrange ( 0, df + 1 ) : coeff = h [ i ] for j in xrange ( max ( 0, dg - i ), min...
[ -0.06966246664524078, 0.15375539660453796, 0.7424532771110535, 0.021314196288585663, -0.05855582281947136, 0.4957874119281769, -0.014956140890717506, 0.3897838592529297, -0.6570626497268677, -0.057160068303346634, -0.21358825266361237, -0.030604077503085136, -0.4542297124862671, -0.3468670...
def modified _ time ( self ) - > optional [ str ] : return pulumi. get ( self, " modified _ time " )
[ 0.6326792240142822, -0.12688806653022766, 0.34489625692367554, 0.038786519318819046, 0.9340959191322327, 0.8148696422576904, -0.7061263918876648, -0.029243366792798042, 0.8511230945587158, 0.4957784116268158, 0.2548680007457733, 0.5544459223747253, -0.03214097023010254, -0.4374020695686340...
def get _ resources _ in _ dir ( path, datafolder ) : # if the directory does not exists, return if not os. path. isdir ( path ) : return # iterate over the items inside of the resources directory for found in os. scandir ( path ) : # if is not a directory, continue to the next iteration if not found. is _ dir ( ) : co...
[ 0.8199746012687683, 0.3278144299983978, 0.6358597278594971, -0.6114107370376587, -0.6468005180358887, -0.3105012774467468, -0.28804299235343933, -0.08188587427139282, 0.3516039550304413, -0.22610245645046234, 0.4024139940738678, 0.5353973507881165, -0.35701996088027954, 0.6517605781555176,...
def test _ user _ email _ normalized ( self ) : email = " test @ recipeapi. com " password = " somethingrandom " user = get _ user _ model ( ). objects. create _ user ( email = email, password = password ) normalized _ email = " @ ". join ( [ email. split ( " @ " ) [ 0 ], email. split ( " @ " ) [ 1 ]. lower ( ) ] ) sel...
[ 0.7373465299606323, -0.3050205111503601, 0.23145534098148346, -0.010704206302762032, -0.5007879734039307, 1.029934287071228, -0.33856701850891113, 0.4886627197265625, -0.09772263467311859, -0.27280786633491516, -0.5495676398277283, 0.199416846036911, -0.5213791728019714, -0.910810172557830...
def compute _ stat ( stat _ to _ comp, ipdat ) : if ( stat _ to _ comp = ='average') : stat _ value = np. average ( ipdat, weights = none ) elif ( stat _ to _ comp = ='max') : stat _ value = np. max ( ipdat ) elif ( stat _ to _ comp = ='mean') : stat _ value = np. mean ( ipdat ) elif ( stat _ to _ comp = ='median') : s...
[ -0.24587006866931915, -0.533028244972229, 0.6472166180610657, -0.31998956203460693, -0.2128394991159439, -0.17738306522369385, -0.269695907831192, 0.0006885364418849349, 0.14731678366661072, 0.06377222388982773, 0.5460358262062073, 0.5743375420570374, 0.7271252274513245, -0.822165608406066...
def insert _ in _ database ( self, categories : list [ category ], session : session ) - > none : columns = sorted ( categories [ 0 ]. _ _ dict _ _. keys ( ) ) values = [ ] for category in categories : values. append ( ( str ( uuid1 ( ) ), category. name, category. off _ id, category. url ) ) stmt = session. prepare _ ...
[ -1.501562476158142, 0.9705792665481567, 0.27749472856521606, 0.05631931498646736, 0.5017867088317871, 0.5860884189605713, -0.17990164458751678, -0.012264708988368511, -0.5155656933784485, -0.1491674780845642, -0.6110125184059143, -1.6077312231063843, -0.4430778920650482, 0.9400308728218079...
def sendparentalformmail ( request, * args, * * kwargs ) : post _ dict = request. post program _ key = post _ dict. get ('program _ key') if not program _ key : return error _ handler. logerrorandreturnok ('the program key is not specified : % s'% post _ dict ) program = gci _ program _ logic. getfromkeyname ( program ...
[ -0.3651726543903351, 0.44697868824005127, 1.0457404851913452, 0.3104288578033447, 0.04131360352039337, 0.4308778643608093, 0.38183271884918213, -0.2387515902519226, -0.8012017011642456, 0.5809319615364075, -0.7970527410507202, 0.7161560654640198, -0.3039717972278595, 0.10452002286911011, ...
def instance ( self ) : try : return self. _ instance except attributeerror : self. _ instance = self. _ decorated ( ) return self. _ instance
[ -0.21368838846683502, 0.05194292217493057, 0.4026966691017151, -0.4576808214187622, -0.14970366656780243, 0.559311032295227, 0.6237515807151794, -0.45921146869659424, 0.9803875088691711, -0.5886328816413879, 0.760248064994812, 0.25580331683158875, 0.23436397314071655, -0.06480211019515991,...
def _ _ init _ _ ( self, sym : optional [ symbol ], args :'list [ any ]') : self. _ symbol = sym self. _ args = args self. canonize ( )
[ 0.07132592797279358, 0.5685919523239136, 0.1777426153421402, 0.5559747815132141, 1.061915397644043, -1.3118906021118164, -0.0715600848197937, 1.5157290697097778, 0.06333379447460175, -0.1665993332862854, -0.8791521191596985, 0.4601145088672638, 0.6070643067359924, 0.9588168263435364, 0.0...
def get _ count ( query ) : result = cursor. execute ( query ). fetchall ( ) return result [ 0 ] [ 0 ]
[ 0.36170893907546997, 0.3944375216960907, 0.344927579164505, 0.20076021552085876, 0.45150086283683777, -0.29616349935531616, -0.7344769239425659, 0.057389989495277405, -0.5183020830154419, -0.15380607545375824, -0.013741174712777138, -0.5406798124313354, 0.11751742660999298, -0.125539690256...
def remove _ with _ prefix ( dl, prefix ) : dl = list ( filter ( lambda x : x is not none, dl ) ) return list ( filter ( lambda x : not x. startswith ( prefix ), dl ) )
[ 0.1494073122739792, -1.2210631370544434, 0.6277830004692078, -0.36901941895484924, -1.2063419818878174, -1.2430616617202759, -2.050771951675415, 0.8546433448791504, 0.8676450848579407, 0.937195897102356, -0.7453460693359375, 0.7138108015060425, -0.13894321024417877, -0.12669064104557037, ...
def print _ digits ( number ) : if 0 < = number < 100 : print " the tens digit is " + str ( number / / 10 ) + ", ", print " and the ones digit is " + str ( number % 10 ) + ". " else : print " error : input is not a two - digit number. "
[ -0.7950361967086792, 0.3346047103404999, 0.48264938592910767, 0.018869629129767418, 0.6063905358314514, 0.04643644765019417, 0.2076447308063507, 0.0028579658828675747, 0.34192126989364624, -0.09485695511102676, 0.07660780847072601, 0.9650318622589111, 0.7732796669006348, 1.270463466644287,...
def copy _ values _ to ( self, bus ) : if not isinstance ( bus, bus ) : raise exception ( " error : invalid input " " " ) if bus. width! = self. _ width : raise exception ( " error : width of both the busses must be same " ) bus. set _ voltage _ all ( self. get _ voltage _ all ( ) )
[ -0.905794620513916, -0.008758974261581898, 0.6761356592178345, 1.3126354217529297, -0.2521515488624573, 0.905042290687561, -0.19037850201129913, 0.005053739529103041, 0.3389548361301422, -0.06089450791478157, -0.2610544264316559, 0.6481626629829407, -1.0387624502182007, 1.2078864574432373,...
def _ _ init _ _ ( self ) : self. login _ uri ='https : / / worldjuniors. tsn. ca / tsn / secure / login'self. games _ uri ='http : / / worldjuniors. tsn. ca / tsn / servlets / games'self. publish _ uri ='http : / / worldjuniors. tsn. ca / tsn / servlets / publishpoint'self. login _ user ='username'self. login _ pass =...
[ -1.0814208984375, -0.23103319108486176, 0.42826342582702637, 0.294129341840744, 0.29635366797447205, 0.2575683295726776, -0.9899954199790955, 0.1709434986114502, -0.35036736726760864, 0.14544709026813507, -0.37817737460136414, 0.0692991241812706, 0.28717026114463806, 0.36918339133262634, ...
def pytest _ collection _ modifyitems ( config, items ) : if global _ var ['config']! = none : # filter and re - order tests sequencer _ features. filter _ order _ tests ( config, items ) # configure the tests with the reruns and timeout features sequencer _ features. configure _ reruns _ timeout _ features ( items )
[ -0.13383904099464417, -0.1263125240802765, 0.4641209542751312, 0.7088574171066284, 1.343581199645996, -0.2760026752948761, 0.6060894131660461, 0.8443176746368408, 0.56989586353302, 0.5218805074691772, -0.6451101303100586, -0.020314261317253113, -0.36390992999076843, 0.2170727550983429, 0...
def write _ table ( table, fp ) : writer = csv. writer ( fp ) writer. writerow ( [ " keycode ", " name " ] ) for row in table : writer. writerow ( row )
[ -0.08243666589260101, -0.5435173511505127, 0.35330578684806824, 1.2725167274475098, -0.09286454319953918, -0.1465045064687729, -0.6438716650009155, 0.5054280757904053, -0.7916318774223328, 0.32039862871170044, -0.5902863144874573, -0.5127375721931458, 0.5936662554740906, 0.5194507837295532...
def sling _ servlet _ extensions ( self, sling _ servlet _ extensions : confignodepropertystring ) : self. _ sling _ servlet _ extensions = sling _ servlet _ extensions
[ 1.305716633796692, -0.09935752302408218, -0.19501467049121857, 1.0231348276138306, -1.0223503112792969, 1.3099795579910278, -0.1585955172777176, -0.032270342111587524, 1.019532322883606, -0.5380766987800598, -1.1878107786178589, -0.4417385160923004, 0.3697865307331085, 0.21350421011447906,...
def updateexchangereactionbounds ( self, carbonsource = none, carbonuptakerate = 20 ) : exchangerxnids = [ rxn. id for rxn in self. gem. exchanges if len ( rxn. reactants ) = = 0 ] for id in exchangerxnids : try : if self. _ _ isorganicexchange ( id ) : self. gem. reactions. get _ by _ id ( id ). upper _ bound = 0 exce...
[ -0.7694768905639648, -0.5773009061813354, 0.6146564483642578, 0.046075526624917984, 0.4260307252407074, -0.3922750949859619, -0.023061562329530716, 0.6558461785316467, 0.48984962701797485, 0.03924215957522392, -0.06522499769926071, 0.5145861506462097, -0.9523947238922119, 0.410013437271118...
def is _ metal ( self, atom ) : return self. struct _ dict [ " sites " ] [ atom ] [ " species " ] [ 0 ] [ " element " ] not in [ " h ", " he ", " b ", " c ", " n ", " o ", " f ", " ne ", " si ", " p ", " s ", " cl ", " ar ", " as ", " se ", " br ", " kr ", " te ", " i ", " xe ", " at ", " rn " ]
[ -0.7172006964683533, 0.20139296352863312, 0.6264200210571289, -0.691692590713501, -0.33243462443351746, 0.7073374390602112, -0.5040163397789001, -0.5965563654899597, 0.8301919102668762, 0.671116828918457, -0.47233858704566956, 1.1668789386749268, -0.5803967118263245, 0.3370080888271332, ...
def set ( timeout ) : default _ status _ timeout. set ( timeout ) msgreader. set _ timeout ( timeout )
[ 0.4865886867046356, 0.23903748393058777, 0.11169669777154922, -0.21835583448410034, 0.32081860303878784, -0.010472485795617104, -0.6953938007354736, 0.6844037771224976, -0.6398904323577881, 0.5230085849761963, -0.5926663875579834, 0.5040677189826965, -0.2645292282104492, 0.7331773042678833...
def _ activation _ summary ( x ) : tensor _ name = x. op. name tf. summary. histogram ( tensor _ name +'/ activations ', x ) tf. summary. scalar ( tensor _ name +'/ sparsity ', tf. nn. zero _ fraction ( x ) )
[ 0.08479321002960205, 0.604764997959137, 0.2895141839981079, -0.8782982230186462, -0.010861769318580627, -0.28609371185302734, 0.3916131556034088, 0.9576293230056763, 0.7782883048057556, 0.4275420010089874, 0.11883872747421265, 0.9895015358924866, 1.6596457958221436, -0.6663821339607239, ...
def treasury ( ) : room = room ( ) " " " set up the game and initialize the variables. " " " # sprite lists room. wall _ list = arcade. spritelist ( ) # - - set up the walls # create bottom and top row of mirrors # this y loops a list of two, the coordinate 0, and just under the top of window for y in ( 0, screen _ hei...
[ -0.07143797725439072, 0.4352349638938904, 1.00480055809021, -0.5704675912857056, -0.4253966808319092, -0.04204639419913292, 0.8312552571296692, 0.07429477572441101, -0.23812879621982574, 1.0006942749023438, -0.5939932465553284, 0.17675034701824188, 0.04677806422114372, 0.3414978086948395, ...
def request _ for _ quote ( self, amount, instrument, direction ) : direction = str ( direction ). lower ( ) if direction not in ['buy ','sell'] : raise exception ('wrong direction') if instrument not in self. instrument _ list : raise exception ('wrong instrument') if not isinstance ( amount, ( float, int ) ) or not i...
[ -0.9331333637237549, -0.022690460085868835, 0.787162721157074, 0.13264544308185577, 0.24926264584064484, -0.5047672390937805, -0.12320859730243683, -0.7693876624107361, -0.043547701090574265, -0.022641444578766823, 0.6542776226997375, 0.8557053208351135, -1.152359127998352, 0.7989140748977...
def plot _ distort ( undistort _ func, image _ size, step = 10, contour _ n _ levels = none, save _ f _ string = none, fontsize = 15 ) : assert len ( image _ size ) = = 2 and isinstance ( image _ size, tuple ), " image _ size has to be a tuple of length 2 " assert isinstance ( undistort _ func, callable ), " undistortf...
[ 0.5074222087860107, 0.4899306893348694, 1.0630009174346924, -0.2104528695344925, -0.19376328587532043, 0.0698760524392128, 0.606650710105896, 0.8870474100112915, 0.10360834747552872, 0.021156927570700645, 0.7469096779823303, 0.8196564316749573, 0.3450353145599365, 0.7273638844490051, 0.1...
def binary _ focal _ loss ( gamma = 2., alpha =. 25 ) : def binary _ focal _ loss _ fixed ( y _ true, y _ pred ) : " " " : param y _ true : a tensor of the same shape as ` y _ pred ` : param y _ pred : a tensor resulting from a sigmoid : return : output tensor. " " " y _ true = tf. cast ( y _ true, tf. float32 ) # defi...
[ 0.2513205111026764, -0.708663821220398, 0.5392422080039978, -0.16115759313106537, -0.5818579792976379, -0.8187960386276245, 0.26319384574890137, 0.40116438269615173, -0.1175212562084198, 0.5845577120780945, -0.5022784471511841, 0.7156686186790466, 0.40154004096984863, 0.06223655864596367, ...
def is _ child ( self, child _ id : int, parent _ id : int ) - > bool : child = self. nodes [ child _ id ] if child. parent is not none and child. parent. db _ id = = parent _ id : return true return false
[ 1.0035326480865479, 0.09161342680454254, 0.4067779779434204, 0.4102039337158203, 0.5090919137001038, -0.028834393247961998, -0.5689924955368042, -0.6563270688056946, -0.1271054595708847, 0.16440904140472412, -0.453304648399353, 0.9353645443916321, -0.4217231869697571, 0.0006003218004480004...
def _ _ init _ _ ( self, shape ) : super ( ). _ _ init _ _ ( ) self. shape _ out = shape self. shape _ in = none
[ 0.39649659395217896, -0.41455185413360596, 0.3228435814380646, -0.09652616083621979, -0.02410532534122467, -0.11333915591239929, 0.2444969117641449, 0.7110694646835327, 0.09133899956941605, -0.7887887954711914, -1.1361281871795654, 0.3844243586063385, 0.8040058612823486, 0.8087689876556396...
def fliptiers ( infile, outfile ) : tg = textgrid ( ) tg. read ( infile ) phonetier = [ tier for tier in tg. tiers if'phone'in tier. name ] [ 0 ] wordtier = [ tier for tier in tg. tiers if'word'in tier. name ] [ 0 ] tg. tiers = [ phonetier, wordtier ] tg. write ( outfile )
[ -0.21435430645942688, -0.7928696274757385, 0.4980887174606323, -1.2314006090164185, -1.1577234268188477, 0.8274713158607483, -0.34642675518989563, 1.255933165550232, -1.2275339365005493, 0.8141135573387146, 0.47257399559020996, 0.8469454646110535, -0.33330053091049194, 0.3292577862739563, ...
def snap _ projection ( props, snap, l = none, lz = none, pixel _ res = 0. 1, labels = none, color _ map = config. base _ cmap, foutname ='snap _ projection. png ', * * kwargs ) : # todo : add ability to only put colorbar on right side if multiple plots if they all share the same projected data but are from different s...
[ -0.46785107254981995, 0.14063826203346252, 1.1431646347045898, 0.05347765237092972, -0.7339089512825012, 0.19854311645030975, 0.010479560121893883, -0.22071604430675507, 0.5814663767814636, 0.3396311402320862, 0.5150811672210693, -0.4717790186405182, 0.4173138737678528, -0.2803050875663757...
def main ( ) : if len ( sys. argv )! = 3 : sys. exit ( " usage : python client - python. py [ server ip ] [ server port ] < [ message ] " ) server _ ip = sys. argv [ 1 ] server _ port = int ( sys. argv [ 2 ] ) client ( server _ ip, server _ port )
[ -0.2790803909301758, -0.1043415516614914, 0.6364119052886963, -0.16888809204101562, 0.6891117095947266, 0.8318490386009216, 0.6734158992767334, -0.6174509525299072, -1.4559036493301392, 0.003948107361793518, 0.08681400120258331, 0.5857681035995483, -0.2159213423728943, -0.5494242310523987,...
def feed _ from _ annotations ( # pylint : disable = too - many - arguments annotations, annotation _ url, rss _ url, html _ url, title, description ) : annotations = [ presenters. annotationhtmlpresenter ( a ) for a in annotations ] feed = { " title " : title, " rss _ url " : rss _ url, " html _ url " : html _ url, " ...
[ 0.3288147747516632, -0.10971367359161377, 0.2083914577960968, -0.35744529962539673, -0.4864930510520935, -0.6766421794891357, -0.37353357672691345, -0.0987713485956192, 0.007125119678676128, -0.07921250909566879, -0.21130837500095367, 0.33847859501838684, 0.3499894440174103, 0.833637654781...