text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def main ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ( " - i ", " - - ip ", type = str, help = " the udp host ip ", default = " localhost " ) parser. add _ argument ( " - p ", " - - port ", type = int, help = " the udp host port ", default = " 1565 " ) args = parser. parse _ args ( ) s = socket. ... | [
-0.027927042916417122,
0.744276225566864,
1.1626168489456177,
0.262115478515625,
-0.3018060028553009,
0.5229854583740234,
-0.04968499764800072,
-0.4776378571987152,
-0.2357541173696518,
0.14588722586631775,
-0.27901485562324524,
0.09194865822792053,
-0.39822709560394287,
-0.154864206910133... |
def created _ time ( self ) - > str : return pulumi. get ( self, " created _ time " ) | [
1.1207305192947388,
-0.07519160211086273,
0.30987194180488586,
0.29604268074035645,
1.6015195846557617,
1.4001634120941162,
-0.7632248401641846,
-0.2825455069541931,
-0.17478875815868378,
0.15165531635284424,
0.01778659224510193,
0.450857013463974,
0.7523033618927002,
-0.855850875377655,
... |
def parse _ live _ data ( blob ) : live _ data = struct ( " magic " / const ( b " \ xaa \ xdd " ), padding ( 1 ), " year " / int8ub, " weekday " / int8ub, " month " / int8ub, " day " / int8ub, " hour " / int8ub, " minute " / int8ub, " second " / int8ub, " dat0h " / int8ub, " dat0l " / int8ub, " dat1h " / int8ub, " dat1... | [
0.9780030846595764,
-0.46270790696144104,
0.8642141819000244,
-0.38494873046875,
-0.6958634257316589,
0.37098145484924316,
-0.5255409479141235,
-0.016349196434020996,
0.13027328252792358,
-0.17506547272205353,
-0.45578137040138245,
-0.4050735831260681,
-0.8264545798301697,
-0.5620318651199... |
def _ getassociatedclk ( self ) : a = self. _ associatedclk if a is not none : return a p = self. _ parent assert p is not none if isinstance ( p, unitbase ) : return getclk ( p ) else : return p. _ getassociatedclk ( ) | [
0.6139324307441711,
-0.15572267770767212,
0.5063499808311462,
0.6649075746536255,
0.6595197916030884,
-0.16961438953876495,
1.258108377456665,
-1.0520521402359009,
0.2077305167913437,
-1.0568196773529053,
1.5282729864120483,
0.5085110664367676,
0.07127095758914948,
0.41215068101882935,
-... |
def test _ load _ many _ pip ( self, build _ image _ for _ jupyterlab ) : lb, username = build _ image _ for _ jupyterlab [ 0 ], build _ image _ for _ jupyterlab [ 5 ] keys = [ " pip & gtmunit1 ", " pip & gtmunit2 ", " pip & gtmunit3 " ] loader = packagedataloader ( keys, lb, username ) promise1 = loader. load _ many (... | [
-1.096630573272705,
0.5026084780693054,
0.5558144450187683,
-0.22004441916942596,
0.6347813010215759,
0.7408837676048279,
-1.3904569149017334,
-0.2593083381652832,
-0.520675778388977,
0.4031910300254822,
-0.45733708143234253,
-0.5102558732032776,
0.12253397703170776,
0.2678163945674896,
... |
def get _ ratings _ file ( self ) : try : url = self. urls [ self. version ] zip _ file = self. download _ url ( url, self. verbose ) zfile = zipfile. zipfile ( zip _ file ) to _ extract = self. data _ files [ self. version ] self. ratings _ file = zfile. extract ( to _ extract, self. all _ datasets _ dir ) os. remove ... | [
0.18981102108955383,
-0.12800593674182892,
0.8247199654579163,
0.01108655333518982,
0.3809630274772644,
-0.047184333205223083,
0.14068320393562317,
1.1636837720870972,
-0.777289628982544,
0.25905004143714905,
0.5010713934898376,
0.1986178308725357,
-0.5292271375656128,
-0.18446047604084015... |
def get _ value ( self, from _ state, to _ state ) : return self. value [ from _ state ] [ to _ state ] | [
-0.3150419592857361,
-0.46689194440841675,
0.4794451892375946,
-0.5136139392852783,
-0.031074920669198036,
-0.23711423575878143,
-1.2791389226913452,
-0.35678765177726746,
-0.9843800663948059,
0.03715573251247406,
0.027523942291736603,
1.4264246225357056,
0.7414847016334534,
-1.44993138313... |
def topods _ shell ( * args ) : return _ topods. topods _ shell ( * args ) | [
-0.5946972370147705,
0.5152310729026794,
0.41071730852127075,
0.006556990090757608,
-0.6122248768806458,
-0.014745986089110374,
0.2082715928554535,
-1.3023812770843506,
0.19260045886039734,
-0.07826266437768936,
-0.0972823053598404,
-0.2947777211666107,
-0.14951199293136597,
0.278106480836... |
def _ payload ( v : union [ layerfieldscontainer, layerfield ] ) - > bytearray : assert not isinstance ( v, layerfieldscontainer ) or len ( v. fields ) = = 1 hex _ value = v. raw _ value assert len ( hex _ value ) % 2 = = 0 s = bytearray ( ) for i in range ( 0, len ( hex _ value ), 2 ) : s. append ( int ( hex _ value [... | [
-0.5675498843193054,
0.37304264307022095,
0.6628326773643494,
-1.0613913536071777,
0.009107551537454128,
-0.2892957031726837,
-0.12003563344478607,
-0.6636365056037903,
-0.2307661473751068,
0.11819063872098923,
-0.7497028112411499,
-0.18632493913173676,
-0.14932629466056824,
0.674774527549... |
def preprocess _ filt _ wal _ nodata _ fill ( self ) : image _ 1, zero _ mask _ 1 = _ wallis _ filter _ fill ( self. i1, self. wallisfilterwidth, self. standarddeviationcutoff ) image _ 2, zero _ mask _ 2 = _ wallis _ filter _ fill ( self. i2, self. wallisfilterwidth, self. standarddeviationcutoff ) self. i1 = image _ ... | [
-0.33404552936553955,
-0.027931474149227142,
0.5818143486976624,
-0.29660770297050476,
0.615485668182373,
0.4564822316169739,
1.0617858171463013,
-0.5985113978385925,
-0.3743601143360138,
-0.4886358380317688,
0.08418911695480347,
0.9360966682434082,
0.5429555773735046,
1.1073012351989746,
... |
def matlab ( args ) : port = int ( os. environ [ " mw _ connector _ secure _ port " ] ) wait _ for _ port ( port ) print ( f " serving fake matlab embedded connector at port { port } " ) app = web. application ( ) app [ " ready _ delay " ] = args. ready _ delay app [ " port " ] = port app. router. add _ route ( " get "... | [
0.5382676720619202,
-0.276493638753891,
1.2011064291000366,
0.10495062917470932,
0.00333887105807662,
0.6981122493743896,
0.9732558727264404,
-0.2137717604637146,
-0.06412430107593536,
-0.13020221889019012,
0.1411166936159134,
0.31621524691581726,
-0.35012343525886536,
0.7037560939788818,
... |
def _ _ init _ _ ( self, matrix : list [ list [ int ] ] ) : n = len ( matrix ) if n > 0 : m = len ( matrix [ 0 ] ) if m > 0 : for i in range ( 1, n ) : matrix [ i ] [ 0 ] + = matrix [ i - 1 ] [ 0 ] for j in range ( 1, m ) : matrix [ 0 ] [ j ] + = matrix [ 0 ] [ j - 1 ] for i in range ( 1, n ) : for j in range ( 1, m ) ... | [
-0.14376571774482727,
0.8705015778541565,
0.7758215069770813,
0.7330597043037415,
-0.3622226417064667,
-0.15381912887096405,
1.2110921144485474,
0.2694780230522156,
1.0847941637039185,
-0.01673945225775242,
-0.40176236629486084,
-0.5149426460266113,
-0.5917389988899231,
1.0399587154388428,... |
def clean _ pixels _ list _ as _ list ( self ) : return self. clean _ pixels _ per _ acquisition. rstrip ( ','). split ( ',') | [
-0.7058053612709045,
-0.5630715489387512,
0.5538436770439148,
-0.10337766259908676,
-0.1873023957014084,
0.45441293716430664,
-0.950293242931366,
-0.308342307806015,
1.20846426486969,
1.3092396259307861,
0.01953299157321453,
0.49725106358528137,
-0.05090847238898277,
0.9663283228874207,
... |
def get _ dataset ( path, example _ shape ) : proto _ features = {'image / encoded': tf. io. fixedlenfeature ( ( ), tf. string ),'variant / encoded': tf. io. fixedlenfeature ( ( ), tf. string ),'alt _ allele _ indices / encoded': tf. io. fixedlenfeature ( ( ), tf. string ) } def _ parse _ example _ variant _ alt _ alle... | [
0.35805174708366394,
0.2259109616279602,
0.7983682155609131,
-1.0031359195709229,
-0.3191981315612793,
-0.1464216113090515,
-0.07618174701929092,
0.6282452344894409,
-0.2054714560508728,
0.31814029812812805,
0.38205650448799133,
0.8480098843574524,
0.2783382534980774,
-0.50981205701828,
... |
async def test _ attributes _ ct _ reduced ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 2 # 2 channel light ( cw ) config [ " so " ] [ " 82 " ] = 1 # reduced ct range mac = config [ ... | [
0.3439970910549164,
-0.15931785106658936,
0.4075092375278473,
-0.593187153339386,
0.3535078167915344,
0.46537449955940247,
0.34766504168510437,
0.3832109868526459,
0.4187707304954529,
-0.6712073683738708,
-0.7327219247817993,
-0.0807785615324974,
0.06134073808789253,
0.6374868154525757,
... |
def test _ update _ group ( self ) : pass | [
-0.8679003119468689,
0.3992171585559845,
-0.05519423261284828,
0.6530094742774963,
-0.3338204622268677,
0.21277593076229095,
0.9780853390693665,
-0.282754510641098,
-0.6893711090087891,
-0.29155832529067993,
-0.26070892810821533,
-0.18405531346797943,
-0.9407570362091064,
0.102072209119796... |
def bulk _ test _ users _ load ( count, default _ password ) : short _ name = " lskywalker " domain = " @ example. com " family _ name = " skywalker " given _ name = " luke " # current user we're working on current _ user = { } # a list of all the users. ( a list of dictionaries ; each a current _ user at one point in ... | [
-0.2753525376319885,
-0.005513377953320742,
0.7755008935928345,
0.2209143042564392,
0.8612383008003235,
0.9096627831459045,
0.07441407442092896,
-0.25086092948913574,
-0.21572700142860413,
-0.32699817419052124,
-0.9423943758010864,
0.10873214155435562,
-0.8255247473716736,
0.14817556738853... |
def enable _ short _ circuits ( self ) : lines = self. app. getcalcrelevantobjects ('*. elmlne') for line in lines : if line. ishclne = = 0 : line. ishclne = 1 print ( " all lines available for short circuit " ) | [
1.4326385259628296,
-0.6195722222328186,
0.4675573408603668,
0.9436106085777283,
0.33067086338996887,
0.8730356097221375,
-0.23738409578800201,
0.48091012239456177,
0.27487051486968994,
-0.3096838593482971,
-0.15669021010398865,
0.7738897800445557,
0.3728635311126709,
0.6015227437019348,
... |
def thumbed _ handler ( sender, instance, created, * * kwargs ) : entity _ object = getattr ( instance,'content _ object ', none ) thumbing = instance. thumbing if ( entity _ object and hasattr ( entity _ object,'thumbsup _ count') and hasattr ( entity _ object,'thumbsdown _ count') ) : # only new thumb created if crea... | [
-0.19655181467533112,
-0.15361236035823822,
0.9024757742881775,
0.17527572810649872,
0.8651344776153564,
0.5562483072280884,
1.5220969915390015,
0.5077143907546997,
0.3172774612903595,
-0.032667335122823715,
-0.5851603150367737,
-0.6987354755401611,
1.0508557558059692,
1.3482317924499512,
... |
def test _ register _ notunique _ username ( self ) : username ='duplicate _ username'password ='password'# create user. user = user. objects. create _ user ( username = username, password = password ) args = {'user _ name': username,'password': password } self. client. post ('/ user _ auth / register / ', args ) # thi... | [
-0.4853361248970032,
1.5065041780471802,
0.26765719056129456,
0.694481372833252,
1.0070278644561768,
0.010048897005617619,
0.3296165466308594,
0.1451551616191864,
0.3475967347621918,
0.2110520303249359,
-1.9865120649337769,
0.17028117179870605,
-0.2516973614692688,
0.7493656277656555,
0.... |
def setup ( ) : for i in xrange ( polygons _ num ) : mat. append ( [ [ 0 for j in xrange ( items _ num ) ] for k in xrange ( polygons _ num ) ] ) for pos, polygon in enumerate ( polygons ) : idx. insert ( pos, shape ( polygon ['geometry'] ). bounds ) print'finished setup ' | [
-0.18551069498062134,
-0.7263438105583191,
0.43565553426742554,
-0.7602431178092957,
0.8388434648513794,
0.7232778668403625,
0.3562700152397156,
-0.2917402982711792,
0.4138609766960144,
0.4983051121234894,
-0.6426811814308167,
-0.0015870524803176522,
0.7678745985031128,
-1.0454018115997314... |
def best _ price ( supers, products, prices ) : enter _ loop = true while enter _ loop : try : period = ask _ and _ convert ( prices,'busqueda') prod _ id = ask _ prod ( products ) best _ price = get _ best _ price ( period, prod _ id, prices ) for sup _ id in best _ price [ 1 ] : print ('\ n { } '. format ( supers [ s... | [
0.092607282102108,
-0.5138866305351257,
0.6050950288772583,
1.4000393152236938,
0.25339627265930176,
0.5033585429191589,
-0.4076559245586395,
0.02650132030248642,
-0.3721138834953308,
0.07993746548891068,
-0.062181390821933746,
1.629408836364746,
0.06016538292169571,
-0.13436684012413025,
... |
def greet _ user ( self ) : print ( " welcome login, % s! " % self. user _ name. title ( ) ) | [
0.528057336807251,
0.28092649579048157,
0.504306435585022,
0.3889623284339905,
-0.2837357521057129,
0.6560571193695068,
-0.7589750289916992,
-0.529306173324585,
-0.4611364006996155,
-0.4208758771419525,
-0.14907601475715637,
1.3405061960220337,
0.25601062178611755,
-0.17518851161003113,
... |
def readframe ( self ) : # our frame consists of a line of text with the frame's size in bytes, then the encoded frame # at both stages we need to check for end - of - file, which will be a read returning an empty string. line = self. file. readline ( ) if not line : return none size = int ( line. strip ( ) ) data = se... | [
0.14302073419094086,
-0.19892479479312897,
0.5301128029823303,
-0.11878233402967453,
-0.7467811703681946,
-0.9093473553657532,
-0.46149200201034546,
-0.5589568018913269,
-0.2964714765548706,
-0.49561232328414917,
0.5411746501922607,
0.7388192415237427,
-0.2518637180328369,
-0.5196406245231... |
def files _ as _ cmd ( self ) : return self. _ files _ as _ cmd ( self. files ) | [
-0.9470392465591431,
-1.2625925540924072,
0.34703975915908813,
-0.12055467814207077,
1.0697376728057861,
-0.6657298803329468,
0.5064334869384766,
-0.8384926319122314,
0.22370865941047668,
-0.6729053854942322,
0.985649824142456,
-0.38730084896087646,
0.6276422739028931,
0.5137664079666138,
... |
def detect ( self, video _ path : str ) - > dict : step _ large = self. step _ large step _ small = self. step _ small assert step _ small < step _ large, " step _ small must be smaller than step _ large " batch _ size = self. batch _ size self. frame _ handler = frame _ handler = framehandler ( step _ large, batch _ s... | [
-0.20847107470035553,
0.353726327419281,
0.8580290079116821,
0.43048104643821716,
-0.10998041927814484,
-0.4689733684062958,
1.1814841032028198,
0.13137423992156982,
-0.04981730133295059,
-0.7554143667221069,
-0.8249214887619019,
0.13371992111206055,
0.4590837061405182,
1.3569992780685425,... |
def getcourses ( self ) : courses = self. context. getfoldercontents ( contentfilter = {'portal _ type':'course ','sort _ on':'sortable _ title'}, full _ objects = true ) return courses | [
-0.42405402660369873,
-0.3167248070240021,
0.48697125911712646,
0.38357147574424744,
0.16571006178855896,
0.5902816653251648,
-0.5764795541763306,
-1.377432107925415,
0.09211591631174088,
0.0721067488193512,
1.4483917951583862,
0.012814617715775967,
-0.20614604651927948,
-0.122565500438213... |
def get _ object _ for _ user _ or _ 404 ( user, permission, * * filters ) : return get _ object _ or _ 404 ( get _ objects _ for _ user ( user, permission ), * * filters ) | [
-0.7394280433654785,
0.08463796228170395,
0.5135855078697205,
1.3930854797363281,
-0.37864288687705994,
-0.6218549609184265,
0.1756015419960022,
-0.4675929546356201,
-0.4021718502044678,
0.1428097039461136,
0.6973035335540771,
0.7914519309997559,
0.348598450422287,
-1.0019670724868774,
-... |
def mixed _ mass ( self, v _ a, v _ b ) : from firedrake. supermeshing import assemble _ mixed _ mass _ matrix key = ( v _ a. dim ( ), v _ b. dim ( ) ) try : return self. _ mixed _ mass [ key ] except keyerror : m = assemble _ mixed _ mass _ matrix ( v _ a, v _ b ) return self. _ mixed _ mass. setdefault ( key, m ) | [
0.04377198964357376,
-0.6314493417739868,
0.3145858943462372,
-0.003576491726562381,
0.3676707148551941,
-0.34183064103126526,
-0.41729632019996643,
-0.40150371193885803,
0.336875319480896,
-0.49627459049224854,
0.2638949155807495,
0.5362496376037598,
-0.38019686937332153,
0.65092706680297... |
def test _ route _ get ( self, test _ client ) : response = test _ client. get ( " / " ) assert response. status _ code = = 200 assert response. headers. get ( " content - type " ) = = " text / html ; charset = utf - 8 " assert b " typefight! " in response. data assert ( b " compete against players around the world to ... | [
0.0006567193195223808,
-0.2833358645439148,
0.4157179892063141,
0.11925022304058075,
1.2663557529449463,
0.15411867201328278,
-0.3104757070541382,
-0.2802879810333252,
-0.395588219165802,
-0.47628048062324524,
0.12022314220666885,
0.683627724647522,
-0.16525182127952576,
-0.014822303317487... |
def getjinjaenv ( pathtotemplates ) : return jinja2. environment ( loader = jinja2. filesystemloader ( pathtotemplates ), extensions = ['jinja2. ext. autoescape'], autoescape = true ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # specific template rendering # # - - - - - - - - - - - - - - - - - - - - ... | [
-0.3401798903942108,
-0.6160843372344971,
0.7388784885406494,
-0.46007996797561646,
-1.4530900716781616,
0.011761929839849472,
0.5451350212097168,
-0.37913957238197327,
-0.1364116370677948,
-0.07265754789113998,
-0.35168781876564026,
0.41737836599349976,
-0.273683100938797,
0.6824916005134... |
def _ _ set _ current _ volume ( volume ) : if volume > 100 : key. _ _ current _ volume = 100 elif volume < 0 : key. _ _ current _ volume = 0 else : key. _ _ current _ volume = volume | [
-1.303667664527893,
-1.5107216835021973,
0.49167993664741516,
-0.22365181148052216,
-0.024047227576375008,
-0.052712228149175644,
-0.421031653881073,
-0.332264244556427,
-0.912901759147644,
1.0022062063217163,
0.33670711517333984,
0.26029977202415466,
-0.5116789937019348,
0.588230669498443... |
def parse _ annotation ( img _ dir, ann _ dir, labels ) : max _ annot = 0 imgs _ name = [ ] annots = [ ] # read all parse file in order for ann in sorted ( os. listdir ( ann _ dir ) ) : annot _ count = 0 boxes = [ ] tree = et. parse ( ann _ dir + ann ) # print ( tree ) # < xml. etree. elementtree. elementtree object at... | [
-0.4101482927799225,
-0.4381895363330841,
0.9913144707679749,
-0.1282750368118286,
-0.14407844841480255,
-0.32327884435653687,
0.7391218543052673,
-0.15736813843250275,
0.038596246391534805,
0.31804007291793823,
-0.14861391484737396,
-0.15434208512306213,
0.4135975241661072,
1.045856475830... |
def device _ state _ attributes ( self ) : # static attributes attr = { " id " : self. _ maxdevice. address, " interface " : self. _ interface, } # generate a dictionary with attributes for node, data in hg _ attribute _ support. items ( ) : # is an attribute and exists for this object if node in self. _ data : value =... | [
-1.2276047468185425,
0.06334046274423599,
0.4030289053916931,
-0.5364030003547668,
-0.6827788352966309,
-0.16829414665699005,
0.15890508890151978,
0.30282285809516907,
0.04867664724588394,
-0.011186828836798668,
-0.6955808997154236,
-0.6844881772994995,
0.2414906769990921,
0.19637373089790... |
def testdata ( indatabase, schema, methoddict, verify _ rules, equationdict ) : # set outdict to none outdict = none # blank list mylist = [ ] # open up the input database ( which is the output from interpolation ( why verify anything else ) ) db = leveldb. leveldb ( indatabase ) # start our counter at zero count = 0 #... | [
-0.18397048115730286,
-0.3248680830001831,
0.9003830552101135,
-0.4538305699825287,
-0.0888727456331253,
-0.673251748085022,
-0.22221051156520844,
0.04474877193570137,
-0.08646569401025772,
0.6670141220092773,
-0.0341239757835865,
0.10897423326969147,
0.04469766467809677,
0.982430994510650... |
def can _ afford ( self, item _ id : sc2. union [ unittypeid, upgradeid, abilityid ], check _ supply _ cost : bool = true ) - > bool : enough _ supply = true if isinstance ( item _ id, unittypeid ) : unit = self. ai. _ game _ data. units [ item _ id. value ] cost = self. ai. _ game _ data. calculate _ ability _ cost ( ... | [
-0.07050429284572601,
-0.4443572759628296,
0.7192423939704895,
0.3089120090007782,
-0.019492769613862038,
0.07453522086143494,
-0.20125983655452728,
-0.4615832269191742,
0.23849712312221527,
0.4437148869037628,
0.05248275026679039,
0.5293984413146973,
-0.25360989570617676,
0.49921447038650... |
async def main ( self ) - > none : await self. execute ( ) | [
0.1402597427368164,
0.2883920669555664,
0.3282281160354614,
1.0343573093414307,
1.0913429260253906,
0.40796566009521484,
-0.2667960524559021,
0.781608521938324,
-0.8726087212562561,
-0.09326108545064926,
0.470413476228714,
0.41932907700538635,
-0.1747853308916092,
-0.168668732047081,
-0.... |
def _ apply _ header _ inherit ( self, hdu _ list ) : primary _ header = hdu _ list [ 0 ]. header reserved _ kwds = [ " comment ", " simple ", " bitpix ", " extend ", " nextend " ] for hdu in hdu _ list [ 1 : ] : if hdu. header. get ( " inherit ", false ) : for kwd in primary _ header : if ( kwd not in hdu. header ) an... | [
-0.5684846043586731,
-0.18383607268333435,
0.7530811429023743,
0.6997214555740356,
-0.12959563732147217,
0.3233649432659149,
-0.6908575892448425,
0.18478310108184814,
-0.07733104377985,
-0.046691201627254486,
-0.6662101745605469,
0.1020321324467659,
-0.7379310727119446,
1.6673935651779175,... |
def read ( self, file _ name : optional [ path ] = none ) : if file _ name is none : file _ name = self. file _ name with open ( file _ name,'r') as nominal : # parse the name line self. image _ name = nominal. readline ( ). strip ('\ n \ t \ r') # read in the spacecraft velocity vector and frame specifier for the unce... | [
-0.09203750640153885,
-0.6393086314201355,
0.7575139999389648,
-0.17437227070331573,
0.29349422454833984,
-0.10913445055484772,
-0.18288762867450714,
0.4986133277416229,
-0.44438573718070984,
-0.07891716808080673,
0.08877734839916229,
0.45159342885017395,
-0.21281027793884277,
0.2143203169... |
def get _ all ( self, key ) : for o in self. graph. objects ( self. asnode ( ), key ) : yield o | [
-0.6739667057991028,
0.02774951234459877,
0.5153563022613525,
0.6523738503456116,
0.0795804113149643,
0.019701912999153137,
-0.2774873673915863,
-0.553318977355957,
-0.34200915694236755,
0.25300925970077515,
0.034643881022930145,
0.15711137652397156,
-0.2643952965736389,
0.1675728857517242... |
def test _ hand _ count ( self ) : # test empty hand bob = player ('b. o. b. ', is _ computer = false ) self. asserttrue ( len ( bob. hand ) = = 0 ) self. asserttrue ( bob. get _ hand _ count ( ) = = 0 ) # test ace, jack = = 21 bob. hand = [ card ( 1, suites. diamonds ), card ( 11, suites. spades ) ] self. asserttrue (... | [
0.30523359775543213,
0.625399649143219,
0.9410942792892456,
0.33858904242515564,
0.9018511176109314,
0.8871902823448181,
1.123952031135559,
0.1845702826976776,
-0.14486250281333923,
-0.6989367604255676,
-0.4932088255882263,
-0.5339731574058533,
0.5933699011802673,
0.30211982131004333,
1.... |
def join _ plan ( data, plan, dates ='datdealversion ', hours ='hour') : plan _ iter = [ ] for itr in plan. iterrows ( ) : df _ iter = pd. dataframe ( pd. date _ range ( end = itr [ 1 ] [ 4 ], start = itr [ 1 ] [ 5 ], freq ='d'), columns = ['date'] ) df _ iter ['consumer'], df _ iter ['slot'], df _ iter ['startallocati... | [
-0.047215890139341354,
0.10626383870840073,
0.7675828337669373,
-0.22169330716133118,
-0.1430985927581787,
1.058577299118042,
-0.18057730793952942,
-0.3219553828239441,
-0.2535601556301117,
-0.00964360125362873,
-0.3583780825138092,
0.29102182388305664,
0.16311690211296082,
-0.254039496183... |
def fix _ ownership ( self, path ) : uid = os. environ. get ('sudo _ uid') gid = os. environ. get ('sudo _ gid') if uid is not none : os. chown ( path, int ( uid ), int ( gid ) ) | [
0.39814385771751404,
-0.6384549140930176,
0.5964258313179016,
0.9138827919960022,
0.5169102549552917,
0.2727343440055847,
0.47418317198753357,
0.7363625764846802,
-0.4502139687538147,
-0.6684867143630981,
0.7005746364593506,
1.2382354736328125,
0.13614676892757416,
0.6078153252601624,
0.... |
def novel _ word _ count ( self ) : self. word _ count = sum ( len ( line. split ( ) ) for line in self. originaltext ) self. network. word _ count = self. word _ count | [
0.9017484188079834,
-0.33985093235969543,
0.3452596962451935,
-0.6269893050193787,
0.07516630738973618,
0.4459017217159271,
-0.19656656682491302,
1.6561607122421265,
-0.9010646939277649,
0.16328564286231995,
-0.6495354771614075,
-0.14955328404903412,
-0.1062328889966011,
0.8324858546257019... |
def setup _ plone ( app, options = none ) : # set up request for debug / bin / instance run mode. app = makerequest ( app ) # if no site specified in options, assume there's exactly one and use that. if not options or not options. site _ root : plone = get _ plone _ site ( app ) else : plone = app. unrestrictedtraverse... | [
0.0030736755579710007,
0.08086854964494705,
0.5916592478752136,
0.734185516834259,
0.4676274061203003,
0.5670033693313599,
0.8241613507270813,
-0.22066672146320343,
1.3386725187301636,
-0.015727117657661438,
-0.42900922894477844,
0.3390549123287201,
-0.6598371267318726,
-0.6116998195648193... |
def dust _ acc _ diag ( params, snaps, bin _ nums = 100, labels = none, foutname ='dust _ acc _ diag. png ', style ='color ', implementation ='species') : # get plot stylization linewidths, colors, linestyles = plt _ set. setup _ plot _ style ( len ( snaps ), properties = config. dust _ species, style = style ) # set u... | [
0.06526250392198563,
0.028474513441324234,
0.772549033164978,
0.48324400186538696,
-0.20098961889743805,
0.43560242652893066,
1.208909034729004,
0.10442325472831726,
-0.15887372195720673,
-0.08318596333265305,
0.0840332880616188,
0.7070091962814331,
0.9090976119041443,
1.2359834909439087,
... |
def get _ master ( exchange _ id, format = u " default " ) : root = m. getitem ( m. itemshape ( t. baseshape ( format ) ), m. itemids ( t. recurringmasteritemid ( occurrenceid = exchange _ id ) ) ) return root | [
0.5081908702850342,
-0.3333736062049866,
0.4087832272052765,
-0.3690488636493683,
-0.37707215547561646,
-0.6376895904541016,
-0.7179802656173706,
0.37775057554244995,
0.7800359129905701,
-0.35383710265159607,
0.4506639540195465,
0.9326274394989014,
-0.25768694281578064,
-0.6672280430793762... |
def recall _ from _ cfg ( cfg ) : dataset = cfg [ " dataset " ] m = int ( cfg [ " m " ] ) h = 256 niter = 25 ilsiter = int ( cfg [ " ilsiter " ] ) icmiter = int ( 32 / ilsiter ) # roughly controls for runtime npert = int ( cfg [ " npert " ] ) randord = true if cfg [ " randord " ] = = " true " else false # make sure sch... | [
0.24698536098003387,
0.44794338941574097,
0.5825914144515991,
-0.7382287979125977,
-0.7982615232467651,
-0.3818777799606323,
0.2411007583141327,
-0.3676629960536957,
0.6260446906089783,
-0.33981889486312866,
-0.07519097626209259,
0.021924728527665138,
-1.261674404144287,
0.3462087213993072... |
async def test _ form _ network _ issue ( hass : homeassistant ) - > none : result1 = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ user } ) with patch ( " aussiebb. asyncio. aussiebb. _ _ init _ _ ", return _ value = none ), patch ( " aussiebb. asyncio. ... | [
-0.39887791872024536,
0.2083352506160736,
0.4721754193305969,
-0.039211172610521317,
0.6477777361869812,
0.3523796498775482,
-0.464361310005188,
-0.1983456164598465,
0.4938873052597046,
-0.8933873772621155,
-0.6773392558097839,
-0.12976115942001343,
-0.008910469710826874,
0.418877393007278... |
def get _ values ( self, fnames, size _ limit = 10 * 1024 ) : res = { } for fname in fnames : parts = self. get _ parts _ by _ name ( fname ) if not parts : raise keyerror ( " no such field : % s " % fname ) size = parts [ 0 ] [ " size " ] if size > size _ limit : raise sizelimiterror ( " part size = % s > limit = % s ... | [
-0.7266237735748291,
0.261768639087677,
0.728503406047821,
-0.39901769161224365,
-0.49969998002052307,
-0.5596961975097656,
-0.41628310084342957,
-0.2864983081817627,
-0.8688942193984985,
0.21350990235805511,
-0.8373407125473022,
-0.4109917879104614,
-0.0577363520860672,
0.2028204649686813... |
def _ _ relocatetab ( self, sourceid, sourceindex, targetindex ) : tw = self. vm. gettabwidgetbyid ( int ( sourceid ) ) if tw is not none : # step 1 : get data of the tab of the source tooltip = tw. tabtooltip ( sourceindex ) text = tw. tabtext ( sourceindex ) icon = tw. tabicon ( sourceindex ) whatsthis = tw. tabwhats... | [
-0.3623276948928833,
0.0752529725432396,
0.5749976634979248,
-1.0259426832199097,
0.09551344811916351,
-0.2550216317176819,
0.24985462427139282,
0.1479305624961853,
0.28351572155952454,
0.07351028174161911,
-0.2614355981349945,
-0.028653878718614578,
0.018360786139965057,
-0.96433120965957... |
def relu ( input _ tensor, name ) : return tf. keras. layers. relu ( name = name ) ( input _ tensor ) | [
0.2427777498960495,
-0.8948181867599487,
0.332549124956131,
-0.2099754810333252,
-0.8799071907997131,
-0.05497599393129349,
-0.5152053833007812,
0.4327981472015381,
0.01607833243906498,
-0.043951451778411865,
-1.019243836402893,
0.3380798399448395,
0.10829170793294907,
-1.6197065114974976,... |
async def web _ socket _ handler ( request ) : ws = web. websocketresponse ( ) await ws. prepare ( request ) await ws. send _ str ( " hello world " ) | [
0.24542690813541412,
0.2357242852449417,
0.6686274409294128,
0.12952367961406708,
-0.2189781218767166,
-0.08880849927663803,
0.24002651870250702,
-0.3675815165042877,
0.6275579929351807,
0.08911728858947754,
-0.02909361757338047,
0.5589039921760559,
-0.16770176589488983,
0.0445604622364044... |
def _ empirical _ auto _ ntk _ fn ( * * kwargs ) - > empiricalgetkernelfn : cache = { } def ntk _ fn ( x1 : pytree, x2 : optional [ pytree ], params : pytree, * * apply _ fn _ kwargs ) - > np. ndarray : " " " computes a single sample of the automatic empirical ntk. args : x1 : first batch of inputs. x2 : second batch o... | [
-0.03624824807047844,
0.15533749759197235,
0.5744771957397461,
0.17184272408485413,
-0.43976685404777527,
-1.3125275373458862,
0.6487444639205933,
-0.6427103281021118,
-0.9155444502830505,
0.34201133251190186,
-0.46437588334083557,
0.412912517786026,
0.9572709798812866,
0.13837245106697083... |
def markpuzzlesolved ( self, username, token ) : message = dict ( ) if not ( self. checktoken ( username, token ) ) : message [ " success " ] = false message [ " error " ] = " invalid authentication token. " return ( json. dumps ( message ) ) lastlogbook = self. lastlogbookentrybyuser ( username ) if lastlogbook is not... | [
-1.271328091621399,
0.18603622913360596,
0.40682873129844666,
0.1457487940788269,
0.2888728380203247,
-0.15873222053050995,
0.11804331094026566,
-0.24498562514781952,
-0.22814199328422546,
0.2235884666442871,
-1.4989852905273438,
0.26438573002815247,
-0.9125483632087708,
-0.600292384624481... |
def to _ last ( self ) : # submit should not happen a second time, since then we don't want # the widgets data to be written to the model form = self. findchild ( qtgui. qwidget,'form') if form : form. submit ( ) form. to _ last ( ) | [
-0.3016166687011719,
0.05382334068417549,
0.7690184116363525,
-0.9501909017562866,
1.2042733430862427,
0.013803782872855663,
-0.2535206377506256,
-0.12869921326637268,
-0.5824976563453674,
-0.1503765732049942,
-0.7263209223747253,
-0.2431601881980896,
-0.5206429362297058,
0.780215620994567... |
def favorite _ book ( title ) : print ( f " { title } is one of my favorite books. " ) | [
0.4982092082500458,
0.08678796142339706,
0.3339296281337738,
1.0407978296279907,
-0.3729911744594574,
0.36181822419166565,
-1.4299432039260864,
0.04169823229312897,
-0.5034469962120056,
0.4385482370853424,
0.30060234665870667,
0.8733971118927002,
-0.18165148794651031,
-0.7364625930786133,
... |
def parse _ maven _ base _ urls ( maven _ base _ urls ) : result = [ ] count = 0 for base _ url in maven _ base _ urls. split ( ", " ) : count + = 1 if not is _ url _ reachable ( base _ url ) : continue if base _ url. endswith ('/') : base _ url = base _ url [ 0 : - 1 ] result. append ( base _ url ) if len ( result ) <... | [
-0.9739536643028259,
-0.575077474117279,
0.5942850708961487,
0.7459040880203247,
0.17575666308403015,
0.26870763301849365,
-0.42954957485198975,
0.25308865308761597,
-0.25839197635650635,
0.7046805620193481,
-0.17799334228038788,
-0.6194215416908264,
-0.9569181203842163,
0.2289088219404220... |
def do _ update ( self, cmd, params ) : try : self. cur. execute ( cmd, params ) self. conn. commit ( ) except exception as e : logger. error ( e ) logger. error ( e. message ) return self. cur | [
-0.4644233286380768,
-1.005859136581421,
0.6898544430732727,
0.4316910207271576,
-0.23451048135757446,
0.40558212995529175,
-0.07079829275608063,
0.19000601768493652,
-0.8285069465637207,
0.6071635484695435,
1.1739280223846436,
-0.43909159302711487,
-1.3385484218597412,
-0.5014525055885315... |
def get _ all _ keywords ( self ) : keywords = set ( ) for a _ dict in self. get _ dicts ( ) : keywords = keywords. union ( a _ dict ['keywords'] ) return sorted ( keywords ) | [
0.4644486606121063,
-0.0510035902261734,
0.4718015491962433,
0.7429432272911072,
0.5987227559089661,
0.5667240619659424,
-0.846188485622406,
-0.22631414234638214,
0.00905374065041542,
0.032027605921030045,
-0.036218151450157166,
0.43949106335639954,
0.15872439742088318,
0.6314560770988464,... |
def query _ by _ cart _ points ( self, sites _ cart ) : tree = spatial. kdtree ( data = self. atom _ sites _ cart ) nn _ dists, nn _ groups = tree. query ( sites _ cart ) return [ self. atom _ labels [ i ] for i in nn _ groups ] | [
-0.5150711536407471,
-0.6467154026031494,
0.100797139108181,
-0.16860581934452057,
-0.41703730821609497,
0.21733245253562927,
-0.41463223099708557,
-0.5883707404136658,
0.026120180264115334,
0.9213295578956604,
0.37396982312202454,
0.44599342346191406,
0.6370847225189209,
-0.10395289957523... |
def allowance ( self, owner = none, spender = none ) : if owner = = none : owner = self. contract. account return call ( self. contract. allowance ( owner, spender ) ) | [
0.01840568706393242,
0.2739611864089966,
0.5497493147850037,
0.6578730940818787,
-0.5118340849876404,
-0.27650123834609985,
0.1279144436120987,
-0.008292132057249546,
1.0702176094055176,
1.0541523694992065,
0.8419079184532166,
0.8345838785171509,
-0.8552058935165405,
-0.6704966425895691,
... |
def _ _ ge _ _ ( self, other ) : if type ( other ) is type ( self ) : if self. type! = other. type : return notimplemented elif isinstance ( other, discordentity ) : if self. type not in other. _ _ class _ _. _ _ name _ _ : return notimplemented else : return notimplemented return ( self. id > = other. id ) | [
-1.343660593032837,
-0.0218616034835577,
0.8630967140197754,
-0.5389621257781982,
0.3309343159198761,
0.4855881631374359,
-0.23157264292240143,
-1.169230580329895,
0.17036259174346924,
0.1750389039516449,
-0.7214117050170898,
-0.06625460833311081,
-0.22024351358413696,
1.123823642730713,
... |
def load ( self, stb, defn ) : clss = [ ] # element classes while true : l = defn. readline ( ) # next definition line if len ( l ) = = 0 : break # eof check s = l. split (': =') # look for user - defined class if len ( s ) = = 2 : nme = s [ 0 ]. strip ( ) if len ( nme )! = 2 and not ellychar. isletterordigit ( nme [ 1... | [
-0.5984398126602173,
0.22342748939990997,
0.9360749125480652,
0.45553773641586304,
-0.2850978672504425,
-0.455096036195755,
0.446845680475235,
0.2624041736125946,
-0.34022918343544006,
-0.047457609325647354,
-0.4595125615596771,
-0.4857628345489502,
0.8867167830467224,
1.029310941696167,
... |
def plot _ observed ( progress, include ='observed ', start _ date = none, stop _ date = none, what ='exptime ', print _ summary = false, save = none ) : if start _ date : start _ date = desisurvey. utils. get _ date ( start _ date ) mjd _ min = desisurvey. utils. local _ noon _ on _ date ( start _ date ). mjd else : s... | [
0.09635285288095474,
0.5688378810882568,
0.9600051045417786,
-0.5423789024353027,
-1.2472589015960693,
0.5811530351638794,
-0.2101357877254486,
-0.10782894492149353,
-0.08273738622665405,
0.2999672591686249,
0.6363773345947266,
0.721774697303772,
0.5948061943054199,
0.4407232105731964,
-... |
def sample _ recipe ( user, * * params ) : defaults = {'title':'sample title ','time _ minutes': 5,'price': 12. 84 } defaults. update ( * * params ) return recipe. objects. create ( user = user, * * defaults ) | [
0.6733508110046387,
0.5683494806289673,
0.36342287063598633,
0.7975246906280518,
-0.3555128574371338,
-0.2109440565109253,
-1.2100894451141357,
0.19038204848766327,
-0.4544329345226288,
0.1891375482082367,
-0.988458514213562,
-0.33893975615501404,
-0.39412179589271545,
-0.31484290957450867... |
def from _ chunks ( cls, chunks ) : im = cls ( ) im. chunks = chunks im. init ( ) return im | [
0.21692058444023132,
-0.6596443057060242,
0.17896050214767456,
0.1226252093911171,
-0.9086424708366394,
-0.14798130095005035,
-0.6540082097053528,
-0.40037843585014343,
0.3433898985385895,
-0.24974898993968964,
-0.3892885148525238,
-0.36826589703559875,
0.2946474850177765,
-0.2054223269224... |
def parse _ requirements ( requirements : list [ str ] ) - > list [ str ] : packages = [ ] for req in requirements : try : for line in open ( req, " r " ). readlines ( ) : pkg = line. strip ( ) if pkg and not pkg. startswith ( " # " ) : packages. append ( pkg ) # alternatively, let pip handle requirements # open ( req,... | [
-0.5535628795623779,
-0.6809126138687134,
0.4895109534263611,
0.6054325103759766,
0.39048558473587036,
0.48359429836273193,
-0.8501990437507629,
0.3920198082923889,
0.6254721879959106,
0.0625125989317894,
0.7635432481765747,
-0.9861675500869751,
-0.018493136391043663,
1.1499098539352417,
... |
def santer _ compensation ( xvec, yvec, slope, intercept ) : ymod = xvec * slope + intercept evec = yvec - ymod emean = np. mean ( evec ) n _ t = len ( xvec ) r1 = np. abs ( np. sum ( ( evec [ : - 1 ] - emean ) * ( evec [ 1 : ] - emean ) ) / np. sum ( ( evec - emean ) * * 2 ) ) n _ e = n _ t * ( 1 - r1 ) / ( 1 + r1 ) s... | [
1.225753903388977,
-0.614702045917511,
0.7239769697189331,
0.1453959047794342,
-0.29969727993011475,
0.05324196442961693,
0.3070102334022522,
0.5379477143287659,
0.46663913130760193,
1.095575213432312,
0.21008047461509705,
-0.2127373069524765,
0.7475882172584534,
-0.045410849153995514,
0... |
def set _ widget _ color _ style ( self, rgb, a, tip, target ) : # get string name of target object name = str ( target. objectname ( ) ) # napravi stil stil = pomocne _ funkcije. rgba _ to _ style _ string ( rgb, a, tip, name ) # set stil u target target. setstylesheet ( stil ) | [
-0.6960530877113342,
-0.9928420782089233,
0.3186081051826477,
-0.5965638756752014,
0.0539097897708416,
-0.09507731348276138,
-0.16481409966945648,
-0.03945292532444,
-0.3618590831756592,
0.8819595575332642,
0.3574846088886261,
0.31565362215042114,
0.3765749931335449,
-0.13961133360862732,
... |
def get _ pedal _ type _ from _ ast ( value : ast. ast, evaluate _ name = none ) - > type : try : if isinstance ( value, ast. constant ) : return get _ pedal _ type _ from _ value ( value. value, evaluate _ name ) except attributeerror as e : pass if isinstance ( value, ast. name ) : return get _ pedal _ type _ from _ ... | [
0.016758432611823082,
-0.011651406064629555,
0.7858517169952393,
-0.39914456009864807,
-0.9847415685653687,
-0.5577841401100159,
-0.3098730742931366,
-0.930292010307312,
0.18289972841739655,
0.24524258077144623,
-0.0601213276386261,
0.4579133689403534,
0.1816672384738922,
0.785940170288085... |
def update ( self, result ) : self. visits + = 1 self. wins + = result | [
-1.7530746459960938,
0.1271270364522934,
0.490884006023407,
0.35708650946617126,
-0.32437634468078613,
-0.22201776504516602,
1.002929449081421,
-0.39700669050216675,
0.12937387824058533,
0.0018023222219198942,
-0.8068186640739441,
0.3018798232078552,
-0.13006632030010223,
-0.40719071030616... |
def resources ( self ) : yield from get _ resources _ in _ dir ( os. path. join ( self. path, " resources " ), self ) | [
0.18094801902770996,
-0.4374072253704071,
0.4991632401943207,
0.005064415279775858,
0.1942644566297531,
0.3663097023963928,
0.7015955448150635,
-0.6305609345436096,
0.2352876365184784,
-0.4638144075870514,
0.7061538696289062,
0.03965305909514427,
0.3995060920715332,
0.5194997787475586,
-... |
def puzzle ( self ) : return self. source | [
-0.21141417324543,
-0.0131790516898036,
0.23548850417137146,
-0.361391544342041,
-0.5736287236213684,
0.18250688910484314,
1.2718137502670288,
0.1532844752073288,
1.3514891862869263,
-0.7170068621635437,
-0.5473228693008423,
-0.17064692080020905,
-0.3824082911014557,
-0.6321415305137634,
... |
def symbolic _ joint _ probabilities _ consecutive _ external ( symx, symy ) : if len ( symx )! = len ( symy ) : raise valueerror ('all arrays must have same length') symx = np. array ( symx ) symy = np. array ( symy ) jp = symbolic _ joint _ probabilities _ triple ( symx [ 1 : ], symy [ : - 1 ], symx [ : - 1 ] ) retur... | [
0.5740641355514526,
0.4224281311035156,
0.7869531512260437,
0.3612743616104126,
-0.3465690314769745,
-0.4807223379611969,
0.21031330525875092,
0.19451458752155304,
0.10657794773578644,
0.9332932829856873,
0.47230979800224304,
1.0881413221359253,
-0.718024492263794,
-0.622351348400116,
0.... |
def get _ mcmc _ stats ( all _ samples, v _ names, out _ file _ base, debug, stats _ types = ['all'], return _ cov = false ) : # number of variables, columns, samples in the file n _ vars = len ( v _ names ) n _ cols = all _ samples. shape [ 1 ] n _ sam = all _ samples. shape [ 0 ] # extract all mcmc chain variables in... | [
0.12395698577165604,
-0.5699164271354675,
0.9927970170974731,
0.34437716007232666,
0.34558284282684326,
-0.28844013810157776,
0.22506538033485413,
0.274380087852478,
-0.800488293170929,
0.3274228274822235,
0.38109633326530457,
0.4843358099460602,
-0.36275237798690796,
0.35899925231933594,
... |
def test _ bad _ minlength ( ) : bad = random. randint ( 1, 19 ) rv, out = getstatusoutput ( f'{ prg } - m { bad } { input1 }') assert rv! = 0 assert re. match ('usage : ', out, re. i ) assert re. search ( f'- - minlength " { bad } " must be greater than 20 ', out ) | [
0.8464556932449341,
0.07307031005620956,
0.32392337918281555,
-0.15418243408203125,
0.35696840286254883,
0.595818817615509,
-0.1389627605676651,
-0.004760207142680883,
0.12285012751817703,
-0.5702842473983765,
0.01958211325109005,
0.6294898390769958,
-0.5743707418441772,
0.1622761338949203... |
def solve ( url, func ) : print ( " solving " + func. _ _ name _ _ + '...') # get challenge response = requests. post ( url, json = {'token': token } ) if response. status _ code! = 200 : raise exception ( " fetching challenge for " + func. _ _ name _ _ + " faied with status code : " + response. status _ code + " and m... | [
-0.32369527220726013,
-0.3281663656234741,
0.8950387239456177,
0.1414993554353714,
0.3511331379413605,
-0.38342759013175964,
-0.39753320813179016,
0.2472383826971054,
-0.28796160221099854,
-0.46703314781188965,
-1.0167806148529053,
-0.004420160781592131,
0.6456749439239502,
0.1536853909492... |
def clusters _ to _ files ( mols, clusters, smirs _ order _ types, json _ file _ name, mol _ dir = '. / mol _ files /') : directory = os. path. abspath ( mol _ dir ) mfile _ names = list ( ) for midx, mol in enumerate ( mols ) : file _ name = mol. gettitle ( ) + '. oeb'mfile _ names. append ( file _ name ) for param, p... | [
-0.8656752109527588,
-0.6570916175842285,
0.7137612104415894,
-0.10286731272935867,
0.7620052695274353,
-0.4894266426563263,
0.480528861284256,
-0.70561683177948,
0.26445215940475464,
0.4924760162830353,
-0.7549806237220764,
0.49393969774246216,
0.08367802202701569,
-0.0058954497799277306,... |
def run ( self ) : assert self. output _ dir is not none assert self. _ chrome _ ctl = = none assert self. _ local _ cache _ directory _ path = = none self. _ cleantraceoutputdirectory ( ) if self. android _ device : self. _ chrome _ ctl = controller. remotechromecontroller ( self. android _ device ) else : self. _ chr... | [
-0.4522356688976288,
0.2824958562850952,
0.6842491030693054,
0.6848368644714355,
0.21799254417419434,
-0.2414148896932602,
1.2103605270385742,
-0.6167222261428833,
0.32925599813461304,
0.4267082214355469,
0.10501102358102798,
-0.15742816030979156,
-0.2879501283168793,
0.14009550213813782,
... |
def prefix _ sum ( self, index : int ) - > _ t : # handle indexing behaviour, count * including * index. index = self. _ nmlz _ index ( index, len ( self ) ) + 1 # set accumulator to value at index k. doesn't # require it to be initialized to value that is # dependant on op. binop = self. binop acc = self. _ st [ index... | [
-0.0691889226436615,
0.6982493996620178,
0.7381319403648376,
0.06670543551445007,
-0.7955738306045532,
-0.6196736693382263,
1.3535823822021484,
-0.9373776912689209,
1.0797996520996094,
0.16724172234535217,
-0.6245220303535461,
0.5447841882705688,
-0.25082337856292725,
-0.22865179181098938,... |
def gethashattrs ( self ) : hash _ attrs = ['name ','minimum ','maximum ','type ', ] attr _ str = " " for attr in hash _ attrs : attr _ str + = str ( getattr ( self, attr ) ) return attr _ str | [
-0.3847043812274933,
-0.476663738489151,
0.5329836010932922,
-0.0920577198266983,
0.26465174555778503,
0.7534369230270386,
-1.1349204778671265,
-0.6178810596466064,
-0.7680153250694275,
0.23892872035503387,
-0.0688677653670311,
0.012894709594547749,
0.10104947537183762,
-0.1089787632226944... |
def get _ plant _ id _ in _ interconnects ( interconnects, grid ) : areas = _ check _ areas _ are _ in _ grid _ and _ format ( { " interconnect " : interconnects }, grid ) loadzones = set. union ( * ( grid. model _ immutables. zones [ " interconnect2loadzone " ] [ i ] for i in areas [ " interconnect " ] ) ) plant = gri... | [
0.056316375732421875,
-0.8962739706039429,
0.49196740984916687,
-0.4169265329837799,
0.3439870774745941,
-0.27378132939338684,
0.5773845911026001,
-0.26047077775001526,
0.20071916282176971,
0.6111036539077759,
-0.06433345377445221,
0.2530391812324524,
-1.0666013956069946,
-0.90148502588272... |
def find _ cumulative _ pairs ( distances, cut _ off ) : num _ of _ pairs = np. zeros ( len ( distances. keys ( ) ) ) for index, key in enumerate ( distances ) : num _ of _ pairs [ index ] = np. asarray ( np. where ( distances [ key ] < cut _ off ) ). shape [ 1 ] normalizer = np. amax ( num _ of _ pairs ) num _ of _ pa... | [
-0.0037085942458361387,
0.2948155701160431,
0.6220577359199524,
-0.5033138394355774,
-1.1857695579528809,
0.22328361868858337,
0.6299555897712708,
0.6769530773162842,
0.2897893488407135,
1.0445432662963867,
0.4164637327194214,
-0.8403694033622742,
-0.3126801550388336,
0.836790144443512,
... |
def plot _ weekend _ tweets _ against _ rank ( self, first _ run ) : # if first count then filter mojo data by date mojo _ df = self. mojo _ box _ office _ df if first _ run : mojo _ df = mojo _ df [ mojo _ df ['end _ date'] < = self. first _ run _ end ] # get weekend tweet counts mojo _ df [ " weekend _ tweet _ count ... | [
0.49202314019203186,
0.1044812947511673,
0.6936485171318054,
-1.0700803995132446,
-0.07874518632888794,
0.42155247926712036,
0.12698301672935486,
0.5903169512748718,
-0.8368796110153198,
0.059231970459222794,
0.39035817980766296,
1.3362159729003906,
-0.1038823351264,
0.42422235012054443,
... |
def test _ get _ module _ mname _ ok _ star ( self ) : module = " knownrvplanets " m = get _ module ( module ) # this is a non - prototype module of type planetpopulation self. validate _ module ( m, " planetpopulation " ) | [
-0.9134572148323059,
-0.305867999792099,
0.34960421919822693,
0.17454712092876434,
-0.2525460422039032,
1.4170335531234741,
-0.5725600719451904,
-0.6123740673065186,
0.8268417716026306,
0.25607019662857056,
-0.3271838128566742,
0.6043683886528015,
0.21973173320293427,
0.6512635350227356,
... |
def creerdossier ( ftp, dossier _ chemin, dossier _ nom ) : ftp. cwd ( dossier _ chemin ) try : ftp. mkd ( dossier _ nom ) except ftplib. error _ perm : none ftp. cwd ( '..') | [
0.42406219244003296,
0.2557353675365448,
0.3842093348503113,
-0.2865302860736847,
0.08885670453310013,
0.35738229751586914,
-0.5009515881538391,
-0.1287921667098999,
-0.8709335327148438,
-1.1164870262145996,
-0.05074765160679817,
-0.12776753306388855,
-0.08165255188941956,
0.14817076921463... |
def hinted _ tuple _ hook ( obj ) : if'_ _ tuple _ _'in obj : return tuple ( obj ['items'] ) else : return obj | [
-1.709214687347412,
-0.011791936121881008,
0.7059158086776733,
-0.18410271406173706,
0.4830034375190735,
0.004582938738167286,
0.08541160821914673,
-0.2712985575199127,
0.08842622488737106,
0.3693082332611084,
0.24364489316940308,
-1.0186994075775146,
0.27887654304504395,
-0.70872563123703... |
def build _ dominoes ( ) : # create the dominoes. stack = [ ] for i in range ( 0, 7 ) : for j in range ( 0, 7 ) : var = [ i, j ] if ( [ i, j ] in stack ) or ( [ j, i ] in stack ) : pass else : stack. append ( var ) # build the default domino values. they are'assigned'to'none ', have not been played, and default as not ... | [
-0.9866304397583008,
0.13771381974220276,
0.7447056770324707,
-0.14694279432296753,
-0.7051283121109009,
-0.9924960136413574,
0.1451685130596161,
0.4833088517189026,
-0.7157588005065918,
0.29722630977630615,
-1.4582982063293457,
0.12977512180805206,
-0.3146415054798126,
0.27418577671051025... |
def getvalue ( self, xpath, default = " " ) : xpath = self. _ applybase ( xpath ) results = self. context. xpatheval ( xpath ) if ( len ( results ) > 0 ) : return results [ 0 ]. content return default | [
0.00031253157067112625,
0.9064038395881653,
0.49228259921073914,
0.5988763570785522,
0.49479806423187256,
-0.5828080773353577,
-0.8278502225875854,
-0.778730571269989,
0.40595290064811707,
0.2608623802661896,
0.19412212073802948,
-0.2820449471473694,
-0.329970121383667,
-0.7995043396949768... |
def test _ functionbuilder _ kwonly _ marker ( signature, should _ match ) : matched = bool ( functionbuilder. _ kwonly _ marker. search ( signature ) ) message = " {! r } : should _ match was { }, but result was { } ". format ( signature, should _ match, matched ) assert bool ( matched ) = = should _ match, message | [
0.1536632925271988,
0.16679365932941437,
0.21543216705322266,
1.513647198677063,
-0.08939167857170105,
0.34505149722099304,
-0.13891194760799408,
0.9997939467430115,
0.3517574369907379,
-0.7801579833030701,
-0.5927620530128479,
0.13835762441158295,
-0.31683701276779175,
0.3531956374645233,... |
def ticker ( self, market _ id : str ) : data = self. get ( f " { market _ id } / market / ticker " ) if self. return _ json : return data return _ m. ticker. create _ from _ json ( data ) | [
-0.34427496790885925,
-0.07725418359041214,
0.08433535695075989,
0.288124144077301,
0.6596285700798035,
-0.5629567503929138,
-0.49610501527786255,
-1.0030664205551147,
-0.11307656019926071,
-0.38968926668167114,
-0.4255543649196625,
0.9832972288131714,
-0.6940230131149292,
0.12798443436622... |
def clean _ record _ id ( seq _ record ) : if " / " in seq _ record. id : clean _ id = str ( seq _ record. id ) clean _ id = clean _ id. split ('/') [ 0 ] else : clean _ id = seq _ record. id return clean _ id | [
0.2480430006980896,
-1.0965607166290283,
0.3670291304588318,
0.13729967176914215,
-0.2505321502685547,
-0.16089729964733124,
0.3233584463596344,
0.5349996089935303,
0.4411180913448334,
1.250692367553711,
0.20596368610858917,
-0.15032124519348145,
-0.9982178807258606,
0.19501441717147827,
... |
def split _ textline ( table, textline, direction, flag _ size = false, strip _ text = " " ) : idx = 0 cut _ text = [ ] bbox = textline. bbox try : if direction = = " horizontal " and not textline. is _ empty ( ) : x _ overlap = [ i for i, x in enumerate ( table. cols ) if x [ 0 ] < = bbox [ 2 ] and bbox [ 0 ] < = x [ ... | [
0.023213107138872147,
-0.41829386353492737,
1.0035499334335327,
0.16903606057167053,
-0.5265135169029236,
0.15475937724113464,
0.5611327886581421,
-0.12464744597673416,
-0.5456671118736267,
1.0945940017700195,
-0.625798761844635,
-0.27609941363334656,
-0.07081594318151474,
-0.4446131587028... |
def calculate _ stride ( var : variable, axis : axis ) - > union [ int, placeholder ] : return mul ( var. shape [ var. order. axes _ dict [ axis ] + 1 : ] ) | [
0.355130136013031,
0.9480705261230469,
0.4267480671405792,
-0.1867407262325287,
-0.32920631766319275,
-0.8877812027931213,
0.2987458109855652,
0.04361652210354805,
0.007501713931560516,
0.18733634054660797,
-1.1667455434799194,
-0.07068894803524017,
-0.17773175239562988,
-0.251956969499588... |
def teardown _ logger ( logger ) : while logger. handlers : for h in logger. handlers : logger. removehandler ( h ) h. flush ( ) h. close ( ) logging. shutdown ( ) | [
-0.5806106925010681,
-0.8771837949752808,
0.4012658894062042,
-0.9416564106941223,
-0.1475464254617691,
0.19772431254386902,
1.183167815208435,
-0.5585776567459106,
0.9341482520103455,
-0.6041849851608276,
0.23659273982048035,
-0.3791583776473999,
-0.7335014343261719,
1.1156176328659058,
... |
def qvoigt ( x, amp, pos, fwhm, gam ) : tmp = 1 / special. wofz ( np. zeros ( ( len ( x ) ) ) + 1j * np. sqrt ( np. log ( 2. 0 ) ) * gam ). real tmp = tmp * amp * special. wofz ( 2 * np. sqrt ( np. log ( 2. 0 ) ) * ( x - pos ) / fwhm + 1j * np. sqrt ( np. log ( 2. 0 ) ) * gam ). real return tmp | [
0.8650068640708923,
-0.16211523115634918,
0.41218101978302,
-0.4295952320098877,
-1.205060601234436,
-0.05796939507126808,
-0.5549879670143127,
-0.2884468734264374,
0.19028103351593018,
0.32092902064323425,
-0.5467667579650879,
0.40125399827957153,
-0.4233313202857971,
-0.0778963565826416,... |
def allow _ multi _ select ( self ) - > optional [ bool ] : return pulumi. get ( self, " allow _ multi _ select " ) | [
-0.6310670375823975,
0.2462727278470993,
0.49317461252212524,
0.7305414080619812,
0.5717101097106934,
0.8450274467468262,
-0.557519257068634,
-0.6794808506965637,
0.7689917683601379,
0.5131116509437561,
0.27234312891960144,
0.7921391129493713,
-0.13350993394851685,
-0.4235440492630005,
-... |
def test _ nonexistent _ image ( self ) - > none : self. lookups [ " matrix. org " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] result = ( b " " " < html > < body > < img src = " http : / / cdn. matrix. org / foo. jpg " > < / body > < / html > " " " ) channel = self. make _ request ( " get ", " preview _ url? url = http : ... | [
-0.7190887331962585,
0.7823931574821472,
0.579777717590332,
-0.9137705564498901,
0.2344820648431778,
-0.2949606478214264,
-0.17079517245292664,
-0.21137623488903046,
-0.587034285068512,
0.09750112891197205,
0.11533216387033463,
0.10006175190210342,
-0.2705062925815582,
0.6306569576263428,
... |
async def test _ attributes _ rgb ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 3 # 3 channel light ( rgb ) mac = config [ " mac " ] async _ fire _ mqtt _ message ( hass, f " { defaul... | [
0.18498395383358002,
0.08270047605037689,
0.46669164299964905,
-0.4865514934062958,
0.4593980610370636,
0.4875483214855194,
-0.09851914644241333,
0.13823238015174866,
0.25988391041755676,
-0.7989435791969299,
-0.5461825132369995,
0.061849791556596756,
0.3344830870628357,
0.8929823637008667... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.