text
stringlengths
25
2.19k
embedding
listlengths
768
768
def shower _ muon _ physical _ quantities ( self, rng ) : physical _ energy = self. shower _ energy _ spectrum ( rng ) pe _ per _ mev = 170 charge = physical _ energy * pe _ per _ mev nhit = 192 x = 0 y = 0 z = 0 fmax = 0. 1 fquad = 0. 1 fpsd _ t1 = 0. 99 fpsd _ t2 = 0. 99 f2inch _ maxq = 0 return ( physical _ energy, ...
[ -1.0466585159301758, -0.503897488117218, 0.5721916556358337, -0.7288904190063477, -0.8650610446929932, 0.2521495819091797, -0.24221108853816986, -0.390676349401474, -0.19630959630012512, -0.7983311414718628, -0.7033689618110657, 0.1370013803243637, 0.3906362056732178, 0.8061631321907043, ...
def merge _ data ( user _ hash : str, data : dict, old _ data = none, delete _ horizon = none ) : if delete _ horizon is none : delete _ horizon = time. time ( ) - delete _ horizon if old _ data is none : try : old _ data = lookup _ user ( user _ hash ) except usernotfound : [ _ index _ profiles ( data [ series ] ) for...
[ 0.00028313984512351453, 0.2188340127468109, 1.089277982711792, 0.2138179987668991, -0.04195445775985718, 0.5051892995834351, 0.2239457666873932, -0.1322738528251648, 0.10769639909267426, 0.5345488786697388, -0.49626514315605164, 0.18868321180343628, -0.5788804888725281, -0.0929828956723213...
def predict _ no _ adj ( self, features : np. ndarray ) - > float : # make questions for compatibility questions = list ( combinations ( range ( len ( features ) ), r = 2 ) ) # predict predictions = super ( ). predict _ no _ adj ( questions = questions, features = features ) # prediction score score = np. mean ( predic...
[ -1.09370756149292, 0.3568532466888428, 0.30210813879966736, 0.5358536839485168, -0.18034030497074127, 0.7901794910430908, 0.5451695322990417, -0.18204930424690247, -0.511502206325531, 0.5490155816078186, 0.32246848940849304, -0.685612678527832, -0.16807293891906738, 0.06697799265384674, ...
def test _ atomic _ base64 _ binary _ white _ space _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ white _ space _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - whitespace - 1. xsd "...
[ -0.4622419774532318, 0.19412562251091003, 0.4802530109882355, 0.7386581897735596, 0.22032426297664642, 0.2754586338996887, 0.32235315442085266, -0.5080055594444275, 0.661203920841217, 0.562278687953949, 0.12466660141944885, 0.25136128067970276, -0.741460382938385, 0.7134138345718384, -0....
def get _ disable _ version _ manager _ by _ user _ id ( user _ id, _ cls = true ) : return templateversionmanager. get _ disable _ version _ manager _ by _ user _ id ( user _ id, _ cls )
[ -0.4771760404109955, -0.6375023722648621, 0.3235855996608734, 1.1628286838531494, -1.1341866254806519, 0.44627973437309265, 0.34585151076316833, -0.20681701600551605, 0.5790086388587952, -0.21417447924613953, -0.5457895398139954, 0.6329002380371094, -0.3370218276977539, 0.7816009521484375,...
def clone ( self ) : new _ circle = self return new _ circle
[ -0.07820340991020203, -1.6604423522949219, 0.4499509632587433, -0.34829485416412354, -0.8529676795005798, 1.0551202297210693, 0.7443181872367859, -1.7987760305404663, 0.08346027880907059, 0.1383969783782959, -0.6147052645683289, 0.6376392841339111, -0.5517856478691101, -1.056065320968628, ...
def ids _ updated _ sd ( date, freq = " w " ) : _ tmtp = date. timetuple ( ) if freq = = " w " : _ sql _ base = " select distinct fund _ id from fund _ nv _ data _ standard \ where statistic _ date ='{ date }'and { nv } > 0. 2 and statistic _ date > ='1970 - 01 - 02'". format ( date = date, nv = _ nv ) _ criteria = " a...
[ -0.20267896354198456, 0.06515651196241379, 0.9452711939811707, 0.2722286581993103, -0.7185095548629761, -0.27863648533821106, 0.36951562762260437, -0.31507810950279236, 0.034349169582128525, -0.3081137537956238, 0.42505398392677307, 0.3995896875858307, 0.3639129102230072, 0.289084941148757...
def estimate _ parameters ( projector _ points, initial _ parameters ) : # setup initial values of the parameters dome = domeprojection ( * * initial _ parameters ) parameters = dome. get _ parameters ( ) # from params _ 2015 _ 11 _ 04 _ 17 _ 16 import parameters # 1. 7 # from parameters _ domecal import parameters #??...
[ 0.20123153924942017, 0.27640506625175476, 1.0038328170776367, -0.3381374478340149, -0.3119884431362152, 0.010646498762071133, 0.18521803617477417, -0.554961621761322, 0.08821607381105423, 0.5276908278465271, -0.09393390268087387, 0.7369736433029175, 0.011032627895474434, 0.3075814247131347...
def boxplot _ reduceboth ( ) : fig = plt. subplots ( figsize = ( 7, 3 ) ) cooling ='linear'error _ method ='mean squared'filename ='sa _'+ cooling +'_'+ error _ method +'_ removed _ data _ xy. csv'with open ( filename ) as csvfile : reader = csv. reader ( csvfile, delimiter = ',') errors = [ ] for i, row in enumerate (...
[ 0.6836297512054443, 0.3095261752605438, 0.8825792074203491, -0.7021769285202026, -0.11498722434043884, 0.41060563921928406, 0.44956839084625244, -0.39632171392440796, -0.13865497708320618, 0.27371060848236084, -0.11979882419109344, 0.6865047216415405, -0.008939522318542004, 0.3208311498165...
def individual ( length, minimun, maximum ) : return [ randint ( minimun, maximum ) for i in range ( length ) ]
[ -1.2708027362823486, -0.6168157458305359, 0.29650360345840454, -0.07495091110467911, -0.05547728389501572, 1.3235926628112793, -1.3104217052459717, 0.9562748670578003, 0.7935023903846741, -0.09517393261194229, -1.7138879299163818, 1.106938362121582, -0.7941127419471741, -1.1884604692459106...
def scaling ( x _ train, x _ test ) : # scalerx = minmaxscaler ( ) scalerx = standardscaler ( ) x _ train = scalerx. fit _ transform ( x _ train ) x _ test = scalerx. transform ( x _ test )
[ 0.12650157511234283, -0.12543724477291107, 0.5508663058280945, 0.4475669264793396, -0.20497874915599823, 0.3615044355392456, -1.5383318662643433, 0.429166704416275, -0.4156431257724762, 0.4185924530029297, -0.16330407559871674, 0.6900575160980225, -0.08002122491598129, -0.04327601566910744...
def media _ playlist ( self ) : if self. _ playlist is none : return none return self. _ playlist [ " name " ]
[ 0.0741463452577591, -0.8683760762214661, 0.2761370539665222, 0.17070524394512177, -0.1575433313846588, -0.02964208275079727, 0.18402758240699768, -1.0965490341186523, 0.6445050835609436, 0.5812466740608215, 0.34624382853507996, 0.35498759150505066, -0.48905864357948303, 0.17126795649528503...
def predict ( self, input : any ) : pass
[ -0.8864572048187256, -0.5447747111320496, 0.15881973505020142, 1.2745158672332764, 0.027854442596435547, 0.6767232418060303, 0.2818540334701538, 0.1634385734796524, -0.19073180854320526, -1.5293457508087158, -0.857717752456665, 0.5716845989227295, -0.06690623611211777, 0.6955642104148865, ...
def open _ new _ graph ( self, event = " nothing " ) : # pylint : disable = w0613 # self. add _ tab ( graph _ name = " peter " ) if debug : a = " / home / td / dev / projects / graph. py / graphs / simple _ bin _ tree _ 3. json " self. add _ tab ( a ) self. load _ graph ( a ) else : current _ instance = opengraphdialog...
[ -0.39477765560150146, 0.0529790073633194, 0.6363292336463928, 0.3423615097999573, -0.5083478689193726, 0.6981638073921204, 0.629417359828949, -0.1090838834643364, -0.10222349315881729, -0.3931885361671448, -0.42947590351104736, 0.8719537258148193, 0.11515451222658157, -0.24857041239738464,...
def login _ user ( ) : truth _ value = 0 # validate user id and password while truth _ value = = 0 : userid = input ('userid :') while userid in nothing or ord ( userid [ 0 ] ) in invalid _ char _ array : print ( " not a valid user id " ) userid = input ('userid :') unhashed _ pass = getpass. getpass ('password :') # p...
[ -0.2153821587562561, -0.719880223274231, 0.7222852110862732, 0.5126084089279175, -0.7308026552200317, 0.9951345324516296, 0.555753767490387, -0.08942174911499023, 0.04352962225675583, -0.5113888382911682, 0.4858495891094208, 0.14830288290977478, -0.8042415380477905, 0.7345927953720093, -...
def test _ logged _ in _ user _ cannot _ access _ new _ account _ page ( self ) : # create test user and login as them. createtestuser ( username ='testuser') login = self. client. login ( username ='testuser ', password ='12345') # attempt to get to new account creation page. desired _ url = reverse ('users : new _ ac...
[ -0.3783297836780548, -0.07798117399215698, 0.11911135166883469, 0.7153881192207336, 0.22787223756313324, 1.029321312904358, 1.2513357400894165, -1.3116987943649292, 0.23734502494335175, -0.9001460671424866, 0.2061018943786621, 0.39368531107902527, 0.5651905536651611, 0.23478184640407562, ...
def erode _ img ( self, img ) : kernel = np. ones ( self. kernel _ erode ) img = cv2. morphologyex ( img, cv2. morph _ erode, kernel = kernel, iterations = self. iterations _ erode ) return np. array ( img, dtype ='uint8')
[ -1.136520266532898, 0.34341132640838623, 0.542983889579773, 0.17457127571105957, 0.17334885895252228, -0.5341011881828308, 0.21535472571849823, 0.22560061514377594, 1.034901738166809, 0.6612104177474976, 0.5782038569450378, 0.5113165378570557, -0.5715533494949341, 0.6435256004333496, 0.7...
def _ _ init _ _ ( self, stock _ data _ container _ list, reload _ stockdata, parameter _ dict ) : self. stock _ data _ container _ list = stock _ data _ container _ list self. reload _ stockdata = reload _ stockdata self. _ parameter _ dict = parameter _ dict statusupdate. _ _ init _ _ ( self, len ( stock _ data _ con...
[ -0.4414907991886139, 0.22135165333747864, 0.5074137449264526, 0.5768412947654724, 0.33518871665000916, 0.01721314713358879, -0.5424827933311462, 0.12234481424093246, 0.43472158908843994, -0.21951287984848022, -1.0177233219146729, -0.19298765063285828, 0.4104198217391968, 0.6066257357597351...
def aperture _ convolve _ cube ( orig _ cube, aperture _ radii, apkwargs = {'method':'subpixel ','subpixels': 4 } ) : cube = orig _ cube. copy ( ) orig _ shape = cube. shape aperture _ radii = np. array ( aperture _ radii ) # because pandas indexing can cause problems # image or cube? img _ flag = true if len ( orig _ ...
[ -0.7138636708259583, -0.009853624738752842, 0.767632782459259, 0.6554818153381348, -0.6420543789863586, 0.014766106382012367, -0.0711546465754509, 0.5545386672019958, 0.09694279730319977, 0.7917784452438354, 0.6778037548065186, 0.6301466822624207, 0.2315974086523056, 0.3604220747947693, ...
def test _ list _ integer _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 3. xsd ", instance = " nistdata / list / integer / schem...
[ -0.3548971712589264, -0.14759185910224915, 0.40108489990234375, 0.24693508446216583, -0.2535185217857361, 0.2799960672855377, -0.874458372592926, 0.47211217880249023, 1.0282961130142212, 1.0683655738830566, -0.9883518815040588, 0.009628779254853725, -0.09446649253368378, 0.5095788240432739...
def get _ tick _ pixel ( ax, fig, tick _ size, axes _ x _ pos, axes _ y _ pos ) : x _ tick _ pos = [ ax. translimits. transform ( textobj. get _ position ( ) ) for textobj in ax. get _ xticklabels ( ) if len ( textobj. get _ text ( ) ) > 0 ] y _ tick _ pos = [ ax. translimits. transform ( textobj. get _ position ( ) ) ...
[ 0.2881064713001251, 0.2980126440525055, 1.0421656370162964, -0.7786842584609985, -0.694129228591919, -0.29273274540901184, 0.788564145565033, -0.14967921376228333, -0.4083925187587738, 0.7919420003890991, -0.5875651836395264, -0.3624565005302429, 0.7025866508483887, -0.643441379070282, 0...
def gps _ pointdata ( ) : arduino = serial. serial ('/ dev / serial / by - id / usb - gravitech _ arduino _ nano _ 13bp1066 - if00 - port0 ', 115200 ) ln = eval ( arduino. readline ( ). strip ( ) ) / 100 lt = eval ( arduino. readline ( ). strip ( ) ) / 100 st = time. strftime ( " % y - % m - % dt % h : % m : % s " ) ln...
[ -0.6820719242095947, -0.3595893979072571, 0.6155393719673157, -0.30551382899284363, 0.6130035519599915, 0.3635616600513458, -0.8488361835479736, -0.05627598613500595, -0.3352736234664917, 0.23969829082489014, -0.5414848327636719, 0.5438280701637268, 0.37239718437194824, -0.0815451666712760...
def gettaskdefinitionformscriptonsubmit ( self, script ='' ) : return'' # if (! window. document. getelementsbyname ('name') [ 0 ]. value ) { # alert ('please specify task definition name') ; # return false ; # }
[ -0.4995485544204712, 0.2835156321525574, 0.5473794937133789, 0.7888376116752625, -0.36623984575271606, 0.07972287386655807, 0.5800516605377197, -0.3872605264186859, -0.14567306637763977, 0.5859161615371704, -1.0335845947265625, 0.25179818272590637, 0.008702794089913368, 1.3776590824127197,...
def test _ get _ password _ forgotten _ form ( self ) : pass
[ 0.2667383551597595, 0.6885567903518677, 0.2553883492946625, 0.31956183910369873, 1.3357303142547607, 0.07382356375455856, 0.6051838994026184, -0.5468152165412903, -0.571008026599884, -1.739436388015747, -0.840930700302124, 0.34383299946784973, -0.479132741689682, 0.5027073621749878, -0.0...
def listorcashortcuts ( self, inputevent = none ) : if not inputevent or inputevent. event _ string = = " f2 " : bound = self. getdefaultkeybindings ( ). getboundbindings ( ) title = messages. shortcutsfoundorca ( len ( bound ) ) else : try : appname = self. app. name except attributeerror : appname = messages. applica...
[ 0.08147992938756943, -0.4051702320575714, 0.6712057590484619, 0.7593896985054016, -0.49167105555534363, 0.09609713405370712, 0.3349878787994385, -0.29966795444488525, 0.43423911929130554, -0.1465243399143219, -0.08140166103839874, 0.3914720416069031, 0.16346582770347595, 1.3173900842666626...
def test _ atomic _ qname _ min _ length _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 1. xsd ", instance = " nistdata / atomic / qn...
[ 0.4206366240978241, -0.7172519564628601, 0.3724391460418701, -0.08988587558269501, -0.7138197422027588, 0.232029989361763, 0.16638809442520142, -0.9833385348320007, 0.6210323572158813, 0.4428379535675049, -0.4959334433078766, -0.003541931975632906, -0.5382683873176575, 0.1063525527715683, ...
def genotype _ to _ fastphenotype ( chromosome ) : if not hasattr ( chromosome,'data') : raise notimplementederror ('' ) def naming ( p ) : return'_ { : 02. 0f } '. format ( p ['inflowfile | hwindspeed'] ) if len ( chromosome )! = ch _ map. nbases : raise exception ('chromosome length ( { } ) not compatible with ch _ m...
[ 0.33610644936561584, -0.25618642568588257, 0.6583491563796997, -0.02387848123908043, -0.31625065207481384, -0.02278745360672474, 0.40506166219711304, 0.22980014979839325, -0.7982219457626343, 0.654252827167511, -0.6958214640617371, 0.378057062625885, 0.17608517408370972, 0.980805516242981,...
def test _ atomic _ any _ uri _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 2. xsd ", instance = " nistdata / atomic / any...
[ -0.06756778806447983, -0.5696702003479004, 0.41492417454719543, 1.0052855014801025, -0.46794068813323975, -0.26998794078826904, 0.22150208055973053, -0.20192337036132812, -0.8292044997215271, -0.04356096312403679, -0.2151000201702118, -0.16024011373519897, -0.03237791359424591, 0.618433713...
def get _ table _ row _ with ( self, element ) : source _ code = self. get _ source ( ) result = self. get _ table _ row _ xpath ( source _ code, element ) return result
[ -0.11801005154848099, 1.107479214668274, 0.5150915384292603, 1.3309717178344727, -0.5131940245628357, -1.0517674684524536, -0.18712425231933594, -0.6716822981834412, 0.2561764121055603, 0.191715806722641, 0.2964775860309601, -0.03792215883731842, 0.33784759044647217, 0.7884347438812256, ...
def display ( values ) : print ( ) i = 1 for row in rows : j = 1 for column in cols : print ( values [ row + column ] +'', end ='' ) if ( j = = 3 or j = = 6 ) : print ('| ', end ='' ) j = j + 1 if ( i = = 3 or i = = 6 ) : print ('\ n - - - - - - + - - - - - - - + - - - - - -') else : print ( ) i = i + 1 return
[ 0.14313015341758728, 0.10296415537595749, 0.8924615383148193, 0.4008808135986328, -0.9226031303405762, 0.33537670969963074, 0.5437579154968262, -0.27663230895996094, -0.46645089983940125, 0.044804465025663376, 0.8597403764724731, -0.17588242888450623, -0.00047854165313765407, 0.66572976112...
def _ _ init _ _ ( self, token ) : # : fomo api auth token self. _ _ token = token # : fomo api endpoint self. _ _ endpoint ='https : / / api. fomo. com'# : sdk version self. _ _ version _ _ ='1. 2. 2 '
[ -0.41947415471076965, -0.49048754572868347, 0.3667929470539093, 0.40067440271377563, -0.2708100378513336, -1.1040339469909668, -0.6262505650520325, -0.052271194756031036, -0.09675439447164536, -0.5170018076896667, -1.2006897926330566, -0.15213961899280548, 0.8131203651428223, -0.0176939480...
def parse ( self ) : self. commands = {'get _ account _ info': self. get _ account _ info,'get _ all _ shared _ folders': self. get _ all _ shared _ folders,'get _ all _ file _ requests': self. get _ all _ file _ requests,'get _ space _ usage': self. get _ space _ usage,'get _ shared _ links': self. get _ shared _ link...
[ -0.3287740647792816, -0.14531105756759644, 0.520847737789154, -0.256293922662735, 0.8572911024093628, -0.7077704071998596, -0.10569041222333908, -0.8419849276542664, -0.5993897318840027, -1.0765659809112549, -0.48217564821243286, -0.5408588647842407, 0.4697497487068176, 0.486763060092926, ...
def eval ( self, interval _ id ) : print ('eval ( interval % d )'% interval _ id ) loss, acc = self. model. evaluate ( self. x _ test, self. y _ test, batch _ size = 128 ) print ( " accuracy : % f " % acc ) return acc
[ 0.0663435161113739, -1.0368679761886597, 0.27747035026550293, -0.3355446457862854, 0.3370741009712219, 0.649986743927002, 0.2686598002910614, -0.0284705962985754, -0.3436233103275299, -0.1320367306470871, 0.13993282616138458, 0.9827603697776794, -0.048503413796424866, 0.09361931681632996, ...
def get _ allref ( self ) : return self. _ _ userlist. keys ( )
[ -0.5078999400138855, -0.38903918862342834, 0.520656168460846, 0.5587851405143738, 0.2584070861339569, 0.8816594481468201, -0.7447239756584167, 0.17781397700309753, 0.40726253390312195, 0.11209774017333984, -0.46447309851646423, 1.2740623950958252, -1.1492416858673096, 1.2388417720794678, ...
def get _ next _ character ( input _ file ) : next _ char = input _ file. read ( 1 ) if next _ char is none : next _ char = " " return next _ char
[ 0.017062930390238762, -0.3560634255409241, 0.5393425822257996, 0.34339794516563416, -0.38578352332115173, 0.2394109070301056, 0.854956865310669, 0.2374418079853058, -0.6770971417427063, -0.83039391040802, 0.5424866676330566, 0.41962340474128723, -0.4647120535373688, -0.5734813809394836, ...
def _ clean _ up _ expired _ leases ( machine _ type ) : active = [ ] expired = [ ] for request in machine _ type. leases : if request. hostname and request. lease _ expiration _ ts < = utils. utcnow ( ) : logging. warning ('request id % s expired : \ nhostname : % s \ nexpiration : % s ', request. client _ request _ i...
[ -0.35885605216026306, -0.7765603065490723, 0.5713340640068054, -0.530090868473053, -0.1733693778514862, 0.40359026193618774, -1.373472809791565, 0.6575818061828613, -0.4789763391017914, 0.4457544982433319, 0.5022178888320923, 0.23627637326717377, 0.19941262900829315, 0.949522078037262, -...
def bio _ classification _ report ( y _ true, y _ pred, output _ dict = true ) : lb = labelbinarizer ( ) y _ true _ combined = lb. fit _ transform ( list ( chain. from _ iterable ( y _ true ) ) ) y _ pred _ combined = lb. transform ( list ( chain. from _ iterable ( y _ pred ) ) ) tagset = set ( lb. classes _ ) - { " o ...
[ 0.29404008388519287, -0.3777235448360443, 0.6176743507385254, -0.306765615940094, -0.07128196209669113, -0.46446266770362854, -0.4098556339740753, 0.21541728079319, -0.8553252220153809, 0.06096971780061722, 0.3615140914916992, 0.7368396520614624, 0.7005910277366638, 0.4093191623687744, -...
def test _ list _ decimal _ min _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 3. xsd ", instance = " nistdata / list / ...
[ 0.10769857466220856, -0.3492397665977478, 0.5071585774421692, 0.2707863450050354, -0.00442601228132844, -0.032471705228090286, -0.8407633304595947, -0.2391197830438614, 1.224751591682434, -0.17064893245697021, -0.9273896813392639, -0.23513120412826538, -0.4369203746318817, 0.06831193715333...
def test _ atomic _ language _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 4. xsd ", instance = " nistda...
[ 0.3767862617969513, -0.34766146540641785, 0.31815603375434875, 0.40679481625556946, -0.5312172770500183, 0.306184321641922, -0.28213754296302795, -0.11609812080860138, 0.5351767539978027, 0.5012803077697754, -0.2594365179538727, -0.30464956164360046, -0.6090145707130432, -0.594954133033752...
def register ( request ) : # only allow users to access register page if they are not logged in if not request. user. is _ anonymous : return redirect ( " user : profile " ) # disallow access to this page if open signup is disabled if not hasattr ( settings, " enable _ open _ signup " ) or not settings. enable _ open _...
[ -0.2784257233142853, 0.52836674451828, 0.7709884643554688, 0.6594268083572388, -0.09277528524398804, -0.2674891948699951, 0.3059842884540558, -0.2926523983478546, 0.22003811597824097, -0.3055145740509033, 0.09991119801998138, -0.4565529525279999, 0.18725603818893433, 0.07768894731998444, ...
def listdataassets ( annotations = none, include _ annotated _ by _ group = false, annotatable _ only = true, filter _ exp ='', limit = none ) : request = utils. getmessagesmodule ( ). datapoldataassetslistresourcenamesrequest ( annotations = annotations or [ ], includeannotatedbygroup = include _ annotated _ by _ grou...
[ -0.30239149928092957, 0.18880704045295715, 0.5354932546615601, -0.749309778213501, -0.7707819938659668, 0.37660273909568787, -0.058691468089818954, 0.06889814883470535, 1.106196641921997, -0.26241886615753174, 0.022884894162416458, 0.8669372797012329, 0.42335328459739685, -0.08866093307733...
def test _ atomic _ hex _ binary _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 5. xsd ", instance ...
[ -0.5980193018913269, -0.6208986639976501, 0.4735756516456604, 0.6173946261405945, -0.20693890750408173, 0.1465122103691101, 0.21182286739349365, -0.4527442455291748, -0.45005205273628235, 0.5811322927474976, -0.879051923751831, -0.5230536460876465, -0.5560801029205322, 0.6055006980895996, ...
def utility _ contains ( one _ contour, another _ contour ) : if not one _ contour. shape [ 0 ] > = 3 and another _ contour. shape [ 0 ] > = 3 : print ('invalid rectangle contour') return 0 one _ contour _ area = cv2. contourarea ( one _ contour ) one _ contour _ centroid = np. int32 ( np. mean ( one _ contour, axis = ...
[ 0.2770588994026184, -0.49683019518852234, 1.076107144355774, 0.5938825607299805, -0.4393341541290283, 0.02176404558122158, 0.6339333653450012, -0.34662970900535583, 0.4639514088630676, -0.041305746883153915, -0.5090734958648682, -0.1563100665807724, 0.016776464879512787, 0.4911890625953674...
def toggletablecellreadmode ( self, inputevent = none ) : speakrow = _ settingsmanager. getsetting ('readtablecellrow') _ settingsmanager. setsetting ('readtablecellrow ', not speakrow ) if not speakrow : line = messages. table _ mode _ row else : line = messages. table _ mode _ cell self. presentmessage ( line ) retur...
[ -0.1142185851931572, 0.3985457420349121, 0.7159779667854309, 0.4781853258609772, 0.10612708330154419, 0.6260056495666504, -0.1572507619857788, -0.24528296291828156, 0.2537654936313629, 0.26709967851638794, 0.6467664837837219, -0.4678749740123749, -0.40005287528038025, 0.06116904318332672, ...
def countplayers ( ) : # connect to the database conn = connect ( ) curs = conn. cursor ( ) # query the table players for the number of entries query = " select count ( * ) from players " curs. execute ( query ) # save the number of players found player _ count = curs. fetchall ( ) [ 0 ] [ 0 ] # close the connection an...
[ 0.1672314703464508, -0.19118632376194, 0.8543958067893982, -0.12121060490608215, 0.9699195027351379, -0.08731947839260101, 0.09578009694814682, 0.5486547350883484, -1.0880552530288696, 0.917864978313446, -0.38049641251564026, -0.5685110688209534, -1.0510585308074951, 0.3817596137523651, ...
def test _ atomic _ hex _ binary _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 5. xsd ", instance = " nistdata / ...
[ 0.2552183270454407, -0.24197211861610413, 0.3570369780063629, 0.37535029649734497, -0.010751459747552872, 0.08687920868396759, -0.02787662297487259, -0.26688340306282043, -0.3954586386680603, 0.28368842601776123, -0.8682836294174194, -0.6545701622962952, -0.5603182315826416, 0.746906459331...
def test _ encode _ character ( self ) : keyword ='train'plaintext ='e'cipher = vigenerecipher ( keyword ) actual = cipher. encode ( plaintext ) expected ='x'self. assertequal ( actual, expected )
[ 0.056150395423173904, -0.21163907647132874, 0.04580562561750412, 0.7868859171867371, 0.02741239406168461, 0.5592058897018433, -0.29423853754997253, 0.15554110705852509, 0.5805190205574036, -0.09014427661895752, -1.3232370615005493, 0.26483792066574097, -0.9097511768341064, -0.7409945726394...
def test _ loopuntil _ newcontract ( ) : # better make backup perhaps try : shutil. move ( file _ contract _ address, file _ contract _ address + ". backup " ) except : pass json. dump ( { " address " : " address - dummy one " }, open ( file _ contract _ address,'w') ) print ( " start loopuntil _ newcontract ( ) in its...
[ -0.17199936509132385, -0.2354242205619812, 0.8695508241653442, 0.04450317844748497, 0.44416120648384094, 0.43251854181289673, 0.18199105560779572, -0.5187406539916992, -0.03505421429872513, 0.06101424992084503, -0.4536357820034027, -0.14637918770313263, -0.2327156811952591, -0.106127969920...
def jse _ download ( self, download = true ) : if download : self. download _ data ('jse')
[ -0.11131385713815689, 0.12484563142061234, 0.3890490233898163, 0.9761329889297485, -0.5821688771247864, -0.17864316701889038, 0.3019568920135498, -0.5658323764801025, 0.473466157913208, 0.42037665843963623, 0.07132066786289215, 0.38419604301452637, 0.07893484830856323, 0.8854279518127441, ...
def daily ( self, pattern _ dict ) : if isinstance ( pattern _ dict, bool ) : pattern _ dict = { } pattern _ dict ['freq _ type'] ='daily'schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ schedule _ pattern ( pattern _ dict ) self. _ modify _ task _ properties ( )
[ -1.2161837816238403, 0.6393640041351318, 0.5480911731719971, 0.35320478677749634, 0.6453136801719666, 0.6130102872848511, 0.7993835210800171, 0.8299255967140198, -0.3280010521411896, -0.14360933005809784, -0.13331565260887146, -0.08924948424100876, 0.249550461769104, 0.06954790651798248, ...
def adnauseum ( self, x, y, gameboard, color, intervals ) : answers = [ ] for xint, yint in intervals : xtemp, ytemp = x + xint, y + yint while self. isinbounds ( xtemp, ytemp ) : # print ( str ( ( xtemp, ytemp ) ) + " is in bounds " ) target = gameboard. get ( ( xtemp, ytemp ), none ) if target is none : answers. appe...
[ -1.044066309928894, -0.468289852142334, 0.6990710496902466, -0.36637359857559204, -0.012107720598578453, 0.23049458861351013, -0.713348925113678, -1.3061299324035645, 0.4792981445789337, 0.17594565451145172, 0.24581855535507202, 0.021863797679543495, -0.10570316016674042, 0.146729931235313...
def flatreviewcopy ( self, inputevent ) : if self. flatreviewcontext : clipboard = gtk. clipboard. get ( gdk. atom. intern ( " clipboard ", false ) ) clipboard. set _ text ( self. currentreviewcontents, len ( self. currentreviewcontents ) ) self. presentmessage ( messages. flat _ review _ copied ) else : self. presentm...
[ -0.463752418756485, -0.5510400533676147, 0.45979243516921997, -0.48177337646484375, -0.953283429145813, 1.5483932495117188, -0.02547314576804638, 0.11296667903661728, 0.46410638093948364, 0.30623942613601685, 0.7116826772689819, -0.03516189381480217, -1.1435774564743042, -0.089541487395763...
def createlogicalinterface ( self, name, schemaid, description = none, alias = none ) : req = apiclient. alllogicalinterfacesurl % ( self. host, " / draft " ) body = { " name " : name, " schemaid " : schemaid } if description : body [ " description " ] = description if alias : body [ " alias " ] = alias resp = requests...
[ -0.09314261376857758, -0.25397688150405884, 0.6123014688491821, -0.19325457513332367, -0.5589212775230408, 0.8990162014961243, -1.0439143180847168, 0.24718467891216278, 0.5188621878623962, 0.28971266746520996, -0.9533007144927979, 0.31590837240219116, -1.727966547012329, 0.3607198596000671...
def _ _ init _ _ ( self, pwm _ period _ ms, duty _ cycle _ ms, enable ) : print pwm _ period _ ms print duty _ cycle _ ms self. pwm _ period _ ms = pwm _ period _ ms self. duty _ cycle _ ms = duty _ cycle _ ms self. enable = enable # c wrapper self. pwm _ lib = cdll. loadlibrary ( '. / pwm _ drv. so') self. pwm _ lib. ...
[ 0.08017831295728683, -0.3956393301486969, 0.6689491868019104, 0.18104012310504913, -0.31539180874824524, 1.018306851387024, 0.5001409649848938, 0.3904162049293518, 0.14908760786056519, -0.35479462146759033, 0.1908109039068222, 0.09178519994020462, -0.5013108253479004, 0.8401322364807129, ...
async def remote _ auto _ seat _ climate _ request ( self, seat _ id : int, enable : bool ) - > none : data = await self. _ send _ command ( " remote _ auto _ seat _ climate _ request ", auto _ seat _ position = seat _ id, auto _ climate _ on = enable, ) if data and data [ " response " ] [ " result " ] is true : params...
[ -0.6381447911262512, -0.25958722829818726, 0.666775107383728, 0.27634701132774353, -0.027427073568105698, 0.6433618068695068, -1.067165493965149, 0.2943130135536194, -0.7275161743164062, 0.7392603158950806, -0.2921484708786011, 1.4280242919921875, -0.9596837162971497, -0.07913327217102051,...
def get _ label _ value ( ax ) : x _ labels, y _ labels = [ ], [ ] xticks _ text = ax. get _ xticklabels ( ) xticks _ numbers = ax. get _ xticks ( ) for j in range ( len ( xticks _ text ) ) : if len ( xticks _ text [ j ]. get _ text ( ) ) > 0 : x _ labels. append ( xticks _ numbers [ j ] ) yticks _ text = ax. get _ yti...
[ -0.32575780153274536, -0.6149990558624268, 0.7685375213623047, -0.5772565603256226, -0.37863853573799133, 0.0868724137544632, 0.19510413706302643, -0.11493068188428879, -0.12327885627746582, 0.405009925365448, 0.07136591523885727, -0.12568838894367218, 0.3865913450717926, 0.814062833786010...
def write _ len ( self ) - > int : return enc _ read _ size
[ 0.3159444332122803, -0.1018083244562149, 0.4439454674720764, -0.5307945013046265, 0.8954418897628784, -0.041485920548439026, 0.9114719033241272, 0.2375796139240265, 0.005407916381955147, -0.17031700909137726, -0.30793309211730957, 0.04774043336510658, -0.24396732449531555, -0.5674393177032...
def test _ atomic _ base64 _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 2. xsd ...
[ 0.06006096303462982, -0.09780057519674301, 0.37175673246383667, 1.3905587196350098, -0.043086837977170944, 0.1799468994140625, -0.3510825037956238, -0.0029207144398242235, 0.004185338970273733, 0.3219046890735626, -0.5926336050033569, 0.13281288743019104, -0.2388550043106079, 0.17488998174...
def should _ mask ( key ) : return get _ component ( loggingmaskingpackage. component _ name ). should _ mask ( key )
[ -0.7628414034843445, 0.1966540813446045, 0.36422616243362427, 0.6274512410163879, 0.008756798692047596, -0.09921831637620926, -0.4768713712692261, -0.2589549422264099, 0.6766824126243591, 0.6067325472831726, -0.05146271362900734, 0.19761614501476288, -0.2957819700241089, 0.4545984864234924...
def get _ trades ( self, max _ id = none, count = none, instrument = none, ids = none ) : url = " { 0 } / { 1 } / accounts / { 2 } / trades ". format ( self. domain, self. api _ version, self. account _ id ) params = { " maxid " : int ( max _ id ) if max _ id is not none and max _ id > 0 else none, " count " : int ( co...
[ -0.5442719459533691, 0.8078804612159729, 0.5653465986251831, 0.15637023746967316, 0.9130101203918457, 0.0006474396213889122, -0.2607027292251587, 0.030954869464039803, -0.1612924039363861, -0.0831642672419548, -0.09691264480352402, 1.0432463884353638, -1.0553326606750488, -0.46690842509269...
def seek ( self, offset, whence = os. seek _ set ) : # type : ( int, int ) - > none if whence = = os. seek _ set : absolute _ offset = offset elif whence = = os. seek _ cur : absolute _ offset = self. _ uncompressed _ position + offset elif whence = = os. seek _ end : # determine and cache the uncompressed size of the ...
[ -0.3072461783885956, -0.03866640478372574, 1.0859720706939697, -0.40372830629348755, -0.47885364294052124, 0.05328049138188362, 0.521664023399353, -0.20078901946544647, -1.192735195159912, -0.7673743963241577, 0.47203877568244934, -0.07220052182674408, 0.010133588686585426, -0.881058871746...
def peak _ error _ days ( ) : query ='''select date ( time ), cast ( 100 * cast ( sum ( case when status not like'% 200 %'then 1 else 0 end ) as decimal ( 7, 2 ) ) / cast ( count ( id ) as decimal ( 7, 2 ) ) as decimal ( 7, 2 ) ) as percent _ errors from log group by date ( time ) having cast ( sum ( case when status n...
[ -0.6900621652603149, 0.6219562292098999, 0.6472965478897095, -0.13253331184387207, -0.3073384463787079, 0.09412675350904465, -0.5843721628189087, -0.5134537816047668, -0.17792803049087524, 0.6003705263137817, 1.0347895622253418, 0.5694942474365234, 0.9074772000312805, 0.4746287763118744, ...
def export _ thumb _ masks ( self, save _ to = ". ", size = 512 ) : for cls in self. masks. keys ( ) : self. export _ thumb _ mask ( cls, save _ to, size )
[ -1.7077736854553223, -0.4459284543991089, 0.3807762861251831, 1.2603204250335693, 1.1675240993499756, 0.020255202427506447, 1.3207340240478516, -1.1428568363189697, 0.8717270493507385, 0.21833644807338715, -1.3174080848693848, 0.4563767910003662, 0.7647217512130737, 1.2748937606811523, 0...
def getbpm ( self ) : return [ ( v [ 0 ], v [ 1 ] ) for v in self. bpm ]
[ -1.1280426979064941, -0.4547770619392395, 0.45974671840667725, 0.19784608483314514, 1.2651177644729614, -0.0746106207370758, -0.5639534592628479, -0.07772428542375565, 0.18470346927642822, 0.0338950976729393, -1.0278009176254272, 0.07326711714267731, -1.596413016319275, 0.5515303611755371,...
def step ( self, action ) : observation, reward, done, info = self. env. step ( action ) # convert x - y coordinates to angles polar _ observation = np. array ( [ atan ( observation [ 1 ] / observation [ 0 ] ), atan ( observation [ 3 ] / observation [ 2 ] ), observation [ 4 ], observation [ 5 ] ] ) # notice how we are ...
[ -1.2367454767227173, -0.3753252327442169, 0.4960399866104126, -0.7574812173843384, 0.3364786207675934, 0.3123953938484192, -0.1256774514913559, -0.5295521020889282, -0.09684336185455322, 0.376935750246048, -0.025620557367801666, -0.15796814858913422, 0.08447466790676117, -0.544012308120727...
def lunar _ to _ gre ( self, year : int, month : int, day : int, leap : bool = true ) - > date : leap _ month = self. _ get _ leap _ month ( year ) if leap else 15 span _ days = sum ( self. _ lunar _ month _ days ( year, m ) for m in range ( 1, month + ( month > leap _ month ) ) ) span _ days + = self. _ span _ days ( ...
[ 0.7614274621009827, 1.2327789068222046, 0.7094134092330933, -0.7594836354255676, -0.20942501723766327, 0.5968276262283325, -1.1287994384765625, -0.9309859871864319, 0.3215102553367615, -0.19237469136714935, 0.42876169085502625, 1.097147822380066, -0.4004548192024231, 0.7394717335700989, ...
def construct _ error _ function ( self, model _ output ) : if self. error _ function = ='loglikelyhood': self. model = t. sum ( model _ output ) - t. sum ( self. y * t. log ( model _ output + 0. 0000000000000000001 ) ) elif self. error _ function = ='mse': self. model = t. sum ( t. sqr ( model _ output - self. y ) )
[ -0.19172829389572144, -0.5460594892501831, 0.34527909755706787, 0.07990991324186325, -0.18346230685710907, -0.3134380877017975, 0.7161524295806885, -0.04131294786930084, -0.7020741105079651, -0.5774906873703003, -0.43856263160705566, 0.29140111804008484, 1.0506477355957031, 0.1917144358158...
def parse _ cbr _ key _ indicators ( document ) : indicators _ dict = { } soup = beautifulsoup ( document,'html. parser') currencies = soup. find ( " div ", { " class " : " key - indicator _ content offset - md - 2 " } ) currencies _ table = currencies. find ('tbody') for index, line in enumerate ( currencies _ table. ...
[ 0.19246922433376312, -0.3033483624458313, 0.6011988520622253, -1.2395912408828735, -1.0495692491531372, 0.3481883704662323, 0.3234003484249115, -0.3545209765434265, -0.9046591520309448, 1.3437305688858032, -0.4808938205242157, -0.42432835698127747, -0.37431904673576355, 0.7335527539253235,...
def reproject _ image _ into _ polar ( data, origin = none ) : ny, nx = data. shape [ : 2 ] if origin is none : origin _ x, origin _ y = nx / / 2, ny / / 2 r _ i, theta _ i = get _ polar _ axes ( data. shape, ny, nx ) theta _ grid, r _ grid = np. meshgrid ( theta _ i, r _ i ) # project the r and theta grid back into pi...
[ -0.6091400980949402, -0.34848475456237793, 0.7726846933364868, -0.0846419706940651, -0.27401748299598694, 0.21782714128494263, -0.005074669606983662, -0.07713381946086884, 0.5926557183265686, 0.13367274403572083, 0.48775389790534973, 0.03787021338939667, -0.5177610516548157, -0.45179468393...
def _ match ( pattern, limit ) : if pattern. endswith ('/') or pattern. endswith ('\ \') : pattern + ='*'# get the part of the pattern before the first globbing character. # for example scheme : / / path / foo * will become scheme : / / path / foo for # filesystems like gcs, or converted to scheme : / / path for filesy...
[ -0.3207564651966095, 0.31054922938346863, 0.8244038224220276, -1.0854666233062744, 0.3320278823375702, -0.7219362854957581, -0.13962578773498535, 0.6140208840370178, 0.47039830684661865, 0.11393959820270538, 0.5000451803207397, 0.39306724071502686, 0.34130120277404785, -0.4136023223400116,...
def data ( self ) : return self. _ buf [ : stunmsg _ c. stun _ msg _ len ( self. _ buf ) ]
[ -0.051183346658945084, 0.09681923687458038, 0.40676164627075195, -0.49464547634124756, 0.029078304767608643, 0.14183950424194336, 0.5416845083236694, -1.0248838663101196, 0.5314933061599731, -0.7003529071807861, -0.926620364189148, 0.5632036328315735, -0.6162352561950684, 0.038211598992347...
def removedatasetsfrom ( self, root ) : data = self. _ _ dataviewer. data ( ) if data is not none : if data. file is not none : # that's an approximation, is can't be used as h5py generates # to objects for each requests to a node if data. file. filename = = root. file. filename : self. _ _ dataviewer. setdata ( none )
[ -0.11971566081047058, -0.6757519245147705, 0.4942014515399933, -0.2079218029975891, -1.3228849172592163, -0.33298811316490173, 0.38520142436027527, -0.28131234645843506, -0.13781090080738068, -1.5242146253585815, 0.27519768476486206, 0.7485572695732117, -0.16844749450683594, 1.259167194366...
def setup ( self ) - > none : test _ stock _ obj _ a = stock. objects. create ( * * test _ stock _ a ) test _ stock _ obj _ b = stock. objects. create ( * * test _ stock _ b ) self. test _ stock _ a = test _ stock _ obj _ a. name self. test _ stock _ b = test _ stock _ obj _ b. name
[ -0.6162525415420532, -0.6291995048522949, 0.6180315017700195, -0.08680479973554611, 1.6041430234909058, -0.09612861275672913, 0.8028245568275452, -1.2196359634399414, -0.5409579277038574, 0.4060792922973633, -1.1234418153762817, -0.251179963350296, 0.2570793330669403, 0.5383362770080566, ...
def test _ get _ proper _ tracks ( ) : repo _ model = snapkubeletrepomodel ( ) repo _ model. version = " 1. 23 " assert repo _ model. tracks = = [ " 1. 23 / stable ", " 1. 23 / candidate ", " 1. 23 / beta ", " 1. 23 / edge ", ]
[ -0.1372646987438202, 0.18817953765392303, 0.42472732067108154, 0.9485631585121155, 0.8749504685401917, 1.3167780637741089, -0.7822332382202148, -0.146915465593338, -0.9750914573669434, 0.43821701407432556, -0.444047212600708, -1.1931394338607788, 0.17580924928188324, -0.20407424867153168, ...
def group _ clones ( self, define ='v _ j _ cdr3') : # make sure'define'is defined correctly if define! ='v _ j _ cdr3'and define! ='cdr3': print'the " define " parameter does not have an acceptable value : ', define return self. clone _ define = define # first gather unique clones, based on'define'clone _ counts = { }...
[ -0.09090791642665863, 0.7006465792655945, 0.7803917527198792, -0.01719723641872406, -0.5237528681755066, -0.1882634311914444, -0.07607529312372208, 0.15308518707752228, -0.5310338139533997, 0.8307031393051147, -0.1955614537000656, 0.7487847208976746, 0.5238334536552429, 0.47586607933044434...
def concat _ tiles ( self, img, tilepixel, move _ x, move _ y, paste _ x, paste _ y, lim1, corner = false, lim2 = none ) : if not corner : if tilepixel [ 0 ] [ lim1 [ 0 ] ] = = lim1 [ 1 ] : tile = image. new ( " rgb ", ( 1000, 1000 ) ) else : fn = self. tile _ fn _ for _ tile ( [ tilepixel [ 0 ] [ 0 ] + move _ x, tilep...
[ 0.1602851152420044, 0.12640732526779175, 0.8591157793998718, 0.07165729999542236, -0.646378219127655, 0.4038667678833008, -0.278886079788208, 0.2684779167175293, -0.06616950035095215, 1.0121103525161743, 0.7212487459182739, 0.44438567757606506, 0.18360452353954315, 0.1858838051557541, -0...
def path _ with _ base ( base _ url : str ) : def _ inner ( route : str, * args, * * kwargs ) - > urlpattern : return path ( f " { base _ url } / { route } ", * args, * * kwargs ) return _ inner
[ -0.05076621472835541, -0.3349171280860901, 0.5440081357955933, 0.00473862374201417, -0.5319399237632751, -0.02655228227376938, -0.20348875224590302, 0.29959702491760254, -0.18991409242153168, -0.29058393836021423, 0.031781453639268875, -0.31335946917533875, 0.07944197207689285, 0.291629135...
def activatedevicetypeconfiguration ( self, typeid ) : req = apiclient. draftdevicetypeurl % ( self. host, typeid ) body = { " operation " : " activate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " application / json " }, data = json. dumps ( body ), veri...
[ -2.4606239795684814, -0.3604331314563751, 0.36007773876190186, -0.42218083143234253, -0.278046578168869, -0.7073903679847717, 0.1389680951833725, -0.6543732285499573, -0.08915217220783234, 1.12808096408844, -1.2947369813919067, 0.9586617946624756, -0.8832322955131531, 0.2958880066871643, ...
def test _ atomic _ qname _ enumeration _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 1. xsd ", instance = " nistdata / atomic / qn...
[ -0.5184531807899475, -0.6094405055046082, 0.5185747146606445, -0.02191772498190403, -0.22401198744773865, 0.5079090595245361, -0.10069059580564499, -0.5394640564918518, 0.8071428537368774, 0.6858971118927002, -0.02462480030953884, -0.3727283179759979, -0.1520790457725525, -0.34672757983207...
def fetch _ ( this, path : str, rev : int = none, self : bool = true ) - > dict : return this. _ http. get ( path, rev = rev, self = self )
[ -0.31851398944854736, -0.20043721795082092, 0.6415167450904846, -0.5264500379562378, -1.2761121988296509, 0.08062377572059631, -0.6565048694610596, -0.4237648844718933, -0.8843331933021545, 0.03394034504890442, 0.1793300211429596, 0.4768655300140381, 0.09600083529949188, -0.735467612743377...
def compute _ vocab _ count ( sents ) : vocab = { } for sent in sents : for token in sent : increment _ count ( vocab, token [ 0 ] ) return vocab
[ 0.2810947597026825, -0.05581372603774071, 0.22553908824920654, 0.11910158395767212, -0.23149770498275757, -1.3511866331100464, 0.1432119905948639, 0.5277410745620728, 0.11377941817045212, 0.3741289973258972, -1.014676570892334, -0.25742965936660767, 0.4146761894226074, 0.7909369468688965, ...
def addchecker ( self, checker ) : self. checkers. append ( checker )
[ -0.693314254283905, -0.6139202117919922, 0.23818470537662506, 0.8909660577774048, 0.19627141952514648, 1.4751067161560059, -0.8191465735435486, 0.010416231118142605, -0.05576230213046074, -1.0022648572921753, 0.038694269955158234, -0.19224585592746735, -0.6124413013458252, 2.11925697326660...
def process _ image _ for _ heuristic _ af ( self, tile _ key ) : # the image from the dictionary self. img is provided as a numpy array # and already cropped to 512 x 512 pixels img = self. img [ tile _ key ] mean = int ( np. mean ( img ) ) # recast as int16 and subtract mean img = img. astype ( np. int16 ) img - = me...
[ -0.28259629011154175, 0.3173741400241852, 0.664945662021637, -0.03374972566962242, -0.26069873571395874, -0.5854644179344177, 0.8143951892852783, 0.6653175950050354, 0.14978525042533875, 0.8739542365074158, 0.21703681349754333, 0.2806940972805023, 0.44891223311424255, 1.316112756729126, ...
def get _ gunw _ attr ( filename : union [ str, path ] ) - > dict : # use gdal to read gunw netcdf ds = gdal. open ( filename, gdal. ga _ readonly ) # get gunw raster attributes nodata = ds. getrasterband ( 1 ). getnodatavalue ( ) # get raster geographical information transform = ds. getgeotransform ( ) xsize = ds. ras...
[ -0.16653715074062347, -0.466884046792984, 0.5723557472229004, -1.342642903327942, -0.603293776512146, 0.4937624931335449, 0.5969916582107544, -0.36074015498161316, -1.6127794981002808, -0.18829011917114258, -0.24399049580097198, -0.04117118567228317, 0.305843710899353, 1.0069750547409058, ...
def tokenize ( self, path ) : assert os. path. exists ( path ) # add words to the dictionary with open ( path,'r') as f : tokens = 0 for line in f : words = line. split ( ) + ['< eos >'] tokens + = len ( words ) for word in words : self. dictionary. add _ word ( word ) # tokenize file content with open ( path,'r') as f...
[ -0.33944034576416016, 0.028674935922026634, 0.6826763153076172, -1.3794761896133423, 0.24845467507839203, -0.611469566822052, -0.046799737960100174, 0.8967484831809998, -0.8672041296958923, 0.6627349853515625, -0.747913658618927, -0.4176088869571686, 0.08112449198961258, 0.3860481381416321...
def async _ get _ discovered _ device ( hass : homeassistant, uuid : str ) - > sensemedevice : discovery : sensemediscovery = hass. data [ domain ] [ discovery ] devices : list [ sensemedevice ] = discovery. devices for discovered _ device in devices : if discovered _ device. uuid = = uuid : return discovered _ device ...
[ 0.13400372862815857, 0.043659232556819916, 0.44328561425209045, 0.7270709872245789, 0.3479931056499481, -0.7678778767585754, -0.3442181348800659, -0.4080656170845032, 0.5011615753173828, -0.4739862382411957, 0.5662316083908081, 0.562602698802948, 0.31169918179512024, 0.30474042892456055, ...
def _ _ init _ _ ( self, n : int, bias : union [ float, torch. tensor ] = 0. 0, tau : float = 1, activation : union [ str, callable ] = " relu ", * * kwargs ) : super ( neurons, self ). _ _ init _ _ ( * * kwargs ) self. n = n self. tau = tau if isinstance ( bias, torch. tensor ) : assert len ( bias ) = = n,'bias dimens...
[ -0.04997944459319115, 0.13275764882564545, 0.49104177951812744, 0.37074014544487, 0.33212247490882874, -0.7552743554115295, 0.10301288217306137, -0.1321481615304947, 0.22680827975273132, -0.5181812644004822, -0.8993549346923828, 0.358987957239151, 0.400388240814209, 0.034112513065338135, ...
def histo _ lt _ params _ and _ pulls ( e0, lt, e0s, ue0s, lts, ults, bin _ e0s = 50, bin _ lts = 50, bin _ pull = 50, range _ e0s = ( 9950, 10050 ), range _ lts = ( 1900, 2100 ), range _ pull = ( - 5, 5 ), figsize = ( 10, 10 ) ) : fig = plt. figure ( figsize = figsize ) ax = fig. add _ subplot ( 2, 2, 1 ) pltlabels = ...
[ 0.8821175694465637, 0.09263855218887329, 0.8711134195327759, -0.8256273865699768, 0.3174433410167694, 0.4056864082813263, 0.4065726697444916, 0.6608984470367432, -0.2648630738258362, -0.4178648889064789, -0.06964576244354248, 0.4364556670188904, 0.7917664051055908, 0.7506889700889587, 0....
def fetch _ data _ with _ moabb ( dataset _ name, subject _ ids ) : # todo : update path to where moabb downloads / looks for the data dataset = _ find _ dataset _ in _ moabb ( dataset _ name ) subject _ id = [ subject _ ids ] if isinstance ( subject _ ids, int ) else subject _ ids return _ fetch _ and _ unpack _ moabb...
[ 0.1075291708111763, -0.7323885560035706, 0.3196868896484375, 0.31049373745918274, -0.9429545402526855, -0.29212701320648193, -1.5060570240020752, -0.9871046543121338, 0.2980428636074066, 0.2441442310810089, 0.9622558355331421, 0.6063966155052185, 0.0924619808793068, 0.5060314536094666, -...
def _ assemble _ segment _ length _ tensor ( self, ux _ s, steps _ per _ example, ignore _ division _ by _ number _ of _ steps : bool = false ) : num _ steps, batch _ size, dtype, device = len ( ux _ s [ 0 ] ), ux _ s [ 0 ] [ 0 ]. size ( 0 ), ux _ s [ 0 ] [ 0 ]. dtype, ux _ s [ 0 ] [ 0 ]. device x _ time = self. _ asse...
[ 0.19765418767929077, 0.10391281545162201, 0.5399828553199768, -0.583095908164978, -0.17936980724334717, 0.21637633442878723, 0.6246235370635986, 0.8567680716514587, 0.037740711122751236, 0.8701213598251343, -0.09377989172935486, -0.6139826774597168, 1.0573134422302246, -0.5649335980415344,...
def save _ checkpoint ( state, is _ best, filename = " checkpoint. pth. tar " ) : torch. save ( state, filename )
[ 0.3131864666938782, -0.0418953038752079, 0.057851843535900116, 1.0953487157821655, 0.8498850464820862, 0.7204593420028687, -0.11663858592510223, 0.9860105514526367, -0.824377715587616, 0.18969327211380005, -0.7509920597076416, -0.5853350162506104, 0.8155826926231384, -0.6750615239143372, ...
def processkeyboardevent ( self, keyboardevent ) : return script. script. processkeyboardevent ( self, keyboardevent )
[ 0.24944160878658295, -0.10255925357341766, 0.6229159235954285, 0.8987568020820618, -0.5197519063949585, -0.2746320962905884, 0.5633463859558105, -0.3294157087802887, 0.672158420085907, 0.674126923084259, -0.8172918558120728, 0.3163464665412903, -0.3202818036079407, 0.6834636926651001, 0....
def _ _ init _ _ ( self, filename : str = " / cache / processed _ { origname } ", * * kwargs : any ) : imageprocessor. _ _ init _ _ ( self, * * kwargs ) # store self. _ formatter = filenameformatter ( filename )
[ -0.4956047534942627, -0.7055661082267761, 0.48525938391685486, -0.2779492735862732, -1.0000488758087158, -0.5654546618461609, 0.4675261080265045, 0.7185543179512024, -0.19816674292087555, -0.2834029793739319, -0.32802489399909973, 0.2979786992073059, 0.49647852778434753, 1.1038587093353271...
def panbraillerightonechar ( self, inputevent = none ) : self. panbrailleright ( inputevent, 1 )
[ 0.4159937798976898, -0.4095243513584137, 0.37202441692352295, 1.1629011631011963, -0.8092729449272156, 0.8498861193656921, 0.7646191716194153, -0.5594936013221741, 0.5296816825866699, -0.361685574054718, -0.9506322741508484, 0.45466846227645874, -1.5441019535064697, 0.7127651572227478, 0...
def haversine ( lonlat1, lonlat2 ) : # convert decimal degrees to radians lat1, lon1 = lonlat1 lat2, lon2 = lonlat2 lon1, lat1, lon2, lat2 = map ( radians, [ lon1, lat1, lon2, lat2 ] ) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin ( dlat / 2 ) * * 2 + cos ( lat1 ) * cos ( lat2 ) * sin ( dlon / 2 ) *...
[ 0.6385855674743652, -0.34512263536453247, 0.9366917014122009, -0.856013298034668, -0.6938007473945618, 0.2050429731607437, -1.3340904712677002, 0.20555421710014343, -0.5951275825500488, -0.16197863221168518, -0.3851916491985321, 0.03384218364953995, 0.014658194966614246, -0.562926828861236...
def simfn ( fnsim, embeddings, leftop, rightop, op ='' ) : embedding, relationl, relationr = parse _ embeddings ( embeddings ) # inputs inpr, inpl, inpo = s. csr _ matrix ('inpr'), s. csr _ matrix ('inpl'), s. csr _ matrix ('inpo') # graph lhs = s. dot ( embedding. e, inpl ). t rhs = s. dot ( embedding. e, inpr ). t re...
[ 0.6654061675071716, 0.08220057934522629, 0.8096048831939697, 0.350848913192749, -0.10434967279434204, -0.4875473380088806, 0.4460078775882721, 0.29920971393585205, 0.5616734027862549, 0.5084717869758606, -0.5414211750030518, -0.24436135590076447, 0.18012118339538574, -1.2530369758605957, ...
def deduplicatepeaks ( self, peaks, bounds ) : # throw out chosen peaks with mostly overlapping bounds by only keeping the highest intensity peak. pints = [ self. i [ p ] for p in peaks ] while pints : # get max peak - - if bounds too wide or too narrow, throw out. continue. i = pints. index ( max ( pints ) ) width = s...
[ -0.08237678557634354, -0.09588208794593811, 0.7239813208580017, -0.10975240170955658, -0.09057685732841492, 0.29704055190086365, 0.5390449166297913, -0.49254220724105835, 0.35303816199302673, 0.31574714183807373, 0.08725809305906296, 0.42745041847229004, -0.6605666875839233, 0.202173277735...
def as _ dict ( input _ base _ path ) : file _ paths _ to _ code _ properties = { } for file _ path, file _ name in get _ directory _ structure ( input _ base _ path ) : path _ to _ python _ file = os. path. join ( file _ path, file _ name ) code _ properties = { } with open ( path _ to _ python _ file ) as python _ fi...
[ -0.10909420996904373, -0.9370905160903931, 0.6564260721206665, -0.6522648930549622, -0.5126366019248962, 0.1756855696439743, 0.8618940711021423, 0.13241899013519287, -0.9121677279472351, 0.2665513753890991, -0.49762701988220215, -0.04352383688092232, -0.10297448188066483, 0.926626384258270...
def fits ( self, x, y, with _ orientation = none ) : will _ fit = false orientation = none if self. polygon. isinside ( x, y ) : will _ fit = true orientation = " xy " if self. polygon. isinside ( y, x ) : will _ fit = true orientation = " yx " if with _ orientation : return will _ fit, orientation return will _ fit
[ -0.204069584608078, -0.33399641513824463, 0.7078413367271423, -0.23427535593509674, -0.5515393018722534, 0.4660419523715973, -0.8978384733200073, -1.175249695777893, 0.010331712663173676, -0.10125572979450226, -0.5523388385772705, 0.2130986899137497, -0.05360483378171921, -0.34393343329429...
def test _ run _ tests _ returns _ false ( self ) : self. testrun. base _ dir = self. workdir # inject our temp folder path = self. workdir test _ package = " my - tests " executor = mock _ executor ( self. testrun, true, none, hostname = " hostname ", testrun _ timeout = 60 ) status = executor. _ run _ tests ( test _ ...
[ -0.7968348860740662, 0.2548728585243225, 0.5161117911338806, -0.17127256095409393, 0.36525553464889526, 0.46010032296180725, 0.2530367970466614, 0.4899531602859497, -0.18238401412963867, -0.8173039555549622, -0.0006588237592950463, -0.4829474091529846, -0.8802932500839233, 0.43984949588775...