text
stringlengths
25
2.19k
embedding
listlengths
768
768
def run _ code ( self, what _ to _ execute ) : instructions = what _ to _ execute [ " instructions " ] for each _ step in instructions : instruction, argument = each _ step argument = self. parse _ arguments ( instruction, argument, what _ to _ execute ) if instruction = = " load _ value " : self. load _ value ( argume...
[ -1.5243330001831055, 0.02945806458592415, 0.7010930776596069, 0.3042372763156891, 0.6524172425270081, -0.20792558789253235, -0.29947125911712646, -0.2753205895423889, -0.3570680618286133, 0.19535472989082336, -0.47315290570259094, -0.1975928246974945, 0.18607091903686523, 0.381497085094451...
def _ _ init _ _ ( self, config = none, * * shared ) : if config is none : config = self. config _ type ( ) super ( probabilisticintentparser, self ). _ _ init _ _ ( config, * * shared ) self. intent _ classifier = none self. slot _ fillers = dict ( )
[ 0.3255685567855835, -0.5480634570121765, 0.6280468106269836, 0.8653728365898132, -0.22375531494617462, 0.8188020586967468, 0.708884596824646, 0.7881133556365967, 0.48265811800956726, -0.4850063621997833, -0.11610491573810577, -0.12053132057189941, -0.7778868079185486, 1.5504887104034424, ...
def make _ updates ( self, orig _ prob _ schema ) : if not orig _ prob _ schema : self. add _ error _ message ( ('" orig _ prob _ schema " not found'' ( userproblemhelper )') ) return false update _ cnt = 0 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # createpipelines f...
[ -0.32628995180130005, -0.645655632019043, 0.9882890582084656, 0.09300567954778671, -0.564092755317688, 0.5261479616165161, 1.2069252729415894, 0.6632410287857056, -1.420915961265564, 0.6047130823135376, -0.4872923493385315, -0.5687360167503357, -0.26854074001312256, -0.06962477415800095, ...
def _ fetch _ data _ into _ dict ( self ) : query ='select * from pcd order by cls _ codigo'data = self. app. cursor. execute ( query ). fetchall ( ) description = [ col [ 0 ] for col in self. app. cursor. description ] return [ dict ( zip ( description, item ) ) for item in data ]
[ -0.14945533871650696, 0.26527196168899536, 0.5252313613891602, -0.6736003160476685, -0.3420955538749695, -0.09331155568361282, -1.8321362733840942, -0.17718373239040375, -1.2508076429367065, 0.13867856562137604, 0.2431500405073166, 0.12581461668014526, 0.6393023729324341, 0.822260558605194...
def analyse _ clusters ( f, disambiguation = false ) : if disambiguation : clusters = dict ( ) for line in f : if line. startswith ( " macsyfinder " ) : genome = re. search ( r " / ( [ ^ / ] * ). faa ", next ( f ) ). group ( 1 ) # genome = os. path. basename ( os. path. dirname ( # fileinput. filename ( ) ) ). rstrip (...
[ 0.008958929218351841, -0.24693693220615387, 0.8681929707527161, -0.11328821629285812, 0.24056386947631836, -0.5917814373970032, 0.7817499041557312, 0.6392624974250793, -1.3200191259384155, 0.049105070531368256, -0.1424776166677475, 0.016576189547777176, 0.4165443480014801, 0.93459159135818...
def parse ( country _ code ) : success = get _ death _ data ( ) filename = " ghe2015 _ deaths - 2000 - country. xls " names = ['sex ','ghecode ','disease category ','ghecause ','group ','disease name ','dclass'] df = pd. read _ excel ( filename, sheet _ name = 1, skiprows = 7 ) n = names. copy ( ) for col in df. column...
[ -0.24908144772052765, -0.36099955439567566, 0.6587576270103455, -0.31494027376174927, 0.052247054874897, 0.6696756482124329, -0.25167468190193176, 0.40580517053604126, -0.4445592164993286, 0.0002451440377626568, -0.056722551584243774, 0.23378680646419525, 0.3973356783390045, -0.31189554929...
def approximatejacobian ( f, x, dx = 1e - 6 ) : try : n = len ( x ) except typeerror : n = 1 fx = f ( x ) df _ x = n. matrix ( n. zeros ( ( n, n ) ) ) for i in range ( n ) : v = n. matrix ( n. zeros ( ( n, 1 ) ) ) v [ i, 0 ] = dx # original : df _ x [ :, i ] = ( f ( x + v ) - fx ) df _ x [ :, i ] = ( f ( x + v ) - fx )...
[ -0.2829379141330719, 1.351863980293274, 0.5631764531135559, 0.32334408164024353, -0.9582799077033997, -0.579373300075531, 0.00339867128059268, -0.1804315149784088, -0.28453317284584045, -0.09603087604045868, 0.26460757851600647, -0.20359806716442108, 0.3209940493106842, -0.0195730533450841...
def _ _ init _ classify ( self ) : self. _ _ classifier = [ ] self. _ _ performance _ er = [ ] if self. _ _ classifier _ type is none : self. _ _ classifier _ type = [ " knn " ] for classifier _ type in self. _ _ classifier _ type : if classifier _ type = = " knn " : from sklearn. neighbors import kneighborsclassifier ...
[ -0.8128973841667175, 0.24324965476989746, 0.7831544876098633, 0.5305675864219666, 1.1392408609390259, 0.19458359479904175, -0.08079587668180466, -0.006447823718190193, -0.4243529140949249, 0.2619490325450897, -0.04719303920865059, 0.7578299641609192, -0.1605750173330307, 1.3001090288162231...
def actions ( self ) : return self. _ actionlist
[ -0.8891242146492004, -0.6800589561462402, 0.3238881528377533, 1.2809866666793823, 0.8477048277854919, 0.16117943823337555, 0.4490298926830292, -0.009279094636440277, 1.0424867868423462, -0.5254178643226624, -1.1034475564956665, 0.32482263445854187, 0.1350017637014389, 0.07115543633699417, ...
def _ load _ dir ( path, fields ) : # look through the contents of the directory, for files and subdirectories files, dirs = { }, { } for sub in listdir ( path ) : full = join ( path, sub ) try : # if it's a file, check if it's on the xxxx - nnn. vtk form. if it is, # add it to the files dict. assert isfile ( full ) ba...
[ 0.12856459617614746, 0.7438086271286011, 0.6453992128372192, -0.12162192165851593, -0.8135308623313904, -0.8086866140365601, 0.35357463359832764, -0.637547492980957, 0.18603892624378204, -0.21428123116493225, -0.22133319079875946, -0.6526585221290588, 0.021893775090575218, 0.23779568076133...
def varand ( population, toolbox, cxpb, mutpb ) : offspring = [ toolbox. clone ( ind ) for ind in population ] # apply crossover and mutation on the offspring for i in range ( 1, len ( offspring ), 2 ) : if random. random ( ) < cxpb : offspring [ i - 1 ], offspring [ i ] = toolbox. mate ( offspring [ i - 1 ], offspring...
[ -0.6464125514030457, -0.32727327942848206, 0.695510983467102, 0.6121786236763, -1.0624505281448364, 0.8493761420249939, 0.041730303317308426, -0.16945846378803253, 0.4618760049343109, 0.757477879524231, 0.21399857103824615, 0.12269585579633713, -0.8131561279296875, -0.06723060458898544, ...
async def _ change _ motion _ status ( self, status : motionstatus, interface : optional [ str ] = none ) - > none : # did something change? changed = false # global or individual? if interface is none : # did status change? if self. _ _ motion _ status! = status : # set it changed = true self. _ _ motion _ status = st...
[ -0.4588642120361328, 0.16023291647434235, 0.5603302121162415, 0.6653304696083069, 0.5061440467834473, 0.1559852957725525, -0.0039007554296404123, 0.10775743424892426, 0.14635007083415985, 0.6035518050193787, -0.6938918828964233, 0.6155136227607727, -0.43122541904449463, 1.4210957288742065,...
def wait _ state ( self, state ='running ', timeout = 120, tick = 5 ) : start = time. time ( ) logger = self. get _ logger ('wait _ state') trial = 1 while self. instance. state! = state and time. time ( ) - start < timeout : logger. info ('attempt # % d : watch the state of % r ', trial, self. instance ) self. instanc...
[ 0.06606526672840118, 0.2985258400440216, 0.5125133395195007, -0.3301534950733185, -0.225906640291214, 0.6365049481391907, 0.04910700023174286, -0.22697605192661285, -0.4095483422279358, 0.19880715012550354, -0.3856714367866516, 0.5121433138847351, 0.21119102835655212, -0.3551170229911804, ...
def hassuccessor ( self, src : int, player1 _ action : int, player2 _ action : int ) - > bool : return ( src, player1 _ action, player2 _ action ) in self. transitions
[ -0.8300816416740417, -0.10728371888399124, 0.5912783741950989, 0.8961557149887085, -0.5086866021156311, -0.1065610721707344, -0.5691682696342468, 0.17284344136714935, -0.7546358704566956, 0.34419286251068115, -1.2153863906860352, 0.15670999884605408, 0.22060570120811462, 0.1358757317066192...
def pickle ( file _ or _ filename, * objects ) : if hasattr ( file _ or _ filename,'read') : f = file _ or _ filename elif file _ or _ filename [ - 3 : ] = = ". gz " : import gzip f = gzip. open ( file _ or _ filename,'wb') else : f = open ( file _ or _ filename,'wb') for o in objects : if isinstance ( o, np. ndarray )...
[ -0.16095924377441406, -0.8583914041519165, 0.9019806981086731, 0.40778449177742004, 0.8318265080451965, 0.4831909239292145, 0.8095775842666626, -0.30342501401901245, -0.25642696022987366, 0.3704562187194824, 0.39919161796569824, -0.5024762153625488, 0.43297940492630005, 0.01521942578256130...
def add ( self, item ) : if not item in self : arraybag. add ( self, item )
[ -0.30678266286849976, -0.3347466289997101, 0.48531606793403625, 0.6600951552391052, 1.2537124156951904, 1.62138032913208, -0.5163441896438599, -0.7165930271148682, 0.9988027811050415, -0.45926398038864136, -1.2873389720916748, 0.029604824259877205, -0.8478003740310669, 0.688197910785675, ...
def bot _ updater ( config ) : global new _ changes if config ['bot _ updater'] : print ('- - > now checking bot updates...') time. sleep ( 1. 5 ) if not requests _ present : print ('* no requests module present. please install requests to receive bot updates. *') time. sleep ( 5 ) return new _ changes else : repo _ ur...
[ -0.06004997715353966, -1.222827434539795, 0.7548216581344604, -0.33506542444229126, -0.22275443375110626, 0.7854200005531311, -0.2737441062927246, 0.06283443421125412, -0.3297191560268402, 0.7228804230690002, -0.3116186857223511, -0.15645413100719452, -0.47343313694000244, 0.58181345462799...
def eval _ model _ all ( self, data _ iter, model ) : correct = 0 total = 0 model. eval ( ) while true : try : p1 _ vec, p2 _ vec, p1 _ str, p2 _ str, label = next ( data _ iter ) p1 _ vec = variable ( p1 _ vec ) p2 _ vec = variable ( p2 _ vec ) outputs = model ( p1 _ vec, p2 _ vec ) predicted = ( outputs. data > 0. 5 ...
[ -0.5522359013557434, -0.5927594900131226, 0.572489321231842, -0.09518120437860489, 0.10772211104631424, 1.0900927782058716, 0.11372625827789307, -0.070423923432827, -1.0822257995605469, 0.4698784053325653, 0.012221970595419407, -0.17690199613571167, -0.22505982220172882, 0.5581380128860474...
def connect ( config ) : global clientsocket clientsocket = socket ( af _ inet, sock _ stream ) host = config. config. get ('errors ','serveraddress') port = config. config. getint ('errors ','port') clientsocket. settimeout ( 3 ) clientsocket. connect ( ( host, port ) )
[ 0.5969460010528564, 0.15354964137077332, 0.43532097339630127, -0.32211044430732727, -0.03246693313121796, 0.31372585892677307, 0.4198276102542877, 0.008891348727047443, -1.0081439018249512, 0.14147087931632996, -0.15827611088752747, 0.8963980674743652, -0.03689533844590187, 0.6167833805084...
def handle _ help ( ) : help _ text = render _ template ('help _ text') return question ( help _ text )
[ 1.0048484802246094, -0.29885315895080566, 0.28827348351478577, 0.2322828769683838, 0.08853455632925034, 0.33654695749282837, -0.3446328341960907, 0.976649284362793, 0.04070103168487549, -0.5796598196029663, 0.026415212079882622, -1.1353126764297485, 0.16032251715660095, -0.4879464507102966...
def test _ qlibrary _ instantiate _ launch _ v1 ( self ) : design = designs. designplanar ( ) try : launchpadwirebond except exception : self. fail ( " launchpadwirebond failed " ) try : launchpadwirebond ( design, " my _ name " ) except exception : self. fail ( " launchpadwirebond ( design, \ " my _ name \ " ) " ) try...
[ 0.0625438243150711, -0.23169250786304474, 0.5084789991378784, -0.10841453075408936, -0.6192994713783264, 1.7201651334762573, 0.22985465824604034, -0.44424211978912354, 0.609470009803772, -0.46686235070228577, -0.5578099489212036, 0.0705394372344017, -0.7970633506774902, 0.6252365708351135,...
def _ _ lt _ _ ( self, other ) : if isinstance ( other, float ) : return self. absolute _ time < other else : return self. absolute _ time < other. absolute _ time
[ 0.6682330369949341, -0.22194381058216095, 1.0820801258087158, 0.41114187240600586, -0.24484482407569885, 1.122720718383789, -0.9623790979385376, -1.8199306726455688, -1.0598368644714355, 0.29897820949554443, 0.3225262463092804, 0.12627987563610077, 0.21674519777297974, 1.6054373979568481, ...
def make _ four _ vecs ( momentum, mass, n ) : f _ vecs = np. zeros ( ( n, 4 ) ) f _ vecs [ :, 1 : ] = momentum. squeeze ( ) f _ vecs [ :, 0 ] = np. sqrt ( np. einsum ( " ij, ij - > i ", momentum. squeeze ( ), momentum. squeeze ( ) ) + mass * * 2 ) return np. matrix ( f _ vecs )
[ -0.20395484566688538, -0.1330571472644806, 0.4387360215187073, -0.1581723541021347, 0.41901451349258423, -0.49246734380722046, 0.31978121399879456, -0.5521141886711121, -0.6950043439865112, -0.7977041006088257, -0.2058439999818802, -0.6926314234733582, 0.2946319878101349, 0.128483265638351...
def convert _ to _ numeric ( score ) : return float ( score )
[ 0.07025295495986938, -0.5187546014785767, 0.5098686814308167, 0.22416117787361145, 0.09192938357591629, -0.6552712917327881, -0.7361958026885986, -0.7436368465423584, 0.011994324624538422, 0.4391128420829773, -0.30461156368255615, -0.19229944050312042, 0.40361863374710083, -0.7456071972846...
def getaction ( self, gamestate ) : # collect legal moves and successor states legalmoves = gamestate. getlegalactions ( ) # choose one of the best actions scores = [ self. evaluationfunction ( gamestate, action ) for action in legalmoves ] bestscore = max ( scores ) bestindices = [ index for index in range ( len ( sco...
[ 0.13074010610580444, -0.4831157624721527, 0.5355898141860962, -0.10887933522462845, 0.5694578289985657, 0.06310107558965683, -0.09742122888565063, -0.4725242555141449, 0.9094794988632202, -0.29958534240722656, 0.346640944480896, 1.1625239849090576, 0.1592557430267334, -0.5990133285522461, ...
def plot _ ellipses ( params, x, y, depth = " none ", numellips = 1, imin = 0, imax = 398, jmin = 0, jmax = 898 ) : phi = 0 fig, ax = plt. subplots ( 1, 1, figsize = ( 10, 10 ) ) k = np. zeros ( ( 898, 398 ) ) m = np. zeros ( ( 898, 398 ) ) scale = 10 for q in np. arange ( jmin, jmax ) : for l in np. arange ( imin, ima...
[ -0.02821955271065235, 0.09486190229654312, 0.9908966422080994, -0.6271970272064209, -0.4975021481513977, 0.5600007176399231, 0.03827015310525894, 0.2391539216041565, 0.5138512253761292, 0.310774564743042, 0.47993203997612, 0.8078615069389343, -0.18282808363437653, -0.004792407620698214, ...
def incoming ( ) : resp = twilio. twiml. response ( ) resp. message ( " you can trust me. " ) return str ( resp )
[ 0.8793988227844238, -0.2967883348464966, 0.35233521461486816, -0.6186404228210449, -0.7350786924362183, 0.6201172471046448, -0.37769967317581177, -0.33637097477912903, 0.29106253385543823, -0.11780677735805511, -0.2923312783241272, 0.03912666067481041, -0.6709486842155457, -0.8756275773048...
def virtual _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " virtual _ name " )
[ 0.39578208327293396, -0.0048546018078923225, 0.40710368752479553, 0.5513888001441956, -0.23610460758209229, 1.3672884702682495, -0.07551456987857819, -0.009979805909097195, 0.4170478582382202, 0.4053073823451996, -0.09303175657987595, 1.3669699430465698, 0.5983421802520752, -0.916784763336...
def _ recalculate _ paths ( ) : for src in _ hosts : for dst in _ hosts : for dscp in _ dscps : if src! = dst : path = _ find _ path ( src, dst, dscp ) if path! = _ known _ paths. get ( ( src, dst, dscp ), none ) : _ known _ paths [ ( src, dst, dscp ) ] = path for o in _ obs : o ( { " src " : ipaddr ( src ), " dst " : ...
[ -0.40339288115501404, 0.7300407290458679, 0.46712908148765564, -0.47850319743156433, -0.04452260956168175, -0.3396548628807068, 1.0974689722061157, 0.21786798536777496, -1.1262129545211792, -0.31646764278411865, -0.34082841873168945, -0.9067835807800293, 0.8564895987510681, 0.1377129703760...
def test _ oembed _ blocked ( self ) - > none : self. lookups [ " twitter. com " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] channel = self. make _ request ( " get ", " preview _ url? url = http : / / twitter. com / matrixdotorg / status / 12345 ", shorthand = false, await _ result = false, ) self. pump ( ) self. asserteq...
[ -0.12269274145364761, 1.2988373041152954, 0.606090784072876, 0.6317673921585083, 0.2497543841600418, 0.42101866006851196, 0.3682166635990143, -0.5286257266998291, 0.36449214816093445, -0.25370916724205017, 0.09176827222108841, 0.8551990985870361, -0.6170961856842041, -0.04210510477423668, ...
def compress _ file _ tar ( open _ spec, input _ files : [ str ], output _ archive ) : with tarfile. open ( output _ archive, open _ spec ) as tar : with create _ pg ( total = len ( input _ files ), leave = false, unit ='file ', desc ='compressing files') as t : for file in input _ files : t. set _ postfix ( file = fil...
[ 0.20414575934410095, -0.5548906922340393, 0.37457704544067383, -0.0028744281735271215, 0.2256711721420288, 0.5891392827033997, 0.2269020825624466, 0.686092734336853, -2.1625163555145264, 0.43803778290748596, 0.7173480987548828, -1.0816415548324585, 0.15395963191986084, 0.2644392251968384, ...
def _ truncate _ seq _ pair ( tokens _ a, tokens _ b, max _ length ) : # this is a simple heuristic which will always truncate the longer sequence # one token at a time. this makes more sense than truncating an equal percent # of tokens from each, since if one sequence is very short then each token # that's truncated l...
[ 0.3685327172279358, 0.006285188253968954, 0.7230350375175476, -0.850329577922821, -0.49964839220046997, -0.5362684726715088, -0.9889039993286133, 0.6978172063827515, -0.20405113697052002, 0.8589258193969727, 0.3422246277332306, 0.5019296407699585, 0.06265176832675934, -0.6329898834228516, ...
def _ _ repr _ _ ( self ) : return'< rating ( { rating! r }, { beer! r } { user! r } ) > '. format ( rating = self. rating, beer = self. beer _ id, user = self. user _ id )
[ -0.7122566103935242, -0.1934603601694107, 0.4647218883037567, -0.5430958271026611, -0.4017413258552551, 0.764235258102417, -0.836190402507782, 0.5957064032554626, -0.9234206676483154, 0.7388684153556824, 0.02055620215833187, -0.05765543878078461, -0.6417368650436401, -0.9446181058883667, ...
def on _ validation _ end ( self, trainer : pl. trainer, _ ) : epoch = trainer. current _ epoch # type : ignore if epoch % self. frequency = = 0 : self. save ( trainer )
[ -0.8128286004066467, 0.23809432983398438, 0.3804492950439453, 0.6130021810531616, 0.4161085784435272, 0.1182665154337883, 0.6286269426345825, 0.028830310329794884, -1.0181080102920532, 0.7759541869163513, -0.886246919631958, -0.5379788875579834, -0.15220791101455688, 0.6084190607070923, ...
def test _ parser _ run _ generates _ correct _ ast _ single _ value _ integer ( self ) : tokens = [ token ( tokentype. integer, " 42 " ), token ( tokentype. end _ statement, " end of statement " ), token ( tokentype. eof, " end of file " ) ] parser _ response = parser ( tokens ). parse ( ) assert len ( parser _ respon...
[ -0.3388894200325012, -0.4025275409221649, 0.6140129566192627, -0.4786510169506073, 0.1800329089164734, 0.28184011578559875, 0.1319732367992401, 0.04667358100414276, -0.2069709300994873, 0.04584585502743721, -0.18095649778842926, -0.1965249478816986, 0.1159275695681572, 0.5858790278434753, ...
def euclidean _ distance ( p1, p2 ) : return math. sqrt ( ( p1 [ 0 ] - p2 [ 0 ] ) * * 2 + ( p1 [ 2 ] - p2 [ 2 ] ) * * 2 )
[ 0.0805249735713005, -0.4932255446910858, 0.6205166578292847, -0.30859360098838806, 0.24181866645812988, 0.697368323802948, -1.2426390647888184, 0.8748321533203125, -0.7425962686538696, 1.5649102926254272, -0.27278435230255127, 0.6285329461097717, -0.10514576733112335, -0.7662322521209717, ...
def check _ duplicate _ id _ files ( dataset ) : if len ( set ( dataset ['non - rumours']. keys ( ) ). intersection ( set ( dataset ['rumours']. keys ( ) ) ) ) = = 0 : return true else : return false
[ -0.32852834463119507, 0.42441970109939575, 0.3854732811450958, -0.36887285113334656, 0.6977914571762085, 0.802715539932251, -0.44645753502845764, 0.3442777991294861, -0.43163734674453735, 0.3312338590621948, -0.015625491738319397, -0.2764911949634552, -0.6341113448143005, 0.719699859619140...
def parse _ view _ args ( args : list [ str ], flags : list [ str ] ) - > tuple [ union [ str, bool, none ] ] : timeframe _ from = none timeframe _ to = none colored = true view _ option ='default'if long _ nocolor _ flag in flags : colored = false if len ( args ) = = 1 : timeframe _ from = args [ 0 ] elif len ( args )...
[ -0.5881714224815369, 0.5165631771087646, 0.5980930924415588, -0.7303386926651001, 0.4372257590293884, -0.44206276535987854, -0.05966872721910477, -0.5712004899978638, -0.7397326827049255, 0.44863584637641907, -0.07314712554216385, 0.3175681531429291, -0.2914466857910156, 0.3443928360939026...
def multiply ( lhs, rhs ) : try : result = zeros ( ( lhs. shape [ 0 ], rhs. shape [ 1 ] ) ) for i in range ( lhs. shape [ 0 ] ) : for j in range ( rhs. shape [ 1 ] ) : for k in range ( lhs. shape [ 1 ] ) : result [ i ] [ j ] + = lhs [ i ] [ k ] * rhs [ k ] [ j ] except : result = zeros ( ( lhs. shape [ 0 ], 1 ) ) for i...
[ -0.011129745282232761, 0.266818106174469, 0.9995959997177124, -0.131231889128685, -0.04453287646174431, -0.20024356245994568, -0.16758817434310913, -0.2717721462249756, 0.2813780605792999, 0.6976741552352905, 0.03645080327987671, -0.23224815726280212, -1.325369954109192, 0.6364584565162659...
def photoionizationrate ( self, absorber ) : ionizationrate = self. phin [ absorber ]. copy ( ) if self. pf ['photon _ conserving'] : ionizationrate - = self. phindn [ absorber ] return self. a [ absorber ] * ionizationrate
[ -0.5912322998046875, 0.7599062919616699, 0.3861805498600006, 0.2208811491727829, 0.07295815646648407, -0.5108115077018738, -0.10763846337795258, 0.13811492919921875, 0.9397228956222534, 0.12687091529369354, 0.9529289603233337, -0.5155719518661499, -1.2006499767303467, 0.7352504134178162, ...
def _ set _ grading _ policy ( self, passing = 0. 5 ) : self. grading _ policy = { " grader " : [ { " type " : " homework ", " min _ count " : 1, " drop _ count " : 0, " short _ label " : " hw ", " weight " : 1. 0, }, { " type " : " nocredit ", " min _ count " : 0, " drop _ count " : 0, " short _ label " : " nc ", " we...
[ -0.8037098050117493, 0.3681893050670624, 0.5101315379142761, -0.4211902320384979, 0.41477128863334656, 1.9725128412246704, 0.2798311114311218, 0.5407857894897461, -0.5630698800086975, 0.8045728802680969, -0.4797160029411316, -0.013112124055624008, -0.4738923907279968, 0.5078907608985901, ...
def module ( name ) : if inspect. ismodule ( name ) : return name else : return import _ module ( name )
[ -0.41234514117240906, 0.5477544665336609, 0.2953450679779053, 0.5181313157081604, -0.16375133395195007, 0.33043351769447327, 0.3372596204280853, -1.0087014436721802, 1.1926395893096924, 1.266658067703247, 0.7355860471725464, 0.46369490027427673, -0.1454239785671234, -0.018142303451895714, ...
def expandable _ fields ( self ) : return [ entityresolverexpandablefield ( " parent. review. receiver " ), parentcommunitiesexpandablefield ( " parent. communities. default " ), ]
[ 0.7602493762969971, 0.7169310450553894, 0.3578360080718994, -0.365908145904541, 0.3650115430355072, 0.27274203300476074, -0.3805219233036041, 0.10116233676671982, 0.3006901741027832, -0.34015536308288574, -0.5687709450721741, -1.6936454772949219, -0.5868592858314514, -0.24429459869861603, ...
def transform _ current _ line ( self, transform _ callback ) : document = self. document a = document. cursor _ position + document. get _ start _ of _ line _ position ( ) b = document. cursor _ position + document. get _ end _ of _ line _ position ( ) self. text = ( document. text [ : a ] + transform _ callback ( doc...
[ -0.01183090265840292, -1.225522756576538, 0.6149274110794067, -0.14393208920955658, 0.3835785388946533, -0.038237616419792175, -0.12338659167289734, 0.2331911325454712, -0.07859556376934052, 0.15318502485752106, -0.5718453526496887, -0.02955116517841816, -0.18493503332138062, 0.19611719250...
def _ data _ limits _ centroids _ table ( ) : dlimits _ dict = dict ( ) dlimits _ dict. update ( {'dbz': ( 60., - 9. ) } ) dlimits _ dict. update ( {'zdr': ( 5., - 1. 5 ) } ) dlimits _ dict. update ( {'kdp': ( 5., - 0. 5 ) } ) dlimits _ dict. update ( {'rhohv': ( 1., 0. 7 ) } ) dlimits _ dict. update ( {'h _ iso0': ( 2...
[ 0.4463907480239868, -0.1061151996254921, 0.5237336754798889, -0.5799476504325867, -0.9896268248558044, 0.029973721131682396, -0.7767242789268494, -0.253836065530777, -0.3733822703361511, 0.7073954939842224, -0.7202317714691162, -0.11076367646455765, 0.17423859238624573, -0.4988381564617157...
def normalize _ data ( form, files ) : try : doc _ file = files ['doc'] except keyerror : doc _ file = none try : attach _ file = files ['attach _ doc'] except keyerror : attach _ file = none return {'op': form ['op']. lower ( ),'id': int ( form ['doc _ id'] ),'title': form ['doc _ title'],'author': form ['doc _ author...
[ 0.2801978588104248, -0.6157816648483276, 0.6934299468994141, -0.7913875579833984, -0.47838732600212097, 0.041865069419145584, -0.47165098786354065, -0.057746656239032745, -0.7023428082466125, -0.3686448931694031, -0.01279244851320982, -0.5824269652366638, 0.26110056042671204, 0.08891097456...
def select _ best _ move ( self, stats, depth, board ) : bestscore = 0 bestmove = none total _ n = 0 moves = board. moves ( ) for m in moves : n, w = stats [ board. move ( m ). hashkey ( ) [ 0 ] ] total _ n + = n print ('move % d score : % d / % d ( % 0. 1f % % )'% ( m + 1, w, n, w / n * 100 ) ) if n > bestscore or ( n...
[ 0.26052048802375793, 0.20322921872138977, 0.5900991559028625, 0.3924507200717926, 0.2533607482910156, -0.5507988333702087, 0.25419411063194275, -0.8564674258232117, 0.16281484067440033, -0.4490099847316742, 0.6342328786849976, 0.4739404618740082, 0.010014274157583714, 0.2878362238407135, ...
def dice _ index ( pred, gt ) : smooth = epsilon if torch. is _ tensor ( pred ) : output = pred. data. cpu ( ). numpy ( ) if torch. is _ tensor ( gt ) : target = gt. data. cpu ( ). numpy ( ) size = pred. shape [ 0 ] sum = 0. 0 for i in range ( size ) : the _ output = output [ i, 0,... ] the _ target = target [ i, 0,......
[ -0.4681347906589508, 0.016714533790946007, 0.8302103877067566, 0.15964962542057037, -0.35669076442718506, 0.13295283913612366, 1.0761698484420776, 0.843247652053833, -0.4202897548675537, 0.7250051498413086, 0.5111965537071228, 1.0610263347625732, -0.00807585846632719, -0.5095356702804565, ...
def get _ or _ create _ security _ groups ( cluster _ name, vpc _ id ) - >'list [ boto. ec2. securitygroup. securitygroup ]': securitygrouprule = namedtuple ('securitygrouprule ', ['ip _ protocol ','from _ port ','to _ port ','src _ group ','cidr _ ip'] ) # todo : make these into methods, since we need this logic ( tho...
[ -0.1204361543059349, 0.8094667792320251, 0.511458158493042, -0.05398833006620407, 1.563376545906067, -1.0759799480438232, -0.2196204960346222, -0.6347646713256836, -0.22700192034244537, 0.3299304246902466, -0.5245041847229004, 0.38513609766960144, -0.461557537317276, 0.14353986084461212, ...
def process _ commandline ( ) : # description parser = argparse. argumentparser ( formatter _ class = argparse. rawtexthelpformatter ) parser. add _ argument ( " - - data - directory ", type = str, default = " results - data ", help = " path of the data directory, containing the data gathered from the experiments " ) p...
[ 0.17680908739566803, 0.1292068213224411, 0.715048611164093, -0.3667652904987335, 0.47317782044410706, 0.37542086839675903, 0.7043268084526062, 0.5823820233345032, -0.058929018676280975, -0.1821880340576172, 0.10442589968442917, -0.11494390666484833, -0.47216930985450745, 0.0152409803122282...
def add _ arguments ( self, parser : argumentparser ) - > none : # positional arguments parser. add _ argument ('piperun ', type = str, help ='path or name of the pipeline run.') parser. add _ argument ('- - full - rerun ', required = false, default = false, action ='store _ true ', help = ('flag to signify that a full...
[ -0.1979459524154663, -0.6824492812156677, 0.6087195873260498, -0.6650279760360718, 0.9293273687362671, 0.3525262475013733, -0.17903970181941986, 1.3541152477264404, -0.8087735772132874, -0.06115183234214783, -0.639315664768219, 0.3988012969493866, -0.1424219161272049, 0.04009954631328583, ...
def remove _ entry ( self, file _ path ) : key = get _ key _ from _ path ( file _ path ) if ( self. db. has _ key ( key ) ) : del self. db [ key ] else : pass
[ 0.09418715536594391, -0.4949902296066284, 0.2751277983188629, 0.14323940873146057, 0.19727858901023865, 0.35484087467193604, -0.31399527192115784, 1.2111711502075195, -0.9573543667793274, 0.969765841960907, 0.1925719827413559, -0.7782254815101624, -1.0321580171585083, 0.9374637007713318, ...
def need _ restart ( self ) - > bool : if self. _ stream _ conf. restart _ period = = self. _ ignore _ restart _ check : return false return int ( time. time ( ) ) > self. _ start _ ts + self. _ stream _ conf. restart _ period
[ -0.6156133413314819, 0.42185622453689575, 0.7060380578041077, 0.3644382059574127, -0.4046180844306946, 0.4459846019744873, 0.002801544964313507, 0.19492200016975403, -0.5602818131446838, 0.38963583111763, -0.2704634666442871, 1.2226814031600952, -0.8956378698348999, -0.04630853235721588, ...
def _ _ init _ _ ( self, init _ data = none, eval _ data = none, eval _ y _ predicted = none, eval _ y _ predicted _ proba = none, * * kwargs ) : super ( _ datasetsmixin, self ). _ _ init _ _ ( * * kwargs ) self. _ init _ data = init _ data self. _ eval _ data = eval _ data self. _ eval _ y _ predicted = eval _ y _ pre...
[ 0.26892468333244324, 0.1382233053445816, 0.4699428081512451, 0.4219004511833191, -0.4396372437477112, -0.16355301439762115, -0.8535395264625549, 0.7194555997848511, 0.32782626152038574, -1.0981465578079224, -0.6518060564994812, 0.886565089225769, 0.23968687653541565, 0.2813556492328644, ...
def handle _ calculate ( self, value ) : result = value * * 1. 61 self. kilometres = str ( result )
[ 0.3573819696903229, 0.28782951831817627, 0.3935648500919342, -0.3104536831378937, -0.7129316926002502, -0.499977171421051, 0.6362173557281494, -0.17772682011127472, 0.5151175260543823, -0.3600156307220459, -0.6366768479347229, -1.581775426864624, -0.1426076740026474, 0.09447861462831497, ...
def norm ( psi ) : return np. sqrt ( np. real ( np. dot ( psi. t, psi ) ) )
[ -0.20716483891010284, -1.350921630859375, 0.22104112803936005, -0.38158363103866577, -0.8463867902755737, 0.1963815689086914, -0.26356956362724304, 0.7293551564216614, 0.9131466746330261, 0.7761993408203125, 0.11974920332431793, -0.07186579704284668, -0.8060663938522339, -0.149954006075859...
def test _ xp _ subject ( self ) : self. assertequal ( self. image. xp _ subject, baseline ( " " " xp - style subject " " " ) )
[ 0.7423118948936462, 0.05717216059565544, 0.2977202534675598, 0.3067554235458374, 0.28103581070899963, 1.1704174280166626, -0.6949406862258911, -0.9558790326118469, 0.868209958076477, 0.005980303511023521, -0.12322161346673965, 1.0024166107177734, -1.1361677646636963, -0.7947719693183899, ...
def _ num _ to _ bytes ( n : int ) - > bytes : if n < 0 : raise overflowerror ( " number can't be negative " ) if n = = 0 : return b'\ x00'octets = bytearray ( ) while n : octets. append ( n % 256 ) n / / = 256 return bytes ( octets [ : : - 1 ] )
[ -0.17463409900665283, 0.5767796635627747, 0.44592031836509705, 0.2715470790863037, 0.04516143351793289, -0.26107874512672424, -0.4093020260334015, -1.1244617700576782, 0.33375391364097595, -0.5758072137832642, -0.45940157771110535, -0.1904188096523285, -0.5596698522567749, 0.52032065391540...
def add _ haircut ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='get': portfolio _ haircuts = portfoliohaircut. objects. filter ( stylist = request. user ) return render ( request,'stylist / bill / add _ haircut _ tobill. html ', {'portfolio _ haircuts': portfolio _ haircuts } ) if reques...
[ 0.07684952765703201, 0.22456707060337067, 0.5670746564865112, 0.5407741069793701, 0.04081527143716812, 0.9923282265663147, 0.11380723118782043, 0.4468756914138794, -0.08450651913881302, 0.48558950424194336, 0.1255934089422226, 0.09912464767694473, -0.2314760535955429, 0.8057128190994263, ...
async def create _ ec _ key ( self, name : str, * * kwargs : " any " ) - > keyvaultkey : hsm = kwargs. pop ( " hardware _ protected ", false ) return await self. create _ key ( name, key _ type = " ec - hsm " if hsm else " ec ", * * kwargs )
[ 0.01963692344725132, 0.805804967880249, 0.3196006417274475, 0.8093041181564331, 0.6301479339599609, 0.3351539671421051, -0.9001184701919556, -0.9512713551521301, -0.18887121975421906, 0.3771038353443146, -0.6615868806838989, -0.19718503952026367, -0.1624620258808136, 0.2924807369709015, ...
def main ( input _ filepath, output _ filepath ) : logger = logging. getlogger ( _ _ name _ _ ) logger. info ('creating synthetic workload prediction ( ltwp )') create _ synthetic _ workload ( output _ filepath, extension ='_ ltwp ', regenerate = true ) logger. info ('creating synthetic workload realization ( stwp )') ...
[ 0.4075978994369507, -0.4423542320728302, 0.4228014647960663, 0.5193179249763489, 0.30906757712364197, 0.4009913206100464, 0.5567414164543152, 0.4077339768409729, -1.537310004234314, 0.8224127888679504, -0.7940889000892639, 0.5249347686767578, 0.38043510913848877, -0.15540160238742828, -0...
def test _ employee _ will _ go _ pick _ order ( self ) : employee = self. _ make _ employee ( ) self. base _ conditions ( ) self. assertcanticktilltaskis ( employee, takeorder, 100 )
[ 0.4307554364204407, 0.5032941699028015, 0.32155582308769226, 1.0672950744628906, 0.010030683130025864, 0.3043132424354553, 0.7931565046310425, 0.25432175397872925, 0.05034853145480156, 0.49549880623817444, -1.177464246749878, -0.5438095331192017, 0.4532209038734436, -0.043362293392419815, ...
def finish ( newfiles ) : if ( len ( newfiles ) > 0 ) : text = " " subject = " moodle report - " for course in newfiles : text + = " ~ " * 5 + course + " ~ " * 5 + " \ n " if ( len ( newfiles [ course ] ) > 0 ) : subject + = course + " " for file in newfiles [ course ] : if file [ 2 ] : suffix = " changed " else : suff...
[ 0.01593853533267975, -0.5131510496139526, 0.7187907099723816, -0.5705191493034363, 0.1710989773273468, 0.536325991153717, -0.1365620344877243, 0.2941301167011261, -1.1943687200546265, 0.9999104738235474, -0.18714433908462524, 0.6540333032608032, -0.4198386073112488, 0.8240541815757751, -...
def test _ set _ and _ get _ values _ of _ coordinates _ of _ vectors ( self ) : self. assertequals ( self. vector. getcoordinates ( 0 ), 1. 0 ) self. assertequals ( self. vector. getcoordinates ( 1 ), 2. 0 ) self. assertequals ( self. vector. getcoordinates ( 2 ), 3. 0 ) self. vector. setcoordinates ( 1, 5 ) self. ass...
[ -0.30830317735671997, 0.05950605869293213, 0.5267685651779175, 0.08429624885320663, 0.9497758746147156, -0.22145028412342072, 0.4888525903224945, -0.6973293423652649, 0.037602536380290985, -0.6095255017280579, -0.3054118752479553, -0.32598766684532166, 0.3881502151489258, 0.226173490285873...
def assert _ no _ error ( self, ignore _ messages = none ) : if ignore _ messages is none : ignore _ messages = [ ] msg _ filter = { " t " : { " success ", " info ", " warning " }, " inverse " : true } self. logger. info ( " asserting there are no error notifications. " ) errs = self. read ( * * msg _ filter ) if set (...
[ -0.3156145215034485, 0.6304636597633362, 0.5551196932792664, -0.03927652910351753, 0.5628938674926758, 0.7262486815452576, 0.2930563986301422, -0.20015737414360046, 0.013724775984883308, -0.35681357979774475, -0.05173967778682709, 0.2858971655368805, -0.8339316844940186, 0.7998772263526917...
def convert _ pre _ tags _ to _ mask ( tensor ) : mask = torch. zeros _ like ( tensor ) mask [ tensor! = pre _ tag2idx ['o'] ] = 1 return mask. bool ( )
[ -1.1921968460083008, -0.3287428319454193, 0.4556352198123932, 0.45573821663856506, 0.3430342674255371, -0.14655782282352448, 0.5525010228157043, -0.12395436316728592, 0.20955583453178406, 0.25382158160209656, -1.3151041269302368, -0.09167290478944778, 0.8328854441642761, -0.548798143863678...
def parse ( argv ) : parser = argparse. argumentparser ( description ='parameters for the system') parser. add _ argument ('- - model _ type') parser. add _ argument ('- - num _ layers ', type = int ) parser. add _ argument ('- - num _ units ', type = int ) parser. add _ argument ('- - num _ classes ', type = int ) par...
[ -0.2229597270488739, -0.3852115273475647, 1.0899368524551392, -0.19482329487800598, 0.16451041400432587, 0.06854680925607681, -0.09808263927698135, 0.12461042404174805, -0.6031011343002319, 0.3872469365596771, 0.13325294852256775, 0.23738639056682587, -0.5371524691581726, 1.720054984092712...
def version _ string ( self ) : return'% s % s \ n'\'copyright ( c ) 2017 jonathan simmonds \ n \ n'\'loaded modules : \ n'\'% s \ n'% ( os. path. basename ( sys. argv [ 0 ] ), _ _ version _ _,'\ n '. join ( ['' + str ( m ) for m in search _ modules ] ) )
[ 0.3473812937736511, -1.7790864706039429, 0.578720211982727, -0.5464707016944885, 0.09468299895524979, 1.1574763059616089, -0.14705675840377808, -0.5649532079696655, -0.8658871054649353, 0.7088331580162048, -0.006691186223179102, 0.6738279461860657, -0.4944891631603241, -0.333002507686615, ...
def create _ reflector ( lex ) : if len ( lex ) % 2! = 0 : print ( " the lexicon should contain even number of elements " ) lst _ ind = [ i for i in range ( len ( lex ) ) ] # list of indexes of the lexicon # pair a letter to another and remember the associated indexes new _ enum = [ ] while len ( lst _ ind )! = 0 : ind...
[ -1.3776843547821045, 0.20428305864334106, 0.6936012506484985, -1.5010958909988403, -0.39404284954071045, -0.3413383960723877, -0.6270875930786133, 0.3694624602794647, 0.3554684519767761, 0.7174777984619141, -1.1139037609100342, 0.38697898387908936, -1.0786433219909668, 0.28259384632110596,...
def test _ interrupt ( mocker : mockerfixture ) - > none : main = mocker. asyncmock ( side _ effect = keyboardinterrupt ( ) ) mocker. patch ( " nefelibata. console. main ", main ) _ logger = mocker. patch ( " nefelibata. console. _ logger " ) console. run ( ) _ logger. info. assert _ called _ with ( " stopping nefeliba...
[ -0.4564090669155121, 0.2769259214401245, 0.4454602897167206, -0.13120368123054504, 0.6288489699363708, 0.5552855134010315, 0.20020587742328644, 0.44659489393234253, -0.6217817068099976, -0.09401542693376541, -0.2879601716995239, -0.45448243618011475, -0.44708767533302307, -0.24380609393119...
def _ preprocess ( self, script, langsys ) : # 1. get a list of applicable feature records # based on the script and langsys features = self. _ getapplicablefeatures ( script, langsys ) # 2. get a list of applicable lookup tables based on the # found features and the feature application states lookupindexes = set ( ) f...
[ -0.5959665179252625, -0.5328757762908936, 0.8356939554214478, -0.5451488494873047, -0.4878239035606384, -0.6511463522911072, -0.23872247338294983, 0.5350651741027832, 0.3982093036174774, 0.23262375593185425, -0.22428694367408752, -0.011169055476784706, 0.8160886764526367, 0.720277190208435...
def average ( x : list ) - > float : try : average = sum ( x ) / float ( len ( x ) ) except ( typeerror, valueerror ) : average = np. nan return average
[ -0.635706901550293, 1.0269901752471924, 0.20114126801490784, 0.637483537197113, 0.31979355216026306, 0.30468958616256714, -0.37826600670814514, 0.08785762637853622, 0.45746585726737976, 0.44347453117370605, -0.8272437453269958, 0.6252967119216919, -0.16095611453056335, 1.0540106296539307, ...
def cl _ sm ( par ) : # ew nlo corrections arxiv : 1009. 0947 scale = 120. # < - result has very little sensitivity to high matching scale mt = flavio. physics. running. running. get _ mt ( par, scale ) s2w = par ['s2w'] xt0 _ 165 = 1. 50546 # lo result for mt = 165, scale = 120 xt0 = xt0 _ 165 * ( 1 + 1. 14064 * ( mt ...
[ 0.19765183329582214, -0.2322918176651001, 0.82377690076828, -1.388529896736145, -0.566041111946106, 0.26933449506759644, -0.10676309466362, -1.2048755884170532, -0.2505210340023041, 0.5255752205848694, -0.001652289880439639, -0.16585807502269745, 0.10323207080364227, 0.4008389115333557, ...
def display _ object ( self ) : output = self. font. render ( str ( self. content ), true, self. font _ color ) self. where. blit ( output, ( self. x _ coord, self. y _ coord ) )
[ 0.6815178394317627, -1.035907506942749, 0.46957746148109436, -1.4182202816009521, -0.24135154485702515, 0.428169846534729, 0.37030917406082153, -0.29330793023109436, -0.5286542773246765, 0.4053926169872284, 0.5726011395454407, 0.5063848495483398, -0.101970374584198, -1.0439510345458984, ...
def convert _ to _ coordinates ( lidar ) : p = pyproj. proj ( proj ='utm ', zone = 33, ellps ='wgs84') x, y = p ( lidar [ lat ], lidar [ long ] ) return x, y, lidar [ ele ], lidar [ int ]
[ -0.46559181809425354, -0.004697713069617748, 0.3346324861049652, -0.8122770190238953, -0.1812959611415863, 0.5129776000976562, -0.6593276262283325, 0.05889957398176193, -0.031519386917352676, 0.3261652886867523, -0.10547509044408798, -1.1534465551376343, -0.14621631801128387, -0.6683570146...
def period ( self ) - > st. utcperiod : return st. utcperiod ( self. start, self. end )
[ 0.004511226434260607, -0.6592081785202026, 0.37523332238197327, -0.13511182367801666, 0.016223959624767303, 0.6213791370391846, 0.4691001772880554, 0.04681416600942612, 1.1609885692596436, 0.08607594668865204, 1.0104578733444214, 0.593774139881134, -0.4533206522464752, -1.7676661014556885,...
def test _ connect _ auth ( self ) : self. server. authenticator = simpleauthenticator ( store = {'user':'pass'} ) c1 = self. _ new _ client ( connect = false ) c1. connect ( ) r = c1. received _ frames. get ( timeout = 1 ) self. assertequal ( r. cmd, frames. error ) self. assertin ( b'auth ', r. body ) c2 = self. _ ne...
[ -0.5179826021194458, -0.18443171679973602, 0.5574653148651123, 0.6501928567886353, -0.19481654465198517, 0.6252989768981934, 0.2548018991947174, -0.548060417175293, 0.10739650577306747, -0.3488650619983673, -0.35862553119659424, -0.13813559710979462, -0.5667973160743713, 0.3245684206485748...
def boto3 _ session ( self ) - > boto3. session. session : session = self. _ per _ thread. session if session is none : session = self. _ create _ boto3 _ session ( ) self. _ per _ thread. session = session return session
[ 0.038612380623817444, -0.060561783611774445, 0.5640079975128174, -0.17988620698451996, 0.6139501929283142, 0.7886292934417725, 0.602916419506073, -1.049320101737976, 1.4600136280059814, -0.8869659900665283, 0.2278759926557541, 0.3060348629951477, -0.7878017425537109, -0.8277843594551086, ...
def add _ plot ( self, plot ) : name = plot. name self. plots [ name ] = plot self. canvas. add ( plot, tag = name ) plot _ bg = self. plot _ decor _ d. get ('plot _ bg ', none ) self. canvas. raise _ object ( plot, abovethis = plot _ bg ) for plotable in self. plot _ decor _ l : plotable. add _ plot ( self. viewer, pl...
[ -0.19995976984500885, 0.8140709400177002, 0.3788125514984131, 0.38781020045280457, -0.5959978103637695, 0.09406417608261108, 0.5344101786613464, -0.5166296362876892, 0.6430789828300476, -0.9705435633659363, -0.3582439422607422, 0.3181201219558716, 0.2637360095977783, 0.4281822741031647, ...
def test _ source _ zenith _ from _ icrs ( time _ location ) : time, array _ location = time _ location lst = time. sidereal _ time ( " apparent " ) tee _ ra = lst cirs _ ra = skyutils. _ tee _ to _ cirs _ ra ( tee _ ra, time ) cirs _ source _ coord = skycoord ( ra = cirs _ ra, dec = array _ location. lat, obstime = ti...
[ -0.6055430173873901, -0.20881527662277222, 0.34787970781326294, -1.0631846189498901, 0.2890188992023468, 0.07606318593025208, 0.6168625950813293, 0.01538397092372179, 1.1414976119995117, 0.2579292058944702, -0.7554437518119812, -0.5335118174552917, -0.2359924614429474, -0.105416439473629, ...
def name ( cls ) : return cls. _ _ name _ _. rsplit ( " command " ) [ 0 ]. lower ( )
[ 0.407224178314209, -1.1882061958312988, 0.7192822694778442, 0.032556865364313126, 0.7916387319564819, 0.6381436586380005, 0.2830822169780731, -0.29535192251205444, 0.20815233886241913, -0.1520298421382904, 0.22492772340774536, 0.4906961917877197, -0.2979293465614319, 0.6868152618408203, ...
def ganalytics ( ) : if ( not settings. debug ) and getattr ( settings,'ganalytics _ tracking _ code ', false ) : context = context ( {'ganalytics _ tracking _ code': settings. ganalytics _ tracking _ code } ) return get _ template ('ganalytics / ganalytics. js'). render ( context ) return''
[ -0.29226458072662354, 1.5852023363113403, 0.527531087398529, -0.2478729635477066, 0.44181326031684875, 0.14433003962039948, 0.5736484527587891, -1.1459009647369385, 0.061601754277944565, 0.5536653399467468, 0.9078357815742493, 0.20246195793151855, 0.32029563188552856, 0.12032891064882278, ...
def osdetection ( ) : ipaddr = [ ] for hostname in homenetwork. get _ allhosts ( ) : ipaddr. append ( ( homenetwork. get _ hostname _ specificdata ( hostname,'ip'), hostname ) ) if not ipaddr : return pool = pool ( processes = len ( ipaddr ) ) results = pool. map ( oshandler, ipaddr ) pool. close ( ) pool. join ( ) new...
[ -0.7000259757041931, -0.06953075528144836, 0.6988599896430969, -0.01675523817539215, 0.09221962094306946, -0.12738755345344543, 0.039883822202682495, 0.28717896342277527, -0.5657334327697754, -0.189692884683609, -0.2999684810638428, -0.10608252137899399, 0.08777296543121338, 0.698686361312...
def get _ continent _ floors ( self, continent _ id, * ids ) : return self. _ request ( " continents / { } / floors ". format ( continent _ id ), ids = ', '. join ( str ( id ) for id in ids ) )
[ -0.5895371437072754, -0.08020206540822983, 0.406176894903183, 0.43268176913261414, 0.7822461724281311, 0.48075902462005615, -0.021436229348182678, -0.2612420916557312, -0.4530376195907593, 0.3624044954776764, 0.5047566294670105, -0.3870266079902649, -1.5689959526062012, 1.2506946325302124,...
def get _ plot ( self, name ) : return self. plots [ name ]
[ 0.03310917317867279, 0.15723927319049835, -0.0835321769118309, -0.11899914592504501, -1.1529805660247803, -0.01828084886074066, -0.4693196415901184, -1.3737595081329346, -0.7948548793792725, -0.1662461906671524, 0.2538602352142334, 0.97923344373703, -0.19002149999141693, -0.896868586540222...
def execute ( self, graph, node _ name, node, connect _ to _ node _ name, local _ state = { }, global _ state = { } ) : my _ state = getnodestate ( node _ name, local _ state ) predecessors = [ getnodestate ( predecessor, local _ state ) ['node'] for predecessor in graph. predecessors ( node _ name ) \ if predecessor! ...
[ -0.3451509475708008, -0.2360686957836151, 0.7022165060043335, -0.21898481249809265, 0.15655893087387085, -1.145628809928894, 0.37943360209465027, 0.610523521900177, -0.4444409906864166, 0.7189837098121643, 0.17354002594947815, 0.36971044540405273, 0.29384171962738037, -0.29794663190841675,...
def _ on _ click _ subtract ( self ) : items = self. view. selected _ session # extract alpha labels from selected items labels = [ i. split ('' ) [ - 1 ] for i in items if i. split ('' ) [ 0 ] = ='distance'or i. split ('' ) [ 0 ] = ='width'] # remove selected items from model self. _ session _ targets = [ i for i in s...
[ -0.7255609035491943, -1.2680948972702026, 0.8776841163635254, -0.7238152027130127, -0.19536416232585907, 0.18450875580310822, 0.4880341589450836, -0.05737860128283501, 0.7581713795661926, 0.7942091226577759, -0.21113818883895874, -0.3059570789337158, -0.32945069670677185, -0.75128102302551...
def get ( self, request : request, user _ id = none ) - > response. response : user : models. user = request. user if user _ id : try : user = models. user. objects. get ( id = user _ id ) except models. user. doesnotexist as e : return response. response ( data = e. _ _ dict _ _, status = status. http _ 400 _ bad _ re...
[ -0.6903240084648132, -0.37585413455963135, 0.5742665529251099, 0.9690617322921753, -0.3254547715187073, -0.04732620343565941, -0.13855382800102234, -0.5560892224311829, 0.7096813917160034, -0.5071536302566528, -0.18832668662071228, 1.0017693042755127, 0.23602554202079773, 0.300859510898590...
def without _ env ( self, environment _ variable ) : new _ command = copy. deepcopy ( self ) new _ command. _ env _ drop. append ( str ( environment _ variable ) ) return new _ command
[ -0.9540226459503174, -0.9427855014801025, 0.5599998235702515, -0.5167143940925598, -0.2996753454208374, 1.383298635482788, -0.012150096707046032, -0.7893199920654297, -0.17582190036773682, 0.21111388504505157, -0.3976496756076813, 0.8398380875587463, -0.6170249581336975, 0.4852707386016845...
def end ( ) : return render _ template ('end. html ', graph _ lst = graph _ lst, score = round ( sum ( score _ lst ) / len ( score _ lst ), 2 ) )
[ 0.31102168560028076, 0.476217657327652, 0.4138670265674591, 0.48181965947151184, 0.3531789481639862, 0.5327122211456299, 0.6675382256507874, 0.3907385766506195, -0.7136660218238831, 1.056431770324707, -0.3045426309108734, -0.1905345469713211, -0.7292584776878357, 0.6114417314529419, -0.0...
def request _ client _ token ( client _ id : str, client _ secret : str, redirect _ uri : str ) - > refreshingtoken : cred = refreshingcredentials ( client _ id, client _ secret, redirect _ uri ) return cred. request _ client _ token ( )
[ -0.13887353241443634, -0.3577542304992676, 0.2674187123775482, 0.3471705913543701, -0.14222955703735352, -0.1348271369934082, -0.625184953212738, -0.37029898166656494, -0.0005974299274384975, -0.7909596562385559, -0.18204736709594727, 1.4875003099441528, -0.07022994756698608, -0.7095450758...
def gn _ max ( self, votes, preds ) : release _ votes = false data _ intependent _ ret = none thresh _ votes = votes # thresholding based on mode if self. threshold _ mode = = self. basic _ mode : release _ votes = true elif self. threshold _ mode = = self. confident _ mode : self. _ add _ rdp _ loss ( votes, self. sig...
[ -0.4207242429256439, 0.37170130014419556, 0.8743223547935486, 0.2205328792333603, -0.3405782878398895, 0.6476325392723083, -0.863472580909729, -0.31110647320747375, -0.2953784167766571, 0.8432028889656067, 0.5268118977546692, 0.8011436462402344, -0.09397498518228531, 0.37111973762512207, ...
def add ( lemon, rule, handler = none, app = none, * * options ) : def callback ( * args, * * kwargs ) : check _ access ( options. get ('access') or [ ] ) if isinstance ( handler, str ) : # pragma : no cover # test in : tests / test _ routes. py : test _ route _ fetch replacements = {'{'+ k +'}': v for k, v in request....
[ 0.12335456162691116, 0.5588880777359009, 0.8837719559669495, 0.035054322332143784, -0.40856000781059265, 0.14723534882068634, -0.5730651617050171, 0.25933021306991577, 0.470801442861557, -0.43239840865135193, 1.3349379301071167, 0.5317569375038147, 0.29110243916511536, 0.9127246141433716, ...
def taxi ( self ) : # todo : verify that this blocks until complete self. pso _ taxi. put ( " taxi " )
[ 0.6943671107292175, 0.5486997365951538, 0.3817291259765625, -0.014902131631970406, 0.9231081604957581, -0.1836499124765396, 0.15968331694602966, -0.1969843953847885, -1.2404621839523315, -0.8447656035423279, -1.6938514709472656, -0.16810092329978943, -0.5468212366104126, -1.044986367225647...
def _ _ init _ _ ( self, corner, position, character ) : super ( playersprite, self ). _ _ init _ _ ( corner, position, character, impassable ='', confined _ to _ board = true )
[ 0.766823947429657, -0.5105059742927551, 0.5102673172950745, -0.6193203330039978, 0.23972584307193756, 0.22343957424163818, -0.12998493015766144, 0.3508251905441284, -0.48773080110549927, 0.9963387846946716, -0.5685036182403564, -0.34933847188949585, -0.25867462158203125, -0.489428967237472...
def offset _ to _ next _ variable ( self ) - > optional [ int ] : if self. source _ type! = variablesourcetype. stackvariablesourcetype : return none for i, var in enumerate ( self. _ function. stack _ layout ) : if var = = self : if i + 1 < len ( self. _ function. stack _ layout ) : return abs ( self. storage - self. ...
[ -0.23001164197921753, 0.21971407532691956, 0.7132421731948853, -0.19345872104167938, -0.9644399881362915, -0.16308213770389557, 1.3142629861831665, -0.7359732389450073, 0.003805621061474085, -0.07307972759008408, -0.34677770733833313, 0.2748830318450928, -0.4827672839164734, 0.030030641704...
def predictdeficitexpon ( self, countsin = 50000. 0 ) : self. aimgpred = self. aexpon [ :, :, 0 ] * countsin + self. aexpon [ :, :, 1 ] self. aimgpred = n. exp ( self. aimgpred ) / countsin # do in percentage self. aimgpred * = 100. 0
[ -0.17754806578159332, 0.26654645800590515, 0.3897106647491455, 0.04111963510513306, -0.10650312155485153, 0.27957531809806824, 0.05819397419691086, 0.6835863590240479, 0.329009085893631, 0.7038661241531372, 0.3161739408969879, 0.21652436256408691, 0.33689793944358826, -0.029487742111086845...
def create _ default _ params _ file ( ) : param _ dict = {'negative peaks':'no ','temperature range to bound negative curve fitting':'none ','temperature range to bound positive curve fitting':'full ','max peak num':'10 ','mass defect warning':'10 ','temperature to calculate mass loss from':'60 ','temperature to calcu...
[ 0.4813435971736908, -0.4029493033885956, 0.7665077447891235, -0.03117040917277336, 0.8265939354896545, 0.9332413673400879, 0.46874797344207764, 0.34849780797958374, -0.8909550309181213, 0.2796068489551544, -0.3108275830745697, 0.2903536856174469, 0.11174757033586502, 1.059882402420044, -...
def get _ current _ tickers _ data ( stockname ) : query _ url = " https : / / query1. finance. yahoo. com / v7 / finance / quote? symbols = { } " res = requests. get ( query _ url. format ( stockname ) ) data = res. json ( ) [ " quoteresponse " ] [ " result " ] if len ( stockname. split ( ", " ) ) = = 1 : return data ...
[ -1.25315260887146, -0.13789846003055573, 0.4071812927722931, 0.011881698854267597, 0.26478055119514465, -0.7718247771263123, -0.2864374816417694, -0.754352331161499, -0.014762606471776962, 0.4581708014011383, -0.3923563063144684, 0.24013622105121613, -1.1436904668807983, 0.6042323708534241...
def _ _ len _ _ ( self ) : return len ( self. _ rows )
[ 0.1541557013988495, 0.22585463523864746, 0.30601221323013306, -1.2343648672103882, 0.3010643720626831, -0.37654319405555725, 0.31617510318756104, 0.9385601878166199, 0.8484499454498291, -0.8614720106124878, -0.5046001076698303, -0.2329758256673813, 0.9721043109893799, 0.13092531263828278, ...