text
stringlengths
25
2.19k
embedding
listlengths
768
768
def addhousenumber ( self, number, points ) : if number not in [ hn. number for hn in self. housenumbers ] : db. session. add ( housenumber ( self. id, number, yaml. dump ( points ) ) ) db. session. commit ( )
[ -0.20788396894931793, -0.017076000571250916, 0.44977709650993347, 1.2498512268066406, 1.1660228967666626, 0.4918258786201477, -0.6925742626190186, 0.8955100178718567, 0.42355895042419434, -0.5606586337089539, -0.7449465394020081, -0.5825824737548828, 0.0876195877790451, 0.8353950381278992,...
def _ _ get _ thrsh _ point _ vector ( self ) - > np. array : # create user pos projection on ecuatorial plane u = self. u z _ ax = np. array ( [ 0, 0, 1 ] ) u _ p = u - np. dot ( u, z _ ax ) * z _ ax u _ p = u _ p / np. linalg. norm ( u _ p ) # angle of the horizon lat = math. acos ( np. dot ( u _ p, z _ ax ) ) h = la...
[ 0.4927690625190735, -0.627554714679718, 0.7340999841690063, -0.1450510323047638, 0.5123056173324585, 0.6875317096710205, 0.3550046682357788, 0.12944470345973969, -0.350816547870636, 0.6987724900245667, -0.0913812667131424, 0.15277065336704254, 0.2091938555240631, -0.9754219651222229, 0.9...
def query2 ( connection ) : current = time. time ( ) cursor = connection. cursor ( ) cursor. execute ( " " " select nonr _ beers. name as beer _ name, round ( nonr _ beers. score, 2 ) as beer _ score, round ( nonr _ beers. overall, 2 ) as beer _ rating from ( select b. name, avg ( ( r. look + r. smell + r. taste + r. f...
[ 0.0850192978978157, -0.6067051887512207, 0.6164016127586365, 0.5991933941841125, -0.6667914390563965, 0.35246700048446655, -0.17412437498569489, -0.18555760383605957, -1.4479405879974365, 0.8176658153533936, -0.09385030716657639, 0.016114402562379837, -0.6420503258705139, 0.531274616718292...
def events ( self, last _ id : optional [ str ] = none ) : return self. _ http. sse _ request ( " / acls / events ", last _ id )
[ 0.31753313541412354, 0.7313451170921326, 0.6079837083816528, -0.06577814370393753, 0.34512171149253845, -0.8558274507522583, -0.15455399453639984, 0.051580511033535004, 1.22428560256958, 0.3310154676437378, 0.3189834654331207, 1.0897916555404663, -0.5388933420181274, -0.0022455351427197456...
def generate ( self, node, file ) : file. write ('< br / >')
[ -0.12180770933628082, 0.33937767148017883, 0.2993854880332947, -0.1365557760000229, 1.1129118204116821, 1.169646978378296, -0.29976898431777954, 0.6178795695304871, -1.5789111852645874, -0.6065682172775269, -0.10314305871725082, -0.074259914457798, 1.0451771020889282, 0.4644755721092224, ...
def shopify _ update _ price ( self, instance, product _ template, price ) : if instance. shopify _ pricelist _ id. currency _ id. id = = product _ template. company _ id. currency _ id. id : product _ template. write ( { " list _ price " : price. replace ( ", ", ". " ) } ) else : instance _ currency = instance. shopif...
[ -1.2217289209365845, -0.1853380799293518, 0.705285906791687, 0.08204758912324905, 0.09683753550052643, 0.31921449303627014, -0.5551211833953857, 0.3184696137905121, 0.5039107799530029, 1.769856572151184, -1.0794992446899414, -0.5883454084396362, -0.2493145614862442, 0.2717088460922241, -...
def speakmessage ( self, string, voice = none, interrupt = true ) : if _ settingsmanager. getsetting ('enablespeech') : voice = voice or self. voices. get ( settings. system _ voice ) speech. speak ( string, voice, interrupt )
[ 0.6506346464157104, -0.07486821711063385, 0.5701205730438232, 0.7929763793945312, 0.09561480581760406, 0.30121928453445435, -0.8842414617538452, -0.21042795479297638, 0.6450919508934021, 0.4106195569038391, 0.7111135125160217, 0.23289312422275543, -2.175107479095459, 0.16225986182689667, ...
def mensaje _ ayuda ( ) : print ('hi there! debes ingresar un comando para jugar con randomtweets. \ nlos comandos son : \ na ) generar \ nb ) favoritos \ nc ) trending') accion = input ('\ ningresa a, b o c para mas informacion o cualquier otra tecla para salir :'). upper ( ) while accion in ('a ','b ','c') : if accio...
[ 0.6207579970359802, 0.31736287474632263, 0.7655047178268433, -0.26498886942863464, 0.6830639243125916, 0.25708046555519104, 0.39717233180999756, -0.7600073218345642, -0.43106338381767273, -0.30651968717575073, 0.22943803668022156, 0.6888570189476013, 0.3999859690666199, 0.6737930774688721,...
async def async _ setup ( hass : homeassistanttype, config : configtype ) - > bool : platform _ config = config. get ( domain ) api _ key = platform _ config. get ( conf _ api _ key ) pws _ id = platform _ config. get ( conf _ pws _ id ) # xxx : could get the lat / long from the pws latitude = platform _ config. get ( ...
[ -0.77349454164505, 0.49789300560951233, 0.7056184411048889, -0.45255860686302185, 0.1401093751192093, 0.5855033993721008, 0.28037789463996887, 0.14952999353408813, -0.08997731655836105, -0.05267970263957977, -0.3986934423446655, -0.03452518209815025, -0.028136705979704857, 0.76481574773788...
def _ _ init _ _ ( self, * args ) : pass
[ 0.17309658229351044, -0.5959532260894775, 0.3741130828857422, 0.9378101229667664, 1.0776631832122803, 0.46381834149360657, 0.31563350558280945, 0.10038095712661743, -0.7510321736335754, -0.9708048701286316, -0.3367096185684204, -0.08203879743814468, -0.19481827318668365, 0.6378073692321777...
def get _ integration _ user ( bot : str, account : int ) : if not utility. is _ exist ( user, raise _ error = false, bot = bot, is _ integration _ user = true, status = true ) : email = bot + " @ integration. com " password = utility. generate _ password ( ) return accountprocessor. add _ user ( email = email, passwor...
[ 0.05483885109424591, 1.0290758609771729, 0.6108864545822144, 0.7365943193435669, 0.7254691123962402, 0.37403127551078796, 0.0015025550965219736, -0.07106304168701172, -0.28762054443359375, 0.5069530010223389, -0.7304848432540894, 0.12797103822231293, -0.5570158958435059, -0.155939355492591...
def testtoprettyxml ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) long _ description = textwrap. dedent ( " " " \ this is a very long multi - line description. this will be split into multiple lines by the formatter. i think this should be enough text anyways. " " " ) short _ description ...
[ 0.18779918551445007, 0.2000444382429123, 0.6342750787734985, -0.588925838470459, -0.28403687477111816, -0.2666120231151581, -0.6259173154830933, 0.3159979283809662, -0.11076296865940094, -0.5268327593803406, -0.04417233541607857, 0.04616175964474678, 0.3407769799232483, 0.34573209285736084...
def handle _ grafana _ alert ( alert, name2file, play _ queue ) : logger = logging. getlogger ( _ _ name _ _ ) status = alert. get ( " status " ) if status is none : raise grafanapayloadexception ( f " no status in the alert payload : { alert } " ) if status! = " firing " : logger. debug ( f'status not " firing " in th...
[ 0.17534327507019043, -0.4463363587856293, 0.8525170087814331, -0.10707823187112808, 0.10723482072353363, -0.0008625324699096382, -0.07659143209457397, -0.02529984340071678, -0.07786384969949722, 0.2447822242975235, 0.6340581178665161, 0.07895194739103317, 0.1323346644639969, 0.113555014133...
def create _ fixtures ( self ) : pass
[ 0.4219743311405182, -0.1550055593252182, 0.0869433656334877, 0.7330386638641357, 1.4136205911636353, 0.27184784412384033, 1.0311994552612305, -0.03699234500527382, -0.31630998849868774, -1.5750432014465332, -1.1664913892745972, -0.8210176825523376, -0.36068928241729736, 0.4977863132953644,...
def begin _ start _ dev _ box ( self, project _ name : str, dev _ box _ name : str, user _ id : str = " me ", * * kwargs : any ) - > lropoller [ none ] : _ headers = kwargs. pop ( " headers ", { } ) or { } _ params = kwargs. pop ( " params ", { } ) or { } cls : clstype [ none ] = kwargs. pop ( " cls ", none ) polling :...
[ -0.2161126732826233, 0.28106987476348877, 1.017865777015686, -0.09332004934549332, -0.6940577030181885, -0.05672793835401535, -0.45749229192733765, -0.821933388710022, -0.0656823143362999, -0.5005835294723511, 0.19968393445014954, 0.7513346076011658, 0.23229947686195374, -0.120668970048427...
def get _ label _ buckets ( * y : np. ndarray ) - > dict [ tuple [ int,... ], np. ndarray ] : buckets : defaultdict [ tuple [ int, int ], list [ int ] ] = defaultdict ( list ) y _ flat = list ( map ( lambda x : to _ int _ label _ array ( x, flatten _ vector = true ), y ) ) if len ( set ( map ( len, y _ flat ) ) )! = 1 ...
[ -1.5197033882141113, 0.10340089350938797, 0.8283716440200806, 0.02438376098871231, -0.8891144394874573, 0.6361525654792786, 0.7901624441146851, -1.3597031831741333, -0.39036640524864197, 0.3156667947769165, -0.7665472626686096, -0.39471176266670227, 0.6720501780509949, 0.6543581485748291, ...
def test _ zip _ archive _ zip _ create ( self ) : pass
[ 0.09367574751377106, 0.07668361812829971, 0.13237364590168, 0.5460371375083923, 0.9184247255325317, -0.2036871314048767, 0.8827269077301025, 0.5959262251853943, 0.5376092195510864, -1.334340214729309, -0.2411305457353592, -0.6740586757659912, 0.04643421247601509, -0.0935886949300766, 0.1...
def s2 _ band ( ) : return testdata _ dir / " s2 _ band. tif "
[ 0.7425091862678528, -1.1943711042404175, 0.2105000764131546, 0.7911904454231262, -0.2290651798248291, 1.1095343828201294, 1.2473560571670532, -0.5789329409599304, 0.18293911218643188, -0.6274256706237793, -0.06538393348455429, 1.6790038347244263, 0.4067806899547577, -0.2131628543138504, ...
def transform _ image ( image ) : img _ transforms = torchvision. transforms. compose ( [ torchvision. transforms. resize ( size = ( 224, 224 ) ), torchvision. transforms. totensor ( ), torchvision. transforms. normalize ( mean = [ 0. 485, 0. 456, 0. 406 ], std = [ 0. 229, 0. 224, 0. 225 ] ) ] ) return img _ transforms...
[ -0.5637199282646179, 0.3778333365917206, 0.3927074372768402, -0.0799708142876625, -0.29372578859329224, -0.8826782703399658, 0.6761147379875183, 0.19817110896110535, 0.24102653563022614, 0.5921041965484619, -0.08773259818553925, 0.11120021343231201, 0.27489233016967773, -0.2286216765642166...
def _ _ upgrade _ socket ( self, raw _ socket : socket. socket ) - > socket. socket : self. _ _ logger. debug ( " upgrading socket for tls " ) # create a tls context and wrap the raw socket tls _ context = create _ default _ context ( ) tls _ socket = tls _ context. wrap _ socket ( raw _ socket, server _ hostname = sel...
[ -0.33515113592147827, 0.17979849874973297, 0.6389196515083313, -0.8450767397880554, -0.7084670662879944, -0.2878147065639496, -0.3564699590206146, -0.2906455993652344, 0.08593083173036575, -0.2041095495223999, 0.6421740651130676, 0.21055351197719574, 0.023448100313544273, -0.02729096636176...
def test _ multiple _ types ( self ) : st. file _ uploader ( " the label ", type = [ " png ", " svg ", " jpeg " ] ) c = self. get _ delta _ from _ queue ( ). new _ element. file _ uploader self. assertequal ( c. type, [ " png ", " svg ", " jpeg " ] )
[ -0.20553788542747498, -0.0713038519024849, 0.6717824935913086, 0.5770719051361084, 1.2032932043075562, 1.103445053100586, -0.234491765499115, -0.5679534673690796, -0.23023712635040283, -0.4059005677700043, -0.7787092328071594, -0.3598356544971466, -0.3361321985721588, 1.4829602241516113, ...
def task _ to _ data ( data ) : # generate the structure and unpack the data to it u = struct. unpack ('b'+'b'* 143 +'i'* 32 * 4096 +'h'* 32 * 4096, data [ : 1 + 143 + 4 * 32 * 4096 + 2 * 32 * 4096 ] ) # read out the data mac5 = u [ 0 ] config = ('{ : 02x }'* 143 ). format ( * u [ 1 : 1 + 143 ] ) pedestals = [ u [ 1 + ...
[ -0.3167465925216675, 0.45499420166015625, 0.8179554343223572, -1.0117554664611816, -0.656512439250946, 0.21091113984584808, 0.44696661829948425, -0.034075960516929626, -0.15251511335372925, -0.16459012031555176, -1.061576247215271, -0.2717837989330292, -0.34124502539634705, -0.517577052116...
def _ prepare _ newline _ chars _ with _ proxy _ pc ( self ) : newline _ chars = { unixremote. unix _ remote : self. _ configurations [ unixremote. connection _ hops ] [ unixremote. proxy _ pc ] [ unixremote. unix _ remote ] [ " command _ params " ] [ " target _ newline " ], unixremote. unix _ remote _ root : self. _ c...
[ -0.09112866222858429, -0.8884111642837524, 0.45102858543395996, -0.8634255528450012, 0.23185472190380096, 0.18304362893104553, -1.3338075876235962, -0.36941978335380554, -0.6513859629631042, -0.016912924125790596, -0.44166529178619385, 0.10942511260509491, -0.3779143691062927, -0.137008383...
def cancel ( self ) : self. top. destroy ( )
[ 0.4849945604801178, -0.3145071864128113, 0.28249529004096985, 0.06623949855566025, -0.7593005895614624, 0.48116251826286316, 0.32296717166900635, 0.4183363616466522, -0.09459008276462555, 0.5090492367744446, 0.5988505482673645, -0.3374214172363281, 0.022857191041111946, -0.1340851634740829...
def processbraillecutline ( self, inputevent = none ) : obj, caretoffset = self. getbraillecaretcontext ( inputevent ) if caretoffset > = 0 : self. utilities. adjusttextselection ( obj, caretoffset ) texti = obj. querytext ( ) startoffset, endoffset = texti. getselection ( 0 ) string = texti. gettext ( startoffset, end...
[ 0.22475260496139526, -0.2574831545352936, 0.7045424580574036, -0.2214139848947525, -0.19020944833755493, 1.1548774242401123, 0.3799319863319397, -0.17553484439849854, -0.07769903540611267, 0.3698081970214844, -0.4447009861469269, 0.17305932939052582, -0.35925760865211487, -0.49004176259040...
def add _ logging ( parser, log _ format = log _ format, log _ level = log _ level, color = true ) : parser. set _ defaults ( log _ level = log _ level ) parser. add _ argument ('- v ', dest ='log _ level ', action = _ logleveladdaction, const = 1, help ='use more verbose logging ( stackable )') parser. add _ argument ...
[ -0.01065888162702322, -0.5354942083358765, 1.0981390476226807, -0.2985434830188751, 0.21732313930988312, -0.3674392104148865, -0.53373122215271, -0.365895539522171, 0.27606645226478577, -0.5414667725563049, 0.25043195486068726, 0.6758387684822083, 0.6256635189056396, 1.311840534210205, 0...
def getenabledarray ( self ) : array = [ ] for i, info in enumerate ( self. methodinfolist ) : argutil = factories. apiargutil ( self. apiclassname, self. apimethodname, i ) array. append ( argutil. canbewrapped ( ) ) return array
[ -1.0655152797698975, -1.1799530982971191, 0.24879643321037292, 0.338919073343277, 0.08198106288909912, 0.07619670033454895, -0.3679414987564087, 0.3978879749774933, -0.14351606369018555, 0.20308923721313477, -0.009793903678655624, 1.0079797506332397, -0.8993874788284302, 1.2345836162567139...
def test _ list _ simple ( self ) : self. _ test _ list ( rest _ objects = false )
[ -0.15048451721668243, -0.20379336178302765, 0.27424269914627075, 0.7616335153579712, 1.0073565244674683, 0.7449018955230713, 0.004689388908445835, -0.11158601194620132, 0.9672217965126038, -1.1394834518432617, -1.617782711982727, -0.4784142076969147, -0.2167244404554367, 0.0649177804589271...
def classifytriangle ( a, b, c ) : if a + b > c and b + c > a and a + c > b : if a = = b and b = = c : return'equilateral'elif a * a + b * b = = c * c or b * b + c * c = = a * a or a * a + c * c = = b * b : return'right'elif a = = b or b = = c or c = = a : return'isoceles'else : return'scalene'else : return'notatriangl...
[ 0.4032338261604309, -0.5506176352500916, 0.9338942766189575, -1.0445663928985596, 0.8892536759376526, 0.6014477014541626, -0.41153860092163086, -0.6422738432884216, 0.1085163950920105, 0.5097070932388306, 0.6175877451896667, 0.0042572165839374065, 0.4135401248931885, -0.7801167368888855, ...
def make _ bitcoin _ spot _ price ( intent _ request ) : source = intent _ request ['invocationsource'] output _ session _ attributes = intent _ request ['sessionattributes'] if intent _ request ['sessionattributes'] is not none else { } if source = ='dialogcodehook': return close ( { },'fulfilled ', {'contenttype':'pl...
[ -0.512306272983551, -0.5186276435852051, 0.5258722305297852, -1.0134265422821045, -0.013113955035805702, -0.25622522830963135, 0.10309457778930664, -0.2524089217185974, 0.06243116036057472, 0.8638919591903687, 0.650335967540741, -0.03036048822104931, 0.08778118342161179, -0.306248962879180...
def get _ upsampling _ weight ( in _ channels, out _ channels, kernel _ size ) : factor = ( kernel _ size + 1 ) / / 2 if kernel _ size % 2 = = 1 : center = factor - 1 else : center = factor - 0. 5 og = np. ogrid [ : kernel _ size, : kernel _ size ] filt = ( 1 - abs ( og [ 0 ] - center ) / factor ) * \ ( 1 - abs ( og [ ...
[ 0.003847614862024784, -0.15414932370185852, 0.7885059118270874, -0.054043617099523544, -0.7146132588386536, -1.0332801342010498, -0.08568055927753448, -0.03816481679677963, -0.4009014070034027, 0.8793930411338806, 0.429971843957901, 0.3387289345264435, -0.3027624785900116, 0.03099188581109...
def register ( self, name, uri, safe = false, metadata = none ) : if isinstance ( uri, core. uri ) : uri = uri. asstring ( ) elif not isinstance ( uri, basestring ) : raise typeerror ( " only uris or strings can be registered " ) else : core. uri ( uri ) # check if uri is valid if not isinstance ( name, basestring ) : ...
[ -1.2306715250015259, 0.8334499597549438, 0.6545786261558533, 0.38800594210624695, 0.2621702253818512, 0.12735748291015625, -0.5677888989448547, -0.06990000605583191, -0.5323512554168701, 0.37712404131889343, -0.5249347686767578, 0.42893433570861816, -0.8545934557914734, -0.4817026555538177...
def backward ( ctx : any, grad _ output : tensor ) - > tuple [ optional [ tensor ], optional [ tensor ], optional [ tensor ], optional [ tensor ], optional [ tensor ] ] : # call the backward function in the tile instance. grad _ input = ctx. analog _ tile. backward ( grad _ output ) # store the parameters needed by the...
[ -0.1581181436777115, 0.09502580016851425, 0.6674774289131165, -0.14917410910129547, 0.4352743327617645, -0.19817118346691132, 0.9554294943809509, -1.0108613967895508, -0.4846925139427185, -0.056885894387960434, -0.22991955280303955, 0.23003090918064117, -0.1791236251592636, -0.672508835792...
def get _ exception _ info ( exception ) : context _ lines = 10 lineno = exception. lineno source = exception. source if source is none : exception _ file = path ( exception. filename ) if exception _ file. exists ( ) : source = exception _ file. read _ text ( ) if source is not none : lines = list ( enumerate ( source...
[ 0.01643921621143818, -0.2384965568780899, 0.8288326859474182, -1.0618579387664795, -0.6715980172157288, -0.9055322408676147, 0.23870502412319183, 0.1602560430765152, -0.26989343762397766, 0.4953329861164093, -0.5244798064231873, -0.32853299379348755, 0.46573594212532043, 0.2367946356534958...
def activate _ processing ( request : object, uidb64 : str, token : str ) - > bool : try : uid = force _ text ( urlsafe _ base64 _ decode ( uidb64 ) ) user = user. objects. get ( pk = uid ) except ( typeerror, valueerror, overflowerror, user. doesnotexist ) : user = none if user is not none and account _ activation _ t...
[ -0.5475564002990723, -0.1979924738407135, 0.5848018527030945, 0.61072838306427, -0.39071497321128845, -0.025527000427246094, -0.02613702043890953, 0.49937963485717773, 0.7564594149589539, 0.07254902273416519, -0.4845721125602722, 0.10857637971639633, -0.1040370985865593, -0.843960583209991...
def author _ cloud ( self ) : distancelist = self. work _ distances ( ) sum = 0 squaresum = 0 l = len ( distancelist ) for distance in distancelist. values ( ) : sum + = distance squaresum + = distance * * 2 sum / = l squaresum / = l return [ sum, math. sqrt ( squaresum - sum * * 2 ) ], distancelist
[ -0.11297314614057541, -0.11139506101608276, 0.4481058716773987, 0.6146891713142395, 0.1556646227836609, -0.09999958425760269, 0.7465499639511108, 0.2935042083263397, 0.30762141942977905, 0.44287899136543274, -0.8819680213928223, -0.3617650270462036, -0.013684006407856941, 0.288848519325256...
def test _ sla _ get _ exclusion _ period ( self ) : pass
[ 0.4887959361076355, 0.574972927570343, 0.2143649458885193, 0.7071905136108398, -0.6730638742446899, 1.4424010515213013, 0.5286272764205933, 0.30878907442092896, 1.4661682844161987, -0.09946305304765701, -0.13507741689682007, 0.7602189779281616, -1.5220966339111328, -0.18399980664253235, ...
def enable ( self ) : return self. sysconfig. enable _ svc ( self. get _ svc _ map ( ) )
[ -0.3687055706977844, -0.15809929370880127, 0.49659305810928345, 0.19706453382968903, 0.20788471400737762, 0.04552426189184189, 0.3822513818740845, 0.6836276054382324, 0.30915018916130066, -0.8881518244743347, -0.9706577062606812, 0.1391083002090454, -0.8284053802490234, 0.36093300580978394...
def increment _ metric ( execution _ metrics : executionmetrics, mapping : dict [ type, str ], caught _ exception : type ) - > executionmetrics : demisto. debug ( f " exception of type'{ caught _ exception }'caught. trying to find the matching execution metric attribute to increment... " ) try : metric _ attribute = ma...
[ -0.6913579702377319, -0.12182894349098206, 0.5990007519721985, 0.2794704735279083, -0.5250136852264404, 0.28465116024017334, 0.6611335277557373, -0.19692374765872955, -0.377909779548645, 0.1395793855190277, 1.1688790321350098, 0.376960813999176, 0.5332249999046326, -0.617939293384552, 0....
def _ lunar _ month _ days ( self, lunar _ year : int, lunar _ month : int ) - > int : return 29 + ( ( self. g _ lunar _ month _ days [ lunar _ year - self. start _ year ] > > lunar _ month ) & 0x01 )
[ 0.7873099446296692, -0.20843970775604248, 0.29388001561164856, -0.46495765447616577, -0.09312401711940765, 1.0340396165847778, -1.231284260749817, -0.2366422861814499, 0.10615634173154831, -0.7027153968811035, 0.70961594581604, 1.243262767791748, -0.9882369637489319, 0.22851064801216125, ...
def tokenfromurl ( url ) : if url. find ( '?') > - 1 : query _ params = url. split ( '?') [ 1 ] else : query _ params = url for pair in query _ params. split ('&') : if pair. startswith ('token =') : return pair [ 6 : ] return none
[ -0.29521843791007996, -0.7324684858322144, 0.614109992980957, 0.17257504165172577, -0.35692235827445984, -0.8480386734008789, 0.2492431402206421, 0.80764240026474, 0.32200688123703003, 0.06522437930107117, -0.4784518778324127, 0.0985925942659378, -0.17044152319431305, -0.03496688976883888,...
def count ( self ) : return len ( self. cards )
[ 0.14740079641342163, -0.3053685426712036, 0.33687737584114075, -0.8544304370880127, 0.49698394536972046, 0.3985137939453125, -0.5326659679412842, 0.9552773833274841, -0.32272177934646606, -0.8251202702522278, -1.2233693599700928, -0.4653429687023163, 0.27088308334350586, -0.291284233331680...
def speed _ control ( self, velocity _ x, velocity _ y, velocity _ z, duration ) : msg1 = self. vehicle. message _ factory. set _ position _ target _ global _ int _ encode ( 0, # time _ boot _ ms ( not used ) 0, 0, # target system, target component mavutil. mavlink. mav _ frame _ global _ relative _ alt _ int, # frame ...
[ 0.1913042664527893, -0.42550215125083923, 0.622600257396698, 0.22475147247314453, 0.62551349401474, 0.3436085283756256, -0.1223733052611351, -0.6141637563705444, -0.12580862641334534, 0.12674497067928314, 0.40077999234199524, 0.1413196474313736, -0.5185949206352234, 0.637149453163147, -0...
def _ _ init _ _ ( self, file _ name ) : self. fd = none try : self. fd = open ( file _ name,'r') line = self. fd. read ( edireader. isa _ len ) if line [ : 3 ]! ='isa': raise interchangecontrolerror ( " first line does not begin with'isa': % s " % line [ : 3 ] ) self. icvn = line [ 84 : 89 ] if self. icvn not in ('005...
[ -0.2265334278345108, -0.8769546151161194, 0.835898756980896, 0.0873575508594513, 0.14478042721748352, 0.12546980381011963, 0.4945247173309326, 0.7127332091331482, 0.022578569129109383, 0.16487079858779907, -0.005021917633712292, -0.7219250798225403, -0.11435876786708832, 0.0505955778062343...
def test _ observation _ frequency _ per _ bin ( ) : a = pd. dataframe ( { " a " : [ 1, 2, 4 ] } ) b = pd. dataframe ( { " a " : [ 1, 2, 3 ] } ) transformer = drophighpsifeatures ( ) a _ bins, b _ bins = transformer. _ observation _ frequency _ per _ bin ( a, b ) expected _ a _ bins = pd. series ( [ 0. 3333333, 0. 3333...
[ -0.46848317980766296, 1.1751993894577026, 0.7391413450241089, 0.48638075590133667, 0.6717591881752014, 0.2701118588447571, 0.8527835011482239, -0.14618122577667236, -0.5253770351409912, -0.32342177629470825, -0.013191582635045052, -0.02129027619957924, 0.13537731766700745, 0.01297594420611...
def calcular _ flujos ( regiones, ejes _ relativos, mesh _ regiones, vectores _ valores _ eigen, \ recursos _ v _ transpuestos, recursos _ flujo, constantes _ c, \ dimension _ mesh = 100, n _ dimension = 100 ) : # se crea el dataframe de dimension = valores _ eigen * n _ dimension y se llena con ceros flujos = pd. data...
[ 0.2906965911388397, -0.18805009126663208, 0.5918096899986267, -0.08441848307847977, -0.02042362652719021, -0.19109751284122467, 0.9179759621620178, 0.4619206488132477, -0.5728486776351929, -0.09033823758363724, -0.07673254609107971, 0.7757598757743835, 0.4655526578426361, 0.312880694866180...
def get _ s3 _ access ( ) : loadconfig ( ) aws _ cred = configdict [ " credentials " ] [ " aws " ] storage = storage _ s3. storages3 ( * * aws _ cred ) return storage
[ 0.4772457778453827, -0.2188856154680252, 0.4823813736438751, 0.26535603404045105, -0.6149626970291138, 0.5450353026390076, 0.10129247605800629, 0.4386943578720093, 0.6859665513038635, -0.41905876994132996, 0.05229489877820015, 0.4502730667591095, -0.2062004655599594, -0.8440502882003784, ...
def test _ gauss ( ) : # seed the random generator to ensure test results are consistent random. seed ( 110679 ) # configure the quota std _ dev = 0. 1 mean = 5 quota = quotas. gauss ( mean, std _ dev ) # count the number of times a value falls within each deviation std _ devs = { 1 : 0, 2 : 0, 3 : 0 } for i in range (...
[ 0.3567854166030884, 0.6747928857803345, 0.6992584466934204, -0.19308415055274963, -0.1659311056137085, 0.5927982926368713, 0.44556924700737, -0.3199104368686676, 0.5101999640464783, -0.22417153418064117, 0.0024373303167521954, 0.6939650774002075, 0.19287872314453125, 0.012141868472099304, ...
def get _ field _ schema ( _ field : str ) - > dict : _ field _ schema = {'integer': {'type': ['string ','number'],'pattern':'^ \ d + $'},'default': {'type':'string'} } try : field _ type = str ( table. c [ _ field ]. type ) field _ schema = _ field _ schema [ field _ type ] except keyerror : field _ schema = _ field _...
[ -0.780367910861969, 0.704823911190033, 0.42952775955200195, -0.2075340300798416, 0.1341099590063095, -0.48577699065208435, -0.00526880519464612, 0.16296426951885223, -0.7200391292572021, 0.2500576972961426, -1.1411473751068115, -0.5033464431762695, 0.3807693421840668, -0.1478264033794403, ...
def test _ atomic _ qname _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 3. xsd ", instance = " nistdata / atomic ...
[ 0.6662649512290955, -0.627646803855896, 0.44163987040519714, -0.251312255859375, -0.3315739333629608, 0.29215821623802185, -0.7778667211532593, -0.9266237616539001, 0.7461435198783875, 0.18536335229873657, -0.30138275027275085, -0.010271030478179455, -0.49388107657432556, -0.47636717557907...
def shuffle ( self, shuffle ) : q = urllib. parse. urlencode ( { " state " : shuffle } ) url = " me / player / shuffle " self. put _ api _ v1 ( url, q )
[ -1.6838339567184448, 0.09138697385787964, 0.32621070742607117, 0.008359236642718315, 0.20326988399028778, 0.1348731964826584, 0.4277188181877136, -0.2312658429145813, 1.6151814460754395, -0.9347932934761047, -0.6057849526405334, 1.1386345624923706, -1.1233290433883667, -0.5041719675064087,...
def contr _ divergence ( self, data _ point, l2 _ l = 0 ) : hidden _ probabilities _ 0 = tf. sigmoid ( tf. add ( tf. tensordot ( self. weights, data _ point, 1 ), self. hidden _ biases ) ) # dimension w + 1 row for biases hidden _ states _ 0 = self. calculate _ state ( hidden _ probabilities _ 0 ) hidden _ states _ 0 _...
[ 0.4267585873603821, -0.34607794880867004, 0.855019211769104, 0.03760342299938202, 0.3966308534145355, 0.5368074178695679, 0.5146680474281311, 0.7917053699493408, -0.5083349943161011, 0.5287182927131653, -0.47993960976600647, 0.16697941720485687, 0.24329139292240143, 0.1595633178949356, 0...
def expect _ document _ start ( self, first = false ) : if not isinstance ( self. event, ruamel. yaml. events. documentstartevent ) : return super ( yamlemitternoversiondirective, self ). \ expect _ document _ start ( first = first ) version = self. event. version self. event. version = none ret = super ( yamlemitterno...
[ -0.011919581331312656, -0.6209505200386047, 0.48673486709594727, 0.04347563534975052, -0.09174264967441559, -0.2704913020133972, 0.5223888158798218, 0.4155597388744354, 0.4630015790462494, 0.37249913811683655, -0.5806796550750732, 0.6985763907432556, -0.3913893699645996, 1.098394513130188,...
def calibrate _ ar ( rgb1, depth1, rgb2, depth2 ) : ar _ pos1 = get _ ar _ marker _ poses ( rgb1, depth1 ) ar _ pos2 = get _ ar _ marker _ poses ( rgb2, depth2 ) points1 = conver _ hmat _ to _ points ( ar _ pos1 ) points2 = conver _ hmat _ to _ points ( ar _ pos2 ) return find _ rigid _ tfm ( points1, points2 )
[ -0.15376567840576172, -1.3449296951293945, 0.6141209006309509, 0.28762003779411316, -0.37874430418014526, -0.30063876509666443, -0.22528819739818573, -1.0169767141342163, -1.0061787366867065, 0.3776918649673462, 0.8013085722923279, 0.40737229585647583, 0.40675467252731323, -0.1740831136703...
def get _ zstat _ list ( sid _ list, db _ dir ) : zstat _ list = [ ] for subj in sid _ list : subject _ dir = os. path. join ( db _ dir, subj,'obj ','face - object') if not os. path. exists ( subject _ dir ) : print'subject % s does not exist in database.'% ( subj ) return zstat = os. path. join ( subject _ dir,'zstat1...
[ 0.23173758387565613, 0.24805785715579987, 0.31563660502433777, 0.39175257086753845, 0.4556019604206085, 0.10169050842523575, 0.5076063871383667, -0.6602584719657898, 1.316547155380249, 0.16279785335063934, -0.32880961894989014, -0.037320226430892944, -0.18398930132389069, 0.718054711818695...
def test _ atomic _ language _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 2. xsd ", instance = " nistdata / atomic ...
[ 0.06732171028852463, -0.61497962474823, 0.4842706024646759, 0.7740446329116821, -0.6569068431854248, 0.251836359500885, 0.28923487663269043, 0.033151447772979736, -0.6174297332763672, 0.7321785688400269, -0.6721904873847961, 0.1624770164489746, 0.14337757229804993, 0.20077095925807953, 0...
def get _ by _ id ( template _ version _ manager _ id ) : return templateversionmanager. get _ by _ id ( template _ version _ manager _ id )
[ 0.26317262649536133, -1.1737418174743652, 0.16697992384433746, -0.4482233226299286, -0.5324788689613342, -0.757354199886322, -0.6422669887542725, -0.434777170419693, 0.2102029025554657, 0.6306619644165039, -0.2923413813114166, 0.46068206429481506, -0.15489321947097778, 0.37710148096084595,...
def plot _ std _ vs _ mean ( inargs ) : dx = float ( get _ config ( inargs,'domain ','dx') ) c _ red = get _ config ( inargs,'colors ','third') c _ blue = get _ config ( inargs,'colors ','ens') # load dataset rootgroup = read _ netcdf _ dataset ( inargs ) # the variables have dimensions [ date, time, n, x [ n ], y [ n ...
[ -0.053494539111852646, 0.3850477337837219, 0.9781582951545715, -0.0328037329018116, -0.4463846981525421, 0.29857608675956726, 0.4570131301879883, -0.39920300245285034, -0.09493156522512436, 1.0043401718139648, 0.07607193291187286, 1.5961662530899048, 0.4899075925350189, 0.34433868527412415...
def compute _ maes ( y _ true : pd. series, y _ pred : pd. dataframe ) - > list [ float ] : columns = [ col for col in y _ pred. columns if col. startswith ('y _ pred') ] return [ mean _ absolute _ error ( y _ true, y _ pred [ col ] ) for col in columns ]
[ -0.5420442819595337, -0.24372443556785583, 0.6074042916297913, -0.13223545253276825, 0.037426576018333435, 0.010104404762387276, -0.9225673675537109, 1.0570800304412842, -0.1425098329782486, 1.5811837911605835, -0.06864860653877258, 0.8088721632957458, 1.6435669660568237, 0.817194163799285...
def reverse _ characters ( self ) : for i in range ( len ( self. _ input _ lines ) - 1, - 1, - 1 ) : line = self. _ input _ lines [ i ] for j in range ( len ( line ) - 1, - 1, - 1 ) : print ( line [ j ], end ='' ) # print ( self. _ input _ text [ i ], end ='' ) print ( )
[ -0.5124347805976868, -0.6391000151634216, 0.7932170629501343, -0.30890434980392456, 0.4458636939525604, -0.054221879690885544, 0.258049339056015, 0.48528963327407837, -1.1737562417984009, -0.15640921890735626, 0.14081056416034698, 1.253899335861206, -0.6982903480529785, -0.0348682142794132...
def configure _ local ( name, package _ path, use _ gpg = true ) : repo _ dest _ prefix ='/ opt / ice'repo _ dest _ dir = os. path. join ( repo _ dest _ prefix, name ) package _ source = get _ package _ source ( package _ path, name ) distro = get _ distro ( ) if distro. name = = " redhat " : gpg _ url _ path = get _ r...
[ 0.23556244373321533, 0.30661964416503906, 0.8362129926681519, -0.6291030049324036, -0.08544788509607315, -0.16843442618846893, -0.6938468813896179, 1.3806878328323364, -0.23727932572364807, 0.5670598149299622, -0.9543517827987671, -0.6161156296730042, 0.1789475977420807, 0.0489071831107139...
def format _ checksum ( checksum _ pyxb ) : return " { } / { } ". format ( checksum _ pyxb. algorithm. upper ( ). replace ( " - ", " " ), checksum _ pyxb. value ( ). lower ( ) )
[ 1.4103952646255493, -1.2667614221572876, 0.33048272132873535, 0.019202541559934616, 0.341871440410614, 0.6469123959541321, -0.35151249170303345, -0.38476821780204773, 0.48155468702316284, 0.10862744599580765, 0.7669987678527832, -0.3375256061553955, 0.22936570644378662, 1.0572915077209473,...
def automatic ( self ) : if self. schedule _ freq _ type = ='automatic': pattern = { " min _ interval _ hours " : self. _ automatic _ pattern ['minbackupinterval'], " min _ interval _ minutes " : self. _ automatic _ pattern ['minbackupintervalminutes'], " max _ interval _ hours " : self. _ automatic _ pattern ['maxback...
[ -0.41684144735336304, -0.23100265860557556, 0.627229630947113, -0.35528773069381714, -0.33514973521232605, -0.011564941145479679, 0.4463423788547516, -0.20169121026992798, -0.649374783039093, 0.3168330192565918, -0.603754460811615, 0.004715066868811846, 0.1443438082933426, 0.03034975565969...
def charge _ current _ request ( self ) - > int : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charge _ current _ request " )
[ -1.4129735231399536, -0.5502675771713257, 0.6216734051704407, 0.4077922999858856, 0.24623870849609375, -0.25926464796066284, -0.4382137060165405, -0.6378048658370972, -0.7032894492149353, -0.2900410592556, 0.9530273079872131, 0.36023756861686707, -0.2643928825855255, 0.2272508293390274, ...
def select _ windows ( self, window _ set _ name : str, event : str, validation = false, ) : # check if window set exists : path = os. path. join ( self. lasif _ root, " sets ", " windows ", f " { window _ set _ name }. sqlite " ) if os. path. exists ( path ) and not validation : self. print ( f " window set for event ...
[ 0.2950693368911743, 0.09983515739440918, 0.37931251525878906, 0.03623152896761894, -0.5125391483306885, -0.509909987449646, -0.06229787692427635, -0.8183260560035706, 0.25537583231925964, 1.0386449098587036, 0.41697800159454346, 0.9947358965873718, -0.7466592192649841, 0.7532459497451782, ...
def _ get _ file _ url ( self, repository, revision, base _ commit _ id = none, path = none ) : if revision : return ('% s / repos / % s / file / % s'% ( self. account. hosting _ url, repository. extra _ data ['rbgateway _ repo _ name'], revision ) ) else : return ('% s / repos / % s / commits / % s / path / % s'% ( se...
[ 0.7579800486564636, -0.49380648136138916, 0.5553706288337708, -0.4589845836162567, 0.6469668745994568, 0.2156297117471695, -0.7484766840934753, 0.3187043070793152, -1.2245815992355347, 0.08715774863958359, 1.1070160865783691, 0.30089181661605835, -0.7140469551086426, -0.15500089526176453, ...
def _ _ init _ _ ( self, time _ series, epochs = 10, time _ step = 30, drop _ out = 0. 2, num _ nodes = 64, activation ='relu ', loss _ func ='mse ', optimizer ='adam ', batch _ size = 35, validation _ split = 0. 25, allowed _ std _ rate = 1. 5 ) : # save time index here time _ index = time _ series. index # original d...
[ -0.16559039056301117, -0.09117050468921661, 0.771265983581543, 0.0827459767460823, -0.6467130184173584, -0.3770671784877777, 0.3923470973968506, -0.09519654512405396, -0.3773622214794159, -0.04686403647065163, -0.6312747597694397, 0.5456469058990479, 1.2351412773132324, -0.0572656169533729...
def test _ atomic _ hex _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 3. xsd ", instance = " nistdata / ...
[ 0.421255499124527, -0.05413096025586128, 0.4581192433834076, 0.4350571632385254, 0.34885531663894653, 0.5279507637023926, -0.546038031578064, 0.11980932950973511, 0.0091296611353755, 0.3733074963092804, -0.5257790684700012, -0.5708317756652832, -0.11614967882633209, 0.3570271134376526, 0...
def mock _ client ( ) : from dask. distributed import client yield client ( )
[ -0.16681618988513947, 0.38352692127227783, 0.2511461675167084, -0.1296197772026062, -0.43374982476234436, 0.6033354997634888, 1.3013261556625366, -0.17125970125198364, -0.8479874134063721, -1.274046778678894, -0.3023862838745117, -0.05312472581863403, 0.17596763372421265, -0.60353922843933...
def check _ consistency ( self ) : # check the materials keys match attributes = { " s _ 0 " : [ ], " e _ s " : [ ], " thermal _ cond " : [ ], " heat _ capacity " : [ ], " rho " : [ ], " borders " : [ ], " h " : [ ], } for attr, value in attributes. items ( ) : for mat in self. materials : value. append ( getattr ( mat...
[ 0.16535872220993042, -0.4025903344154358, 0.6586690545082092, -0.3586224913597107, 1.4810686111450195, 0.23300136625766754, -0.6372367739677429, 0.7193520665168762, -0.9473399519920349, 0.09333616495132446, 0.44067731499671936, -0.5455324053764343, -0.18849284946918488, 1.6834847927093506,...
def get _ target _ word _ gradient ( positive _ result : result, negative _ results : iterable [ result ] ) - > np. ndarray : # done ( ~ 4 - 8 lines ) : implement gradient = ( positive _ result [ " probability " ] - 1 ) * positive _ result [ " context _ word _ embedding " ] for res in negative _ results : gradient + = ...
[ -0.8393265008926392, 0.16653747856616974, 0.6235325336456299, 0.11800657212734222, 0.3347781300544739, 0.5340616703033447, -0.2746257185935974, 0.03865635395050049, -0.9151919484138489, 1.0191055536270142, 0.3927539587020874, 0.8080525994300842, -0.6426500678062439, 0.243109330534935, -0...
def compileinstance ( self ) : # check to see if we can export. if not self. validateexport ( ) : # can't export! return # create a dictionary which will hold all of the keyvals. dictkeyvals = { } # iterate over all of the dictdata putting all inside of the keyvals. for key, val in self. dictdata. items ( ) : # skip ov...
[ -0.7371780276298523, -1.1968318223953247, 0.5999816060066223, -1.1086475849151611, -1.4229220151901245, 0.1094232052564621, -0.823736310005188, 0.028810417279601097, -0.28883883357048035, -0.41056230664253235, -0.4382040500640869, 0.10685271769762039, -0.02345937117934227, 0.35106021165847...
def add _ info ( self, info ) : self. info _ to _ send. append ( info ) return
[ -0.6778936386108398, 0.06578352302312851, 0.2991909086704254, 0.12975792586803436, 1.0382062196731567, 0.6965627670288086, -0.7960329651832581, -0.42611584067344666, -0.7958276867866516, -0.034495022147893906, -1.2091096639633179, 0.3325502872467041, 0.025409266352653503, 0.580651342868804...
def create _ eigenenergy _ plot _ figure ( band _ energies, energy _ unit = " unknown unit ", title = " band energies ", special _ point _ labels = { } ) : figure = plt. figure ( ) axes = figure. add _ subplot ( 111 ) # just one plot plot = axes. plot ( band _ energies ) axes. set _ ylabel ( " band eigenenergy ( " + en...
[ 0.12475404888391495, 0.28801798820495605, 0.4249759018421173, -0.2614867687225342, -0.17634645104408264, 1.1706359386444092, -0.5115712881088257, 0.6995313167572021, -0.3831058144569397, -0.573782205581665, 0.8155977129936218, 0.6152226328849792, 0.15872250497341156, -0.8890517950057983, ...
def train ( self, dataset ) : # sets seeds for numpy, torch, python. random and pythonhashseed. if self. torch _ manual _ seed : pl. seed _ everything ( self. torch _ manual _ seed ) # create pytorch datasets dataset _ train = dataset. create _ torch _ dataset ( part ='train ', reshape = ( ( 1, ) + dataset. space [ 0 ]...
[ -0.32618263363838196, 0.41086047887802124, 0.4144247770309448, -0.3205764889717102, 0.2664540410041809, -0.015797073021531105, 0.03877861052751541, -0.018404562026262283, -0.15152043104171753, -0.6889243721961975, -1.1206358671188354, -0.019836941733956337, 0.3196500837802887, 0.1113094091...
def multiple _ file _ alpha ( input _ path, output _ path, metrics, tree _ path = none ) : # alpha _ script = qiime. alpha _ diversity. _ _ file _ _ # removed below file _ names = os. listdir ( input _ path ) file _ names = [ fname for fname in file _ names if not fname. startswith ( '.') ] if not os. path. exists ( ou...
[ -0.11120772361755371, -0.2076520025730133, 0.843742847442627, 0.6988554000854492, 0.7165542244911194, 0.5906426310539246, 0.7573460936546326, 0.39335566759109497, -0.7038822770118713, 0.10435277968645096, 0.9658893942832947, -0.4873480796813965, -0.13995109498500824, 0.5116537809371948, ...
def animate _ and _ store ( view, points : np. ndarray, scene _ name : str, sub _ path : str ) : center _ of _ gravity _ x = sum ( [ pair [ 0 ] for pair in points ] ) / len ( points ) center _ of _ gravity _ y = sum ( [ pair [ 1 ] for pair in points ] ) / len ( points ) center _ of _ gravity _ z = sum ( [ pair [ 2 ] fo...
[ 0.49379250407218933, 1.2541524171829224, 0.6409153938293457, 0.29028841853141785, -0.2854057848453522, 0.12958844006061554, 0.8883617520332336, -0.15679457783699036, 0.3069787323474884, 0.28808367252349854, -0.8233649730682373, 0.4305221438407898, -0.21331091225147247, 0.005929241422563791...
def _ _ init _ _ ( self, master ) : super ( ). _ _ init _ _ ( master,'recommended for you ', 19, 4, true, false ) self. master = master self. master. title ('recommended for you') self. scrollbar. pack ( side = " right ", fill = " y " ) def gettop ( predictions, user _ id ) : top _ films = [ ] for uid, iid, true _ r, e...
[ -0.2759525775909424, 0.5080717206001282, 0.7117528915405273, 0.8708829879760742, -0.6189610362052917, 0.07698408514261246, -0.012531351298093796, 0.2831375002861023, -0.6153320670127869, 0.47625496983528137, 0.10367735475301743, 1.0286461114883423, -0.24753354489803314, 0.5740870833396912,...
def updateschema ( self, schemaid, schemadefinition ) : req = apiclient. oneschemaurl % ( self. host, " / draft ", schemaid ) body = { " schemadefinition " : schemadefinition } resp = requests. put ( req, auth = self. credentials, headers = { " content - type " : " application / json " }, data = json. dumps ( body ), v...
[ -1.5751545429229736, -0.8162124156951904, 0.5415958762168884, -0.12903447449207306, -0.33278948068618774, -0.5296846032142639, -0.8153717517852783, 0.42356786131858826, 0.9431002140045166, 1.0245280265808105, -1.0219509601593018, 1.170145869255066, -1.639462947845459, 0.02419290691614151, ...
def plot _ barcode _ rank ( umi, selected = none, title = none, * * kwargs ) : options = {'kind':'scatter ','s': 3,'logx': true,'logy': true } options. update ( kwargs ) try : ax = options. pop ('ax') except keyerror : ax = make _ ax ( ) dat = umi. to _ frame ( ) dat. columns = ['umi'] dat = dat. sort _ values ('umi ',...
[ 0.13918264210224152, 0.7322446703910828, 0.8240621089935303, 0.8239646553993225, -0.5565675497055054, -0.6763600707054138, 0.48838010430336, 0.1346118450164795, 0.35613417625427246, -0.5393253564834595, 0.049620091915130615, 1.651733160018921, -0.504332423210144, -0.20430760085582733, 0....
def chooser ( arg _ name, choice _ list ) : def _ chooser ( func ) : @ wraps ( func ) def wrapper ( * args, * * kwargs ) : arg _ val = get _ arg _ value ( arg _ name, func, * args, * * kwargs ) assert arg _ val in choice _ list, \ f " { arg _ name } : expected to be in'choice _ list '. " return func ( * args, * * kwarg...
[ -0.2464635968208313, -0.372367799282074, 0.569635272026062, 0.175419420003891, -0.062308501452207565, 0.0010334955295547843, -0.5825202465057373, 0.8594306111335754, -0.18870550394058228, 1.104480266571045, -0.28637051582336426, 0.546110987663269, 0.8877661824226379, 0.8089202642440796, ...
def list _ csv _ files ( search _ dir, reg _ to _ match ) : fnames = os. listdir ( search _ dir ) return [ fname for fname in fnames if reg _ to _ match. match ( fname ) ]
[ -0.4938415288925171, -0.597394585609436, 0.5409084558486938, 0.8519130945205688, 0.5032998919487, -0.5834971070289612, -0.33167803287506104, 1.072564721107483, 0.04212014749646187, 0.15612562000751495, -0.2687176764011383, 0.7196586728096008, 0.10043344646692276, -0.3468295931816101, -1....
def copyuv ( object, toassign ) : for i in toassign : if not cmds. polycompare ( object, i ) : cmds. polytransfer ( object, vertices = true, vertexcolor = false, uvsets = 1, alternateobject = i ) else : logger. error ('the mesh % s do not share the same topology with % s. skipped'% ( i, object ) )
[ -0.6717824339866638, -1.0152857303619385, 0.5942862033843994, 0.9889202117919922, -0.08529356867074966, 1.3015174865722656, 1.2427152395248413, -0.41100385785102844, 0.8952713012695312, 0.41417860984802246, -0.6885932087898254, 0.41163739562034607, 0.2642761170864105, -0.5045891404151917, ...
def _ _ ensure ( self, address ) : added = yield from self. _ connection. sadd ( self. _ key ( " servers " ), [ str ( address ). encode ( self. encoding ) ] ) return added = = 1
[ -0.9221370816230774, 1.3321559429168701, 0.541210412979126, -0.17906005680561066, 0.2683832347393036, 0.023433096706867218, -0.7866622805595398, -0.9406329393386841, 1.038741111755371, -0.007101968862116337, -0.7801477909088135, 0.02230355516076088, -1.3845397233963013, 0.35734209418296814...
def validate _ passwd ( record ) : input _ re = r'( [ 0 - 9 ] + ) - ( [ 0 - 9 ] + ) ( [ a - z ] ) : (. + )'rec _ match = re. match ( input _ re, record. strip ( ) ) ( lower, upper, target, passwd ) = rec _ match. groups ( ) return ( passwd. count ( target ) > = int ( lower ) and passwd. count ( target ) < = int ( upper...
[ -0.39973264932632446, -0.6813055276870728, 0.7011412978172302, 0.25312599539756775, -0.5850259065628052, 0.9667525887489319, 0.6482376456260681, 0.7244125604629517, -0.0402192585170269, 0.1041228324174881, 0.4562086760997772, 0.0925944373011589, -0.9705983996391296, -0.06617756932973862, ...
def _ _ init _ _ ( self ) : self. logger = logging. getlogger ( " alpha " ) self. logger. debug ( " creating configdb object " ) try : self. conn = sqlite3. connect ( self. _ config _ filename ) except sqlite3. operationalerror as error : self. logger. error ( " could not open % s : % s " % ( self. _ config _ filename,...
[ -0.6501916646957397, -0.047559596598148346, 0.5003162622451782, 0.5928825736045837, -0.02645017020404339, 0.2086683213710785, 0.19610494375228882, 1.2853920459747314, -0.6865408420562744, 0.25867223739624023, 0.2062142938375473, -0.8835251927375793, 0.026324132457375526, 0.8229236602783203...
def init _ parameters _ from _ z ( self, z, observations = none ) : observations = self. _ get _ observations ( observations = observations ) t = self. _ get _ t ( observations = observations ) # check z is appropriate size if np. shape ( z ) [ 0 ]! = self. _ get _ t ( ) : raise valueerror ( " z must be length t = { 0 ...
[ -0.7420158386230469, -0.10961388051509857, 0.46659553050994873, -0.2928439676761627, -0.35018661618232727, -0.24504601955413818, 0.2222941815853119, -0.07288134843111038, 0.5004561543464661, 0.9515224695205688, -0.0031065212097018957, 0.7579233050346375, -0.6686834692955017, 0.915819466114...
def login ( self, user, password, *, initial _ response _ ok = true ) : self. ehlo _ or _ helo _ if _ needed ( ) if not self. has _ extn ( " auth " ) : raise smtpnotsupportederror ( " smtp auth extension not supported by server. " ) # authentication methods the server claims to support advertised _ authlist = self. esm...
[ -0.8105926513671875, 0.05670737102627754, 0.6297914385795593, 0.7782367467880249, -0.880862832069397, -0.7044519782066345, 0.021763306111097336, -0.4961356222629547, 0.36967918276786804, 0.2612558901309967, -0.7550098896026611, 0.40503692626953125, -0.35276469588279724, 0.2383531630039215,...
def _ get _ dt _ posted ( self, soup : soupinfo ) - > optional [ datetime ] : return none
[ -0.4433380663394928, 0.3362889587879181, 0.6069937348365784, -0.35112857818603516, -0.37873318791389465, 0.33621707558631897, -0.9609270691871643, -0.5852232575416565, -0.6605105996131897, -0.49730756878852844, -0.12226711958646774, -0.6136030554771423, 0.14646124839782715, 0.1532261669635...
def display _ sorted _ states ( ) : state _ sorted ( )
[ 0.9199246168136597, -0.7580505609512329, 0.20036189258098602, 0.14312608540058136, -0.4998771846294403, 0.23088787496089935, 1.2488471269607544, -1.1292580366134644, 0.25557073950767517, -0.11144577711820602, 0.6314941048622131, 0.41937896609306335, 0.6798064112663269, 0.6098370552062988, ...
def test _ non _ dict _ raises _ error ( self ) : data = [ 1, 2, 3 ] order = order ( ) with self. assertraises ( datavalidationerror ) : order. deserialize ( data )
[ -0.7453456521034241, 0.45502346754074097, 0.46005377173423767, 0.25761115550994873, -0.2900647819042206, 0.01405338291078806, -1.1071689128875732, 0.24593327939510345, -0.4869268238544464, -0.5313388109207153, -1.0505290031433105, -0.5009730458259583, -0.6466883420944214, 0.422497868537902...
def get _ traj ( actor, env, hp, render = false ) : episode _ max _ length = hp. episode _ max _ length env. reset ( ) # print ( debug, " now is working on env # { } ". format ( env. seq _ no ) ) obs = [ ] acts = [ ] rews = [ ] info = [ ] ob = env. observe ( ) for _ in range ( episode _ max _ length ) : if hp. gpu : if...
[ -0.5041030049324036, -0.03719833493232727, 0.8911830186843872, -0.09602508693933487, -0.06823199987411499, -0.623051643371582, -0.23665694892406464, 0.6500709652900696, 0.022136127576231956, 0.4147360920906067, -0.31696462631225586, -0.03480501100420952, 0.4509449601173401, 0.5644978284835...
def get _ entropy ( labels ) : already = { } logs = [ ] total = labels. size for label in labels : if label not in already. keys ( ) : already [ label ] = 1 else : already [ label ] + = 1 for i in already. keys ( ) : logs. append ( ( already [ i ] / total ) * math. log2 ( already [ i ] / total ) ) sum = 0 for i in logs...
[ -1.4238930940628052, -0.11219777911901474, 0.5635147094726562, -0.9555404782295227, -0.21438539028167725, -0.14442966878414154, 0.05668715015053749, 0.3873928189277649, -0.6406025886535645, 0.9636857509613037, -0.33722907304763794, -0.1868141144514084, -0.325886607170105, -0.28883728384971...
def test _ list _ decimal _ length _ 4 _ nistxml _ sv _ iv _ list _ decimal _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 5. xsd ", instance = " nistdata / list / decimal / schem...
[ -0.1496644765138626, -0.2578850984573364, 0.37067192792892456, 0.14729800820350647, -0.019190721213817596, -0.4425552189350128, 0.24924814701080322, -0.0183509923517704, 0.42900148034095764, 0.2570129334926605, -1.4441993236541748, -0.7587114572525024, -0.3922010362148285, 0.72734910249710...
def grow _ drop _ data ( self, years, frequency, load _ growth ) : self. fuel _ price = lib. fill _ extra _ data ( self. fuel _ price, years, 0, frequency ) self. fuel _ price = lib. drop _ extra _ data ( self. fuel _ price, years )
[ -1.2077707052230835, 0.6029829978942871, 0.32939884066581726, -0.4805770814418793, 0.22380107641220093, 0.458755761384964, -0.4946708679199219, -0.059327784925699234, -0.38627833127975464, -0.6138129234313965, 0.09655822813510895, 0.12491244077682495, 0.3988054394721985, 0.2199062556028366...
def save _ metadata ( csv _ size, slug, thru _ month, days _ late, geo _ type ) : pub _ date = datetime. date. today ( ). strftime ( " % b % y " ) thru _ month _ formatted = parser. parse ( thru _ month ). strftime ( " % b % y " ) csv _ url = " { } / { }. csv ". format ( s3 _ mortgage _ downloads _ base, slug ) downloa...
[ -0.03680628165602684, -0.3792461156845093, 0.8993849158287048, -0.4705286920070648, 0.31660228967666626, 0.4068243205547333, -0.7029663920402527, 0.463589072227478, -0.7539762854576111, 0.40057864785194397, -0.22019030153751373, 0.5165528059005737, -0.18745696544647217, 0.42473116517066956...
def create _ layout ( df : pd. dataframe, player _ list : list [ str ], is _ loaded _ header : st. deltagenerator. deltagenerator ) - > none : is _ loaded _ header. subheader ( " is loaded " ) st. sidebar. title ( " menu " ) app _ mode = st. sidebar. selectbox ( " please select a page ", [ " homepage ", " data explorat...
[ -0.4868767261505127, 0.6758255362510681, 0.6609916090965271, 0.2890883684158325, 0.04980577901005745, 0.11114974319934845, 0.1599944680929184, -0.4965669810771942, -0.05626215413212776, 0.19225236773490906, 0.5987275242805481, -0.6485471129417419, 0.6403779983520508, -0.15674373507499695, ...
def get _ global _ link _ position _ function ( self, link : str, n : int = 1, numpy _ output : bool = false ) - > cs. function : return self. make _ function ( " p ", link, self. get _ global _ link _ position, n = n, numpy _ output = numpy _ output )
[ -0.4399638772010803, 0.32182765007019043, 0.4359824061393738, 0.7809101343154907, 0.09706909954547882, -0.6805785894393921, 0.9403474926948547, -0.2349708378314972, -0.07423005253076553, -0.06708355993032455, -0.5168760418891907, 0.4636194705963135, -0.5330119132995605, -0.6385490894317627...
def test _ example _ input _ two _ default _ value _ index ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) default _ index = " default " input _ page. create _ new _ input. select ( " example input two...
[ -0.1463112086057663, 0.3671383559703827, 0.49946293234825134, 0.8090149164199829, 1.4546363353729248, 0.6219828724861145, 0.11063103377819061, -0.6462805867195129, -0.09248386323451996, -0.5068467259407043, -0.6081216931343079, 0.05150618776679039, 0.5469124913215637, -0.002014594385400414...
def get _ ceph _ deploy _ conf _ paths ( ) : configs = [ os. path. join ( os. getcwd ( ),'cephdeploy. conf'), os. path. expanduser ( u'~ /. cephdeploy. conf'), ] sudoer _ user = os. environ. get ('sudo _ user') if sudoer _ user : sudoer _ home = os. path. expanduser ('~'+ sudoer _ user ) configs. append ( os. path. joi...
[ -0.26611343026161194, -0.7482612133026123, 0.46217161417007446, 1.9833413362503052, 0.14717985689640045, 0.3552740812301636, 0.5038248896598816, 0.9116641283035278, -0.5446645617485046, 0.7347064018249512, -0.774111807346344, -0.7748993039131165, 0.23423674702644348, 0.9328072667121887, ...