text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ requirements ( ) : requirements = [ ] with open ('requirements. txt ','r') as file : for line in file. readlines ( ) : line = line. strip ( ) if not line or line. startswith ('#') : continue requirements. append ( line ) return requirements
[ 0.26420050859451294, -1.11338210105896, 0.45668143033981323, 0.2971281409263611, 0.41885626316070557, 1.3821651935577393, -0.8697455525398254, 0.7728979587554932, -0.20677822828292847, 0.7300848960876465, -0.2358405888080597, 0.2115410566329956, -0.048543743789196014, 0.7987388968467712, ...
def readable _ files _ from _ yaml ( results _ yaml : dict ) - > list : raw _ files = [ os. path. splitext ( _ ) [ 0 ] + ". ms _ data. hdf " for _ in results _ yaml [ " experiment " ] [ " file _ paths " ] ] raw _ files = [ results _ yaml [ " experiment " ] [ " results _ path " ] ] + raw _ files raw _ files = [ _ for _ ...
[ 0.7740907073020935, 0.056423891335725784, 0.4676247537136078, 0.1142042949795723, 0.44346684217453003, -0.3420432209968567, 0.2001333385705948, 0.2997123599052429, 0.3508082628250122, 0.4962327182292938, 0.31261375546455383, -0.4740816652774811, 0.561188817024231, 0.4614751935005188, -0....
def _ post _ update ( self ) : # this will add any repeated entries together self. _ matrix = self. _ coo. toarray ( )
[ -0.4686325788497925, -1.155081033706665, 0.18175694346427917, -1.1436741352081299, 0.4078803062438965, -0.5795005559921265, 0.5053412914276123, 0.3168315589427948, -0.24954137206077576, 0.019315578043460846, -0.29966986179351807, 0.1001897007226944, -0.12638545036315918, -0.170325770974159...
def add _ qa _ pair _ with _ matching _ score ( self, question, answer, score ) : self. qa _ pairs _ with _ matching _ score. append ( {'_ question': question,'answer': answer,'score': score } )
[ -0.5357702970504761, -0.7162097692489624, 0.6520457863807678, 0.3483473062515259, -1.116939663887024, 0.5816627144813538, -0.8130201697349548, -1.0037822723388672, 0.3486314117908478, -0.13284680247306824, -0.3015028238296509, -0.833288311958313, -0.33603066205978394, -0.280508428812027, ...
def build _ align _ pharaoh ( valid _ alignment ) : align _ pairs = [ ] align _ scores = [ ] if isinstance ( valid _ alignment, torch. tensor ) : tgt _ align _ src _ id = valid _ alignment. argmax ( dim = - 1 ) align _ scores = torch. divide ( valid _ alignment. max ( dim = - 1 ). values, valid _ alignment. sum ( dim =...
[ -0.6621707081794739, -0.8470781445503235, 0.614155650138855, -0.026010680943727493, -0.31138065457344055, -0.4388464689254761, 0.39362236857414246, 0.5828954577445984, 0.3949704170227051, 0.10630745440721512, 0.5058851838111877, -0.6262683272361755, 0.3890882730484009, 0.15149103105068207,...
def ui _ add _ capacity _ conditions ( ) : platform = config. env _ data [ " platform " ] ocp _ version = get _ ocp _ version ( ) is _ external = config. deployment [ " external _ mode " ] is _ disconnected = config. deployment. get ( " disconnected " ) is _ proxy = config. deployment. get ( " proxy " ) try : locators ...
[ -0.8205821514129639, 0.007965154945850372, 0.9739014506340027, 0.14319127798080444, 0.0799710676074028, 1.1747667789459229, 0.3871936798095703, -0.7839335799217224, -0.9292294383049011, 0.20706142485141754, 0.2260725498199463, -0.693846583366394, -0.9503310918807983, 0.05796097591519356, ...
def resblock ( input _ tensor, num _ channels ) : output _ tensor = conv2d ( num _ channels, ( 3, 3 ), padding = " same " ) ( input _ tensor ) output _ tensor = activation ('relu') ( output _ tensor ) output _ tensor = conv2d ( num _ channels, ( 3, 3 ), padding = " same " ) ( output _ tensor ) output _ tensor = add ( )...
[ 0.3467932939529419, -0.5275072455406189, 0.7089604139328003, -0.6098554134368896, -0.06439585238695145, -0.5209850072860718, -0.18947753310203552, -0.09769275039434433, 0.035568565130233765, 0.1946876049041748, -0.7482468485832214, -0.0675254836678505, -0.11909795552492142, -1.276450395584...
async def test _ entity _ id _ update _ discovery _ update ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 1 # 1 channel light ( dimmer ) await help _ test _ entity _ id _ update _ disc...
[ 0.3264981210231781, -0.1715538650751114, 0.34035688638687134, 0.42256706953048706, 0.5172339081764221, 0.2576254606246948, 0.2233773171901703, 0.12373211979866028, 0.3540840446949005, -0.20540986955165863, -0.4950932562351227, -0.6202635169029236, 0.5668919086456299, 0.8227835297584534, ...
def _ _ init _ _ ( self, debug = false, verbose = - 1 ) : self. verbose = verbose self. debug = debug self. mydir = dirnm ( abspath ( _ _ file _ _ ) ) self. setmodes ( debug = debug, verbose = verbose ) self. schemaroots = { } self. analysers = { } self. modelre = re. compile ( r " < \? xml - model \ b. *? \? > ", re. ...
[ 0.03535361960530281, 0.054184846580028534, 0.6452359557151794, 0.4192577302455902, 0.20377910137176514, -0.23259170353412628, 0.20076124370098114, -0.17642037570476532, -0.20583049952983856, -0.8591009974479675, -0.19067049026489258, -0.6693363189697266, 0.014823361299932003, 0.82244765758...
def _ _ call _ _ ( self, requestsize : int = 1, write : bool = false ) - > none : lock = self. lock _ write if write else self. lock _ read with lock : wait = self. waittime ( write = write ) # calculate the multiplicity of the next delay based on how # big the request is that is being posted now. # we want to add " on...
[ -0.7212385535240173, 0.4295777380466461, 0.8057019710540771, 0.2095465362071991, -0.23330458998680115, -0.49320709705352783, -0.045614030212163925, 0.08060523122549057, 0.03472868353128433, -0.6077980399131775, 0.8367577195167542, -0.5715748071670532, -0.6755505204200745, 0.136536866426467...
def wait _ for _ sms ( ser, origin, timeout = 0 ) : started = int ( time. time ( ) ) while true : messages = inbox _ messages ( ser ) for m in messages : if origin. lower ( ) in m ['origin']. lower ( ) : return {'message': m,'error': none } if timeout : elapsed = int ( time. time ( ) ) - started if elapsed > timeout : ...
[ -0.5797073841094971, -0.41928181052207947, 0.37236711382865906, -0.22901710867881775, -1.1358922719955444, -0.16166812181472778, -0.9772300720214844, 0.1710740029811859, -0.3899358808994293, 0.0030369798187166452, -0.3631942570209503, 0.1685827225446701, 0.051018960773944855, -0.2832922339...
def get _ domain ( self ) : return self. domain
[ -0.6411177515983582, 0.2884437143802643, 0.2196088582277298, 0.6522672772407532, 0.8351728320121765, 0.348423570394516, -0.015564844012260437, -0.3689645528793335, 0.19254225492477417, -2.111847162246704, -0.048516903072595596, 2.126084089279175, -0.0037346817553043365, -0.2975802719593048...
def run _ webhook ( self, webhook _ url, * * options ) : loop = asyncio. get _ event _ loop ( ) loop. run _ until _ complete ( self. set _ webhook ( webhook _ url, * * options ) ) if webhook _ url : url = urlparse ( webhook _ url ) app = self. create _ webhook _ app ( url. path, loop ) host = os. environ. get ( " host ...
[ -0.2509162127971649, -0.38911139965057373, 0.5408002138137817, 1.4591847658157349, 0.6258567571640015, 0.17842239141464233, 0.812656581401825, 0.4269464313983917, 0.5283069014549255, 0.41152486205101013, -0.5310376286506653, 0.22881092131137848, -0.28260645270347595, 0.5045706629753113, ...
def draw ( self ) : if 0 and self. camera. query _ image ( ) : self. snapshot = self. camera. get _ image ( self. snapshot ) self. snapshot = self. camera. get _ image ( self. snapshot ) texturedata = pygame. image. tostring ( self. snapshot, " rgbx ", 1 ) if bool ( glactivetexture ) : # make sure glactivetexture is de...
[ -0.6038827300071716, -0.14704996347427368, 0.6146463751792908, -0.26524293422698975, -0.14764337241649628, 0.17222538590431213, -0.00036757311318069696, -0.09010197222232819, 0.465730220079422, -0.3655211329460144, 0.5091299414634705, -0.30535784363746643, 0.21449457108974457, 0.3739578127...
def _ _ export _ _ ( self, output = mimetypes. json. std, * * kwargs ) : graph = graph ( ) graph. namespace _ manager = get _ graph ( ). namespace _ manager for predicate, object in self. graph [ self. asnode ( ) ] : graph. add ( ( self. asnode ( ), predicate, object ) ) if output = = mimetypes. json. std : out = { } f...
[ -0.39619681239128113, -0.436470091342926, 0.674285352230072, 0.07277121394872665, -1.6873424053192139, 0.10064838081598282, -0.38336262106895447, -0.5664607882499695, -0.021699264645576477, 0.146310955286026, -0.031905628740787506, 0.3933374881744385, -0.5515910387039185, 0.049856435507535...
def _ generate _ md5 _ hash ( s : str ) - > str : return hashlib. md5 ( s. encode ('utf - 8') ). hexdigest ( )
[ 0.3186480700969696, 0.062054432928562164, 0.09775685518980026, -0.8165172934532166, -1.232203722000122, 0.33649593591690063, 0.044210564345121384, 0.5052118301391602, -0.3044232428073883, 0.10977022349834442, -0.2834453582763672, -0.33753320574760437, 0.008007151074707508, -1.1810833215713...
def update ( self ) : if self. _ connected : return true # initialize self. _ homegear = self. hass. data [ data _ max ] self. _ maxdevice = self. _ homegear. devices [ self. _ interface ] [ self. _ address ] self. _ connected = true try : # initialize datapoints of this object self. _ init _ data ( ) self. _ load _ da...
[ -0.2750142812728882, -0.12327183037996292, 0.523212194442749, 0.1307549625635147, 0.20129747688770294, 0.22999878227710724, 0.24847948551177979, 0.3913766145706177, 0.36328980326652527, -0.5521098971366882, -0.7546655535697937, -0.020594397559762, -0.40141209959983826, 0.13292363286018372,...
def prompt _ for _ move ( turn _ count, player _ count, player _ color ) : num = input ( " turn { } : player { } ( { } ), choose your move : ". format ( turn _ count, player _ count, player _ color ) ) return num
[ -0.510424017906189, -0.8098505139350891, 0.5659667253494263, 0.22795262932777405, 0.4371947944164276, -0.793315052986145, 0.48657724261283875, -0.1338062733411789, -0.45504409074783325, -0.15549081563949585, -0.054455943405628204, 0.7939204573631287, -0.1516355574131012, -0.918784081935882...
def find _ bugs _ blocker _ cli ( runtime : runtime, include _ status, exclude _ status, output ) : runtime. initialize ( ) find _ bugs _ obj = findbugsblocker ( ) find _ bugs _ obj. include _ status ( include _ status ) find _ bugs _ obj. exclude _ status ( exclude _ status ) exit _ code = 0 for b in [ runtime. get _ ...
[ 0.08449852466583252, -0.3376339077949524, 0.8367464542388916, 1.1956337690353394, -0.2396378517150879, -0.010616167448461056, 0.8492447733879089, -0.6222296953201294, -1.1330231428146362, -0.07709094136953354, -0.17493006587028503, 0.020021114498376846, -0.6450701355934143, 1.2185105085372...
def mspd ( data _ d, sensor, hourly = false ) : min _ v = [ ] max _ v = [ ] mean _ v = [ ] median _ v = [ ] if not hourly : sensor _ data = data _ d [ sensor ] [ 1 ] [ : - 1 ] else : sensor _ data = data _ d [ sensor ] [ 1 ] # for j in range ( len ( sensor _ data ) ) : # sensor _ data [ j ] = [ x for x in sensor _ data...
[ 0.09049499779939651, -0.27285853028297424, 0.4319758713245392, -0.3608993887901306, -0.03991518169641495, 0.19503472745418549, -1.6056700944900513, 0.42911410331726074, 0.4044083058834076, 0.32904908061027527, 0.28715354204177856, 0.20632249116897583, 0.17348520457744598, 0.602310776710510...
def get _ book ( self, book _ id ) : return self. books [ book _ id ]
[ -0.22146551311016083, -0.3567545413970947, -0.25535571575164795, 0.8546093702316284, 0.7376923561096191, 0.5751065611839294, -1.114931344985962, -0.41214805841445923, -0.4891173839569092, -0.2516920566558838, 0.9841063618659973, 1.0333001613616943, -0.46959835290908813, 0.4057876467704773,...
def getsearchpath ( self ) : pass
[ -0.8263837695121765, -0.0706610307097435, 0.3009635806083679, 1.6729412078857422, 0.6964877843856812, 1.1736958026885986, 0.986286461353302, -0.37010815739631653, -0.49928322434425354, -0.8976815938949585, -0.12149412930011749, 0.18898582458496094, -1.1319100856781006, -0.06649422645568848...
def pb ( self ) : return self. _ pb
[ 0.7147064208984375, -0.008234596811234951, 0.4656667113304138, 0.9876133799552917, 0.33101117610931396, 1.7518572807312012, 0.5363016724586487, -0.552409291267395, 1.0270845890045166, -0.5711573362350464, 0.5133593678474426, -0.09693120419979095, -1.3093504905700684, -0.3139967620372772, ...
def _ set _ field ( self, obj : object, field _ name : str, val : object ) : if not hasattr ( obj, field _ name ) : self. logger. debug ( "'% s'not there! " % field _ name ) self. logger. debug ( vars ( obj ) ) obj _ val = getattr ( obj, field _ name, none ) if obj _ val = = val : return field = obj. _ meta. get _ fiel...
[ -0.07863926887512207, 0.5468736886978149, 0.6870553493499756, -0.7906169891357422, -0.29098987579345703, 0.22513261437416077, -0.24871408939361572, -0.20954515039920807, 0.3447872996330261, 0.36800193786621094, -0.7150147557258606, 0.8426153659820557, 1.116174578666687, 0.46083730459213257...
def regression ( x1, x2, xlabel ='x1 ', ylabel ='x2 ', title ='regression') : assert ( x1. size = = x2. size ) x1 = x1. flatten ( ) x2 = x2. flatten ( ) # test fig, ax = plt. subplots ( ) # fit linear model fit = np. polyfit ( x1, x2, deg = 1 ) # linear regression slope, intercept, r _ value, p _ value, std _ err = sta...
[ 0.5157291293144226, -0.2504119277000427, 1.1252621412277222, -0.5874369144439697, -0.18027380108833313, 1.0379633903503418, -0.23161402344703674, -0.09438836574554443, -0.5715060234069824, -0.5088422298431396, -0.18249239027500153, 1.209985613822937, -0.008990218862891197, -0.6012877821922...
def calculate _ dis _ loss ( self, fake _ prediction, real _ prediction, target _ present ) : missing = 1 - target _ present. float ( ) # bs * seq _ len real _ label = torch. ones _ like ( real _ prediction, dtype = torch. float ) # bs * seq _ len fake _ label = torch. zeros _ like ( fake _ prediction, dtype = torch. f...
[ -0.3785165846347809, -0.5612233877182007, 0.6242367625236511, -0.10349313914775848, -0.48396939039230347, 0.07477417588233948, 0.29699185490608215, 0.31143489480018616, -0.027738278731703758, 0.6202095746994019, -0.5921797752380371, 0.017577016726136208, 0.18184593319892883, 0.304633200168...
def generate _ unique _ id ( self ) : # there seems to be an error in the gaforflash code, so we take the formula # from http : / / xahlee. org / js / google _ analytics _ tracker _ 2010 - 07 - 01 _ expanded. js line 711 # instead ( " & " instead of " " ) return ( ( utils. generate _ 32bit _ random ( ) ^ self. generate...
[ 0.3426116406917572, 0.7392393350601196, 0.613612949848175, -0.6700341105461121, -0.007720548193901777, 0.998332142829895, 0.2599296569824219, 0.17510896921157837, 0.3697742819786072, -0.7097400426864624, -0.44578295946121216, 0.11316218972206116, -0.4660674035549164, -0.09196902066469193, ...
def eval ( self, u, k = 0 ) : return self. evalwrt ( u, self. ctrlpts [ k ] )
[ -0.18580618500709534, -0.15913838148117065, 0.1643298864364624, -0.0397111251950264, -0.5298800468444824, -0.05900738388299942, -0.3399379253387451, 0.977567195892334, 0.1565026044845581, -0.0502120703458786, -0.34738850593566895, -0.30641114711761475, -0.8924717307090759, -0.1826737225055...
def setup ( self ) : self. flag _ verbose = 1
[ 1.068151593208313, 0.43368035554885864, 0.21037670969963074, 0.6894049048423767, 1.6269454956054688, 0.43496814370155334, 0.6132060885429382, 0.6502847075462341, -0.47724777460098267, 0.35255423188209534, -0.14388792216777802, 0.45220401883125305, -0.25898391008377075, 1.1556638479232788, ...
def crawl _ path ( folder _ name ) : files _ list = list ( ) for root, dir, files in os. walk ( folder _ name ) : for _ in files : if _. endswith ( ". html " ) : file _ name = os. path. join ( root, _ ) files _ list. append ( file _ name ) return files _ list
[ 0.02440688945353031, 0.270210325717926, 1.0042650699615479, 0.6059512495994568, 0.056097786873579025, 0.38017895817756653, 1.3093961477279663, 0.452424556016922, -0.5545799136161804, 0.8196462988853455, -0.18883351981639862, -0.44097551703453064, -0.5260301232337952, 1.0908153057098389, ...
def ordinary _ differential _ equation ( x, t, a ) : theta, theta _ dot = x dxdt = [ theta _ dot, - a * np. sin ( theta ) ] return dxdt
[ -0.5775463581085205, -0.7092468738555908, 0.4222929775714874, -1.2701774835586548, -0.06525696069002151, 0.4137842059135437, -0.3570134937763214, 0.5653181076049805, 0.13179025053977966, 0.35694098472595215, -0.11969546973705292, 0.020597033202648163, 1.9119189977645874, -0.140346392989158...
def upcoming _ week _ page ( self, content ) : games = [ ] etz = " america / new _ york " soup = beautifulsoup ( content, " lxml " ) patt = re. compile ( r " ( game [. ] + week. *? homecityname :. *? [ - ] + [ > ] + ) ", re. multiline | re. dotall ) subpatt = re. compile ( r " formatteddate : (. *? ) \ s + [ - ] + [ > ...
[ -0.5993455648422241, -0.14059875905513763, 1.0118250846862793, -1.625542163848877, 0.02089189738035202, -0.434535950422287, -0.16533739864826202, -0.4564633369445801, -0.05368686467409134, 1.0325102806091309, 0.08397198468446732, -0.31910818815231323, 0.23520275950431824, -0.07997031509876...
def _ _ init _ _ ( self, root, alns _ dir, target _ tree, transform = none, pre _ transform = none ) : self. target _ tree = target _ tree self. alns _ dir = alns _ dir self. seqs = none super ( trees, self ). _ _ init _ _ ( root, transform, pre _ transform ) self. data, self. slices = torch. load ( self. processed _ p...
[ 0.28559768199920654, -0.5781978964805603, 0.4582827389240265, -0.3660465180873871, -0.13401618599891663, -0.6887384653091431, -0.3391983211040497, 1.0372141599655151, 0.10066154599189758, 0.12674641609191895, 0.17017249763011932, 0.9503145217895508, 1.0505410432815552, 0.04425082355737686,...
def test _ convergence ( self, epsilon, make _ plots ) : pass
[ 0.789296567440033, 0.031203508377075195, 0.15595486760139465, 0.9959424734115601, 0.705959677696228, 0.9771590828895569, 1.3974512815475464, -0.19246377050876617, -0.32245826721191406, -1.1232552528381348, -0.08063933253288269, -0.30250799655914307, -0.4850316047668457, 0.09185134619474411...
def distance ( p1, p2 ) : return ( ( p1 [ 1 ] - p2 [ 1 ] ) * * 2 + ( p1 [ 0 ] - p2 [ 0 ] ) * * 2 ) * * 0. 5
[ 0.495322585105896, -0.7219049334526062, 0.41634294390678406, 0.10810316354036331, -0.5947694182395935, 1.056229591369629, -0.6202173233032227, 0.07054505497217178, -0.7291339039802551, 0.8026619553565979, -0.20491936802864075, 0.4813186824321747, -0.6124808192253113, -0.45052531361579895, ...
def input _ spec ( self ) - > spec : return self. _ input _ spec
[ 0.25759193301200867, -0.25007763504981995, 0.09270916134119034, -0.14421534538269043, -0.6579554677009583, 1.0875447988510132, 1.0753693580627441, -0.1404636800289154, 0.34209856390953064, -0.4651886224746704, 0.5731953978538513, 0.8185524344444275, 0.2567990720272064, -0.9486793875694275,...
def setfeaturestate ( self, featuretag, state ) : self. _ featureapplicationstates [ featuretag ] = state
[ -0.3857337236404419, -0.9892181158065796, 0.15143601596355438, 0.3758604824542999, -0.14044895768165588, 0.19684205949306488, -0.3004693388938904, 0.5402728319168091, 0.13589724898338318, -0.14702749252319336, -0.9115982055664062, 0.35148435831069946, 0.24372535943984985, 0.951616346836090...
def point ( * coords ) : if len ( coords ) = = 1 : return point1d ( * coords ) elif len ( coords ) = = 2 : return point2d ( * coords ) else : return point3d ( * coords )
[ -0.024450059980154037, 0.30444419384002686, 0.31792014837265015, 0.5122218132019043, 0.39385125041007996, 1.193041443824768, -0.19094015657901764, -0.1234331801533699, 0.2864875793457031, -0.9719792604446411, 0.7146425843238831, 0.2720688283443451, -0.2738659083843231, -0.9051735401153564,...
def _ get _ runlevel ( ) : out = _ _ salt _ _ [ " cmd. run " ] ( " runlevel " ) # unknown can be returned while inside a container environment, since # this is due to a lack of init, it should be safe to assume runlevel # 2, which is debian's default. if not, all service related states # will throw an out of range exce...
[ -0.751588761806488, 0.24472254514694214, 0.7127408981323242, 0.2775116562843323, -0.13191920518875122, 0.20570601522922516, 0.10022993385791779, -1.0290294885635376, -0.9490044116973877, -0.546713650226593, -0.00020113929349463433, 0.3763025104999542, -0.5206605792045593, -0.17591002583503...
async def test _ datadisk _ migrate _ multiple _ external _ data _ disks ( coresys : coresys, all _ dbus _ services : dict [ str, dbusservicemock | dict [ str, dbusservicemock ] ], os _ available, ) : datadisk _ service : datadiskservice = all _ dbus _ services [ " agent _ datadisk " ] datadisk _ service. changedevice....
[ -0.43521127104759216, 1.7738406658172607, 0.8164910674095154, 0.7207023501396179, 0.25329533219337463, 0.5706446766853333, -0.4800631105899811, -0.2964896261692047, 0.5323016047477722, -0.5359503030776978, -0.4819575250148773, 0.3418995141983032, 0.4470618665218353, 0.5133556127548218, 0...
def scrape _ harvard _ website ( self ) : # load the harvard directory home page, enter the firstname and last name and press submit try : self. driver. get ( self. url ) # print ('home page loaded') element = self. driver. find _ element _ by _ xpath ( " " " / / * [ @ id = " welcome " ] / table / tbody / tr / td / tab...
[ -0.34117391705513, 0.2499537169933319, 0.8815540075302124, 0.42294707894325256, 0.33563748002052307, -0.3414298892021179, 0.3953073024749756, -0.7728930115699768, 0.18774735927581787, 0.3202252984046936, -0.33903732895851135, 0.07223942130804062, -1.083406686782837, 1.0139379501342773, 1...
def associate _ carrier _ ip _ address ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " associate _ carrier _ ip _ address " )
[ -0.49124979972839355, -0.8216710686683655, 0.4992228150367737, -0.07708920538425446, 0.8829559087753296, 0.7183979749679565, 0.6576720476150513, 0.2945585548877716, 0.8566693663597107, -0.29432082176208496, 0.365206778049469, 0.4346267282962799, 0.32226064801216125, -0.7684687972068787, ...
def _ _ call _ _ ( self, time, radius, theta, phi, source _ list = none, verbose = none ) : time = np. asarray ( time, dtype = float ) radius = np. asarray ( radius, dtype = float ) theta = np. asarray ( theta, dtype = float ) phi = np. asarray ( phi, dtype = float ) if source _ list is none : source _ list = ['tdep ',...
[ -0.8785127401351929, 0.9650111794471741, 0.7685455083847046, -0.1755741983652115, -0.24414792656898499, -0.49698498845100403, 0.2645350992679596, -0.23390883207321167, -0.600788414478302, 0.652793824672699, -0.4480777382850647, 0.43518295884132385, 0.0863252654671669, 0.9986727237701416, ...
def get _ form _ class ( self ) : if self. form _ class : return self. form _ class else : if hasattr ( self,'object') and self. object is not none : # if this view is operating on a single object, use # the class of that object document = self. object. _ _ class _ _ elif self. document is not none : # if a document ha...
[ -0.13934467732906342, -0.09364955127239227, 0.6617130637168884, -0.10723049938678741, -0.323142945766449, -0.023227090016007423, 0.5050468444824219, -0.4691479802131653, 0.9880890250205994, -1.5425889492034912, 0.5440725088119507, -0.10635627806186676, 0.0725371465086937, 0.509411573410034...
def _ get _ amp ( self, freqs ) : return np. stack ( [ self. psd [..., ( ( self. freqs < = freq + self. frequency _ resolution ) & ( self. freqs > = freq - self. frequency _ resolution ) ) ]. mean ( axis = - 1 ) for freq in freqs. flat ], axis = - 1 )
[ -0.824962317943573, -0.15326765179634094, 0.6168190836906433, -0.6718239784240723, -0.2912117540836334, -0.4030206799507141, 0.15564116835594177, -0.4912594258785248, 0.6618903875350952, 0.14610685408115387, 1.4422248601913452, 0.3356001675128937, -0.41147199273109436, -0.17085571587085724...
def get _ auth ( path ) : fragmented = extract _ section _ by _ name ( path, auth _ name ) if fragmented is none : return none s =''. join ( fragmented ) username = word ( printables ) password = word ( printables ) basic _ auth = ( optional ( suppress ( " basic " ) ) + username + password ). setparseaction ( get _ bas...
[ -0.08340979367494583, -0.8781795501708984, 0.6171995997428894, 0.6246540546417236, -0.6649260520935059, -0.7782024145126343, 0.07376645505428314, -0.44705435633659363, -0.0767551064491272, 0.31861019134521484, 0.31363576650619507, 0.008973395451903343, -0.1281031221151352, -0.4762172400951...
def encrypt _ with _ padding ( key, plaintext, use _ padding = true ) : # type : ( bytes, bytes, bool ) - > tuple length = ( 16 - ( len ( plaintext ) % 16 ) ) + 16 * random. randint ( 0, 14 ) if use _ padding : plaintext _ padded = plaintext + priveapiinstance. get _ rand _ string ( length - 1 ) + bytes ( [ length ] ) ...
[ -0.20804348587989807, 1.4303534030914307, 0.8120086193084717, -0.1396743506193161, 0.2571752071380615, 0.8698395490646362, -0.894859790802002, -0.36657166481018066, 0.4161067008972168, 0.8850687146186829, -1.1487821340560913, -0.7699443101882935, -0.8859890103340149, 0.5406268239021301, ...
def plot _ sample _ files _ from _ s3 ( key, plot _ sample = 12, cols = 6, show = true, savepath = none ) : file _ list = s3 _ utils. get _ image _ list _ from _ s3 ( key ) if plot _ sample is none : plot _ sample = len ( file _ list ) files _ to _ plot = np. random. choice ( file _ list, min ( plot _ sample, len ( fil...
[ -0.1052558571100235, 0.27988314628601074, 0.5474609732627869, 0.39927154779434204, -0.6102831959724426, 0.15455511212348938, 0.6221429705619812, 0.3524411916732788, 1.019726276397705, 0.5293424129486084, -0.010204753838479519, 0.10861250013113022, 0.3035122752189636, 0.05991191789507866, ...
def _ _ len _ _ ( self ) : return len ( self. _ tweets )
[ 0.3840184211730957, -0.2489352524280548, 0.2080777883529663, -2.0092880725860596, 0.5252217054367065, 0.3551793396472931, 0.5834392309188843, 0.7197486162185669, 0.34424251317977905, -0.49466419219970703, -1.1358661651611328, -0.25549018383026123, 0.6406923532485962, 0.04010811448097229, ...
def test _ check _ no _ time _ window ( ) : with pytest. raises ( valueerror ) : mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ] )
[ 0.2011301964521408, 0.7192814946174622, 0.27994048595428467, 1.4852691888809204, 1.1052849292755127, 0.40395182371139526, 0.2955988943576813, -0.6525198817253113, -0.574971079826355, -0.35746192932128906, 0.0581403486430645, 0.4493725895881653, -0.5621299147605896, 1.6278562545776367, -0...
def polyfitc ( f, xo, xn, n, met ='boole ', h = 10 * * - 4, full = false ) : # the logic behind this can be found at # http : / / math. stackexchange. com / questions / 825414 / # a post by me showing the steps i took and asking if it's correct ( it is ). # # or # # http : / / www3. nd. edu / ~ zxu2 / acms40390f11 / se...
[ 1.1174086332321167, 0.4078262746334076, 0.5828686952590942, -0.6199452877044678, -0.08588043600320816, -0.519297182559967, -0.18365567922592163, -0.3004707396030426, -0.8147876858711243, 0.24754689633846283, -1.231710433959961, -0.10142708569765091, 0.10491663962602615, -0.4958202242851257...
def key _ prefix _ replace ( d, prefix, new _ prefix = " " ) : items = [ ] for k, v in d. items ( ) : new _ key = k for p in prefix : new _ key = new _ key. replace ( p, new _ prefix, 1 ) items. append ( ( new _ key, v ) ) return dict ( items )
[ -0.9965185523033142, -0.3486582636833191, 0.5230488777160645, -0.46547919511795044, -1.5041985511779785, -0.8833357095718384, -1.285156488418579, 1.4584828615188599, 0.19517375528812408, 1.4438011646270752, -0.719434916973114, -0.057516369968652725, 0.5749057531356812, 0.23460906744003296,...
def allow _ migrate ( self, db, app _ label, model _ name = none, * * hints ) : if db = ='catalog': return false return none
[ -0.33317649364471436, 0.9830399751663208, 0.57313472032547, 1.3166230916976929, -0.22574421763420105, 1.4435697793960571, -0.7462800741195679, -0.3487567901611328, 0.32502126693725586, 0.6292441487312317, 0.43600571155548096, -0.013810032047331333, -0.5928852558135986, 0.09365622699260712,...
def hex _ to _ bits ( hx ) : length = len ( hx ) # int ( ) can take a string and a base and will return an integer # bin ( ) can take an integer and returns a string of 0b followed by 0s and b = bin ( int ( hx, 16 ) ) # cut off the 0b b = b [ 2 : ] # length * 4 because each character represents 4 bits # bin ( ) does no...
[ -0.3222493827342987, -0.13485155999660492, 0.6142354607582092, 0.061671189963817596, 0.17502035200595856, 0.6882840394973755, -0.7358289361000061, -0.41414675116539, 0.5265450477600098, 0.12998560070991516, -1.2440611124038696, 0.1358194202184677, -0.22129009664058685, 0.606441080570221, ...
def tuple _ as _ atom ( atom : tuple ) - > str : assert len ( atom ) = = 2 return'{ } ( { } ) '. format ( atom [ 0 ], ', '. join ( map ( str, atom [ 1 ] ) ) )
[ -1.0748484134674072, -0.3704383671283722, 0.3977958858013153, -1.2172484397888184, -0.17518384754657745, 0.08713146299123764, -0.6328527927398682, 0.15200112760066986, -0.3289211690425873, 0.8054309487342834, 0.0707007572054863, 0.07272160053253174, 0.49551352858543396, -1.6177318096160889...
def do _ clear ( self, line ) : # todo : platform dependent # tmp = sp. call ('clear ', shell = true ) tmp = os. system ( ['clear ','cls'] [ os. name = ='nt'] )
[ 0.17645075917243958, 0.07396098971366882, 0.49845680594444275, 0.9594920873641968, 0.6780053973197937, 1.2493550777435303, 0.28869372606277466, -1.4546191692352295, -0.13340839743614197, 0.687411367893219, 0.12822295725345612, 1.2367066144943237, 0.3461431562900543, 0.7373138666152954, -...
def _ process _ update _ set ( self, updateset ) : events = [ ] host _ name = none clus _ name = none clus _ id = none log. debug ( " processing updateset version : % s. ", updateset. version ) filterset = updateset. filterset if not filterset : return events for propfilterupdate in filterset : objectset = propfilterup...
[ -0.7069255113601685, -0.20748527348041534, 0.6884855628013611, 0.13613605499267578, 0.32619407773017883, -0.6292984485626221, -0.5355412364006042, -0.49080488085746765, 0.17693549394607544, 1.1582531929016113, 0.15518637001514435, 0.11152638494968414, 0.17921139299869537, 0.570958495140075...
def copy _ to ( self, target ) : target = path ( target ) if isinstance ( target, directory ) : target = target. join ( self. basename ) else : target = target if target. exists : target. remove ( recursive = true ) shutil. copy ( self. absolute. path, target. path ) return path ( target )
[ -0.3851704001426697, -0.6592861413955688, 0.6824373006820679, -0.07155148684978485, -0.49119800329208374, 0.6893536448478699, 0.614300012588501, -0.4959125816822052, 0.2503646910190582, 0.33043986558914185, 1.0340520143508911, 0.319324254989624, 0.29115626215934753, -0.8355235457420349, ...
def on _ train _ begin ( self, net, x = none, y = none, * * kwargs ) :
[ -0.2393931746482849, 0.019495725631713867, 0.7303647994995117, -0.03951196372509003, 0.6142057180404663, -0.38402843475341797, -0.24193140864372253, -0.16904085874557495, 0.4087419807910919, -0.008231653831899166, -1.1268303394317627, 0.26634472608566284, 0.6424974203109741, 0.161087185144...
def make _ geneid2group ( pangenome _ file ) : pangenome = pd. read _ csv ( pangenome _ file, dtype ='str ', index _ col = 0 ) # pangenome = pangenome. fillna ('' ) n _ rows, n _ cols = pangenome. shape gene _ groups = pangenome. index. values geneid2descriptions = { } for row in range ( n _ rows ) : geneid2description...
[ 0.04628003388643265, -0.08424846827983856, 0.5432496070861816, -0.7183338403701782, -0.44514963030815125, 0.2626262903213501, -0.5149281024932861, 0.3521382808685303, -1.7541300058364868, 0.38506919145584106, -0.043690767139196396, 0.6880460381507874, 0.015031770803034306, 0.25867813825607...
def check _ author ( post _ key, comment _ id, username ) : if comment _ id and comment _ id. isdigit ( ) : comm = comment. comment. by _ id ( int ( comment _ id ), post _ key ) if comm : return comm. author = = username
[ 0.2534005641937256, -0.764033317565918, 0.21245260536670685, 1.0185626745224, 0.3630577325820923, -0.38547784090042114, 0.2830946147441864, 0.26599398255348206, -0.5188648104667664, 0.8132429122924805, 0.2920622229576111, -0.019930096343159676, -0.7538236975669861, 0.3826051354408264, -0...
def _ equals ( self, other ) : # call super if not super ( cpovalue, self ). _ equals ( other ) : return false # for array of expr, already managed as a recursive call by _ equals _ expressions ( ) called in super. if self. type. is _ array _ of _ expr : return true # check value return _ is _ equal _ values ( self. va...
[ -0.7643527984619141, 0.08031892031431198, 0.5617725253105164, 1.002970814704895, 0.0016044096555560827, -0.10088010132312775, 0.1868671476840973, -0.38856735825538635, 0.10769448429346085, 0.03531715273857117, -1.1454932689666748, 0.20259790122509003, -0.3285488486289978, 1.007424831390380...
def test _ can _ update _ branch ( self ) : api _ call ( self, " post ",'/ branch / create ', dict ( city = " london ", postcode = " e1w 3ss ", capacity = 5 ), 200 ) json _ response = api _ call ( self, " get ",'/ branch / get ', dict ( id = 1 ), 200, true ) self. assertequal ( json _ response ['city'],'london') self. ...
[ 0.08005263656377792, -0.03556976467370987, 0.9964333772659302, -0.043329134583473206, 0.14094112813472748, 0.6085203886032104, -0.02879174053668976, 0.5307281017303467, -0.9151753783226013, -0.15266047418117523, -0.8070558309555054, 0.5927393436431885, -0.751835823059082, 0.127633035182952...
def append _ extension ( self, append ) : if append [ 0 ] = = '.'or self. _ path [ - 1 ] = = '.': return file ( self. _ path + append ) return file ( self. _ path + '.'+ append )
[ 0.5459709167480469, -0.04608125612139702, 0.7622123956680298, 0.5574867129325867, -0.7450287342071533, 0.0317053496837616, -0.5331557393074036, -0.5560316443443298, 0.46421414613723755, -0.6082202792167664, 0.587216854095459, 0.33093512058258057, -0.3810798227787018, 0.46839120984077454, ...
def display _ considering ( ) : with db _ session ( ) as db : dates = db. query ( models. event, sqlalchemy. func. generate _ series ( models. event. start _ date, models. event. end _ date, sqlalchemy. text ( "'1 day': : interval " ) ). cast ( sqlalchemy. date ). label ('event _ date') ) \. subquery ( ) events = db. q...
[ 0.35259291529655457, -0.005291965790092945, 1.0032463073730469, -0.38152268528938293, -0.5264531373977661, 0.12399102002382278, -0.18369987607002258, 0.15398579835891724, -0.9723858833312988, 0.3804081976413727, 0.8787248134613037, 0.02499721758067608, -0.10875295102596283, 0.4745144844055...
def instantiate ( name ) : def class _ builder ( original _ class ) : new _ class = original _ class # add factory _ name in new _ class new _ class. ipopo _ component _ name = name # create fields in component info _ component _ info [ name ] = { } _ component _ info [ name ] ['provides'] = set ( ) _ component _ info ...
[ -0.8114839792251587, -1.1854915618896484, 0.7894291877746582, -1.0421206951141357, -1.1208206415176392, 0.3904302716255188, 0.061288509517908096, 0.2856656014919281, 0.22745883464813232, -0.13751497864723206, -0.9082344174385071, -1.0114083290100098, 0.8801056742668152, -0.4932679533958435...
def test _ _ app _ manager _ create _ existing _ user _ _ raises ( am ) : am. create _ user ( username = " uname ", password = " passy ", email = " user @ gmail. com " ) with pytest. raises ( useralreadyexistserror ) : am. create _ user ( username = " uname ", password = " passy ", email = " user @ gmail. com " )
[ 0.05219556763768196, 0.5532718300819397, 0.273372083902359, 0.3647203743457794, 0.5890313386917114, 0.9092388153076172, 0.18895524740219116, -0.5529491901397705, -0.07491528987884521, 0.015161518938839436, -0.9097249507904053, -0.6871213316917419, 0.3287227749824524, 1.5057774782180786, ...
def linearity ( arr ) : ar _ len = arr. shape [ 0 ] # can't tell on data less than 3 data points if ar _ len < 3 : return np. ones ( ( arr. shape [ 1 ] ) ) else : return 1 - np. count _ nonzero ( np. diff ( arr, n = 2, axis = 0 ), axis = 0 ) / ( arr. shape [ 0 ] - 2 )
[ 0.9282653331756592, -0.2545103430747986, 0.6796696186065674, 0.6095057129859924, 0.39146554470062256, 0.43685829639434814, 0.2782266139984131, 0.7475585341453552, 1.3383815288543701, 0.20832587778568268, -0.12300718575716019, 0.31227004528045654, -0.32295888662338257, 0.7282141447067261, ...
def get _ priority ( self ) : return - 1
[ -0.8277852535247803, 0.25541695952415466, 0.41277560591697693, 1.4069195985794067, 0.7443692684173584, 0.0318787544965744, 0.016187846660614014, 0.4824132025241852, -0.09909693896770477, -1.5239070653915405, -0.1895364671945572, -0.34801405668258667, -1.083972454071045, 0.5482386946678162,...
def test _ create _ user _ with _ email _ successful ( self ) : email = " caglar @ gmail. com " password = " testpassword123 " user = get _ user _ model ( ). objects. create _ user ( email = email, password = password ) self. assertequal ( user. email, email ) self. asserttrue ( user. check _ password ( password ) )
[ 0.5032232403755188, 0.3039286732673645, 0.20540128648281097, 0.476265549659729, 0.5963229537010193, 0.9850012063980103, -0.2728772461414337, 0.42513978481292725, -0.20117846131324768, 0.345533549785614, -0.9166455864906311, -0.6872986555099487, 0.5910570025444031, -0.04607446491718292, -...
def write _ files ( data _ dict, n _ samples, wd ) : for i in range ( 1, n _ samples + 1 ) : file _ name = str ( d. today ( ) ) +'_ % d'% i + '. csv'file _ path = os. path. join ( wd, file _ name ) data _ dict [ i ]. to _ csv ( file _ path, index = false ) return
[ -1.1181367635726929, -0.2863413989543915, 0.5007725358009338, 0.030305184423923492, 0.24174383282661438, 0.22619983553886414, 0.3330214023590088, 0.2920905649662018, -0.9500542283058167, -0.1475323736667633, 0.31369906663894653, -0.5505470633506775, 0.5719895958900452, 0.9567464590072632, ...
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : if not self. session : self. session = aiohttp. clientsession ( ) params = { " text " : text } tts _ url = urljoin ( self. url, " api / tts " ) async with self. session. get ( tts _ url, ssl = self. ssl _ context, params = params ) as response...
[ -0.2864353060722351, 0.16468295454978943, 0.5054251551628113, 0.22491927444934845, -0.5842813849449158, -0.2932122051715851, -1.9664627313613892, -0.8604830503463745, 0.42044028639793396, 0.14663417637348175, 0.0803476870059967, 0.9927464127540588, -1.3559677600860596, 0.36877205967903137,...
def throttle _ failure ( self ) : return false
[ 0.8649705648422241, 0.4961840510368347, 0.3583303689956665, 0.77362060546875, 0.23450446128845215, 1.0468038320541382, -0.2984110116958618, -0.7810518145561218, -0.48531848192214966, -0.41166335344314575, -0.24337796866893768, -0.3181605637073517, -1.5106443166732788, -0.6425571441650391, ...
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : self. maybe _ load _ voices ( ) if ( not self. voice _ proc ) or ( self. proc _ voice _ id! = voice _ id ) : if self. voice _ proc : _ logger. debug ( " stopping marytts proc ( voice = % s ) ", self. proc _ voice _ id ) try : self. voice _ pro...
[ 0.24984292685985565, 0.14233523607254028, 0.6292486190795898, -0.6336504817008972, -0.9239484667778015, 0.16469526290893555, -0.780055582523346, -0.3612513542175293, 0.6721745729446411, 0.19035762548446655, -0.4636612832546234, 0.3667866289615631, 0.24664829671382904, 0.6320396065711975, ...
def get _ node _ list ( nodes ) : node _ list = [ ] node _ groups = nodes. split ( ',') for ng in node _ groups : node _ range = ng. split ('-') if len ( node _ range ) > 1 : # expand ranges ( sequentially ) found in the string # e. g. 1 - 5 turns into [ 1, 2, 3, 4, 5 ] node _ list. extend ( list ( range ( int ( node _...
[ -1.2833210229873657, 0.28552335500717163, 0.3819839358329773, -0.014644155278801918, 0.6371329426765442, -0.44431063532829285, 0.2554766535758972, 0.961897075176239, 0.07188401371240616, 0.5612824559211731, 0.07130753248929977, 0.49743905663490295, -0.33767402172088623, -0.504538357257843,...
def get _ related _ noun ( self, chunk ) : ent = [ ] for i in chunk : if i. pos _ in self. nouns : if i. ent _ type : ent. append ( self. lemmatize _ word ( i. string ) ) else : yield self. lemmatize _ word ( i. string ) if ent : yield functools. reduce ( lambda x, y : x + " " + y, ent )
[ 0.3062375485897064, -0.1965554654598236, 0.6166738271713257, -0.47103482484817505, 0.6847419142723083, -0.48543980717658997, -1.045242428779602, -0.4103959798812866, -0.13953641057014465, -0.4413190186023712, -0.2457798421382904, -0.1092224270105362, -0.271771639585495, 0.7989023923873901,...
def _ _ parse _ items ( self, items ) : self. _ items. extend ( items ) for item in items : # print ( item ['stacitem'] ['s'] ) for level in get _ catalog _ levels ( item [ " stacitem " ] [ " s " ] ) : self. _ levels _ to _ be _ updated. add ( level )
[ -0.5271467566490173, -0.37601250410079956, 0.5126171112060547, 0.4838193953037262, 0.6917711496353149, 0.3996146619319916, -1.073844075202942, 0.30966582894325256, -0.6188840866088867, 0.527393102645874, -0.6049791574478149, -0.6257284879684448, 0.34405580163002014, 0.1500539928674698, 0...
def auto _ delete _ file _ on _ change ( sender, instance, * * kwargs ) : if not instance. pk : return false try : old _ file = models. product. objects. get ( pk = instance. pk ). image except models. product. doesnotexist : return false new _ file = instance. image if not old _ file = = new _ file : if os. path. isfi...
[ 0.27334314584732056, -1.0316848754882812, 0.8646296858787537, 0.5468688011169434, 0.5829784274101257, 0.8271939158439636, 0.8402509689331055, -0.08549191802740097, -0.19887687265872955, 0.5965689420700073, -0.2513309717178345, -0.21593499183654785, 0.7758495807647705, 0.719426691532135, ...
def webpack _ asset ( unique _ id ) : hook = hooks. webpackbundlehook. get _ by _ unique _ id ( unique _ id ) return hook. render _ to _ page _ load _ sync _ html ( )
[ 0.12638182938098907, -0.5419090986251831, 0.32506728172302246, -0.9297845363616943, -0.15464648604393005, -0.6341497898101807, 0.6276983022689819, 0.5084999203681946, 0.25109922885894775, 0.4991709887981415, 0.6240953803062439, 0.6853155493736267, 0.5137317180633545, 0.38725876808166504, ...
def test _ setup _ default ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd ] ) assert exit _ code = = 0 self. idxmgmt. assert _ ilm _ template _ loaded ( self. alias _ name, self. policy _ name, self. alias _ name ...
[ -0.434895396232605, 0.23560146987438202, 0.5320683121681213, -0.29795601963996887, 1.451447606086731, 0.752623975276947, 0.38167139887809753, 0.3319067656993866, 0.06526052206754684, -0.08205089718103409, -0.0490051694214344, -0.007223059423267841, -0.30553415417671204, 0.12968003749847412...
def unique _ id ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " unique _ id " )
[ 1.4993069171905518, -0.2295093536376953, 0.4504725933074951, 0.11430443078279495, 0.5205063819885254, 0.7224615216255188, 0.3741276264190674, 0.7083936333656311, 0.9246702194213867, -0.2775934934616089, 0.16268806159496307, 1.2095179557800293, 0.07064449042081833, -1.4428237676620483, -0...
def copy ( self ) : return file ( self. path, relto = self. _ relto, make _ absolute = self. _ absolute )
[ 0.6159234642982483, -1.7266743183135986, 0.7199038863182068, -0.06737921386957169, -0.5595868825912476, 1.6878169775009155, 0.6601312160491943, 0.045112162828445435, -0.9926851391792297, -0.4766591489315033, 0.6532906293869019, 0.3759794533252716, 0.7291385531425476, -1.193264126777649, ...
def singleroconepixelphscan ( self, rocid, col, row, ntrig = 1, flag = 0, dac = 25, dacmin = 0, dacmax = 255 ) : self. daq _ select _ deser160 ( self. deseradjust ) self. daq _ open ( ) self. daq _ start ( ) self. loopsingleroconepixeldacscan ( rocid, col, row, ntrig, flag, dac, dacmin, dacmax ) self. daq _ stop ( ) t ...
[ 0.27031752467155457, 0.5528080463409424, 0.5760753154754639, -0.45491018891334534, -0.0021896485704928637, -0.5127332210540771, 0.7983731627464294, -0.23760297894477844, 0.2312512993812561, 0.04199167713522911, -0.16358935832977295, -0.709071695804596, -0.3369045853614807, 0.24130909144878...
def _ handlerstorecursoraspoint ( self, event ) : self. _ storecursor ( self. slice3dvwr. slicedirections. currentcursor )
[ 0.5958147048950195, -1.0784943103790283, 0.08521091192960739, 0.3531202971935272, -0.09991749376058578, -0.2949122190475464, 0.3641422986984253, 0.2599373757839203, 0.5967960357666016, 1.0836340188980103, -0.6032305955886841, 0.5972410440444946, 0.2210940271615982, -0.5782883763313293, 0...
def testclassifier ( x _ train, y _ train, x _ test, y _ test, clf ) : # metrics = [ ] start = dt. now ( ) clf. fit ( x _ train, y _ train ) end = dt. now ( ) print'training time : ', ( end - start ) # add training time to metrics # metrics. append ( end - start ) start = dt. now ( ) yhat = clf. predict ( x _ test ) en...
[ 0.24890975654125214, 0.04847027733922005, 0.6596719026565552, 0.2939116358757019, 1.1656593084335327, 0.5932457447052002, 0.8863115906715393, 0.3005046248435974, -1.4345734119415283, -0.2248864471912384, 0.31398794054985046, 0.6674961447715759, 0.20401473343372345, 0.3822142779827118, -0...
def _ _ contains _ _ ( self, i ) : for j in self : if j = = i : return true return false
[ -0.4474622905254364, -0.7297112941741943, 0.41272321343421936, 0.24274206161499023, -0.47899940609931946, 0.14960917830467224, 0.37190547585487366, -0.32133081555366516, -0.46104609966278076, -0.4521231949329376, -0.9287749528884888, -0.8158848881721497, -1.0594369173049927, -0.47075659036...
def makesolid ( self, * args ) : return _ topods. topods _ builder _ makesolid ( self, * args )
[ -0.08716356754302979, 0.39119869470596313, 0.07202130556106567, -0.5304465293884277, -0.3683983087539673, 1.3392038345336914, 0.8070454597473145, -0.4079131782054901, 0.055604785680770874, -1.3533259630203247, -0.07867428660392761, 0.03057888150215149, -0.8593453168869019, -0.1533700525760...
def fit ( self, x _ train, x _ test, alpha _ 0 = none ) : # lcv loop, shuffle a copy in place for performance. cv = self. cv chunk = int ( x _ test. shape [ 0 ] / float ( cv ) ) if self. random _ state is not none : np. random. seed ( self. random _ state ) x _ test _ shuffled = x _ test. copy ( ) np. random. shuffle (...
[ 0.5201430320739746, -0.16606085002422333, 0.8719455003738403, 0.4781304597854614, -0.11441688239574432, -0.5661954879760742, 0.2668105363845825, -0.008583180606365204, -0.3857220709323883, -0.4011547267436981, 0.16257937252521515, 0.38865742087364197, -0.15295802056789398, 0.59536635875701...
def _ _ init _ _ ( self, gmapskey, ratelimit = 20 ) : self. _ gmapskey = gmapskey self. _ gmaps = googlemaps. client ( key = self. _ gmapskey ) self. _ ratelimit = ratelimit self. _ lastorig = none self. _ lastdest = none self. _ mostrecentrequesttime = none
[ -0.31050240993499756, 0.1464822143316269, 0.7723969221115112, -0.3665940761566162, -0.5077749490737915, 0.47661030292510986, -0.11207117885351181, 0.1631455421447754, 0.6915035843849182, 0.08345955610275269, -0.0032261167652904987, 0.09824971109628677, -0.21901929378509521, 0.1085023656487...
def _ _ init _ _ ( self, course _ info, course _ history, synchronizer, api, settings ) : self. course _ info = course _ info course _ path = course _ info [ u " path " ] course _ name = course _ info [ u " name " ] self. to _ be _ synced = true if course _ name in settings. courses _ to _ sync else false # initialize ...
[ 0.6273687481880188, -0.48310065269470215, 0.5162869691848755, -0.27647092938423157, 0.5796058773994446, 0.39972302317619324, 0.49287205934524536, -0.10466831922531128, 0.2673408091068268, 0.3773708641529083, 0.3613397181034088, -0.2048608958721161, 0.8543505072593689, 0.20293810963630676, ...
def random _ move ( self, game ) : move = choice ( game. moves _ available ( ) ) return move
[ -1.3481580018997192, -0.7164060473442078, 0.38312435150146484, 0.28395387530326843, 0.4228971004486084, 0.42451754212379456, -0.9852946400642395, -0.24359144270420074, 0.6206099987030029, 0.435291051864624, 0.3929883539676666, 0.22279590368270874, -0.4142507314682007, -0.49615374207496643,...
def solve _ repeat ( expr, vars ) : try : result = repeated. meld ( * [ solve ( x, vars ). value for x in expr. children ] ) return result ( result, ( ) ) except typeerror : raise errors. efiltertypeerror ( root = expr, query = expr. source, message = " all values in a repeated value must be of the same type. " )
[ -0.8793792724609375, 0.9912770986557007, 0.510120689868927, 0.5074042081832886, 0.1842689961194992, -1.0347535610198975, -0.3149694800376892, -0.44121766090393066, 0.16411687433719635, 0.27665597200393677, -0.7450792193412781, 0.097520612180233, -0.2704651951789856, 0.44764870405197144, ...
def test _ reactorselectionmixinnotavailable ( self ) : class reactorselectionoptions ( usage. options, app. reactorselectionmixin ) : pass message = " missing foo bar " def install ( ) : raise importerror ( message ) name ='fakereactortest'package = _ _ name _ _ description ='description'self. pluginresults = [ fakere...
[ -0.4586404263973236, -0.21669095754623413, 0.4634118378162384, -0.26551565527915955, 1.4069008827209473, -0.3531533181667328, -0.19390569627285004, 0.4213542640209198, 0.5102323293685913, -0.4007830023765564, -0.7420215010643005, -0.29573121666908264, -0.5556390285491943, 0.095092244446277...
def lambda _ handler ( request, context ) : try : logger. info ( " directive : " ) logger. info ( json. dumps ( request, indent = 4, sort _ keys = true ) ) logger. info ( " received v3 directive! " ) if request [ " directive " ] [ " header " ] [ " name " ] = = " discover " : response = handle _ discovery _ v3 ( request...
[ 0.02729678340256214, -0.7407578229904175, 0.9464808106422424, 0.034873757511377335, -0.26530247926712036, 0.5280057191848755, -0.29963570833206177, -0.45027369260787964, 0.25652405619621277, 0.236006960272789, 0.49205541610717773, 0.5444988012313843, -0.03133964166045189, -0.43827968835830...
def test _ get _ alumno _ curso _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) response = self. client. get ( f " / api / alumnos / curso / { self. curso _ 1. id } / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok )
[ 0.5299367308616638, -0.14098306000232697, 0.36601948738098145, 0.3159695267677307, 0.28716784715652466, 1.2388818264007568, -0.17164474725723267, -0.27196383476257324, 0.009949871338903904, 0.19554314017295837, -0.3795184791088104, 2.333082675933838, 0.40653255581855774, -0.124011777341365...
def test _ frequency ( self ) : qubit = 1 peak _ offset = 5. 0e6 backend = spectroscopybackend ( line _ width = 2e6, freq _ offset = peak _ offset ) freq01 = backend. defaults ( ). qubit _ freq _ est [ qubit ] frequencies = np. linspace ( freq01 - 10. 0e6, freq01 + 10. 0e6, 21 ) / 1e6 spec = qubitspectroscopy ( qubit, ...
[ 0.20467334985733032, 0.8731131553649902, 0.6140300035476685, 0.01285549346357584, 0.5181789398193359, 0.36029717326164246, -0.031738486140966415, -0.4052256941795349, -0.16433292627334595, -0.3191584646701813, 0.023516155779361725, -0.14657722413539886, -0.38748160004615784, 0.146694079041...
def savelastbatchresults ( self, images, predictions, istrain = true ) : labels = [ " _ io " if predictions [ i ] = = 0 else " _ nio " for i in range ( len ( predictions ) ) ] if istrain : imagenames = [ self. imagelist [ index ] for index in self. indices ] else : imagenames = [ self. imagelisttest [ index ] for index...
[ -1.1093031167984009, -0.45421093702316284, 0.6793752908706665, 0.17420858144760132, 0.6338819861412048, 0.11840363591909409, 0.2686713933944702, -0.2859516441822052, -0.3849467635154724, 0.7557846307754517, -0.25892192125320435, -0.7073978185653687, -0.5745421051979065, 0.5657095909118652,...
def createimageurl ( self, path ) : return self. _ _ makeurl ( path, self. imgloc )
[ -0.813585102558136, -0.41413623094558716, 0.3273788094520569, -0.5650463700294495, -0.5701512098312378, 0.5660781860351562, -0.11091526597738266, -0.16376850008964539, -0.5362182855606079, 0.24108344316482544, -0.25053563714027405, 0.32541853189468384, 0.38276273012161255, -0.1922041177749...
def invalidate ( function ) : _ ipopo _ explorer ['invalidate'] = function return function
[ -1.1644742488861084, -0.1913979947566986, 0.1785004585981369, -0.10604460537433624, -0.5563769936561584, -0.026609094813466072, 0.8508275747299194, 0.5872703194618225, 0.3566603362560272, -0.5873082876205444, 0.5565274357795715, -0.0564114935696125, -0.2561601996421814, -1.1700271368026733...
def test _ quantiser ( ) : # declare clock and reset clock = signal ( bool ( 0 ) ) reset = resetsignal ( 0, active = true, async = true ) # width of the input data width _ data = 12 # width of the address used for dual port ram width _ qaddr = 7 # width of data stored in dualportram width _ qdata = 8 # width of input a...
[ 0.47153452038764954, -0.2809121012687683, 0.5597962737083435, -0.39430540800094604, 0.31388816237449646, 0.0952746644616127, 0.9397001266479492, -0.2543374001979828, 0.5861420035362244, -0.500453531742096, -1.288093090057373, 0.1252824068069458, -1.0754072666168213, 0.5300205945968628, 0...