text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ convert _ output _ type _ range ( img : np. ndarray, dst _ type : union [ np. uint8, np. float32 ] ) - > np. ndarray : if dst _ type not in ( np. uint8, np. float32 ) : raise typeerror ('the dst _ type should be np. float32 or np. uint8,'f'but got { dst _ type }') if dst _ type = = np. uint8 : img = img. round ( ...
[ -1.0052586793899536, -0.3892781436443329, 0.5981164574623108, -0.18905282020568848, -0.24635346233844757, 0.1993151754140854, 0.5748985409736633, -1.1776251792907715, 0.5154179334640503, 1.0802384614944458, 1.0034739971160889, 0.7922190427780151, 0.32062897086143494, 0.7394710183143616, ...
def makeidentity ( cls, m ) : obj = matrix ( m, m, init = false ) for i in range ( m ) : obj. data. append ( [ 1 if i = = j else 0 for j in range ( m ) ] ) return obj
[ -1.2507840394973755, -0.745904803276062, 0.35917913913726807, 0.5397748947143555, 0.3612532317638397, 0.7907447814941406, 0.7298029661178589, 0.42403221130371094, 1.0115725994110107, -0.4443376660346985, -0.7032003402709961, -0.4909043610095978, -0.9099851846694946, 0.018847590312361717, ...
def addbookmark ( self, inputevent ) : bookmarks = self. getbookmarks ( ) bookmarks. addbookmark ( inputevent )
[ -0.3229562044143677, -0.3952157497406006, 0.4127722382545471, 1.28324294090271, 1.0509165525436401, 1.07314932346344, 0.22630757093429565, 0.20838023722171783, 0.09810572117567062, -0.6588851809501648, -0.7081942558288574, 0.6752090454101562, -0.30159077048301697, 0.38941124081611633, 0....
def pformat _ directories ( l, absolute = false ) : def fmt _ dir ( index, directory, absolute ) : transform = os. path. basename if absolute : transform = lambda x : x return fmt. format ( index, transform ( directory ), fmt _ ctime ( directory ) ) return'\ n '. join ( fmt _ dir ( i, d, absolute = absolute ) for i, d ...
[ -1.0036821365356445, -0.020943351089954376, 0.7410488128662109, -0.024603553116321564, -0.3622090220451355, 0.24677379429340363, 0.08217506110668182, -0.10946733504533768, 0.4839891493320465, 0.1614902913570404, 0.3916730582714081, -0.6569725275039673, 0.3896940350532532, 1.028881072998046...
def clean _ homes _ data ( df _ housing ) : # filter down to the month we plan to use, june 2019 df _ housing _ jun2019 = df _ housing [ ['regionid ','regionname ','state ','metro ','sizerank ','2019 - 06'] ] df _ housing _ jun2019 = df _ housing _ jun2019. rename ( columns = {'2019 - 06':'medianhouseprice'} ) df _ dcm...
[ 0.429411381483078, 0.11221946775913239, 0.48842114210128784, 0.01263620238751173, -0.057202763855457306, 0.13183128833770752, -0.49041470885276794, 0.5319620966911316, 0.5060282349586487, 0.5112185478210449, 1.175897240638733, 0.6927758455276489, 0.8540154695510864, -0.06410593539476395, ...
def new _ instantiated ( cls, * args, * * kwargs ) : return self. _ instance
[ -0.32429641485214233, -1.1122640371322632, 0.3892149329185486, -0.9863747954368591, 0.19285865128040314, 0.6900095343589783, 0.26681339740753174, -0.2866049110889435, -0.7792404294013977, -0.889635443687439, -0.2264004647731781, 0.32415419816970825, -0.32726725935935974, 0.0187418367713689...
def linear _ to _ log _ base ( xs, dy _ dxs, base = none ) : if base is none : return dy _ dxs * xs else : return dy _ dxs * ( xs * math. log ( base ) )
[ -0.14511443674564362, 0.14524732530117035, 0.7392581701278687, -0.783320963382721, 0.1436881572008133, -1.121411919593811, -1.1820425987243652, -0.34714141488075256, 0.4336930513381958, -0.1458873748779297, -0.32668551802635193, 0.5045229196548462, 0.16974525153636932, -1.1911770105361938,...
def update _ work _ arrangement ( self, request _ data : request _ data _ models. updateworkarrangementdata ) : work _ arrangement _ entity = self. _ work _ arrangement _ repo. work _ arrangement _ exists ( wa _ pk = request _ data. id ) if work _ arrangement _ entity is none : raise domain _ validators. objectentitydo...
[ -1.637768030166626, -0.41479751467704773, 0.9053449034690857, 0.02312472090125084, -0.43971192836761475, 1.1123671531677246, 0.6106320023536682, -0.6994370222091675, -0.01855095662176609, 0.9445111155509949, -0.1417711079120636, 0.006846885662525892, -0.23556245863437653, -0.09318447858095...
def get _ all _ by _ user _ id ( user _ id, _ cls = true ) : return templateversionmanager. get _ all _ version _ manager _ by _ user _ id ( user _ id, _ cls )
[ -0.034511417150497437, -0.1668056845664978, 0.470670610666275, 1.4575035572052002, -0.44535768032073975, 0.1366349458694458, -0.41458433866500854, -0.32479968667030334, 0.530682384967804, -0.13615190982818604, -0.6583407521247864, 0.9906890988349915, 0.5245658755302429, 1.4186713695526123,...
def delete _ listeners ( self, blb _ id, portlist, client _ token = none, config = none ) : path = utils. append _ uri ( self. version,'blb ', blb _ id,'listener') params = { } params [ b'batchdelete'] = none if client _ token is none : params [ b'clienttoken'] = generate _ client _ token ( ) else : params [ b'clientto...
[ 0.09904766827821732, -0.2759760320186615, 0.7272506356239319, 0.32906433939933777, 0.9689323902130127, -0.05317886918783188, -0.03332281857728958, -0.33160147070884705, -0.046054232865571976, 0.8601354360580444, -1.198866844177246, 1.3891960382461548, -1.7128841876983643, -0.04087941348552...
def color _ lattice ( lattice : lattice ) : # fix the coloring to be clockwise about vertex 0 fixed = enumerate ( clockwise _ edges _ about ( vertex _ index = 0, g = lattice ) ) solveable, solution = edge _ color ( lattice, n _ colors = 3, fixed = fixed ) if not solveable : raise valueerror ( " no coloring exists for t...
[ -0.3778060972690582, 0.44286707043647766, 0.3814513683319092, -0.37820732593536377, 0.12748438119888306, -0.11337101459503174, -0.18762950599193573, -0.17948520183563232, 0.7120269536972046, 0.8473619818687439, 0.22493664920330048, 0.480087548494339, -0.6966885924339294, 0.5708531141281128...
def _ _ init _ _ ( self, master, old _ frame, movie _ title, dataset ) : super ( ). _ _ init _ _ ( master, movie _ title, 15, 7, true, false ) self. master = master self. master. title ('main menu') self. master. geometry ('1050x800 + 25 + 25') self. v _ title. set ( movie _ title ) self. scrollbar. pack ( side = " rig...
[ -0.6141707301139832, 0.4476371705532074, 1.0236761569976807, 0.5430036783218384, -0.8460119962692261, -0.16936346888542175, -0.4086947441101074, 0.3712867796421051, -1.0208317041397095, 0.3630897104740143, 0.47435876727104187, 0.2815806567668915, 0.249491885304451, 1.288356900215149, 0.4...
def fan _ status ( self ) - > int : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " fan _ status " )
[ -0.11070702970027924, 0.2622394263744354, 0.18178865313529968, 0.2621726393699646, 0.2198326587677002, 0.5657861232757568, 0.4563078284263611, 0.4427320957183838, -0.30595868825912476, -0.3079785108566284, -0.9829028248786926, 0.41753578186035156, 0.3901561200618744, -0.3953988552093506, ...
def wait ( delay = 1 ) : s = time. clock ( ) while true : if time. clock ( ) - s > = delay : return qtwidgets. qapplication. instance ( ). processevents ( )
[ 0.9950423240661621, -0.07968082278966904, 0.6005034446716309, -0.12843982875347137, -0.6095253229141235, 0.5420793294906616, 0.794990062713623, 0.13482162356376648, -0.0854286402463913, -0.988310694694519, -0.14895939826965332, -0.5150065422058105, -0.3885020315647125, -0.08682325482368469...
def trading _ api _ request ( self, method, endpoint, body = { } ) : try : nonce = str ( int ( time. time ( ) * 1000 ) ) request _ url = self. base _ url + endpoint body _ str ='' if any ( body ) : body _ str = json. dumps ( body, sort _ keys = true, separators = ( ', ',':') ) signature = self. trading _ api _ sign ( m...
[ -1.3005681037902832, 0.05065225809812546, 1.0407174825668335, 0.21178872883319855, 0.021998612210154533, -0.7675504088401794, -0.9900513291358948, -0.21243184804916382, 0.028967874124646187, 0.6631916761398315, 0.050764597952365875, 0.5091599822044373, -0.8542396426200867, 0.60691350698471...
def get _ url ( ad _ id, index, show _ pushid _ set, bidres _ pushid _ set, show _ url _ dict, unshow _ url _ dict, file _ list ) : if ( none = = show _ pushid _ set or none = = bidres _ pushid _ set or none = = file _ list or 0 = = len ( file _ list ) ) : return for file _ name in file _ list : get _ url _ file ( ad _...
[ -0.12393408268690109, 0.977267861366272, 0.3503754436969757, 0.2533814013004303, 0.7823679447174072, -0.5034914612770081, -0.2436852902173996, 0.8743734955787659, -0.275823712348938, 0.5263785123825073, 0.3901676833629608, 0.5575447678565979, 0.5013808012008667, 0.8239240050315857, 0.088...
def eod _ load ( self, download = true ) : self. eod _ df = self. load _ dataset ('eod ', download = download )
[ -0.5709165334701538, 0.28621914982795715, 0.3002202808856964, -0.6434526443481445, -0.11730745434761047, 0.30100980401039124, 0.12067987769842148, 0.22602339088916779, 0.2127348631620407, 0.1926780492067337, 0.6479243636131287, 0.4451046586036682, 0.48152342438697815, 0.024100160226225853,...
def mention ( self ) : return f'< # { self. id } > '
[ 0.8585124015808105, -1.3289686441421509, 0.5575427412986755, -0.5342407822608948, 0.9499988555908203, 0.5859384536743164, -0.46257197856903076, -0.15614329278469086, 0.5970475673675537, -0.04406444728374481, 0.21836131811141968, 1.0062198638916016, -0.4289267957210541, 0.6380149126052856, ...
def visualize _ cifar ( x _ train, y _ train, samples _ per _ class ) : classes = ['plane ','car ','bird ','cat ','deer ','dog ','frog ','horse ','ship ','truck'] ; num _ classes = len ( classes ) ; for y, cls in enumerate ( classes ) : idxs = np. flatnonzero ( y _ train = = y ) idxs = np. random. choice ( idxs, sample...
[ -0.29960423707962036, 0.45300254225730896, 0.7639425992965698, 0.04114595428109169, -0.6320376396179199, 0.12044239789247513, 0.4389517307281494, 0.4948885440826416, 0.16712209582328796, 0.13841627538204193, 0.45730307698249817, 0.8863353133201599, 0.3640277683734894, -0.016323262825608253...
def agentbehavior1 ( cola ) : # registramos el agente # gr = register _ message ( ) # escuchando la cola hasta que llegue un 0 fin = false while not fin : while cola. empty ( ) : pass v = cola. get ( ) if v = = 0 : fin = true else : print v # selfdestruct # requests. get ( infoagent. stop )
[ -0.04938175529241562, -0.2580401599407196, 0.4953702986240387, 0.9228323698043823, 1.327824592590332, 0.35559090971946716, 0.006974843796342611, -0.37997302412986755, -0.6112282276153564, 0.3839368224143982, 0.2040947675704956, 0.6168311238288879, -0.2823435962200165, 0.047721363604068756,...
def test _ atomic _ hex _ binary _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 5. xsd ", instance = " nistdata / ...
[ 0.17790433764457703, -0.449817955493927, 0.3510345220565796, 0.44014328718185425, -0.2968341112136841, 0.01459421031177044, -0.08406741917133331, -0.1955389678478241, -0.714541494846344, 0.4060189127922058, -1.0274696350097656, -0.454343318939209, -0.17549008131027222, 0.8784693479537964, ...
def divide _ data ( data, column, value ) : # a function that decides if the row goes to the first or the second group ( true or false ) spliter = none if isinstance ( value, int ) or isinstance ( value, float ) : spliter = lambda item : item. scaled _ coords [ column ] > = value else : spliter = lambda item : item. sc...
[ -0.2563183903694153, 0.03493402153253555, 0.49432769417762756, -0.2633642554283142, -0.4911555349826813, -0.1302868127822876, -0.36818787455558777, -0.22009822726249695, -1.3707010746002197, 0.3799889385700226, -0.18037135899066925, -0.18410871922969818, -0.33616575598716736, 0.08520644158...
def font _ color ( self, font _ color ) : self. _ font _ color = font _ color
[ 0.31515035033226013, -0.33029183745384216, -0.12083020806312561, -0.12458696216344833, 0.20542483031749725, 0.3360385596752167, 0.4047654867172241, 1.1557072401046753, -0.08097366243600845, -0.4840540885925293, -0.517116129398346, 0.15164265036582947, 0.49599596858024597, 1.253258943557739...
def test _ do _ roll _ up ( test _ dao ) : dut = dtmsimilaritem ( test _ dao ) dut. do _ select _ all ( revision _ id = 1 ) for _ node in dut. do _ select _ children ( 1 ) : _ attributes = _ node. data. get _ attributes ( ) _ attributes ['change _ description _ 1'] = ('this is change description 1'' for node id : { 0 :...
[ -0.6380429863929749, 0.7717669010162354, 0.7240297198295593, -0.15119591355323792, 0.7039971947669983, -0.15143638849258423, 0.5361607670783997, 0.19444037973880768, -0.36684098839759827, 0.48183563351631165, -0.45168209075927734, 0.44813382625579834, 0.2676350474357605, -0.061442416161298...
def _ _ init _ _ ( self, driver, get _ waypoint ) : super ( ). _ _ init _ _ ( driver ) self. _ get _ waypoint = get _ waypoint
[ 0.42804664373397827, -0.30925360321998596, 0.39547455310821533, 0.9890432357788086, 0.4447851777076721, -0.508753776550293, -0.4130701422691345, 0.2691590189933777, 0.4928177297115326, 0.5437153577804565, -0.4859056770801544, 0.6010552048683167, 0.0019994641188532114, 0.5159111618995667, ...
def optimize ( self, src : t. list [ line ] ) - > none : offset = 0 current = 0 insert _ at = set ( ) for num, line in enumerate ( src ) : if line. indent < current : if not line. src. startswith ( ". " ) : if offset < 0 : offset + = 1 else : offset = 0 if ( line. src. startswith ( " if " ) or line. src. startswith ( "...
[ -1.0197383165359497, 0.75520259141922, 0.83641517162323, -0.6904269456863403, 0.2551533877849579, -0.7064071893692017, 0.8507928252220154, 0.12450054287910461, 0.14602436125278473, 0.5929773449897766, -0.8788896799087524, 0.08741078525781631, -0.4371563792228699, 0.570461094379425, -0.08...
def _ _ init _ _ ( self, message : str ) - > none : super ( ). _ _ init _ _ ( message )
[ 0.5833866596221924, 0.3412059247493744, 0.4022090435028076, 0.6123665571212769, 0.07730843126773834, -0.031675562262535095, 0.2126949429512024, 0.25061172246932983, -0.2492031753063202, -0.6197695732116699, -0.09366166591644287, 0.7365660071372986, -0.3506013751029968, 0.9685655236244202, ...
def parse _ corpus _ set _ parallel ( self ) : pool = mp. pool ( processes = os. cpu _ count ( ) ) paths _ names _ and _ window _ sizes = [ ] for name in self. corpus _ name _ list _ : paths _ names _ and _ window _ sizes. append ( ( self. path _, name, self. note _ window _ size _ ) ) mp _ out = pool. starmap ( self. ...
[ 0.22739733755588531, 0.13387969136238098, 0.3735671937465668, -0.603974461555481, -0.44115981459617615, 0.2131950557231903, 0.7151297926902771, 0.2858926057815552, -0.7480111718177795, -0.28257837891578674, 0.08547057211399078, 0.39814919233322144, -0.8611473441123962, 0.2911421060562134, ...
def response _ from _ server ( url, image _ file ) : files = { " file " : image _ file } response = requests. post ( url, files = files ) status _ code = response. status _ code if status _ code! = 200 : print ( " something went wrong!!! " ) return response
[ -0.23796556890010834, -0.8351670503616333, 0.48706409335136414, 0.28833407163619995, 0.24769163131713867, 0.167842835187912, -0.08991468697786331, 0.2160613089799881, -0.8189524412155151, -0.013765210285782814, -0.7053238153457642, -0.5757973194122314, -0.4166720509529114, 0.47890263795852...
def reset _ login _ attempts ( self ) : self. login _ attempts = 0
[ -0.8295563459396362, -0.5526620745658875, 0.2968927323818207, -0.40043142437934875, 0.5677528381347656, 0.46254268288612366, -0.21414297819137573, 0.23591355979442596, -0.27517169713974, -0.2700607478618622, 0.2954162061214447, 1.2865768671035767, -1.1486366987228394, -0.4373452067375183, ...
def phone _ number ( self ) : return self. _ phone _ number
[ -0.18826904892921448, -0.5824910402297974, 0.16861896216869354, 0.9881770610809326, 1.311492919921875, 0.2490483671426773, 1.0977956056594849, 0.9144313931465149, 0.5749706625938416, -1.0158207416534424, -0.2621041238307953, -0.10538432747125626, 0.5603404641151428, -0.03070700541138649, ...
def _ default _ constraints ( self ) : cns = super ( container, self ). _ default _ constraints ( ) cns. append ( vbox ( * self. widgets ) ) return cns
[ -0.2794579267501831, 0.32298117876052856, 0.18235467374324799, 0.7174278497695923, 0.6642139554023743, -0.38906729221343994, -0.4246615469455719, -0.4017734229564667, 0.5351988077163696, -0.06489543616771698, -0.3247540295124054, -0.8343040347099304, -0.7082494497299194, 0.7729963660240173...
def do _ junkout ( self, caller ) : caller. msg ( " you destroy % s. " % self ) self. softdelete ( ) return
[ 0.4489887058734894, 0.225243479013443, 0.3788589537143707, 0.20826861262321472, 0.7529575228691101, 0.05547460541129112, 0.03507260978221893, 0.10938701778650284, 0.4591461718082428, -0.07135006040334702, 0.34587982296943665, 0.6288011074066162, 0.0028435413260012865, 0.4532797932624817, ...
def errors _ in _ session ( self ) : return'errors'in self. session
[ -0.4252229332923889, -0.4487946927547455, 0.400881826877594, -0.25324785709381104, 0.5669105052947998, 0.05823566019535065, -0.12593236565589905, -0.7417829036712646, 1.1265308856964111, -0.6234765648841858, -0.3039471209049225, 0.39611008763313293, 0.30376729369163513, -0.2828527390956878...
def add _ n ( inputs, name = none ) : if not inputs or not isinstance ( inputs, collections _ abc. iterable ) : raise valueerror ( " inputs must be an iterable of at least one " " tensor / indexedslices with the same dtype and shape. " ) inputs = indexed _ slices. convert _ n _ to _ tensor _ or _ indexed _ slices ( inp...
[ -0.7925788164138794, 0.5332086682319641, 0.9481285810470581, 1.218827724456787, 0.2740820348262787, -0.17228353023529053, 0.6589924097061157, -0.6192655563354492, 0.6145479083061218, 0.6063500642776489, 0.24599941074848175, -0.1647437959909439, -0.158552885055542, 0.14255847036838531, -0...
def rotation ( position, theta ) : x, y = position r = m. sqrt ( x * * 2 + y * * 2 ) # on calcule l'angle que forme le point de base avec l'horizontale if x = = 0 : # si x vaut 0, il faut eviter qu'il y ait une zerodivisionerror angle = m. pi / 2 else : angle = m. atan ( y / x ) return ( r * m. cos ( angle + theta ), r...
[ 0.3927215039730072, -0.19458483159542084, 0.5211004614830017, -0.6255772709846497, 0.06996344029903412, -0.12468356639146805, -0.7014155983924866, 0.06270130723714828, -0.6474106907844543, 0.5709006190299988, -0.19663555920124054, -0.7614412903785706, -0.4339158236980438, -1.10062241554260...
def create _ routing _ test _ suite _ module ( modules, language, shortest _ set ) : test _ suites = [ ] if len ( modules ) > 0 and modules [ 0 ]. project. test _ header : th _ module = modules [ 0 ]. project. test _ header else : th _ module = none for module in modules : data = get _ paths _ through _ all _ edges ( m...
[ -0.4927576184272766, -0.44669878482818604, 0.5871699452400208, -0.020862450823187828, 0.6419186592102051, 0.4025656282901764, 0.4641779065132141, -0.2176821380853653, 0.014170506037771702, 0.8622944355010986, -0.7033193707466125, 0.043417610228061676, -0.4871584475040436, 0.645901083946228...
def prepare _ result ( self, xact _ info, action, ks _ path, msg ) : try : if not msg. test : # no specific instance specified, return all results yield from self. update _ result ( ) xact _ info. respond _ xpath ( rwdts. xactrspcode. ack, " d, / rw - dtsperfmgr : perf - test ", self. test _ results ) return test _ id ...
[ 0.36343488097190857, 0.18452784419059753, 0.44617459177970886, -0.3332854211330414, -0.126970574259758, -0.9690488576889038, 0.5824804306030273, -0.4631471335887909, 0.6737105250358582, 0.12538212537765503, 0.9602599143981934, -0.5117449164390564, -0.555921196937561, 0.4719161093235016, ...
def txt2points ( txt ) : lst = [ ln. strip ( ). split ( ) for ln in txt. splitlines ( ) ] return [ [ float ( coord ) for coord in p3d ] for p3d in lst ]
[ 0.5888959169387817, -0.708771824836731, 0.4112045466899872, -0.23676855862140656, 0.2613074481487274, 1.452609896659851, -0.984709620475769, 2.0898358821868896, -0.24604496359825134, 0.37802571058273315, -0.6929368376731873, -0.36392122507095337, -0.283334344625473, -0.3313252031803131, ...
def gen _ transformed _ urls ( url ) : yield from _ gen _ new _ urls ( url, [ _ ext _ munger, _ v _ munger, _ pypi _ munger, _ github _ munger ], )
[ -1.0300525426864624, 0.42839646339416504, 0.38994109630584717, 0.2565898895263672, -0.009891388937830925, -0.578563928604126, -0.25525590777397156, 0.3521268963813782, 0.3298470377922058, -0.4739411473274231, -0.9619928598403931, 0.5432646870613098, 0.24771876633167267, 0.8931398987770081,...
def get _ nearest _ units ( unit _ in, all _ units, valid _ types, threshold = 20 ) : nearby _ allies = 0 for unit in all _ units : if unit. id = = unit _ in. id : continue # if unit is not a valid unit if unit. type not in valid _ types : continue diff = distance _ between ( unit. x, unit. y, unit _ in. x, unit _ in. ...
[ -0.24696986377239227, -1.069077968597412, 0.5657296776771545, 0.22762995958328247, -0.47285550832748413, 0.5425963401794434, -0.12605075538158417, -0.18132781982421875, 0.04714430868625641, -0.46183016896247864, -0.1347053498029709, 0.32050821185112, -0.4148028790950775, 0.7796083688735962...
def get _ vocabs ( dataset ) : print ( " building vocab... " ) vocab _ words = set ( ) vocab _ labels = set ( ) for words, label in dataset : vocab _ words. update ( words ) if type ( label ) = = list : pass else : vocab _ labels. update ( [ label ] ) print ( " - done. { } tokens ". format ( len ( vocab _ words ) ) ) p...
[ -0.5282577872276306, -0.2863411009311676, 0.27109330892562866, -0.5850611329078674, 0.17503049969673157, 0.0703495666384697, -0.7463173270225525, 0.128839373588562, -0.06649450957775116, 0.3778260350227356, 0.5249168276786804, 0.8658635020256042, 0.029984798282384872, 0.8048781156539917, ...
def log ( self, message ) : logging. basicconfig ( filename = self. logfile, format ='% ( asctime ) - 6s : % ( name ) s - % ( levelname ) s - % ( message ) s') logger = logging. getlogger ( self. appname ) logger. setlevel ( logging. info ) logger. info ( message )
[ 0.4864521324634552, -0.15547220408916473, 0.6998698115348816, 0.07682705670595169, 0.10575998574495316, 0.5382471680641174, -0.5057477355003357, -0.3034818470478058, -1.2703815698623657, -0.1911153942346573, -0.4466336667537689, -0.13877855241298676, -0.009364837780594826, 0.87621682882308...
def get _ current _ drawing ( self ) : return self. current _ drawing
[ -0.4654655158519745, -0.4257323741912842, 0.6882216930389404, 0.027452215552330017, 0.14745308458805084, 0.6415899991989136, 0.8761087656021118, -0.44048309326171875, -0.3395106792449951, -0.7966389656066895, 1.0249921083450317, 0.7141413688659668, -0.5799625515937805, -0.1501263529062271,...
def _ expand _ sheet ( self, row, col ) : # columns current _ col _ length = len ( self. rows [ 0 ] ) if current _ col _ length < = col : for row _ iter in self. rows : row _ iter + = [ set ( ) for _ in range ( col - current _ col _ length + 1 ) ] # add rows if needed if len ( self. rows ) < = row : self. rows + = [ [ ...
[ 0.5387645363807678, 1.5172475576400757, 0.5911225080490112, -0.6240706443786621, -0.6206727623939514, -0.21254459023475647, -0.19432388246059418, -0.40469449758529663, 0.3627266585826874, 0.24661526083946228, 1.0937634706497192, 0.1740908920764923, 0.37266722321510315, -0.06094148010015488...
def test _ add _ entry ( self ) : self. login ( ) response = self. client. get ('/ admin / add / text /') entry _ data = {'title':'second test entry ','slug':'second - test - entry ','tags':'tests ','published':'true ','content':'test ','publish _ date _ year': datetime. now ( ). year,'publish _ date _ month': datetime...
[ 0.4808931052684784, 0.2740033268928528, 0.645993709564209, -0.06339284032583237, 0.928800642490387, 0.3492785692214966, -0.32666879892349243, 0.2727005183696747, 0.09969969838857651, -0.5668612122535706, 0.03559969365596771, 0.19013145565986633, -0.3543776273727417, 0.6508006453514099, -...
def test _ atomic _ language _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 4. xsd ", instance = " nistda...
[ 0.5597067475318909, -0.3953580856323242, 0.2776072323322296, 0.049279771745204926, -0.4496121108531952, 0.0003540650359354913, -0.3270091414451599, -0.40198877453804016, 0.4763774275779724, 0.20275729894638062, -0.36243003606796265, -0.4634588658809662, -0.7330247163772583, -0.501896798610...
def get _ sales _ without _ rating _ email ( self ) : try : response = self. bre. find ( { " was _ sent " : false } ) return response, 200 except : return " error : could not connect ", 500
[ -0.42186689376831055, 0.3866739571094513, 0.37011054158210754, 0.4998776614665985, 0.08278640359640121, 0.3991721570491791, 0.17083145678043365, 0.22114260494709015, -1.4688328504562378, 0.7669249773025513, 0.24967937171459198, 0.07005149871110916, -1.3490768671035767, 0.1477547287940979, ...
def resize _ image ( self, image, min _ dim = 512, max _ dim = 512, min _ scale = false, mode = " crop ", aspect _ ratio = 1. 3, zoom = 1. 5, min _ enlarge = 1. 2 ) : # keep track of image dtype and return results in the same dtype image _ dtype = image. dtype # default window ( y1, x1, y2, x2 ) and default scale = = 1...
[ -0.46457651257514954, -0.12530766427516937, 1.3443615436553955, 0.540170431137085, -0.9273755550384521, -0.519584596157074, -0.09640645235776901, -0.309068500995636, 0.3973809480667114, 0.39977484941482544, 0.22099857032299042, 0.29891058802604675, 0.27398681640625, 0.4214761555194855, 0...
def run _ forwards ( app, migrations, fake = false, db _ dry _ run = false, verbosity = 0 ) : def record ( app _ name, migration ) : # record us as having done this record = migrationhistory. for _ migration ( app _ name, migration ) record. applied = datetime. datetime. utcnow ( ) record. save ( ) return run _ migrati...
[ 0.2024890035390854, 1.1901328563690186, 0.6173189878463745, -0.07852650433778763, -0.06271777302026749, 0.07006664574146271, -0.5438607335090637, 0.08799316734075546, -0.30331966280937195, 0.18767708539962769, -0.519182026386261, 0.7740107774734497, 1.179490566253662, 0.5346238017082214, ...
def get _ application _ id ( self ) : if not self. application _ id : raise eikonerror ('401 ','appid was not set ( set _ app _ id was not called )') return self. application _ id
[ 0.9652062654495239, -0.32438161969184875, 0.27430474758148193, 0.7449330687522888, 0.42121297121047974, 1.3013886213302612, 0.6200454235076904, 0.31712549924850464, 1.1411349773406982, 0.7456601858139038, 0.45126885175704956, 0.6182703375816345, 0.027848560363054276, 1.0923712253570557, ...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. openapi _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -0.6693187355995178, -0.3947540521621704, 0.8680081963539124, -0.6332703232765198, -0.7122994065284729, -0.6619346141815186, 0.13689111173152924, -0.8400680422782898, 0.19874952733516693, 0.2828713059425354, -0.7523773312568665, -0.1343313306570053, 0.028995612636208534, 0.5141352415084839...
def test _ should _ skip ( self ) : reporter = yield self. get _ reporter _ with _ suite _ run ( ) result = self. get _ result _ by _ test _ name ( reporter. skips,'statustest _ should _ skip') self. assertnotequals ( result, none )
[ 0.25097256898880005, 0.848192572593689, 0.5208538174629211, 0.7279470562934875, 0.7197794318199158, 1.5495933294296265, 0.5037514567375183, 0.1031620129942894, 0.36468249559402466, -1.1285325288772583, -0.47808706760406494, -0.7506684064865112, -0.8789730072021484, -0.11840307712554932, ...
def gnss _ site _ pos ( dset ) : partials = ( dset. sat _ posvel. pos. trs. val - dset. site _ pos. pos. trs. val ) / dset. delay. gnss _ range [ :, none ] column _ names = [ " x ", " y ", " z " ] return partials, column _ names, " dimensionless "
[ -0.3579557240009308, -0.09302997589111328, 0.18371844291687012, -0.9125421643257141, -0.8304212093353271, -0.27017462253570557, 0.6915280222892761, -0.9212603569030762, 0.05635915696620941, 0.06579435616731644, -0.8358400464057922, -0.7340989112854004, 0.6841475367546082, -0.46590861678123...
def test _ split _ pos _ model ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) tree = make _ tree ( tip _ names = aln. names ) mod = ...
[ -0.4478360116481781, -0.19511470198631287, 0.4422726035118103, -0.2643245458602905, -0.12165281921625137, 0.3827334940433502, 0.1236390545964241, 0.8099431991577148, -0.09815894067287445, 0.45878320932388306, -1.1300567388534546, -0.36625730991363525, 0.33251821994781494, -0.69611561298370...
def getmappingsondevicetype ( self, typeid, draft = false ) : if draft : req = apiclient. alldevicetypemappingsurl % ( self. host, " / draft ", typeid ) else : req = apiclient. alldevicetypemappingsurl % ( self. host, " ", typeid ) resp = requests. get ( req, auth = self. credentials, verify = self. verify ) if resp. s...
[ -2.1698243618011475, 0.17901742458343506, 0.7034009695053101, -0.12725140154361725, -0.8570668697357178, 0.009858174249529839, -0.25014686584472656, -0.9312678575515747, 1.1480672359466553, 0.500453531742096, -0.48683232069015503, 0.4665347635746002, -1.0903397798538208, 1.1027705669403076...
def update _ boxes ( function _ selector, interval _ slider, discretization _ slider, delta _ box, lower _ sum _ box, upper _ sum _ box ) : interval = interval _ slider. value delta _ x = ( interval [ 1 ] - interval [ 0 ] ) / discretization _ slider. value x _ set = np. linspace ( interval [ 0 ], interval [ 1 ] - delta...
[ 0.02403787523508072, -0.6594105362892151, 0.7971039414405823, -0.41868406534194946, 0.026576362550258636, -0.18768055737018585, 0.6749649047851562, -0.31795451045036316, -0.04946764186024666, -0.2196960747241974, 0.04751172661781311, 0.014556481502950191, 0.451583594083786, 0.2758964300155...
def test _ noticeapikey ( self ) : api _ key = self. root. find ('api - key') self. assertequal ( api _ key. text,'api - key')
[ 0.4676540791988373, -0.08097811788320541, 0.18569280207157135, -0.4737282693386078, 1.197335124015808, -0.29726916551589966, -0.5310008525848389, 0.2799623906612396, 0.1389654576778412, 0.5912051796913147, 0.013469316996634007, -0.631357729434967, -0.17516784369945526, 0.8222716450691223, ...
def font _ size ( self ) : return self. _ font _ size
[ 0.2832110524177551, 0.30702874064445496, 0.27571406960487366, -0.070179782807827, -0.4159536361694336, -0.32202044129371643, 1.050698161125183, 0.1509610116481781, 0.5066041946411133, -1.5573086738586426, -0.5205032825469971, 0.3667927384376526, -0.25243064761161804, -0.36393824219703674, ...
def month _ sample ( x ) : enc = onehotencoder ( sparse ='false ', drop ='first ', categories = [ list ( range ( 0, 13 ) ) ] ) array = enc. fit _ transform ( np. array ( x. index. month ). reshape ( - 1, 1 ) ) array = array. toarray ( ) columns = ['month _'+ str ( i ) for i in range ( 1, 13 ) ] return pd. dataframe ( a...
[ 0.19000978767871857, 0.211356520652771, 0.7555762529373169, 0.3411414325237274, -1.0525773763656616, -0.19060811400413513, 0.013741295784711838, 0.018490009009838104, 0.9631737470626831, -0.09456523507833481, 0.28280508518218994, 0.6990832686424255, -0.36039528250694275, -0.523055672645568...
def incarray ( self, variable _ name, variable _ add ) : assert isinstance ( variable _ add, np. ndarray ) setattr ( self. _ _ records, variable _ name, self. array ( variable _ name ) + variable _ add )
[ 0.2847181558609009, -0.6937253475189209, 0.8586678504943848, -0.5413146615028381, -0.07295151054859161, 0.5187884569168091, -0.25217926502227783, -0.15443538129329681, 0.10984168201684952, 0.8560842275619507, 0.05710456147789955, 1.0023671388626099, -0.7358270883560181, 0.5850217938423157,...
def handlemouserelease ( self ) : emptybar = self. board. iscurrentbarempty ( ) # true if current bar is empty # attempts to bear checker from clicked triangle off if correct # conditions are met ; returns from function if piece is born off if self. board. iscurrentplayerhome ( ) : if self. active and not ( self. board...
[ 0.44378307461738586, -0.42112812399864197, 0.8889406323432922, 0.6697555780410767, -0.14902174472808838, 0.4281189739704132, 0.9058254957199097, 0.24454325437545776, 0.1936580389738083, 0.0820278450846672, 0.6502246856689453, -0.36142000555992126, -0.843981146812439, 0.5152568817138672, ...
def ismouseinside ( event, rect : pygame. rect ) - > bool : return rect. collidepoint ( pygame. mouse. get _ pos ( ) ) and event. type = = pygame. mousebuttondown
[ 0.7913680672645569, -0.4790215790271759, 1.0601342916488647, 0.4807530343532562, -0.14341628551483154, 1.022554874420166, -1.0278632640838623, -0.11671629548072815, -0.011311830952763557, 0.2681301236152649, -1.020180106163025, -0.37408649921417236, -0.5047696828842163, 0.2435844987630844,...
def makeactive ( self ) : self. active = true
[ 0.7790269255638123, -1.4039030075073242, 0.30980607867240906, -0.5481696128845215, 0.5913304686546326, 0.7765147686004639, 0.7615587115287781, 1.3168238401412964, -0.38819989562034607, -1.2604247331619263, -0.8273410201072693, 0.5226554274559021, -0.19229428470134735, -1.3164268732070923, ...
def testgotologinfunction ( self ) : startpageurl = self. po. current _ url ( ) self. po. set _ page _ load _ marker ( ) self. po. goto _ login ( ) self. po. wait _ for _ page _ to _ load ( ) endpageurl = self. po. current _ url ( ) assert startpageurl! = endpageurl, \ " user was not taken to the login webpage, url = =...
[ -0.4939771592617035, -0.06840629875659943, 0.2804096043109894, -0.06478310376405716, 0.5822932124137878, 0.5796968936920166, 0.4141506254673004, -0.1284739077091217, -0.1916131228208542, -0.4681611955165863, -0.6540109515190125, 0.3545019030570984, -0.1724020093679428, -0.7483752965927124,...
def favourites ( self, item ) : with open ( '.. / fav. txt ','a') as f : f. write ( item ) f. write ( " \ n " ) favourite. append ( item )
[ 0.062238819897174835, -0.6514886021614075, 0.6842241287231445, 0.03630524128675461, 0.8591232299804688, 1.1228221654891968, -0.5085862874984741, 0.5316557884216309, 0.07847419381141663, 0.5024495124816895, -1.4299415349960327, 0.7583291530609131, -0.0004966901615262032, -0.4070346355438232...
def applymask ( image, mask, color, alpha = 0. 5 ) : for c in range ( 3 ) : image [ :, :, c ] = np. where ( mask = = 1, image [ :, :, c ] * ( 1 - alpha ) + alpha * color [ c ] * 255, image [ :, :, c ] ) return image
[ -0.09384232014417648, -0.1995532363653183, 0.6470600366592407, 0.5228964686393738, 0.35892432928085327, -0.04606260731816292, 0.1913394182920456, 0.4958007335662842, -0.15476946532726288, 0.5668469667434692, 0.1775822937488556, 0.1167883425951004, 0.08316343277692795, 0.4646352529525757, ...
def connect _ database ( self ) : connection = psycopg2. connect ( database = self. database _ name, user = username, password = password, host = self. host, port = str ( self. port ) ) connection. set _ session ( autocommit = true ) cursor = connection. cursor ( ) logger. info ('connection to aws opened') return conne...
[ -0.6798054575920105, -1.0359082221984863, 0.6103339195251465, -0.29199716448783875, 0.06729033589363098, 0.1851598620414734, -0.1615341156721115, 0.8117830157279968, -0.2550050914287567, 0.03290392830967903, -0.37662941217422485, 0.38654762506484985, 0.07277046144008636, 0.4904980361461639...
def story ( ) : return render _ template ( " form. html ", title = " add new story ", data = " ", action = " / new " )
[ 0.9509105682373047, 0.06063753366470337, 0.42004773020744324, 0.23996704816818237, 0.8081372976303101, 0.3985300064086914, -0.44042709469795227, 0.521288275718689, -1.3577990531921387, -0.6890201568603516, 0.07519201189279556, -0.7072603702545166, 0.6357934474945068, 0.9884973168373108, ...
def conj ( x, name = none ) : if isinstance ( x, tensor _ lib. tensor ) : dt = x. dtype if dt. is _ floating or dt. is _ integer : return x with ops. name _ scope ( name, " conj ", [ x ] ) as name : x = ops. convert _ to _ tensor ( x, name = " x " ) if x. dtype. is _ complex or x. dtype = = dtypes. variant : return gen...
[ -0.676705002784729, 0.5229597687721252, 0.668588399887085, 1.1958340406417847, -1.2817943096160889, 0.37898892164230347, 0.5800220370292664, -0.14551140367984772, 0.0418623723089695, 0.04168470576405525, 0.4205927550792694, -0.11911658942699432, 0.4566689431667328, -0.506828784942627, 0....
def adaptive _ link _ wrap ( source _ set, dest _ set, search _ range, subnet _ linker, adaptive _ stop = none, adaptive _ step = 0. 95, * * kwargs ) : try : sn _ spl, sn _ dpl = subnet _ linker ( source _ set, dest _ set, search _ range, * * kwargs ) except subnetoversizeexception : if adaptive _ stop is none : raise ...
[ -0.28592419624328613, 0.24074020981788635, 0.4119888246059418, 0.6489821672439575, -0.6836104393005371, 0.0195542611181736, -0.6866368055343628, -0.13711033761501312, 0.6273173689842224, -0.5171334147453308, -0.3023685812950134, 0.7446322441101074, 0.8669890761375427, 0.23443810641765594, ...
def get _ all _ projects ( ) : try : df = pd. read _ csv ( os. path. join ( project _ dir,'projects. csv') ) projects = df. project. to _ list ( ) except filenotfounderror : projects = [ ] return {'projects': projects }
[ -0.1614585667848587, 0.3926408886909485, 0.2358608841896057, 0.3186313211917877, 0.5457167625427246, 0.22386972606182098, -0.9531052708625793, 0.21709473431110382, -0.331063449382782, 0.6974040269851685, -0.14905034005641937, -0.19817309081554413, 0.29675889015197754, 0.07573089003562927, ...
def get _ list _ portfolios _ info _ one _ page ( url ) : list _ cards _ portfolio = get _ list _ portfolios _ cards ( url ) one _ page _ portfolios _ data = [ ] for i in range ( 30 ) : try : first _ portfolio = get _ unique _ portfolio _ card ( list _ cards _ portfolio, i ) portfolio _ data = extract _ infos _ portfol...
[ -0.9764641523361206, 0.3129459023475647, 0.6075997948646545, -0.11031032353639603, 0.7917171120643616, 0.23976820707321167, -0.2078324556350708, -0.4572015106678009, 0.9203547835350037, 0.26698634028434753, -0.74205482006073, -0.17068085074424744, 0.19392447173595428, 0.7490893006324768, ...
async def async _ setup _ entry ( hass : homeassistant, entry : configentry, async _ add _ entities : addentitiescallback, ) - > none : spotify = spotifymediaplayer ( hass. data [ domain ] [ entry. entry _ id ] [ data _ spotify _ session ], hass. data [ domain ] [ entry. entry _ id ] [ data _ spotify _ client ], hass. ...
[ 0.4460045099258423, -0.27190831303596497, 0.44117408990859985, -0.6829805374145508, 0.9727823138237, -0.10413890331983566, -0.32230737805366516, 0.16346481442451477, 0.6633485555648804, 0.7517228722572327, 0.13601990044116974, 0.3426377773284912, 0.34909436106681824, 0.3586430847644806, ...
def get _ probs ( self, x, available _ actions = none ) : action _ logits = self. action _ out ( x, available _ actions ) action _ probs = action _ logits. probs return action _ probs
[ -0.13318273425102234, -0.4753832221031189, 0.4132575988769531, 0.876786470413208, -0.1321215033531189, -0.3977985680103302, -0.7192092537879944, -0.1710757464170456, 1.1471878290176392, 0.7582775950431824, -0.5142945051193237, 0.9082671403884888, 0.4868243634700775, -0.5830093026161194, ...
async def start _ and _ delay ( cmd, waittime, * * kwargs ) : proc = get _ manager ( ). start ( cmd, * * kwargs ) await sleep ( waittime ) return proc
[ 1.251373291015625, -0.7346606850624084, 0.46560388803482056, 0.15808485448360443, -0.36818403005599976, 0.13108490407466888, -0.10973759740591049, 0.6022608280181885, 0.3938491642475128, -0.7391647696495056, 0.08904128521680832, 0.45028501749038696, 0.11701091378927231, 0.03252923488616943...
def calc _ headroom ( gain, balance, eq _ mag ) : headroom = ( config ['gain _ max'] - gain - np. max ( eq _ mag ) - abs ( balance / 2 ) ) return headroom
[ 0.4148125946521759, -0.8075865507125854, 0.5086260437965393, 0.6242507100105286, -0.3377096354961395, 0.5290910005569458, -0.02505429834127426, -0.43589547276496887, 0.45919153094291687, 0.3071146309375763, 0.15565723180770874, -0.05947328358888626, 0.3175235986709595, 0.2695617079734802, ...
def to _ rdf ( self, format : str = " text / turtle " ) - > str : return self. _ to _ graph ( ). serialize ( format = format )
[ -0.6304445266723633, 0.31830349564552307, 0.4060599207878113, -0.8918784260749817, -0.08987472951412201, 0.12251828610897064, -0.5181479454040527, -0.5552698969841003, 0.1734084039926529, 0.04494824260473251, -0.4430413544178009, 0.671269416809082, -0.5195609927177429, -1.0260365009307861,...
def define _ state _ machine ( self ) : # when we enter a new state, take a screenshot def enter _ state _ callback ( state _ name ) : self. screenshot ( " enter _ state _ { } ". format ( state _ name ) ) state _ machine = pagestatemachine ( self. _ driver ) state _ machine. on _ enter _ state ( enter _ state _ callbac...
[ -0.7551707625389099, -0.006558590568602085, 0.6348373889923096, 0.02453862689435482, 0.23297688364982605, 0.0627545714378357, -0.7622770667076111, -0.10174866020679474, 0.610748827457428, -0.6431409120559692, 0.05143560841679573, -0.17734771966934204, -0.05903532728552818, 0.61950320005416...
def test _ atomic _ base64 _ binary _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 3. xsd ", instance ...
[ -0.0012614198494702578, -0.1651081144809723, 0.4996259808540344, 1.0963774919509888, -0.03946549445390701, 0.3948473334312439, 0.19655290246009827, 0.015248065814375877, -0.228745236992836, 0.8262856006622314, -0.7564356923103333, 0.2520219087600708, -0.45486554503440857, -0.14952740073204...
def create _ test _ jtr ( testfacts, tuples ) : # map test relations to all true / false entity tuples relmap = { } for fact in testfacts : rel, tup = fact [ 0 ] truth = fact [ 1 ] if not truth : continue if rel not in relmap : relmap [ rel ] = {'candidates': set ( ),'answers': set ( ) } # relmap [ rel ] ['candidates']...
[ -0.5108655095100403, -0.35750797390937805, 0.41637876629829407, -1.5827046632766724, -0.5233505368232727, 0.32800984382629395, 0.7098389267921448, 0.22520729899406433, -0.8549362421035767, 0.44505536556243896, 0.2624208331108093, -0.920170247554779, -0.032056085765361786, -0.56201952695846...
def test _ request _ do _ delete _ non _ existent _ id ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) assert dut. request _ do _ delete ( 100 )
[ 0.04587066173553467, 0.5436834692955017, 0.5326017737388611, 0.9099867343902588, 0.9873154163360596, -0.02962196245789528, -0.0455208383500576, 0.4201243221759796, 0.4691603481769562, -0.0065122502855956554, -0.25345349311828613, 0.3176286518573761, 0.35371434688568115, 0.00015751078899484...
def getms ( start, stop ) : diff = stop - start return getmsdiff ( diff )
[ -0.6383618712425232, -0.3974841833114624, 0.5209559798240662, 0.6235203742980957, -0.2572563886642456, -0.5591042637825012, -0.4884202480316162, -1.2265053987503052, -0.11069264262914658, -0.18634645640850067, -0.1421176642179489, 0.39948055148124695, -0.005763103719800711, -0.173652783036...
def page _ index ( self ) : return self. _ _ page _ number
[ -0.4560496211051941, -0.7938240170478821, 0.37021172046661377, -0.356808602809906, 0.4820180833339691, 0.9268602132797241, 1.2111961841583252, 1.0876097679138184, 0.11960466206073761, -0.4269476532936096, 0.5255619883537292, 0.14684239029884338, 0.018711499869823456, -0.6040165424346924, ...
def _ _ init _ _ ( self, size : optional [ union [ int, tuple [ int ], tuple [ int, int ], tuple [ int, int, int ] ] ] = none, scale _ factor : optional [ union [ float, tuple [ float ] ] ] = none, mode : str ='nearest ', align _ corners : optional [ bool ] = none, recompute _ scale _ factor : optional [ bool ] = none ...
[ 0.31651756167411804, -0.35210493206977844, 0.7549300789833069, -0.09794552624225616, -0.4437209367752075, 0.012219421565532684, -0.4211590588092804, -0.4227243661880493, -0.4793684482574463, 0.3862576186656952, -0.9703270792961121, -0.08556865900754929, 0.46400129795074463, 0.5606456398963...
def otype ( module, name, output _ types, decorator = returns ) : register ( module, decorator = decorator, names = [ name ], decorator _ type = " outputs ", types = output _ types )
[ -0.9101471900939941, 0.467308908700943, 0.5637369155883789, -0.025554275140166283, 0.3638700246810913, -0.5630676746368408, 0.18392901122570038, -0.733498215675354, 0.16823025047779083, 0.6327832937240601, -0.31313556432724, 0.26354289054870605, 0.26651811599731445, 0.11952778697013855, ...
def set _ logger ( log _ path ) : logger = logging. getlogger ( ) logger. setlevel ( logging. info ) if not logger. handlers : # logging to a file file _ handler = logging. filehandler ( log _ path ) file _ handler. setformatter ( logging. formatter ('% ( asctime ) s : % ( levelname ) s : % ( message ) s') ) logger. ad...
[ 0.11645891517400742, -0.8766082525253296, 0.7344346642494202, -0.5396630764007568, 0.47076210379600525, -0.024490362033247948, 0.05292704328894615, 0.11610478907823563, -0.5142475962638855, -1.1404913663864136, -0.23041509091854095, -0.2359113097190857, 0.3662039339542389, 1.23727536201477...
def run _ random ( plan _ file, juju _ data, juju _ bin, action _ count, force _ action, unsafe ) : with checked _ client ( juju _ bin, juju _ data ) as client : plan = [ ] if force _ action is not none : actions = default _ actions ( unsafe = true ) actions = actions ( { force _ action : actions. _ actions [ force _ a...
[ -0.3654214143753052, 0.35137492418289185, 0.6274093389511108, 0.6055246591567993, 0.6917401552200317, 0.727249801158905, 0.2525467574596405, 0.07450444996356964, -0.8965185880661011, 0.39329957962036133, -0.8055719137191772, 0.2887319326400757, 0.09401670098304749, 0.1769057810306549, -0...
def xfade _ and _ unfold ( self, y, target, overlap ) : num _ folds, length = y. shape target = length - 2 * overlap total _ len = num _ folds * ( target + overlap ) + overlap # need some silence for the rnn warmup silence _ len = overlap / / 2 fade _ len = overlap - silence _ len silence = np. zeros ( ( silence _ len ...
[ 0.2790573835372925, 0.14666105806827545, 1.0741602182388306, -0.1769651174545288, -0.49297064542770386, -0.42006784677505493, 0.49867770075798035, 0.5951416492462158, 1.0487518310546875, 0.6777293682098389, -0.012471677735447884, 0.7133679389953613, -0.1979963332414627, 0.01103062089532613...
def export _ masks ( self, save _ to ) : for cls in self. masks. keys ( ) : self. export _ mask ( save _ to, cls )
[ -1.3397388458251953, -0.7955453991889954, 0.2446032017469406, 1.5132379531860352, 1.7257335186004639, 0.18603675067424774, 1.0731998682022095, -1.2112183570861816, 0.3236550986766815, 0.7376800775527954, -1.0193928480148315, 0.7412480711936951, 0.5675581097602844, 1.0163307189941406, -0....
def str _ to _ bool ( s ) : return s. lower ( ) in ['yes ','y ','true ','t']
[ 0.08121650665998459, -0.2494710087776184, 0.37611621618270874, 0.10824859142303467, -0.6186857223510742, 0.7995326519012451, -0.5594234466552734, 0.056891798973083496, -0.08053967356681824, 0.44838136434555054, -0.9334213733673096, 0.40380847454071045, 0.16733141243457794, -0.5858904719352...
def clear _ received _ traps ( self, system _ name ) : status = true wdesc = " clear trap messages from { } ". format ( system _ name ) utils. testcase _ utils. psubstep ( wdesc ) snmp _ parameters = ['ip ','snmp _ trap _ port'] snmp _ param _ dic = utils. data _ utils. get _ credentials ( self. datafile, system _ name...
[ -0.6922062635421753, 0.3633716404438019, 0.5738932490348816, -0.5279592275619507, -0.2832649350166321, 0.3114798665046692, -0.027782561257481575, -0.6836929321289062, 0.4612065851688385, 0.5765606760978699, -0.2275894433259964, 0.3294474184513092, -0.6751125454902649, 0.4595770537853241, ...
def get _ window _ data ( self, window _ idx, split _ labels = true ) : end _ idx = self. splits [ window _ idx ] if window _ idx = = 0 : window _ data = self. full _ df [ : end _ idx ] else : start _ idx = self. splits [ window _ idx - 1 ] window _ data = self. full _ df [ start _ idx : end _ idx ] if split _ labels :...
[ -1.5437394380569458, 0.13580375909805298, 0.7157867550849915, -0.12204857170581818, -0.087679423391819, -0.1074337363243103, 0.4243927001953125, 0.20620401203632355, 0.45208919048309326, 0.03942098841071129, 0.4277987778186798, 1.5189533233642578, -0.5479999780654907, -0.38737258315086365,...
def verbose ( verbose _ = true, withresults _ = true ) - > bool : global _ _ verbose, _ _ withresults old = _ _ verbose _ _ verbose = verbose _ _ _ withresults = withresults _ return old
[ 0.3484265208244324, 0.5156088471412659, 0.7309441566467285, 0.06019750237464905, 0.10765497386455536, -0.667336642742157, 0.07110895961523056, -0.49233365058898926, -0.09031368792057037, -0.10726503282785416, -0.45012184977531433, 0.6922791600227356, -0.39511969685554504, 0.495159149169921...
def _ get _ dns _ nameservers ( self, network _ data ) : dns _ nameservers = [ ] for service in network _ data. get ('services ', [ ] ) : if service [ " type " ] = = " dns " : dns _ nameservers. append ( service [ " address " ] ) return dns _ nameservers
[ -1.0502349138259888, 0.7286306619644165, 0.28205639123916626, -0.23008392751216888, 0.361019492149353, -0.18300165235996246, -0.8958408832550049, -1.0751203298568726, 1.0252925157546997, 0.6432718634605408, -0.786270260810852, -0.20492365956306458, 0.27042195200920105, 0.10599476099014282,...
def reduce _ sum ( input _ tensor, axis = none, keepdims = false, name = none ) : return reduce _ sum _ with _ dims ( input _ tensor, axis, keepdims, name, _ reductiondims ( input _ tensor, axis ) )
[ 0.30843430757522583, 0.29145246744155884, 0.7637869119644165, 0.5258634686470032, -0.48068562150001526, -0.013495762832462788, 0.618436872959137, 0.13298220932483673, 0.15487590432167053, 0.6583763360977173, -1.3732982873916626, 0.4124681353569031, 0.24127908051013947, -1.12576162815094, ...
def _ get _ img _ urls ( self, soup : soupinfo ) - > optional [ list [ str ] ] : return none
[ -1.29904305934906, 0.004918913822621107, 0.37637943029403687, -0.03423129394650459, 0.23099170625209808, -0.5709079504013062, -0.5855275988578796, 0.1006569117307663, 0.4899549186229706, -0.2846488058567047, -0.3733169734477997, -0.6061062812805176, 0.2916732132434845, 0.8270750641822815, ...
def rotate _ piece ( piece, degree ) : new _ x = piece [ 0 ] new _ y = piece [ 1 ] if degree = = 90 : new _ x = - piece [ 1 ] new _ y = piece [ 0 ] elif degree = = 180 : new _ x = - piece [ 0 ] new _ y = - piece [ 1 ] elif degree = = 270 : new _ x = piece [ 1 ] new _ y = - piece [ 0 ] return new _ x, new _ y
[ -1.5342893600463867, -0.5033248066902161, 0.5579689145088196, -0.8289408683776855, -0.15532994270324707, 0.08125599473714828, -0.6963501572608948, -0.5314850211143494, -0.6125646829605103, 0.6249877214431763, -0.1880422681570053, 0.7643110156059265, -0.7526240348815918, -0.8175185322761536...
def state _ parameter _ name ( self, time _ deriv : int ) - > str : assert ( time _ deriv in self. time _ derivs ), f " given time derivative time _ deriv = { time _ deriv } is not recognized, only allowed { self. time _ derivs } " return self. name + " / " + " d " * time _ deriv + self. symbol + " / " + " p "
[ -0.7943455576896667, -0.0758589506149292, 0.7920066714286804, -0.4774749279022217, -0.7052100300788879, 0.9678919911384583, 0.029408270493149757, -0.38477882742881775, -0.20710361003875732, 0.6718953847885132, 0.5453552603721619, -0.1944054514169693, 0.873094379901886, 0.7071828842163086, ...
def management _ centre _ member ( self, management _ centre _ member ) : self. _ management _ centre _ member = management _ centre _ member
[ 1.1030830144882202, -1.4829667806625366, -0.10937757790088654, 0.27433568239212036, 0.1040106788277626, 1.1631546020507812, 0.23458769917488098, -0.20854581892490387, -0.2814933657646179, -0.2525293529033661, -0.5350643396377563, 0.07389628887176514, -0.4400098919868469, 0.0740563720464706...