text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def replace ( self, resolved _ lookups ) : replacements = { } for lookup, value in resolved _ lookups. iteritems ( ) : replacements [ lookup. raw ] = value self. _ resolved _ value = resolve ( self. value, replacements ) | [
-0.48088064789772034,
-0.4792437255382538,
0.29722273349761963,
0.05922975391149521,
-0.05561470612883568,
-0.20587775111198425,
-0.8765796422958374,
1.4653592109680176,
-0.03172075375914574,
-1.355552315711975,
-1.6264771223068237,
-0.9987471699714661,
0.005390376318246126,
-0.15693527460... |
def default _ config ( self ) - > configt : props : configt = { " bootstrap. servers " : f " { self. host } : { self. port } ", } if self. sasl : props. update ( { " sasl. mechanisms " : " plain ", " security. protocol " : " sasl _ ssl ", " sasl. username " : self. username, " sasl. password " : self. password, } ) ret... | [
0.13717755675315857,
0.6101303696632385,
0.41212671995162964,
-0.063759945333004,
-0.4230937063694,
-0.10325785726308823,
-0.5235487222671509,
0.057530082762241364,
0.32489243149757385,
-0.16498388350009918,
-0.582520067691803,
-0.21024832129478455,
-0.14437063038349152,
0.7351942658424377... |
def import _ wsgi ( wsgi _ path ) : _ path = path ( wsgi _ path ). abspath ( ) if not _ path. exists ( ) : raise runtimeerror ('% s does not exist'% _ path ) wsgi _ filename = _ path. basename ( ). splitext ( ) [ 0 ] wsgi _ dir = _ path. parent # expose the project dir sys. path. append ( wsgi _ dir ) _ file, pathname,... | [
-0.05737916752696037,
-0.5325527787208557,
0.561269223690033,
-0.2156190425157547,
-0.5697203874588013,
0.9075338840484619,
1.140001654624939,
-1.4755377769470215,
-0.031606726348400116,
0.9311384558677673,
0.27903103828430176,
1.110257863998413,
-0.7969225645065308,
-0.3919239044189453,
... |
def cleanse _ data ( dataset ) : if isinstance ( dataset, list ) : return [ str. lower ( i. replace ( " ", " " ) ) for i in dataset ] else : if isinstance ( dataset, str ) : return str. lower ( dataset. replace ( " ", " " ) ) else : return'' | [
0.2940777540206909,
-0.10073266178369522,
0.4973665177822113,
-0.6877501606941223,
-0.2650795578956604,
0.09257843345403671,
-1.5195550918579102,
0.2538169324398041,
0.6320106983184814,
0.4164064824581146,
-0.1347009837627411,
0.7931896448135376,
-0.9593981504440308,
0.7719842195510864,
... |
def parse _ splign _ output _ default ( splignoutputname ) : file = open ( splignoutputname, " r " ) blocklist = [ ] for line in file. readlines ( ) : if'no alignment was found'in line or " > - 1 " in line : break else : if ( " exon " in line ) : location = line. split ( " ( " ) [ 1 ]. split ( " ) " ) [ 0 ] identity = ... | [
0.8942375779151917,
-1.4558125734329224,
0.8227814435958862,
0.3159226179122925,
-0.570269763469696,
-0.21710838377475739,
0.531272292137146,
0.8763422966003418,
0.1727818101644516,
0.2653462886810303,
-1.105134129524231,
-0.9781432151794434,
-0.5528302192687988,
0.022060872986912727,
-0... |
def test _ atomic _ id _ white _ space _ nistxml _ sv _ iv _ atomic _ id _ white _ space _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - whitespace - 1. xsd ", instance = " nistdata / atomic / id / schema... | [
-0.2285628765821457,
-0.47712182998657227,
0.41857412457466125,
0.14664489030838013,
-0.32522034645080566,
0.03141806647181511,
0.22088518738746643,
-0.5582415461540222,
0.5024471879005432,
0.7409014105796814,
0.1428045630455017,
0.7239827513694763,
0.25737321376800537,
1.0087926387786865,... |
async def create _ db _ mock ( app ) : app [ " pool " ] = asynctest. mock. mock ( asyncpg. create _ pool ( ) ) return app | [
-0.6131475567817688,
1.0254883766174316,
0.3487308621406555,
-0.038686905056238174,
0.9217897057533264,
0.6942704319953918,
-0.09738706052303314,
0.06608344614505768,
0.0029026058036834,
0.7275763750076294,
-0.06810387223958969,
-0.2194480150938034,
-0.6670191884040833,
0.1347379833459854,... |
def save ( self, filename ) : with open ( filename,'w') as f : json. dump ( self. json ( ), f, indent = 4 ) | [
-1.1870392560958862,
-1.4776625633239746,
0.306185781955719,
-0.6960899233818054,
0.6032407879829407,
0.22280335426330566,
0.4334404170513153,
0.11796325445175171,
-0.8111157417297363,
0.05912717804312706,
-1.3728468418121338,
0.22017376124858856,
0.05708511918783188,
0.48077261447906494,
... |
def get _ player _ num _ of _ dealer ( self ) : return self. dealer _ num | [
-1.4421756267547607,
-0.7070351243019104,
0.7227704524993896,
0.94869464635849,
0.5271466374397278,
-0.804416835308075,
0.961745023727417,
0.5395085215568542,
-0.027236031368374825,
-1.238730549812317,
-0.06209375709295273,
0.33418551087379456,
0.40568000078201294,
0.28385064005851746,
1... |
def get _ empty _ tiles ( self ) : result = [ ] for row in range ( self. _ height ) : for col in range ( self. _ width ) : if self. _ grid [ row ] [ col ] = = 0 : result. append ( ( row, col ) ) return result | [
-1.2045137882232666,
-0.016694853082299232,
0.5650476217269897,
0.06774375587701797,
0.15008555352687836,
0.027849523350596428,
0.2124961018562317,
0.04425425827503204,
-0.2079683393239975,
0.37570980191230774,
-0.8004500865936279,
-0.2477719485759735,
-1.044325590133667,
1.025143265724182... |
def exchange ( cls, spin _ particle1, spin _ particle2, j ) : identity = qt. identity ( [ 2 * i + 1 for i in spin _ particle1. spin _ list ] ) return - j * ( 0. 5 * identity + 2 * cls. mkh2 ( spin _ particle1, spin _ particle2, identity ) ) | [
0.20819038152694702,
-0.24041275680065155,
0.3745942711830139,
0.4834670126438141,
-0.5123101472854614,
0.3017697334289551,
-0.3456181585788727,
0.45004555583000183,
0.08081796765327454,
0.9417706727981567,
-0.8703591823577881,
0.8422822952270508,
-0.9802932739257812,
0.2096540480852127,
... |
def sum _ diffs ( n ) : counter = 0 if n < 10 : return counter else : digi _ first, digi _ second = n % 10, ( n / / 10 ) % 10 li = [ digi _ first, digi _ second ] return max ( li ) - min ( li ) + sum _ diffs ( n / / 10 ) | [
-0.31588080525398254,
1.0779930353164673,
0.4949527680873871,
-0.4958227574825287,
0.17709821462631226,
-0.39576274156570435,
0.9387980699539185,
-0.4706021547317505,
0.8820279836654663,
-0.6310297250747681,
-1.262195110321045,
-0.4135870933532715,
-0.24167831242084503,
0.6813303232192993,... |
def deleteqospolicy ( ctx, # mandatory main parameter qospolicyid ) : " " " the qos settings for all volumes created of modified with this policy are unaffected. " " " cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " qospolicyid = " " " + str ( qospolicyid ) + " " " ; " " " + " " ) tr... | [
-0.19048383831977844,
-0.771432638168335,
0.5754445791244507,
-0.12257196009159088,
0.02745952643454075,
0.7677646279335022,
0.4028182327747345,
-0.8041070699691772,
1.2892754077911377,
0.2469208985567093,
0.06735356897115707,
0.7502032518386841,
-0.7859348654747009,
0.05204978957772255,
... |
def ud _ grade _ ipix ( ipix, nside _ in, nside _ out, nest = false ) : if nside _ in = = nside _ out : return ipix elif nside _ in < nside _ out : return u _ grade _ ipix ( ipix, nside _ in, nside _ out, nest ) elif nside _ in > nside _ out : return d _ grade _ ipix ( ipix, nside _ in, nside _ out, nest ) | [
-1.195878028869629,
0.3254399597644806,
0.6925253868103027,
-0.39343297481536865,
-0.910915195941925,
0.3065374493598938,
0.06127365306019783,
-0.33173394203186035,
-0.3251078724861145,
-0.4345676004886627,
0.3261697590351105,
0.5451532602310181,
-0.21139304339885712,
-0.7141386866569519,
... |
def test _ toolkit _ in _ controlpanel ( self ) : self. controlpanel = gettoolbyname ( self. portal,'portal _ controlpanel') self. asserttrue ('propertyshelf _ toolkit'in [ a. getaction ( self ) ['id'] for a in self. controlpanel. listactions ( ) ] ) | [
0.5842300057411194,
-0.267007052898407,
0.15137574076652527,
0.2567662000656128,
1.2589941024780273,
0.5805334448814392,
0.17948457598686218,
-1.0253195762634277,
-0.1289389282464981,
-0.4317270517349243,
-0.19406302273273468,
-0.2557237446308136,
-0.4110206961631775,
0.24278733134269714,
... |
def parafac _ als ( inputdir, outputdir, numexec, r, maxiter, minerrdelta, regularization, regulparam, sketching, randomseed ) : global decompmode global i, j, k global a, b global eye global sketchingrowsc global sketchingrowsa global sketchingrowsb global sketchingrate global errorcalcsketchingrate global mabrates, m... | [
0.9610856771469116,
-0.47426506876945496,
0.6391624212265015,
0.20765195786952972,
-0.2880438566207886,
-0.23343688249588013,
1.029611349105835,
0.49382588267326355,
-0.37342405319213867,
-0.3050610423088074,
0.2933432459831238,
1.1429409980773926,
0.6123787760734558,
0.6203600764274597,
... |
def test _ challenge _ disbursement _ notification ( app ) : with app. app _ context ( ) : db = get _ db ( ) # insert a challenge disbursement and check that a notificaiton is created entities = { " reward _ manager _ txs " : [ { " slot " : i, " signature " : str ( i ) } for i in range ( 5 ) ], } populate _ mock _ db (... | [
0.34661221504211426,
0.41105541586875916,
0.5606086850166321,
-0.1612888127565384,
0.550141453742981,
0.15748070180416107,
0.2507140338420868,
0.14078238606452942,
0.00951685942709446,
0.5867425799369812,
-0.7856204509735107,
-1.224653720855713,
0.34103477001190186,
-0.08209231495857239,
... |
def sentry _ mode _ available ( self ) - > bool : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " sentry _ mode _ available " ) | [
-0.7368229031562805,
-0.037019435316324234,
0.2660068869590759,
-0.0011934107169508934,
0.4693075120449066,
0.03502609208226204,
-0.7753821015357971,
-0.009144184179604053,
-0.14276394248008728,
1.439395785331726,
-0.5681296586990356,
0.17627288401126862,
0.017930731177330017,
-0.145819649... |
def dateparsecsv ( nfile, ofile ) : with open ( ofile,'w') as outfile : writer = csv. writer ( outfile, delimiter = ',') writer. writerow ( ['lastname ','firstname ','uin ','apptmade ','apptstart ','apptend ','meeting _ loc'] ) with open ( nfile,'rb') as infile : reader = csv. reader ( infile, delimiter = ',') next ( r... | [
0.20162247121334076,
0.08137670159339905,
0.7971053719520569,
0.016397152096033096,
-0.4609668254852295,
0.5719636082649231,
0.284408837556839,
0.1052110344171524,
-0.10578072816133499,
-0.01641124114394188,
0.012028532102704048,
-0.2606026232242584,
-0.246095210313797,
0.00099873857107013... |
def filter _ response _ headers ( response ) : filtered _ headers = response [ " headers " ] filtered _ headers = { k : v for k, v in filtered _ headers. items ( ) if k. lower ( ) not in filter _ headers _ set } filtered _ headers = { k : v for k, v in filtered _ headers. items ( ) if not k. lower ( ). startswith ( " x... | [
0.027951525524258614,
-0.6429571509361267,
0.5761891007423401,
-0.4314195215702057,
-0.6515396237373352,
-0.2061571478843689,
-0.5495501756668091,
-1.1091797351837158,
0.30256515741348267,
0.4878648817539215,
-0.2205548882484436,
-0.010657318867743015,
-0.614739179611206,
-1.03677475452423... |
def login _ required ( f ) : @ wraps ( f ) def decorated _ function ( * args, * * kwargs ) : if session. get ( " user _ id " ) is none : return redirect ( url _ for ( " login " ) ) return f ( * args, * * kwargs ) return decorated _ function | [
-0.8723551630973816,
-0.5369812846183777,
0.7974133491516113,
0.6252665519714355,
-0.009414583444595337,
0.3490646779537201,
-0.4056134521961212,
-0.23951366543769836,
1.1592662334442139,
-0.3940201699733734,
0.6973356604576111,
0.6246896982192993,
1.0150927305221558,
0.0906146839261055,
... |
def test _ submit _ record _ rejection _ id _ dne ( ) : fake _ id = " cve - 0000 - 0000 " with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / rejectbody. json') as json _ file : data = json. load ( json _ file ) res = requests. post ( f'{ env. awg _ base _ url } { cve _ url } / { fake _ id } / reject ... | [
-0.5745276212692261,
1.2230780124664307,
0.5633602738380432,
-0.31327396631240845,
0.30508625507354736,
0.44625911116600037,
-0.8482885360717773,
-0.3542018234729767,
-0.2128295600414276,
0.43962809443473816,
-1.1259052753448486,
1.0115634202957153,
-0.717387855052948,
-0.10329897701740265... |
def boxplot _ randomreduce ( ) : for q in ['x ','y'] : fig = plt. subplots ( figsize = ( 7, 3 ) ) cooling ='linear'error _ method ='mean squared'filename ='sa _'+ cooling +'_'+ error _ method +'_ removed _ data _'+ q + '. csv'with open ( filename ) as csvfile : reader = csv. reader ( csvfile, delimiter = ',') errors = ... | [
0.612040638923645,
0.5719881653785706,
0.8783645033836365,
-0.723438560962677,
-0.3126737177371979,
0.6650459170341492,
0.39420437812805176,
-0.6940733194351196,
0.023365672677755356,
0.4669605791568756,
0.0015733427135273814,
0.6360243558883667,
-0.06460853666067123,
0.5807328820228577,
... |
def test _ atomic _ any _ uri _ min _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 2. xsd ", instance = " nistdata... | [
-0.07676301151514053,
-0.8718405365943909,
0.5108935236930847,
1.1000360250473022,
-0.3775041699409485,
-0.17567181587219238,
-0.35145631432533264,
-0.12999312579631805,
-0.00501194316893816,
-0.3572266399860382,
0.1625906229019165,
0.3076914846897125,
-0.14033180475234985,
0.3559711575508... |
def panbrailleright ( self, inputevent = none, panamount = 0 ) : if self. flatreviewcontext : if self. isbrailleendshowing ( ) : self. flatreviewcontext. goend ( flat _ review. context. line ) self. reviewnextcharacter ( inputevent ) else : self. panbrailleindirection ( panamount, pantoleft = false ) # this will update... | [
0.2524148225784302,
-0.45008349418640137,
0.7349806427955627,
-0.02070438675582409,
-0.8499664664268494,
0.4150446057319641,
0.13666920363903046,
0.06518258154392242,
0.3576716184616089,
-0.24031642079353333,
0.04054248705506325,
0.10134560614824295,
-0.8133788108825684,
0.5536817908287048... |
def testremovingindexedmode ( self ) : ssd = self. added ( ) op = iecorescene. removesmoothskinninginfluencesop ( ) op. parameters ( ) ['input']. setvalue ( ssd ) op. parameters ( ) ['mode']. setvalue ( iecorescene. removesmoothskinninginfluencesop. mode. indexed ) op. parameters ( ) ['indices']. setvalue ( iecore. int... | [
-0.08133626729249954,
0.0938325896859169,
0.7043530941009521,
-0.5779016017913818,
0.11879520118236542,
0.5312591791152954,
1.3112645149230957,
0.33255481719970703,
0.3295196294784546,
-0.42535853385925293,
-0.8646374344825745,
0.0008791405707597733,
-0.5520254373550415,
-0.728581845760345... |
def copy _ to _ default ( self, profile ) : if not os. path. exists ( self. creds _ dir ) : os. makedirs ( self. creds _ dir ) config = safeconfigparser ( ) if os. path. isfile ( self. creds _ file ) : config. read ( self. creds _ file ) if not config. has _ section ( profile ) : config. add _ section ( profile ) if co... | [
0.21174204349517822,
-0.5103341341018677,
0.771044909954071,
-0.09197427332401276,
0.7332468032836914,
0.49718397855758667,
0.5000948309898376,
-0.010122100822627544,
-0.1449545919895172,
0.5985958576202393,
-0.6982979774475098,
-0.08924755454063416,
-0.18307411670684814,
0.225503295660018... |
def text _ from _ html ( html ) : texts = html. findall ( text = true ) visible _ texts = filter ( tag _ visible, texts ) return''. join ( t. strip ( ) for t in visible _ texts ) | [
0.5339018702507019,
0.40362346172332764,
0.43373286724090576,
-0.09126956015825272,
-0.7767196297645569,
-0.262132465839386,
-0.1116454154253006,
0.037398919463157654,
-0.09315728396177292,
1.650160789489746,
-1.0540132522583008,
-0.5435007214546204,
-0.018103590235114098,
0.35471594333648... |
def mssne _ grad ( x, sigma _ ij, n, n _ components, p _ h, t _ h, n _ perp ) : global n _ eps _ np _ float64 x = np. reshape ( a = x, newshape = ( n, n _ components ) ) # evaluating the gradient grad = mssne _ eval _ grad ( n = n, n _ perp = n _ perp, t _ h = t _ h, np _ eps = n _ eps _ np _ float64, arr _ ones = np. ... | [
-0.13687631487846375,
0.5562867522239685,
0.8202874660491943,
-0.9663999080657959,
-0.5356383919715881,
-0.11256984621286392,
-0.7082144618034363,
0.6882972121238708,
-0.2721293568611145,
0.3859153389930725,
-0.28813350200653076,
0.10597161203622818,
0.1837061643600464,
0.2230006605386734,... |
def update ( self, namespace _ dict = none, * * kwargs ) : if namespace _ dict is none : namespace _ dict = { } namespace _ dict. update ( kwargs ) for key, value in namespace _ dict. iteritems ( ) : setattr ( self, key, value ) | [
-0.7153708338737488,
-0.7414673566818237,
0.23049138486385345,
-0.6778477430343628,
-1.0466517210006714,
0.2700587809085846,
-1.240567684173584,
-0.002950722584500909,
0.8305383324623108,
0.03596978262066841,
-0.6136279106140137,
0.02619374543428421,
-0.3287659287452698,
1.4443777799606323... |
def run _ modl _ fit ( tup ) : # modl. fit ( summarize = false ) modl, logfile = tup lfh = open ( logfile,'a') sys. stdout = lfh # write fit error messages to log for later parsing if'twogroup'in modl. formula : modl. fit ( factors = {'twogroup': ['ctrl ','trmt'] }, summarize = false ) elif'trigroup'in modl. formula : ... | [
-0.025863109156489372,
-0.660798192024231,
0.6448864340782166,
-0.07731789350509644,
-0.32945629954338074,
0.5968590974807739,
0.7937936782836914,
-0.030422238633036613,
0.004404932260513306,
-0.5664625763893127,
0.47173941135406494,
-0.13386699557304382,
-0.5068943500518799,
0.02582896128... |
def parent _ update _ tweets _ based _ on _ query ( self ) : print ( " hello from run _ tweet _ from _ query " ) # try : # self. insert _ query ( ) # except exception as e : # pass rows _ query = self. sql. get _ data ('select * from query where query _ id = { } '. format ( self. query _ id ) ) for row in rows _ query ... | [
0.2451845407485962,
-0.32296738028526306,
0.7238877415657043,
-0.21114042401313782,
-0.09605789929628372,
0.053720034658908844,
0.04332824796438217,
-0.04128917679190636,
-0.7179020047187805,
0.24599295854568481,
0.25255802273750305,
0.5256231427192688,
0.13684463500976562,
1.2422741651535... |
def getstats ( ctx, # mandatory main parameter volumeid ) : cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " volumeid = " " " + str ( volumeid ) + " " " ; " " " + " " ) try : _ getvolumestatsresult = ctx. element. get _ volume _ stats ( volume _ id = volumeid ) except common. apiserve... | [
-0.2570423185825348,
-0.2065025269985199,
0.8868986964225769,
-0.2227809727191925,
0.566502034664154,
-0.2134190946817398,
-0.30702659487724304,
-1.1724302768707275,
0.43049857020378113,
0.1749761402606964,
0.2790670096874237,
1.2567131519317627,
-0.4492715001106262,
0.24701201915740967,
... |
def test _ atomic _ id _ white _ space _ nistxml _ sv _ iv _ atomic _ id _ white _ space _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - whitespace - 1. xsd ", instance = " nistdata / atomic / id / schema... | [
0.04053641855716705,
-0.28002554178237915,
0.34348636865615845,
-0.04939178377389908,
-0.07939529418945312,
-0.06365854293107986,
0.41644486784935,
-0.7165343165397644,
0.8255008459091187,
0.5502263307571411,
0.30758681893348694,
0.2519325613975525,
-0.22733259201049805,
0.8650800585746765... |
def adjangle ( self, amt ) : self. angle = self. angle + radians ( amt ) self. redraw ( ) | [
0.016238627955317497,
0.08884384483098984,
0.33717086911201477,
-1.3125799894332886,
-0.6823550462722778,
1.1763795614242554,
0.37472355365753174,
0.06803935766220093,
0.9780562520027161,
-0.27242735028266907,
-0.08986488729715347,
0.7285112142562866,
-0.11425897479057312,
0.38232791423797... |
def set _ superseded _ drawings ( self ) : return self. drawing _ list [ : - 1 ] | [
0.04363173246383667,
0.4991290271282196,
0.5462853312492371,
-0.5167073011398315,
0.13003875315189362,
0.8346401453018188,
-0.3213628828525543,
0.20658175647258759,
0.39199137687683105,
-0.8562197685241699,
-1.1917482614517212,
0.6526123285293579,
-0.5403712391853333,
0.5934678316116333,
... |
def test _ example _ input _ one _ add _ backend _ validation ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entity1.... | [
-0.07121695578098297,
0.45972076058387756,
0.9191572666168213,
0.3611656129360199,
0.9088785648345947,
0.7858172655105591,
0.2629501521587372,
-0.03961753472685814,
-0.039693206548690796,
0.7074223756790161,
-0.7704644799232483,
0.058519139885902405,
-0.19401632249355316,
0.187887251377105... |
def get _ events _ with _ meta ( self, size = 30, page = 1 ) : response = self. _ _ makerequest ('/ api / v1 / applications / me / events? per ='+ repr ( size ) +'& page ='+ repr ( page ) +'& show _ meta = true ','get') return json. loads ( response ) | [
-0.5268514752388,
0.26701539754867554,
0.8998244404792786,
-0.13344694674015045,
-0.5566498041152954,
-0.8317818641662598,
-0.8680712580680847,
-0.25490760803222656,
0.4241182208061218,
1.0941932201385498,
-0.305563360452652,
0.6834937334060669,
0.25657010078430176,
0.18217259645462036,
... |
def test _ atomic _ qname _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 5. xsd ", instance = " nistdata / atomic / qname / sc... | [
-0.22845038771629333,
-0.46250900626182556,
0.3922103941440582,
0.4339844584465027,
-0.5124261975288391,
0.38941851258277893,
0.35813480615615845,
-0.8145954012870789,
-0.045130763202905655,
0.7591124773025513,
-0.5390577912330627,
-0.124224953353405,
-0.46646246314048767,
-0.1531763225793... |
def element _ text _ should _ not _ be ( self, selector, text ) : obj _ text = self. get _ text ( selector ) builtin. _ should _ not _ be _ equal ( obj _ text, text ) | [
-1.1089335680007935,
-0.1755850911140442,
0.17408055067062378,
0.8693872094154358,
0.1760462522506714,
0.5604963898658752,
0.1806015819311142,
0.19388696551322937,
0.9768026471138,
0.5185945630073547,
-0.5932480096817017,
0.03431946411728859,
-0.6079704165458679,
-0.19260789453983307,
-1... |
async def flash _ lights ( self ) - > none : await self. _ send _ command ( " flash _ lights ", on = true ) | [
0.6810687780380249,
0.7641104459762573,
0.2903071939945221,
1.065311074256897,
1.1407017707824707,
0.22036872804164886,
-0.07794182002544403,
0.5215623378753662,
0.6184045076370239,
-0.4516102373600006,
-1.3710824251174927,
1.5053918361663818,
-0.12459354102611542,
1.1133390665054321,
-1... |
def getqospolicy ( ctx, # mandatory main parameter qospolicyid ) : cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " qospolicyid = " " " + str ( qospolicyid ) + " " " ; " " " + " " ) try : _ getqospolicyresult = ctx. element. get _ qos _ policy ( qos _ policy _ id = qospolicyid ) excep... | [
-0.3995925188064575,
-0.25631269812583923,
0.6282715797424316,
-0.02737046591937542,
0.08581840991973877,
0.5261768698692322,
-0.12329310923814774,
-1.2526459693908691,
0.9605891108512878,
0.5044780373573303,
0.17615929245948792,
1.1724663972854614,
-0.5124642848968506,
-0.0837565809488296... |
def put _ stdin ( self ) : target = self. dbg. createtarget ( self. exe ) # perform synchronous interaction with the debugger. self. setasync ( true ) process = target. launchsimple ( none, none, os. getcwd ( ) ) if self. traceon ( ) : print " process launched. " self. asserttrue ( process, process _ is _ valid ) proce... | [
0.313942551612854,
0.011204661801457405,
0.5545336008071899,
0.22514595091342926,
-0.09524443745613098,
0.10410921275615692,
0.8733470439910889,
-0.5212512612342834,
-0.24734735488891602,
-0.8042585849761963,
-0.2313547134399414,
0.4292348325252533,
-0.5173700451850891,
0.3827113211154938,... |
def recup _ analysis ( video _ name ) : text _ video = file _ name ( video _ name ) with open ( path _ text _ static. format ( text _ video ), " r " ) as file : text = str ( file. read ( ) ) return text | [
-0.644239068031311,
-1.3283222913742065,
0.3785512149333954,
-0.024670787155628204,
-1.0690127611160278,
-0.11230093985795975,
0.03219394385814667,
-0.2590460479259491,
-0.15567976236343384,
1.259683609008789,
-0.07683292031288147,
0.3898993730545044,
0.34198305010795593,
-0.69364207983016... |
def exception _ dates ( self ) : if " repeatpattern " in self. _ pattern : for repeat _ pattern in self. _ pattern [ " repeatpattern " ] : if repeat _ pattern. get ( " exception " ) : _ on _ day _ number = repeat _ pattern. get ( " ondaynumber " ) day = 1 exceptions = [ ] while day < = 31 and _ on _ day _ number! = 0 :... | [
-0.7488257884979248,
0.7077350616455078,
0.7984415888786316,
0.40057089924812317,
-0.2608380615711212,
0.841119110584259,
0.3428031802177429,
-0.046147577464580536,
0.7397206425666809,
0.07269072532653809,
-0.30764317512512207,
0.4289776384830475,
-0.5734920501708984,
0.5898317098617554,
... |
def clamped _ free _ energy ( self, test _ point, mean = true ) : bv = tf. tensordot ( test _ point, tf. transpose ( self. visible _ biases ), 1 ) wx _ b = tf. tensordot ( test _ point, self. weights, axes = [ [ 1 ], [ 1 ] ] ) + self. hidden _ biases hidden _ term = tf. reduce _ sum ( tf. math. log ( 1 + tf. math. exp ... | [
0.7065538167953491,
0.07191433757543564,
0.36341381072998047,
-0.132158100605011,
-0.9805755019187927,
0.17237283289432526,
1.07567298412323,
-0.42257988452911377,
0.5910146832466125,
1.101570963859558,
0.03264852613210678,
0.44133418798446655,
-1.238020420074463,
-0.6661307215690613,
-0... |
def _ _ init _ _ ( self, env ) : self. allfields = {'accountid': fp ( type ='int ', title ='account id ', dbforeigntable = subaccount, dbname ='accountid ', dbprimarykey = true, ),'email': fp ( title ='email ', dbconstraint = "? like'% @ %'", dbname ='email ', dbprimarykey = true, ),'expiretime': fp ( type ='date ', ti... | [
0.8922537565231323,
0.7462226748466492,
0.6751077771186829,
0.1335846334695816,
0.8684214949607849,
-0.17282110452651978,
0.66075199842453,
-0.09538552165031433,
-0.1298363357782364,
0.1775161176919937,
-0.9077017903327942,
-0.016619158908724785,
-0.1801290214061737,
0.7605584859848022,
... |
def device _ info ( self ) - > deviceinfo : model = " spotify free " if self. _ me is not none : product = self. _ me [ " product " ] model = f " spotify { product } " return { " identifiers " : { ( domain, self. _ id ) }, " manufacturer " : " spotify ab ", " model " : model, " name " : self. _ name, " entry _ type " :... | [
-0.6236287355422974,
0.1070273295044899,
0.26469141244888306,
-0.16534937918186188,
-0.09455662965774536,
0.46140050888061523,
0.2252264767885208,
-0.8685885667800903,
0.005215208977460861,
-0.5049240589141846,
-0.6686875224113464,
0.3482355773448944,
0.4167318344116211,
0.1964679956436157... |
def value ( policy, state ) : if endstate ( state ) : return 0 else : action = policy ( state ) return cachedvalue ( policy, state, action ) | [
-0.2762325704097748,
0.3413635492324829,
0.376429945230484,
0.3336642384529114,
-0.1153947114944458,
0.22055040299892426,
-0.8720563650131226,
0.015796462073922157,
0.8545116782188416,
0.4105375111103058,
0.31753313541412354,
0.6515446305274963,
0.44634535908699036,
-0.1965869665145874,
... |
def route _ gnd ( self ) : # route delay chain gnd to bl _ inv gnd # gnd node between bl _ inv access tx and delay chain, and is below # en _ input self. gnd _ position = self. delay _ chain _ offset bl _ gnd _ offset = self. bl _ inv _ offset mid1 = vector ( 0, self. bl _ inv _ offset. y ) rail2 _ space = drc [ " minw... | [
-0.2383563369512558,
0.18822696805000305,
1.012723445892334,
-0.7324884533882141,
0.5647323131561279,
0.8186699151992798,
0.9244276285171509,
-0.3772646486759186,
-0.8765830993652344,
0.31529295444488525,
0.21016696095466614,
0.986572265625,
-0.310105562210083,
0.047837819904088974,
0.72... |
def remove _ subsegment ( self, subsegment ) : super ( subsegment, self ). remove _ subsegment ( subsegment ) self. parent _ segment. decrement _ subsegments _ size ( ) | [
0.03931492567062378,
0.4319841265678406,
0.5922564268112183,
-0.16315266489982605,
-0.13990502059459686,
0.11357264965772629,
0.7511973977088928,
0.2834649085998535,
0.20544998347759247,
-0.7977138161659241,
-1.2597655057907104,
-0.7762058973312378,
-0.18703792989253998,
-0.077516622841358... |
def get _ recommendations ( title, cosine _ sim, indices _ list ) : movie _ index = indices _ list [ title ] similar _ scores = list ( enumerate ( cosine _ sim [ movie _ index ] ) ) similar _ scores = sorted ( similar _ scores, key = lambda x : x [ 1 ], reverse = true ) movie _ indices = [ i [ 0 ] for i in similar _ sc... | [
-0.7180617451667786,
0.542715847492218,
0.5562013387680054,
-0.15596143901348114,
0.44142404198646545,
0.12797775864601135,
-0.5507970452308655,
0.24643822014331818,
-0.18020737171173096,
1.5954229831695557,
0.06999902427196503,
1.3367846012115479,
-0.7551806569099426,
-1.2525112628936768,... |
def _ deposit _ funds ( amount, person ) : fund _ service. add _ funds ( amount, person ) deposit = model. bankdeposits ( person _ id = person. id, amount = amount ) print ( deposit ) model. db. session. add ( deposit ) model. db. session. commit ( ) | [
0.5492764711380005,
0.005718118976801634,
0.6066088676452637,
0.32481691241264343,
0.6053709983825684,
0.43519365787506104,
0.08620483428239822,
-0.40763193368911743,
-0.11995879560709,
-0.6784321069717407,
0.35824471712112427,
-1.1608014106750488,
-0.07021405547857285,
0.4573534429073334,... |
def _ _ init _ _ ( self, arguments ) : super ( ). _ _ init _ _ ( arguments ) self. _ username = self. _ arguments [ " < username > " ] | [
-0.2758329212665558,
0.46553152799606323,
0.3180217742919922,
0.2003234475851059,
0.21324944496154785,
-0.03663967549800873,
0.5875459909439087,
0.8673661947250366,
-0.05450321361422539,
-0.13470102846622467,
-1.0147597789764404,
0.17936955392360687,
-0.019917674362659454,
0.40267211198806... |
def prepare _ all _ data _ for _ metadata _ export ( tsca _ id, path _ to _ batch _ samples _ info, paths _ to _ batches _ info, google _ bucket _ id ) : prepare _ patients _ for _ metadata _ export ( path _ to _ batch _ samples _ info, tsca _ id ) prepare _ batch _ sample _ set _ for _ metadata _ export ( path _ to _ ... | [
0.718208909034729,
-0.3069922924041748,
0.44040340185165405,
0.3728578984737396,
0.1617320030927658,
0.24720217287540436,
-0.08423686772584915,
-0.30149391293525696,
0.05316098406910896,
0.2106809765100479,
-0.054561469703912735,
1.0179338455200195,
1.2693190574645996,
0.4292092025279999,
... |
def sort _ by ( self, name, sort _ dir ='asc') : logger. log ( 5, " sort by ` % s ` % s. ", name, sort _ dir ) self. eval _ js ('table. sort _ ( " { } ", " { } " ) ; '. format ( name, sort _ dir ) ) | [
-0.8133994936943054,
0.2149936854839325,
0.5297409892082214,
-0.09136998653411865,
-0.6849278211593628,
-1.727256178855896,
0.5939292907714844,
-0.6410949230194092,
-0.8699132800102234,
0.9222313165664673,
-0.5405349135398865,
0.30104759335517883,
0.9260581731796265,
0.28822916746139526,
... |
def soupify ( url ) : response1 = requests. get ( url ) main _ soup = beautifulsoup ( response1. text,'html. parser') try : top _ story _ url = main _ soup. find ('h1'). find ('a') ['href'] except attributeerror : top _ story _ url = main _ soup. find ('div ', {'class':'headline normal x normal - style'} ). find ('a') ... | [
-0.9823927283287048,
-0.5701201558113098,
0.7595721483230591,
-0.1033506765961647,
0.05762467160820961,
-0.40913844108581543,
-0.39872902631759644,
0.015902521088719368,
-0.5784490704536438,
0.12016948312520981,
0.08453739434480667,
0.3454457223415375,
1.2385306358337402,
0.509876906871795... |
def formatdata ( filedir, name, conf = " config. ini ", * options ) : # decode launch options. right now, there is only one option : - a opens the hdf file in read / write # mode instead of overwriting the existing file. file _ access _ mode ='r +'if ('- a'in options ) else " w " f = h5py. file ( name + ". hdf5 ", file... | [
0.10767865926027298,
-0.2653428614139557,
0.9019143581390381,
0.18340158462524414,
-0.10969095677137375,
-0.4666878581047058,
1.3411340713500977,
-0.43873026967048645,
0.1623406857252121,
0.39855924248695374,
0.831714391708374,
0.20894755423069,
0.20020052790641785,
0.6724454164505005,
-... |
def kmeanspp ( matrix, k, *, msr = 2, prior = 0., seed = 0, ntimes = 1, lspp = 0, expskips = 0, n _ local _ trials = 1, weights = none ) : if isinstance ( matrix, sp. csr _ matrix ) or isinstance ( matrix, csr _ tuple ) : matrix = csparsematrix ( matrix ) if isinstance ( k, sumopts ) : return pykmpp ( matrix, k, weight... | [
0.8271636366844177,
-0.13165156543254852,
0.5761353969573975,
0.48525354266166687,
-1.333627700805664,
-0.02870318479835987,
-0.5944366455078125,
0.6583364009857178,
1.6911653280258179,
0.5992420315742493,
0.6705064177513123,
-0.22622866928577423,
-0.4848564863204956,
-0.17605432868003845,... |
def submit _ order ( self, orders ) : url = lendingclub _ url ('accounts ', self. investor _ id,'orders') request _ data = { " aid " : self. investor _ id, " orders " : [ o. _ asdict ( ) for o in orders ] } response = self. session. post ( url = url, data = json. dumps ( request _ data ) ) response. raise _ for _ statu... | [
-1.4892351627349854,
0.3595918118953705,
0.5545616745948792,
0.7504369616508484,
0.4794308543205261,
-0.16761784255504608,
-1.5425583124160767,
-0.9516587853431702,
-0.5324886441230774,
0.7792524695396423,
-0.5123418569564819,
-0.149046391248703,
-0.754713773727417,
1.085953712463379,
-0... |
def _ generate _ new _ kernel _ args ( ops, axes _ mapping, dims ) : # list arguments to kernel params = [ axes _ mapping [ 0 ] [ 4 ] ] if dims = = 2 : params. append ( axes _ mapping [ 1 ] [ 4 ] ) elif dims = = 3 : params. extend ( [ axes _ mapping [ 1 ] [ 4 ], axes _ mapping [ 2 ] [ 4 ] ] ) processed _ tensors = set ... | [
-0.19995424151420593,
0.11726350337266922,
1.0494393110275269,
0.13391809165477753,
-0.15229609608650208,
0.04067089036107063,
-0.21874941885471344,
0.003741440363228321,
-0.4905063807964325,
0.9609014391899109,
0.5613535642623901,
0.08106883615255356,
0.5460660457611084,
1.261915802955627... |
def set _ option ( self, key, value = none, sep = none, fixed = true ) : old _ option = self. _ get _ option _ for _ editing ( key, singleton = true ) new _ option = { " key " : key, " value " : value, " sep " : sep, " fixed " : fixed, " singleton " : true } if old _ option : if old _ option [ " fixed " ] : message = "... | [
-0.653077244758606,
0.40079936385154724,
0.5392937660217285,
0.5355298519134521,
0.2994077503681183,
0.06697065383195877,
0.5163153409957886,
0.007656949106603861,
-0.28661105036735535,
0.2454300969839096,
-0.4786629378795624,
-0.3272320330142975,
-0.11597517877817154,
0.21474237740039825,... |
def test _ atomic _ any _ uri _ max _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 3. xsd ", instance = " nistdata... | [
0.1922052800655365,
-0.28892841935157776,
0.40519702434539795,
0.9642360806465149,
-0.476806640625,
0.19323666393756866,
-0.9299997091293335,
0.19087931513786316,
0.28159642219543457,
0.15917424857616425,
0.014596669934689999,
-0.048129625618457794,
-0.021978849545121193,
-0.06067540496587... |
def apply _ single _ fun ( params, x1, x2 ) : dr = ( x1 - x2 ) / params [ " periods " ] r = np. sqrt ( np. dot ( dr, dr ) ) return params [ " variance " ] * np. exp ( - params [ " scale " ] * np. power ( np. sin ( np. pi * r ), 2 ) ) | [
0.10915298014879227,
0.2041894942522049,
0.4687674343585968,
0.45831677317619324,
0.28221768140792847,
-0.18926414847373962,
-0.22173045575618744,
0.42232227325439453,
-0.5396782755851746,
0.6286579966545105,
0.631860077381134,
1.4544051885604858,
-0.015476430766284466,
-0.0956352874636650... |
def merge _ parent _ settings ( cls ) : behaviors = [ behavior. _ _ name _ _ for behavior in cls. base _ behaviors ( ) ] for behavior in behaviors : parent _ settings = [ getattr ( parent, behavior, false ) for parent in cls. _ _ bases _ _ ] if behavior in cls. _ _ dict _ _ : parent _ settings = [ getattr ( cls, behavi... | [
-0.8518481850624084,
0.5405765175819397,
0.783074140548706,
0.34261560440063477,
0.5829058289527893,
-0.14110299944877625,
0.665483832359314,
-1.317729115486145,
-0.4111001193523407,
0.11642243713140488,
-0.24406133592128754,
-0.5962159037590027,
-0.24033845961093903,
0.7648802399635315,
... |
def squashrngpy ( rng, apermol ) : if not checksymmetry ( rng ) : raise runtimeerror ( " graph is non - symmetrical " ) sh = rng. shape rng = rng. toarray ( ) newsh = ( int ( sh [ 0 ] / apermol ), int ( sh [ 1 ] / apermol ) ) # pdb. set _ trace ( ) # molrng = lil _ matrix ( newsh ) molrng = np. zeros ( newsh ) molrng =... | [
0.2547949254512787,
-0.4613589644432068,
0.46078452467918396,
-0.9678743481636047,
-0.09436719864606857,
-0.24831916391849518,
-0.0652318149805069,
-0.7798354625701904,
0.5054174065589905,
0.3042079508304596,
0.3234378695487976,
0.1038670688867569,
-0.04054674133658409,
-0.0643307492136955... |
def game _ over ( self ) : if self. start _ val = = 0 : return true else : return false | [
-0.6400967240333557,
-0.24649691581726074,
0.6935176849365234,
0.8932618498802185,
0.1625434011220932,
0.9070302844047546,
-0.7688344120979309,
0.2584288418292999,
-0.8670756220817566,
0.25699201226234436,
0.22616951167583466,
-0.5118871331214905,
-0.36444392800331116,
0.5660120248794556,
... |
def _ forward ( self, x ) : output = x. t for index, layer in enumerate ( self. layers ) : output = layer. forward ( output ) return output | [
-0.425375372171402,
-0.09040436893701553,
0.3891794681549072,
-0.41911306977272034,
-0.43966373801231384,
-0.1791556030511856,
0.2919248640537262,
-1.0341229438781738,
-0.8482008576393127,
-0.1659824699163437,
-0.7381855845451355,
-0.6755182147026062,
0.6356193423271179,
-0.118436574935913... |
def _ feature _ and _ label _ matrices _ from _ lists ( feature _ vectors, label _ vectors, features _ data _ type = numpy. float64, labels _ data _ type = int ) : # copy 1d numpy arrays into new 2d numpy arrays x = numpy. array ( feature _ vectors, dtype = features _ data _ type ) y = numpy. array ( label _ vectors, d... | [
-0.41550764441490173,
-1.2189710140228271,
0.42491796612739563,
-0.14782829582691193,
0.040170952677726746,
0.41997483372688293,
-0.5651856660842896,
-0.027076242491602898,
0.2489488124847412,
0.19119422137737274,
0.12720367312431335,
0.9230080842971802,
0.6036373972892761,
0.8776430487632... |
def list ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!') | [
-1.5455148220062256,
-0.05872297286987305,
0.6690901517868042,
0.19294019043445587,
0.7942298650741577,
0.24352937936782837,
0.06111663579940796,
-0.3055838942527771,
0.6110407710075378,
0.2838354706764221,
-0.2825244963169098,
1.025631070137024,
-0.6311829090118408,
0.38893163204193115,
... |
def _ _ get _ account _ alias ( self, role _ arn, principal _ arn, assertion ) : try : # temporarily remove the profile envvar because it can cause first - time setup issues profile = os. environ. pop ( " aws _ profile ", none ) sts = boto3. client ( " sts " ) if profile is not none : os. environ [ " aws _ profile " ] ... | [
0.641346275806427,
-1.0182894468307495,
0.9538952112197876,
-0.7128152847290039,
-0.016627531498670578,
0.6327741742134094,
0.6240066885948181,
-0.30187416076660156,
0.5652039647102356,
0.17380020022392273,
0.9723641872406006,
1.2643225193023682,
0.03981822356581688,
-0.34344378113746643,
... |
def validate ( self, sess, valid _ dataset ) : valid _ cost = 0 for valid _ x, valid _ y in valid _ dataset : valid _ cost = self. test ( sess, valid _ x, valid _ y ) return valid _ cost | [
-0.30624711513519287,
0.1718844473361969,
0.4978930354118347,
0.09373336285352707,
-0.20539820194244385,
-0.14868535101413727,
-0.26613304018974304,
0.46013206243515015,
0.4511016011238098,
-0.1360974907875061,
0.19233345985412598,
-0.1755201816558838,
-0.2677849531173706,
-0.0887442156672... |
def leaf _ symbols ( self ) - > iterable [ symbol ] : for arg in self. arguments : if isinstance ( arg, symbolicexpression ) : yield from arg. leaf _ symbols ( ) | [
0.1497221142053604,
-0.36930862069129944,
0.6003563404083252,
0.7612273097038269,
0.5506663918495178,
0.30106765031814575,
0.349470853805542,
0.013022162020206451,
-0.7276094555854797,
-0.2503895163536072,
-0.14464905858039856,
1.0001106262207031,
-0.29874327778816223,
1.518661379814148,
... |
def ensure _ list ( value : any ) - > list : if isinstance ( value, list ) : return value if isinstance ( value, iterable ) : return list ( value ) return [ value ] | [
-0.3856251835823059,
0.05919024348258972,
0.2283518761396408,
0.7253220677375793,
0.8074127435684204,
0.32507139444351196,
-0.8264113664627075,
-0.28231292963027954,
1.3678513765335083,
0.0768069326877594,
-0.3675127327442169,
0.27812427282333374,
-0.6344851851463318,
0.6957164406776428,
... |
def status ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " status " ) | [
0.6489901542663574,
-0.37072181701660156,
0.2616281807422638,
0.3389657437801361,
0.8354040384292603,
1.3880672454833984,
-0.10290782898664474,
0.4514917731285095,
1.0400772094726562,
-0.055618397891521454,
-0.10378127545118332,
0.6913232207298279,
0.28878578543663025,
-1.0722072124481201,... |
def find ( self, data ) : # define a recursive function to traverse the tree. def _ step ( current ) : " " " recursively step through the tree until the node containing'data'is found. if there is no such node, raise a value error. " " " if current is none : # base case 1 : dead end. raise valueerror ( str ( data ) + " ... | [
0.39938849210739136,
0.12721189856529236,
0.6921213269233704,
-0.03704547882080078,
-0.46658390760421753,
0.22818490862846375,
-0.15084591507911682,
-1.2900974750518799,
-0.45757976174354553,
-0.6077514886856079,
0.5616275668144226,
0.8458709716796875,
-0.7628028988838196,
1.24464106559753... |
def u _ grade _ ipix ( ipix, nside _ in, nside _ out, nest = false ) : if nside _ in = = nside _ out : return ipix if not ( nside _ in < nside _ out ) : raise valueerror ( " nside _ in must be less than nside _ out " ) if nest : nest _ ipix = ipix else : nest _ ipix = hp. ring2nest ( nside _ in, ipix ) factor = ( nside... | [
-0.6263378262519836,
-0.08657509088516235,
0.8357955813407898,
-0.3301210105419159,
-0.4457254409790039,
0.32593846321105957,
0.06673887372016907,
-0.03675173595547676,
-0.6009246110916138,
-0.13411082327365875,
0.3137606382369995,
0.574295163154602,
-0.29876354336738586,
-0.92458242177963... |
def _ modify _ task _ properties ( self ) : request _ json = {'tmmsg _ modifytaskreq': {'taskinfo': {'associations': self. _ associations _ json,'task': self. _ task _ json,'subtasks': [ {'subtask': self. _ sub _ task _ option,'pattern': self. _ pattern,'options': self. _ task _ options } ] } } } flag, response = self.... | [
-1.0924437046051025,
-0.3308946490287781,
0.5449240803718567,
0.06516603380441666,
-0.26350075006484985,
-0.23688183724880219,
0.386188268661499,
-0.03562525287270546,
-0.5009708404541016,
0.13401088118553162,
0.3015294671058655,
0.3770522177219391,
0.09136032313108444,
-0.1651252806186676... |
def call _ subprocess _ and _ raise _ on _ error ( command : str, error : callable = externalprogramerror ) - > list [ bytes ] : p = call _ subprocess ( command ) p. wait ( ) if p. returncode! = 0 : raise error ( p. stdout. readlines ( ) ) return p. stdout. readlines ( ) | [
0.32195085287094116,
0.5464904308319092,
0.8126435279846191,
0.9279347062110901,
-1.026278018951416,
-0.002784857526421547,
-1.2691473960876465,
-0.3736388087272644,
0.3219740688800812,
0.5071244239807129,
-0.06192561984062195,
0.2795134484767914,
-0.8204977512359619,
0.7844372987747192,
... |
def tf _ get _ bbox _ regression _ labels ( bbox _ target _ data, num _ classes ) : # clss = np. array ( bbox _ target _ data [ :, 0 ], dtype = np. uint16, copy = true ) # 生 成 一 , 大 小 ( len ( rois ), 4 * 21 ) bbox _ targets = np. zeros ( ( clss. size, 4 * num _ classes ), dtype = np. float32 ) # 生 成 一 , 大 小 同 ( len ( r... | [
-1.049527883529663,
0.18007665872573853,
0.8203315734863281,
-0.7793986201286316,
0.8981505036354065,
-0.6482782363891602,
0.3304401636123657,
-0.5154207348823547,
-0.7506958842277527,
-0.2004830539226532,
0.23063962161540985,
0.1724705547094345,
-0.6585557460784912,
-0.5635801553726196,
... |
def get _ basis _ set ( basis _ set : str, atomic _ nos : tuple ) : atomic _ nos _ string = ', '. join ( map ( str, atomic _ nos ) ) response = requests. get ( f " https : / / www. basissetexchange. org / api / basis / { basis _ set } / format / gaussian94 /? version = 1 & elements = { atomic _ nos _ string } " ) if no... | [
-0.2653757333755493,
0.10035143047571182,
0.6317421197891235,
-0.5408915281295776,
-0.6716077327728271,
-0.4565213918685913,
-0.9319900870323181,
-0.9273229241371155,
-0.5525032877922058,
-0.08320529013872147,
0.532332718372345,
0.8116662502288818,
-0.23100799322128296,
0.02090556174516678... |
def example _ 2 ( ) : def plus ( a, b ) : return a + b plus. _ _ name _ _ = " + " x : list [ str ] = [ " fold ", " like ", " protein " ] x0 = " " res = fold ( x, plus, x0, debug = true ) print ( f " fold ( { x }, { plus. _ _ name _ _ }, { x0 } ) = { res } " ) | [
0.11535560339689255,
-0.1970100700855255,
0.6563937664031982,
0.04381197318434715,
-1.4716496467590332,
0.3884093165397644,
-0.675424337387085,
0.4331503212451935,
0.5900452136993408,
-0.06647802889347076,
-1.268006682395935,
0.6896429657936096,
0.975100576877594,
0.5717767477035522,
0.6... |
def setup _ stdout _ redirection ( ) : class stdoutoutput ( dummyoutput, abc ) : def write ( self, data : str ) - > none : sys. stdout. write ( data ) # create app session with create _ app _ session ( input = dummyinput ( ), output = stdoutoutput ( ) ) : # yield control to the test case yield | [
0.6965976357460022,
-0.5187728404998779,
0.5500269532203674,
0.34975263476371765,
0.6670054793357849,
0.19386738538742065,
1.0903418064117432,
-1.2387434244155884,
0.7322409152984619,
-0.5639336705207825,
0.018957167863845825,
-0.048373594880104065,
0.4407062828540802,
-0.2310001105070114,... |
def main ( ) : lista _ comandos = sys. argv if len ( sys. argv ) = = 1 : mensaje _ ayuda ( ) return comando = sys. argv [ 1 ]. lower ( ) if comando = ='generar': cuentas = lista _ comandos [ 2 : ] cuentas _ en _ archivo = contadores. cuentas _ en _ archivo ( ) if not cuentas : lista _ cuentas = cuentas _ en _ archivo e... | [
0.6088443398475647,
0.10174193978309631,
0.748607873916626,
0.7860689759254456,
0.5356924533843994,
0.3599417805671692,
-0.10465607047080994,
-0.4362562298774719,
-0.1718979924917221,
-0.6723305583000183,
0.16001002490520477,
0.8727573752403259,
-0.2111530900001526,
0.8818190097808838,
0... |
def run _ tests ( labels, runner _ class, runner _ options, chunk _ num ) : # we need to patch the db name in case we're in - - parallel or - - isolate # mode ( or any other mode with more than one chunk ). but if there's only # a single chunk, don't change the db name. therefore we don't modify the # name for the firs... | [
-0.33889809250831604,
0.6196240186691284,
0.8023623824119568,
0.3143353760242462,
0.6080905199050903,
-0.2058328241109848,
0.3742290139198303,
0.03157724440097809,
-0.2885377109050751,
0.26590922474861145,
-0.39041873812675476,
0.0931125059723854,
-0.45900946855545044,
0.2758810818195343,
... |
def make _ star ( npix0, osf, xc, yc, rstar, u1, u2 ) : npix = int ( np. floor ( npix0 * osf ) ) map = np. mgrid [ : npix, : npix ]. astype ('float64') map [ 0 ] - = xc * osf map [ 1 ] - = yc * osf r2 = ( map [ 0 ] * map [ 0 ] + map [ 1 ] * map [ 1 ] ) / ( rstar * osf ) * * 2 mu = np. sqrt ( 1. - r2 ) star = 1 - u1 * (... | [
-0.8116714358329773,
-0.1674434393644333,
0.44244733452796936,
-0.7012175917625427,
-0.5169517397880554,
0.10127612203359604,
0.2308586984872818,
0.683243453502655,
-0.04333267733454704,
0.06034814566373825,
-0.242018923163414,
0.4779624044895172,
0.059551890939474106,
-0.45446139574050903... |
def delete ( self, test = " and ", * * kw ) : test = self. _ _ process _ test ( test, kw ) self. _ _ remove ( self. _ _ data _ area, true, test ) return self | [
0.5593674778938293,
0.07770319283008575,
0.41888681054115295,
-0.26006484031677246,
-1.1518629789352417,
0.2773009240627289,
0.7711948156356812,
0.539520263671875,
0.40293359756469727,
-0.6784166693687439,
0.16069556772708893,
0.6348766088485718,
-1.0674614906311035,
-0.03298115357756615,
... |
def test _ get _ cve _ filter _ by _ assigner _ empty ( ) : res = requests. get ( f'{ env. awg _ base _ url } { cve _ url } / ', headers = utils. base _ headers, params = {'assigner':'12b746bd - 357f - 483d - 8cda - ed822fecf731'} ) assert res. status _ code = = 200 recordslength = len ( json. loads ( res. content. dec... | [
-0.48574957251548767,
-0.052079591900110245,
0.4589107930660248,
-0.789541482925415,
0.43147802352905273,
0.4372822046279907,
0.1392984837293625,
0.4617973566055298,
0.018211284652352333,
-0.25621485710144043,
0.33824530243873596,
0.3012973368167877,
0.006475736387073994,
0.629562258720398... |
def create _ user _ features ( ) : print ( " - - - insert - physical - locations - - - - " ) locationfinder. insert _ physical _ locations ( ) # users = db. get _ users ( all = true ) users = db. get _ users _ testset ( ) count = 0 for u in users : count + = 1 print ( " create features of user # " + str ( count ) ) id ... | [
-0.4063461124897003,
-0.1379489302635193,
0.6632976531982422,
0.4419648349285126,
0.35702210664749146,
0.3798728585243225,
0.9523594379425049,
0.28032752871513367,
-0.2435796707868576,
-0.7463901042938232,
-0.9619472622871399,
-0.6368909478187561,
0.01384730450809002,
0.5471920371055603,
... |
def write _ feature _ and _ label _ vectors ( features _ file _ path, feature _ vectors, label _ vectors ) : logging. info ('writing feature and label vectors to { }... '. format ( features _ file _ path ) ) with open ( features _ file _ path,'w') as features _ file : for features, labels in zip ( feature _ vectors, la... | [
-0.49457862973213196,
-1.5766491889953613,
0.31272590160369873,
-0.18545852601528168,
0.7054969668388367,
0.7672907114028931,
-0.5091695189476013,
0.4822884500026703,
-0.25748389959335327,
0.05234852805733681,
0.22301311790943146,
0.26979687809944153,
0.6574413180351257,
0.2096561044454574... |
def _ _ init _ _ ( self, expt _ name, expt _ details, parameters, msevents, gauss, verbosity, ionmass ) : self. expt = expt _ name self. expt _ type = expt _ details ['expt _ type'] self. r = expt _ details ['ref'] self. d = expt _ details ['don'] self. doff = expt _ details ['donor offset'] self. a = expt _ details ['... | [
0.8122358918190002,
0.09518985450267792,
0.5922813415527344,
-0.28184276819229126,
0.007753537502139807,
0.22601519525051117,
-0.575249195098877,
0.6371393203735352,
0.7603811025619507,
0.9321642518043518,
0.3613322377204895,
0.589762270450592,
0.08261007815599442,
0.30621907114982605,
0... |
def appos _ look _ up ( text ) : words = text. split ( ) new _ text = [ ] for word in words : word _ s = word. lower ( ) if word _ s in appos _ dict : new _ text. append ( appos _ dict [ word _ s ] ) else : new _ text. append ( word ) apposed = " ". join ( new _ text ) return apposed | [
0.7452331185340881,
-0.7120023965835571,
0.6087583303451538,
-0.9872275590896606,
-0.9333857893943787,
-0.1058516576886177,
-0.5721324682235718,
0.31420791149139404,
0.024013768881559372,
1.11176598072052,
0.77452152967453,
-0.5212604403495789,
-0.17280271649360657,
0.36886465549468994,
... |
def test _ model _ tree _ unique _ trees ( self ) : with self. assertraises ( assertionerror ) : _ = evo _ app. model ( " gn ", tree = " ( a, b, c ) ", unique _ trees = true ) _ data1 = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggc... | [
0.4705723524093628,
0.03162434697151184,
0.5402956008911133,
-0.4997328519821167,
1.1162835359573364,
0.19520050287246704,
0.03473210707306862,
0.059054695069789886,
-0.3764622211456299,
0.41741880774497986,
-1.0381402969360352,
-0.22994136810302734,
-0.015538760460913181,
0.34821617603302... |
def onfile ( self, value : inputfile ) : self. page = self. root. ensure ( str ( value. path ) ) | [
1.1194431781768799,
-0.572546660900116,
0.2094879299402237,
-0.1864345371723175,
0.23211568593978882,
0.8578007221221924,
0.5089273452758789,
-0.10549036413431168,
-0.6701407432556152,
-0.4694717526435852,
0.4081968069076538,
-0.34318625926971436,
-0.08998498320579529,
0.33687713742256165,... |
def test _ atomic _ any _ uri _ pattern _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 1. xsd ", instance = " nistdata / atomic / anyu... | [
-0.4340703785419464,
-0.28738051652908325,
0.5960982441902161,
1.2413784265518188,
-0.010161589831113815,
0.03748857602477074,
0.45115235447883606,
0.329363077878952,
0.33342546224594116,
0.07272841036319733,
0.5587607622146606,
-0.31964510679244995,
-0.3800468146800995,
0.0794389247894287... |
def get _ algo _ folder ( algo _ name, environ = none ) : if not environ : environ = os. environ root = data _ root ( environ ) algo _ folder = os. path. join ( root,'live _ algos ', algo _ name ) ensure _ directory ( algo _ folder ) return algo _ folder | [
0.7352874875068665,
0.21766112744808197,
0.5954634547233582,
0.22075003385543823,
-0.5291356444358826,
0.9532294273376465,
1.1100965738296509,
0.19096139073371887,
-0.8919854164123535,
0.4024234116077423,
0.5602637529373169,
1.0102421045303345,
0.18471422791481018,
0.9069299101829529,
0.... |
def test _ atomic _ hex _ binary _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 5. xsd ", instance ... | [
0.1064458042383194,
-0.16016463935375214,
0.2596857249736786,
0.7907602190971375,
-0.6326613426208496,
0.11187783628702164,
-0.566870391368866,
-0.2986118495464325,
-0.4636777639389038,
0.4853065609931946,
-0.9697776436805725,
-0.5136842727661133,
-0.2615640163421631,
0.7030835151672363,
... |
def continuous _ agg _ array _ features ( n, n _ feats, ks ) : features = [ ] for k in range ( ks ) : features. append ( continuous _ array _ features ( n, n _ feats ) ) features = np. stack ( features, axis = 2 ) return features | [
0.023560084402561188,
0.11612477153539658,
0.7510183453559875,
1.7759208679199219,
0.4456775486469269,
-0.06281793862581253,
-0.3087517023086548,
0.5979545712471008,
-0.2829597592353821,
0.36149078607559204,
-0.5835715532302856,
0.1870320588350296,
0.31405073404312134,
0.37669312953948975,... |
def test _ atomic _ language _ pattern _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 1. xsd ", instance = " nistdata / atomic / la... | [
0.20630943775177002,
-0.29250532388687134,
0.40642550587654114,
0.6216810345649719,
-0.1525205820798874,
0.24196918308734894,
0.11982084810733795,
0.069713294506073,
0.28520897030830383,
0.8014432191848755,
0.002521940739825368,
-0.376101553440094,
-0.4225175380706787,
-0.07949303090572357... |
def predict ( self, query _ index : int, adj : np. ndarray, features : np. ndarray, k : int ) - > float : assert adj. shape [ 0 ] = = features. shape [ 0 ], \ " the length of adjacency matrix should be same with the length of features " assert k > 0, " k should be positive " # make questions for compatibility questions... | [
-0.2837127447128296,
0.5421533584594727,
0.46151742339134216,
0.2914120554924011,
-0.06377360969781876,
0.22476111352443695,
-0.1875181943178177,
0.07577704638242722,
-0.2375573366880417,
1.0423375368118286,
0.8795021772384644,
-0.33486562967300415,
-0.2878258228302002,
-0.4518426358699798... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.