text
stringlengths
25
2.19k
embedding
listlengths
768
768
def render _ empty ( self, *, ctx, add _ format ) :
[ -0.5133135318756104, -0.2766619026660919, 0.3497683107852936, -0.2322157621383667, 0.9484816193580627, 0.5123159885406494, -0.4903373718261719, -0.582456111907959, 0.35925915837287903, -0.6799264550209045, 0.17735226452350616, 0.6864922642707825, -0.2582976222038269, 0.2725638747215271, ...
def location ( self ) - > str : return pulumi. get ( self, " location " )
[ 0.2190219908952713, -0.34800463914871216, 0.4048655033111572, 0.17743009328842163, 0.7626453042030334, 1.2138785123825073, 0.4917268455028534, 0.4296562373638153, 0.4276277720928192, 0.17195431888103485, 0.6824976205825806, 0.4566878378391266, 0.8631269931793213, -1.5780937671661377, -1....
def test _ list _ integer _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 3. xsd ", instance = " nistdata / list / ...
[ -0.4727684557437897, 0.00031977094477042556, 0.3831673562526703, 1.0362926721572876, -0.44954198598861694, 0.7067760229110718, -0.9855726361274719, 0.5907253623008728, 1.4372823238372803, 1.1217987537384033, -0.9455446600914001, 0.024540729820728302, -0.13985824584960938, 0.210219040513038...
def get _ inserts ( self ) : return { group : [ insertfromselect ( self. get _ table _ name ( group ), sel ) for sel in sels ] for group, sels in self. get _ selects ( ). items ( ) }
[ -1.0402309894561768, -0.0869106724858284, 0.269822895526886, -0.7615063190460205, -0.4840986430644989, -0.16444407403469086, -0.17853830754756927, -0.4130454361438751, -0.5572496652603149, 0.2264992594718933, -0.7118125557899475, -0.5478512644767761, -0.7072502374649048, 0.5974847078323364...
def run _ loop ( self ) - > none : module _ logger. debug ( " running tests " ) self. run _ tests ( ) module _ logger. debug ( " running recovery " ) self. do _ recovery ( ) self. do _ recovered ( ) module _ logger. debug ( " running alerts " ) self. do _ alerts ( ) module _ logger. debug ( " running logs " ) self. do ...
[ -0.1806119829416275, -0.5943388938903809, 0.4976389706134796, 0.3476342558860779, 0.8433423042297363, 1.041209101676941, 0.9449019432067871, -0.6573452949523926, -0.15161436796188354, -0.08679927885532379, -0.7294236421585083, -0.1737813949584961, -0.7844946384429932, 0.8157948851585388, ...
def clear ( self ) : self. players. clear ( ) self. round _ start _ player = - 1 self. round _ next _ player = - 1 self. round _ one _ shot = true self. round _ clockwise = true self. dealer _ num = - 1
[ -0.9599538445472717, -0.9280362129211426, 0.4216982424259186, -0.19204425811767578, 0.7826442122459412, 0.12726697325706482, 0.5587437152862549, -0.5957659482955933, -0.5532587170600891, 1.1449851989746094, -0.07991441339254379, 0.9712128639221191, -0.2724415063858032, 0.43082165718078613,...
def calculate _ checksum _ on _ iterator ( itr, algorithm = d1 _ common. const. default _ checksum _ algorithm ) : checksum _ calc = get _ checksum _ calculator _ by _ dataone _ designator ( algorithm ) for chunk in itr : checksum _ calc. update ( chunk ) return checksum _ calc. hexdigest ( )
[ -0.46070238947868347, 0.07044864445924759, 0.3815007209777832, 0.045406922698020935, -0.2478216141462326, -0.104861781001091, 0.15949006378650665, 0.1796286553144455, -0.12838758528232574, 0.20662888884544373, 0.08061370253562927, -0.4321717321872711, 0.5999237298965454, 0.8169445395469666...
def get _ all _ domain _ records ( self, fqdn : str ) : url = self. domain _ records _ url. format ( fqdn ) response = requests. get ( url, headers = self. header ) return response
[ -0.12876570224761963, 0.034807026386260986, 0.5554796457290649, -0.39287543296813965, 0.6527681946754456, -0.5222489833831787, -1.233232855796814, -0.19311673939228058, 0.2638280689716339, -0.6460866928100586, -0.7086474895477295, 0.715348482131958, -0.23982647061347961, 0.5649305582046509...
def parsegpx ( self, dir, files = [ ] ) : if len ( files ) = = 0 : files = self. getallactivites ( ) parsed _ files = { } for file in files : datapoints = [ ] with open ( dir + " / " + file,'r') as gpxfile : try : gpx = parse ( gpxfile ) except : print ( traceback. format _ exc ( ) ) pass # print ( " file " + dir + " /...
[ 0.08826412260532379, -0.0023875136394053698, 0.8843821883201599, 0.04769861325621605, -0.38267460465431213, 0.6146606802940369, -0.23342062532901764, 0.4348286986351013, -0.9368323683738708, 0.5566688776016235, 0.12433219701051712, -0.5773022174835205, 0.09379051625728607, 0.26924768090248...
def create _ cluster _ run _ job ( self, c, arguments ) : response = c. run _ job _ flow ( name = self. app _ name, loguri ='s3 : / / { } / mylog / '. format ( self. my _ bucket ), releaselabel = " emr - 5. 29. 0 ", instances = {'instancegroups': [ {'name':'emrmaster ','market':'on _ demand ','instancerole':'master ','...
[ 0.4745175540447235, -0.3205852210521698, 0.8253203630447388, 0.4795103073120117, 0.3438909649848938, 0.11015810817480087, 0.05688540264964104, 0.2663106918334961, -0.181706503033638, -0.2678524851799011, -0.7528789639472961, 0.11674324423074722, -0.5139195919036865, -0.3435211479663849, ...
def command _ wtf ( self, brain, args ) : if not args : return response = [ ] basedir ='/ home / y / share / wtf'wtf _ dict = self. generate _ dict ( basedir ) for arg in args : if arg. lower ( ) in wtf _ dict : response. append ( " { 0 } : { 1 } ". format ( arg, wtf _ dict [ arg. lower ( ) ] ) ) return " \ n ". join (...
[ -0.18871259689331055, -0.5435837507247925, 0.5814194083213806, 0.007468028925359249, 1.5566833019256592, -0.35476621985435486, 0.6189707517623901, -0.25734493136405945, -0.5652345418930054, 0.320098876953125, -0.12160871922969818, 0.23451967537403107, -1.1374876499176025, 0.439828693866729...
def inference _ ad3 ( unary _ potentials, pairwise _ potentials, edges, relaxed = false, verbose = 0, return _ energy = false, branch _ and _ bound = false, inference _ exception = none ) : import ad3 bmultitype = isinstance ( unary _ potentials, list ) if bmultitype : res = ad3. general _ graph ( unary _ potentials, e...
[ -0.447626531124115, 0.4496893286705017, 0.8868956565856934, -0.1913631558418274, 0.20276647806167603, -0.06359992921352386, -0.43587005138397217, 0.4187144339084625, 0.632952094078064, 0.5904397368431091, 1.0809376239776611, 0.5816568732261658, -0.36166489124298096, 0.15747225284576416, ...
def end _ switch _ isotopy ( self, switch ) : # first we need to find the switch of the large train track where the # isotopy gets stuck. small _ tt = self. _ small _ tt branches = small _ tt. outgoing _ branches ( switch ) for br in branches : if self. is _ branch _ collapsed ( br ) : next _ sw = small _ tt. branch _ ...
[ -0.9518195390701294, 0.03405069187283516, 0.9620578289031982, -0.26988717913627625, -0.5265096426010132, 0.43330904841423035, 0.9255205988883972, -0.31270894408226013, -0.015183834359049797, 0.621416449546814, -0.28628695011138916, -1.2826597690582275, -0.47347453236579895, -0.157353624701...
def f _ measure ( reference _ onsets, estimated _ onsets, window =. 05 ) : validate ( reference _ onsets, estimated _ onsets ) # if either list is empty, return 0s if reference _ onsets. size = = 0 or estimated _ onsets. size = = 0 : return 0., 0., 0. # compute the best - case matching between reference and estimated o...
[ 0.1691422462463379, 0.0010235841618850827, 0.6869298815727234, 0.4654306173324585, -0.04329998791217804, -0.9610462188720703, 0.04077060893177986, -0.018994547426700592, 0.3580494523048401, 0.1082572266459465, 0.026727335527539253, 0.4638454020023346, 0.4854743182659149, 1.155487298965454,...
def adjust _ gamma ( image, gamma = 1. 35 ) : # build a lookup table mapping the pixel values [ 0, 255 ] to # their adjusted gamma values invgamma = 1. 0 / gamma table = np. array ( [ ( ( i / 255. 0 ) * * invgamma ) * 255 for i in np. arange ( 0, 256 ) ] ). astype ( " uint8 " ) # apply gamma correction using the lookup...
[ -0.38401010632514954, -0.8688004612922668, 0.6689775586128235, -0.03512025624513626, -0.0071506192907691, -0.04208208993077278, 0.257477343082428, 0.1856294870376587, 0.46963822841644287, 0.3155086040496826, 1.3353867530822754, 0.6981467008590698, -0.4392426013946533, 0.6548064947128296, ...
def focuskb ( direction, * * kwargs ) : if'hor'in direction. lower ( ) : kwargs. setdefault ('scan _ motor ', nano _ stage. sx ) kwargs. setdefault ('slit _ motor ', jjslits. h _ trans ) slit _ range = 0. 500 kwargs. setdefault ('slit _ stepsize ', 0. 05 ) kwargs. setdefault ('slitgap _ motor ', jjslits. h _ gap ) kwar...
[ 0.7940379977226257, -0.007989289239048958, 0.6471789479255676, 0.3608138859272003, -1.4287530183792114, 0.28644588589668274, 0.10405958443880081, 0.47116926312446594, 0.43675658106803894, -0.048005420714616776, 0.3881792724132538, 1.0908350944519043, -0.38361451029777527, 0.491778135299682...
def get _ current _ losses ( self ) : # errors _ ret = ordereddict ( ) errors _ ret = self. cyclegan. get _ current _ losses ( ) for name in self. loss _ names : if isinstance ( name, str ) : errors _ ret [ name ] = float ( getattr ( self,'loss _'+ name ) ) return errors _ ret
[ -1.0671241283416748, -1.1657426357269287, 0.2818971574306488, -0.14018025994300842, -0.12695735692977905, -0.3509065508842468, -0.1796467900276184, -1.4541347026824951, -1.256428837776184, 0.10347969830036163, -0.32730183005332947, 0.5546723008155823, -0.022108888253569603, 1.0421912670135...
def _ initial _ guess ( opt : curve. fitoptions, x _ values : np. ndarray, y _ values : np. ndarray, num _ qubits : int ) - > curve. fitoptions : opt. p0. set _ if _ empty ( b = 1 / 2 * * num _ qubits ) # use the first two points to guess the decay param dcliff = x _ values [ 1 ] - x _ values [ 0 ] dy = ( y _ values [ ...
[ 0.61940997838974, -0.17496389150619507, 0.5346078872680664, -0.10920613259077072, 0.6666390299797058, 0.1421809047460556, 0.3770625591278076, 0.3187178075313568, -0.05701950937509537, 0.052852410823106766, 0.3217044472694397, 0.4697762131690979, 0.40651294589042664, 0.6410043835639954, -...
def dom _ xss ( html : str, payload, url ) : if " <! doctype html > " in html or " <! doctype html > " in html : methods = [ " write ", " writeln ", " add ", " after ", " append ", " animate ", " insertafter ", " insertbefore ", " before ", " html ", " prepend ", " replaceall ", " replacewith ", " wrap ", " wrapinner "...
[ 0.3178621232509613, 0.6334595680236816, 1.1467138528823853, 0.2703443765640259, -1.1435011625289917, -0.45552629232406616, -0.03308883681893349, -0.3611563742160797, 0.07645171880722046, -0.10385329276323318, 0.41740676760673523, 0.34609755873680115, -0.1832369714975357, 0.727760910987854,...
def auto _ enable _ controls ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " auto _ enable _ controls " )
[ 0.22688144445419312, 0.30385735630989075, 0.6114110946655273, 0.7880537509918213, 1.2458668947219849, 1.020837664604187, 0.08450229465961456, 0.301909863948822, 0.48773184418678284, -0.23383638262748718, -0.8994688391685486, 0.5992587804794312, -0.8305161595344543, -0.7724819779396057, -...
def definearguments ( self, customparser ) : if not customparser : return self. cmdbase. add _ login _ arguments _ group ( customparser ) customparser. add _ argument ( " - - reboot ", dest = " reboot ", help = " use this flag to perform a reboot command function after " " completion of operations. for help with parame...
[ -0.6213275790214539, -0.3395022451877594, 0.775661051273346, 0.20470929145812988, -0.11263511329889297, -0.39216163754463196, -0.08852764219045639, -0.16984125971794128, 0.051955267786979675, 0.18090595304965973, -0.524488091468811, 0.6163212060928345, -0.9347626566886902, 0.77903681993484...
def _ _ round _ _ ( self, ndigits = none ) : if ndigits is none : floor, remainder = divmod ( self. numerator, self. denominator ) if remainder * 2 < self. denominator : return floor elif remainder * 2 > self. denominator : return floor + 1 # deal with the half case : elif floor % 2 = = 0 : return floor else : return f...
[ -0.10679487884044647, 0.9773798584938049, 0.5628473162651062, -0.670177161693573, 0.1415414810180664, -0.10345619171857834, 0.5432681441307068, -1.173458218574524, 0.0355277918279171, -1.1253782510757446, 1.2577325105667114, -0.18073239922523499, -0.44290482997894287, 0.941933274269104, ...
def _ _ init _ _ ( self, size, crop _ type = 0 ) : if crop _ type not in { 0, 1, 2, 3, 4 } : raise valueerror ('crop _ type must be in { 0, 1, 2, 3, 4 }') self. size = size self. crop _ type = crop _ type
[ -0.14102284610271454, -0.12203440070152283, 0.6892324686050415, 0.8394340872764587, -0.4464431703090668, -0.34122970700263977, -0.020536284893751144, -0.6361773014068604, 1.0191764831542969, 0.040318381041288376, -0.3672375977039337, -0.3521880507469177, -0.014567983336746693, 0.5264009833...
def validate _ grant _ type ( self, client _ id, grant _ type, client, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.')
[ -0.01878739893436432, -0.6494530439376831, 0.5090814232826233, 0.34917813539505005, -0.22330696880817413, 0.7879939675331116, 0.5301467180252075, -0.4491613805294037, -0.22691842913627625, 0.45893362164497375, 0.4435298442840576, 1.0960050821304321, -0.7145457863807678, 1.0852007865905762,...
def compute _ shortest _ path _ lengths ( adjacency, source ) : shortest _ path _ lengths = np. zeros ( len ( adjacency ) ) - 1 visited _ dict = breadth _ first _ search ( adjacency, source ) list _ visited _ values = list ( visited _ dict. values ( ) ) list _ visited _ keys = list ( visited _ dict. keys ( ) ) for node...
[ -0.07077106088399887, 1.2006899118423462, 0.22700154781341553, 0.011634888127446175, 0.09631998091936111, -0.15835508704185486, 0.3778781592845917, 0.8306074142456055, 0.3588448166847229, 1.689375400543213, -0.6024993658065796, -0.3341354727745056, 0.036988597363233566, 0.7919076681137085,...
def listactive ( ctx, # optional main parameter startvolumeid = none, # optional main parameter limit = none, # optional main parameter includevirtualvolumes = none ) : " " " volumeid order and can be returned in multiple parts ( pages ). " " " cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " "...
[ -0.03682996705174446, -1.653510570526123, 0.8602092862129211, 0.12200390547513962, 0.27972590923309326, -0.4056612551212311, 0.01021351758390665, -0.2450624257326126, 0.3593265414237976, 0.7099624872207642, -0.1439036875963211, 1.3404263257980347, -0.7458232641220093, -0.39828360080718994,...
async def get _ product _ as _ end _ user _ with _ options _ async ( self, request : servicecatalog _ 20210901 _ models. getproductasenduserrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. getproductasenduserresponse : utilclient. validate _ model ( request ) query = { } if no...
[ -1.5470434427261353, 0.16054324805736542, 0.6081867814064026, 0.5451974272727966, 0.09491662681102753, -0.2330988049507141, -0.07774674892425537, -1.2657970190048218, 0.47863247990608215, 0.33988773822784424, 0.2562893331050873, 1.259192705154419, -0.46156737208366394, -0.01021699793636798...
def list _ files ( filepath : str ) - > list : if os. path. exists ( filepath ) : return glob ( filepath +'*. yaml')
[ 0.7426919937133789, -0.4399724006652832, 0.44071701169013977, 0.03770052641630173, 1.3682963848114014, -0.4022984504699707, 0.058593809604644775, 0.604697048664093, 0.43049290776252747, 0.6684625148773193, -0.15210874378681183, 0.491892546415329, 0.7193036079406738, 1.4019464254379272, -...
def exitwindow ( self ) : self. kit. close ( ) self. tkroot. destroy ( )
[ -0.04510124400258064, -0.5552086234092712, 0.16717784106731415, 0.7106261849403381, -0.4202845096588135, 0.25290820002555847, 0.624879777431488, 0.3627559244632721, -0.8339269757270813, 0.22796738147735596, 0.6198500394821167, 0.08662287145853043, -0.3269502818584442, 2.120136260986328, ...
def loadh5 ( filepath, keys = none ) : f = h5py. file ( filepath,'r') d = { } _ read _ group _ dataset ( f, d, keys ) f. close ( ) return d
[ -1.0451769828796387, -0.08226150274276733, 0.2763916850090027, -0.3952857553958893, -1.8457136154174805, -0.01924717240035534, 0.6115456223487854, -0.1441473662853241, -1.5516566038131714, 0.0023339323233813047, -0.4669152796268463, -0.40455979108810425, -0.7203786373138428, -0.56505227088...
def testupdateandoptionaladd ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) properties _ to _ update = {'key1':'value1 ','key2':'value2 ', } optional _ properties _ to _ add = {'key2':'value2 _ opt ','key3':'value3 _ opt ', } conf. update ( properties _ to _ update, optional _ properties _...
[ -0.00965044368058443, -0.5942205786705017, 0.6645297408103943, -0.29564106464385986, 0.29329344630241394, 0.1438767910003662, -0.3657436668872833, 0.28344228863716125, 0.2842292785644531, 0.08365332335233688, -0.19169245660305023, -0.5660584568977356, 0.06695876270532608, -0.27971836924552...
def cross _ distance _ stats ( self, anotherauthor ) : def sd _ avg ( arr ) : arrsquared = list ( map ( lambda x : x * * 2, arr ) ) return sum ( arr ) / len ( arr ), math. sqrt ( sum ( arrsquared ) / len ( arrsquared ) - ( sum ( arr ) / len ( arr ) ) * * 2 ) def cross _ compare ( matrices, worklist, centroid ) : distan...
[ 0.44891276955604553, -0.3754041790962219, 0.564550518989563, 0.5612401962280273, -0.3049870729446411, 0.36931878328323364, 0.8939635753631592, -0.5474258065223694, 0.8214478492736816, 0.15666992962360382, -0.32401326298713684, -0.049513012170791626, 0.2579788565635681, 1.171359658241272, ...
def set _ belgian _ daisy _ tiles ( self ) : self. board = [ tile ( 8, 4, " i5 ", white _ piece _ id ), tile ( 8, 5, " i6 ", white _ piece _ id ), tile ( 8, 6, " i7 ", none ), tile ( 8, 7, " i8 ", black _ piece _ id ), tile ( 8, 8, " i9 ", black _ piece _ id ), tile ( 7, 3, " h4 ", white _ piece _ id ), tile ( 7, 4, " ...
[ 0.13357798755168915, -0.03409598395228386, 0.9540402889251709, -0.23798449337482452, 0.2475699782371521, -0.3007403612136841, 1.283449649810791, 0.16688387095928192, 0.09990205615758896, 0.084378182888031, -1.3657504320144653, 0.0858478993177414, -0.3316403925418854, 0.7743687629699707, ...
def test _ contact _ model _ email _ date _ field _ validation ( self ) : person = contact ( ) # test model email and date field validation person. email ='aleks @'person. jabber ='42cc'person. date _ of _ birth ='sd'with self. assertraises ( validationerror ) as err : person. full _ clean ( ) err _ dict = err. excepti...
[ 0.14814552664756775, 0.23833544552326202, 0.6290574669837952, 0.47827601432800293, -0.13304032385349274, 1.032900094985962, 0.4537481665611267, -0.17851528525352478, -0.4976232945919037, -0.4647204577922821, -0.5766448974609375, -0.19845972955226898, 0.428600013256073, 0.6008356213569641, ...
def test ( ) : tests = unittest. testloader ( ). discover ('app / tests ', pattern ='test *. py') result = unittest. texttestrunner ( verbosity = 2 ). run ( tests ) if result. wassuccessful ( ) : return 0 return 1
[ -0.426985502243042, 1.045951008796692, 0.6887432932853699, 0.7228740453720093, 0.6168369054794312, 0.19307442009449005, 0.5685629844665527, 0.560802161693573, -0.49375465512275696, -0.09936016798019409, -0.05091552063822746, -0.605164110660553, -0.34248945116996765, 0.5264906883239746, -...
def _ read _ metadata ( filename, showheader = false ) : metadata = { } cmd ='' f = open ( filename,'r') for line in f. readlines ( ) : if line [ 0 ] = ='#': cmd + = line [ 1 : ]. strip ( ) +';'if showheader : print line. strip ( ) elif line [ 0 ] = ='%'and showheader : # for special comments that may be included in th...
[ 0.1510409712791443, -0.3615741729736328, 0.934524416923523, 0.06019018962979317, -0.8991802334785461, 0.24494966864585876, -0.253884494304657, 0.5822867751121521, -1.2760825157165527, 0.6905285716056824, 0.7603909373283386, 0.05361979454755783, 0.8034197688102722, 0.33845722675323486, 0....
async def serial _ read ( self, device, baudrate, bytesize, parity, stopbits, xonxoff, rtscts, dsrdtr, * * kwargs, ) : logged _ error = false while true : try : reader, _ = await serial _ asyncio. open _ serial _ connection ( url = device, baudrate = baudrate, bytesize = bytesize, parity = parity, stopbits = stopbits, ...
[ -0.5800566077232361, 0.09830845147371292, 0.626780092716217, -0.23867519199848175, -0.630544126033783, -0.6886388063430786, -0.48049792647361755, 0.5071128010749817, 0.27906304597854614, -0.6773499250411987, 0.4345434010028839, 0.16153205931186676, 0.5287931561470032, -0.5892344117164612, ...
def _ l2normalize ( v, eps = 1e - 12 ) : return v / ( tf. reduce _ sum ( v * * 2 ) * * 0. 5 + eps )
[ 0.3018260598182678, -0.8740851283073425, 0.35663262009620667, -0.6782246232032776, -1.036531925201416, -0.5060877799987793, -0.05208122730255127, 0.3799884021282196, -0.326548308134079, -0.27462488412857056, -0.5129079222679138, -0.06792166084051132, 0.3419078290462494, -0.7718512415885925...
def exists ( self ) : if not getattr ( self. _ accessor, " exists " ) : try : self. _ accessor. stat ( self ) except ( filenotfounderror ) : return false return true else : return self. _ accessor. exists ( self )
[ -0.46729421615600586, -0.6231274604797363, 0.7816383242607117, -0.40876683592796326, 1.0278849601745605, 0.4032287299633026, 0.1970968097448349, 0.18437635898590088, -0.19664332270622253, -1.0896095037460327, 0.8879727125167847, -0.2739867568016052, 0.460908979177475, 0.39341723918914795, ...
def run _ sequentially ( all _ build _ errors, all _ spelling _ errors, current _ packages, docs _ only, spellcheck _ only, verbose, ) : if not spellcheck _ only : for package _ name in current _ packages : build _ result = perform _ docs _ build _ for _ single _ package ( build _ specification = buildspecification ( p...
[ -0.3539053499698639, -0.22047388553619385, 0.5873544216156006, 1.1049556732177734, 0.8107306361198425, 0.33399441838264465, 0.6964654922485352, 1.012746810913086, 0.2703368663787842, -0.03348502889275551, 0.24643853306770325, 0.5666329264640808, 0.008244023658335209, 0.7243490815162659, ...
def get _ master _ model ( self ) - > str : # we assume the lasif domain is the inversion grid path = self. lasif _ comm. project. lasif _ config [ " domain _ settings " ] [ " domain _ file " ] return path
[ 0.39153286814689636, 0.9748221635818481, 0.4719904959201813, 0.4553910493850708, 0.609063982963562, 0.9777702689170837, 0.3945106863975525, 0.8632262349128723, -0.9654822945594788, -0.2849775552749634, 0.5290631055831909, -0.08624980598688126, 0.59702068567276, 0.04224869981408119, 0.587...
def delete _ package ( self, package _ name, user _ name ) : self. _ authorize ( user _ name, resources. repository, none, actions. delete ) self. package _ repository. delete _ package ( package _ name ) self. data _ logger _ client. report _ event ( name = package _ name, endpoint _ type = dataloggerclient. endpoint ...
[ -0.05806398019194603, 0.9473072290420532, 0.12169381976127625, 0.5644556283950806, 0.4675859808921814, -0.060736291110515594, -0.1662319451570511, 0.46710851788520813, 0.495126336812973, -0.4795721471309662, 0.07763335853815079, 0.9443928003311157, 0.3535744547843933, -0.35138052701950073,...
def rotmatrixtoquaternion ( r ) : q = torch. empty ( 4, dtype = r. dtype ) r = torch. t ( r ) if r [ 2, 2 ] < 0 : if r [ 0, 0 ] > r [ 1, 1 ] : t = 1 + r [ 0, 0 ] - r [ 1, 1 ] - r [ 2, 2 ] q [ : ] = torch. tensor ( [ r [ 1, 2 ] - r [ 2, 1 ], t, r [ 0, 1 ] + r [ 1, 0 ], r [ 2, 0 ] + r [ 0, 2 ] ] ) else : t = 1 - r [ 0, 0...
[ -0.17610695958137512, -1.2441030740737915, 1.1359899044036865, -0.2816891074180603, -0.5059230327606201, -0.46025678515434265, 0.7754729390144348, -0.42270705103874207, 0.12360069155693054, 1.0145999193191528, -0.9412856698036194, -1.0066382884979248, -0.29159387946128845, -1.0544970035552...
def findcomplement ( self ) : new _ seq = [ ] for i in self. seq : new _ seq. append ( self. complements [ i ] ) return new _ seq
[ -1.0188493728637695, -1.8969777822494507, 0.6000669598579407, 0.334919810295105, 0.12158418446779251, 0.5000401139259338, -0.21037715673446655, 0.5198624730110168, -0.021695051342248917, 1.2216894626617432, -1.0202651023864746, -0.6447763442993164, -0.48668721318244934, 1.2091176509857178,...
async def test _ long _ command ( self, ctx, delay : float = 4. 0 ) : await asyncio. sleep ( abs ( delay ) )
[ 0.9320746660232544, 1.5359293222427368, 0.7465636730194092, 0.5151135921478271, 0.977081298828125, 0.7396260499954224, 0.38477110862731934, -0.080587238073349, -0.12620235979557037, -1.2971421480178833, -0.11004451662302017, 0.1128663495182991, 0.5108071565628052, 0.30366426706314087, -0...
def test _ inputs _ more _ info ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) self. assert _ util ( input _ page. table. get _ more _ info, {'name':'dummy _ input _ one ','interval...
[ 0.0786958858370781, 0.8031949996948242, 0.6264224052429199, 0.44804880023002625, 0.6859825849533081, 0.4334529936313629, -0.00684755202382803, -0.8820140361785889, 0.17166388034820557, -0.45618176460266113, -0.46902263164520264, -0.31985709071159363, -0.08259272575378418, -0.15803328156471...
def compute _ stats ( nb _ simu ) : average _ point _ per _ player = [ 0 ] * nb _ players for _ in range ( nb _ simu ) : result = simulate _ tournament ( ) # result is a tuple of four players rank1, rank2, rank3, rank4 = result average _ point _ per _ player [ rank1 ] + = 100 average _ point _ per _ player [ rank2 ] + ...
[ -0.4191106855869293, 0.022306978702545166, 0.6047347187995911, 0.4916200339794159, 0.541687548160553, -0.2628352642059326, 0.43102407455444336, 0.35296621918678284, -0.02765253372490406, 0.8041302561759949, -0.5866191387176514, -0.24356605112552643, -0.07713676989078522, -0.086837708950042...
def draw ( self, surface ) : self. checker. draw ( surface )
[ 0.19440896809101105, -0.026245951652526855, 0.25457948446273804, 0.7099573612213135, 0.6554085612297058, 1.9758942127227783, 1.3116309642791748, 0.055042292922735214, -0.5468027591705322, -1.2009227275848389, 0.6185797452926636, 0.6860823631286621, -0.5976382493972778, 1.644081473350525, ...
def get _ user _ mentions ( reddit ) : for mention in praw. models. util. stream _ generator ( reddit. inbox. unread ) : try : if " u / eyebleacherbot " in mention. body. lower ( ) : print ( " bot called by username mention " ) send _ bleach ( mention ) mention. mark _ read ( ) print ( " bot responded to username menti...
[ 0.41981688141822815, -0.7447025179862976, 0.5397760272026062, 0.2579975724220276, 0.6984889507293701, 0.228899285197258, -0.06290939450263977, -0.49666139483451843, -0.3169791102409363, 0.47564154863357544, 0.16518718004226685, 0.4259524941444397, -0.6310466527938843, 0.7744422554969788, ...
def set _ pan ( self, value ) : self. pan = value logging. debug ( " user's pan number received " ) self. add _ request ( )
[ -0.7069708108901978, 0.302044540643692, 0.1353079080581665, 0.7804288268089294, -0.48499995470046997, 0.7049556970596313, 0.6580339670181274, -0.5506616830825806, 0.6189867258071899, -0.5190479159355164, -1.2339197397232056, 0.5662158727645874, -0.21355858445167542, 0.11241117864847183, ...
def test _ compute _ divide ( test _ client ) : data = {'value1': 6,'value2': 3 } url ='/ compute / divide'response = test _ client. post ( url, json = data ) assert response. status _ code = = 200 assert response. data = = b'2. 0 \ n '
[ -0.23595234751701355, 0.6524651050567627, 0.7889367341995239, 0.919894814491272, 0.9851639866828918, 0.8105303049087524, -0.1701652705669403, -0.04184478893876076, -0.9559508562088013, -0.6951648592948914, -0.7077295780181885, -0.43500885367393494, -0.25924569368362427, 0.471809983253479, ...
def get _ hfcc _ filter _ points ( fmin, fmax, filter _ num ) : fmin _ mel = freq _ to _ mel ( fmin ) fmax _ mel = freq _ to _ mel ( fmax ) filter _ fcs = [ fmin _ mel ] for i in range ( 2, filter _ num ) : filter _ fcs. append ( fmin _ mel + ( i - 1 ) * \ ( ( fmax _ mel - fmin _ mel ) / ( filter _ num - 1 ) ) ) filter...
[ -0.39329519867897034, -0.07841899991035461, 0.6764299273490906, 0.9914476275444031, -0.18074096739292145, -0.8900361061096191, -0.18428081274032593, -0.013058948330581188, -0.13799308240413666, -0.2635538876056671, 0.03843534365296364, 0.3982015550136566, 0.2961832880973816, -0.21252000331...
def printaddresses ( self ) : for i in range ( 0, len ( self. addresses ) ) : for store in self. addresses [ i ] : print store ['name'] print store ['coordinates'] print store ['location'] ['display _ address']
[ -0.21705329418182373, -0.5175465941429138, 0.47745198011398315, -1.0220282077789307, -0.5034728646278381, 0.4745066463947296, -0.251316100358963, 0.2065909504890442, 0.3445606529712677, -0.19046050310134888, 0.09297987073659897, 0.995897114276886, -0.15180005133152008, 0.439031720161438, ...
def test _ place _ buy _ orders ( self ) : stock _ name = self. test _ stock _ a order _ quantity = 10 order _ type ='buy'trader = self. login _ user ( username = usera. get ('username') ). profile d = self. place _ order ( stock _ name, order _ quantity, order _ type, trader ) resp = d. get ('resp') order _ amount = r...
[ -0.2795414626598358, 0.24263674020767212, 0.5989421606063843, 0.5043892860412598, 1.3145692348480225, -0.14986833930015564, 0.14445145428180695, -0.3611283302307129, 0.6593982577323914, -0.5946112275123596, -0.8961180448532104, -0.44598186016082764, 0.16230329871177673, -0.2591924965381622...
def query ( self, stmt ) : try : self. cursor. execute ( stmt ) # ~ print'successfully executed : \ n'except sqlite3. operationalerror as err : print " error executing ", stmt,'\ n'print err
[ -0.2189779132604599, -0.08338749408721924, 0.22606810927391052, -0.005422168876975775, -0.25815144181251526, 0.4687671661376953, -0.5952499508857727, -0.3448997437953949, 0.2006806582212448, 0.20810328423976898, 0.9172036647796631, -0.2114999145269394, -0.6623743772506714, -0.7918815612792...
def fix _ tag ( tag, last ) : if tag in outside : tag = outside [ 0 ] else : # definitely use b or i, including something like " o - chemical ". tag, label = tag [ 0 ], tag [ 1 : ] if tag in begin or last in outside or last [ 1 : ]! = label : tag = begin [ 0 ] else : tag = inside [ 0 ] tag + = label # rejoin return tag
[ -0.3605343699455261, -1.0039254426956177, 0.7402426600456238, -0.15284065902233124, 0.320644348859787, 0.2302359640598297, -0.612112820148468, 0.32407331466674805, -0.6960585117340088, 0.15064634382724762, 0.5800541639328003, 0.5200225710868835, -1.2004857063293457, -0.6181453466415405, ...
def eventtime ( self, i ) : if i > self. numevents : raise ( indexerror,'i > self. numevents') elif i < 0 : raise ( indexerror,'i < 0') return none
[ -0.0148205840960145, 0.03818392753601074, 0.7069657444953918, -0.10356558859348297, -0.48179975152015686, -0.05145428329706192, 0.6132788062095642, -0.915813148021698, 0.041403286159038544, 0.3999090790748596, 0.10358656942844391, -0.7892364859580994, -1.1109367609024048, -0.37799662351608...
def edit _ header ( self, header ) : filename ='unknown'if self. filename is none else self. filename info = [ ('comment ', " < - - - - - - sofia origination data - - - - - - > " ), ('origin ', self. organization,'creator organization / node.'), ('creator ', self. creator,'creator software / task.'), ('observer ', self...
[ -0.19321313500404358, -0.2383236438035965, 0.7917683124542236, -0.3687908351421356, -0.002425317419692874, -0.08500779420137405, 0.6254205107688904, 0.6472562551498413, -0.838122546672821, 0.07919561862945557, -0.5182101726531982, 0.6793040633201599, 0.024920227006077766, -0.07732927054166...
def test _ atomic _ language _ length _ 1 _ nistxml _ sv _ iv _ atomic _ language _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 2. xsd ", instance = " nistdata / atomic / l...
[ 0.4230740964412689, -0.6418195962905884, 0.35073843598365784, 0.4910220801830292, -0.2502306401729584, -0.14537760615348816, -0.10384709388017654, -0.1962197870016098, -0.4244304597377777, 0.3821015954017639, -0.5711482763290405, -0.34573280811309814, 0.11444680392742157, 0.552823066711425...
def get _ header ( input _ file ) : encode _ type ='utf - 8'if check _ encoding ( input _ file ) = ='utf - 16': encode _ type ='utf - 16'with open ( input _ file,'r ', encoding = encode _ type ) as f : csv _ reader = csv. reader ( f ) return next ( csv _ reader )
[ 0.2963279187679291, -0.10972907394170761, 0.5202473998069763, 0.4884200394153595, -0.3190620243549347, 0.40240707993507385, -0.759306013584137, -0.3295881152153015, -0.504173755645752, 0.01700711064040661, 0.4887993037700653, 0.42830902338027954, -0.6848915219306946, -1.2820899486541748, ...
def del _ by _ value ( self, value, category = none, consistent _ read = true, silent = true ) : if category is none : stm = " select * from % s where value ='% s'and creation _ date is not null order by creation _ date desc " % ( self. dname, value ) else : stm = " select * from % s where value ='% s'and category ='% ...
[ -0.1863696277141571, 1.037883996963501, 1.020518183708191, 0.5120522379875183, -0.7296201586723328, -0.11789817363023758, 0.24861735105514526, 0.44029030203819275, -0.2716764509677887, 0.29841262102127075, 0.6014631986618042, -0.5612093806266785, 0.039224863052368164, 0.29731637239456177, ...
def formatnd ( self, l ) : vstack = np. array ( l [ 0 ] ) for remaining in l : vstack = np. vstack ( ( vstack, remaining ) ) self. descriptor _ vstack = vstack. copy ( ) # print ( self. descriptor _ vstack ) return vstack
[ -0.37029290199279785, 0.10559868812561035, 0.4689481854438782, -0.5309891700744629, 0.6293845772743225, -0.5926746129989624, -0.3466646671295166, -0.6043596267700195, 0.27287527918815613, 0.6150185465812683, 0.11284857243299484, 0.3510027527809143, -0.13696114718914032, 1.3991997241973877,...
def create _ time ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " create _ time " )
[ 0.766480028629303, -0.220526784658432, 0.37162187695503235, -0.045219358056783676, 0.9170966148376465, 1.0356274843215942, -0.5085974335670471, -0.3539467751979828, -0.3779527544975281, 0.9884400963783264, -0.2151801884174347, 0.05454324558377266, 0.23610417544841766, -0.6390113234519958, ...
def plot _ decision _ function ( model, ax = none, color ='black') : if ax is none : ax = plt. gca ( ) xlim = ax. get _ xlim ( ) ylim = ax. get _ ylim ( ) # create grid to evaluate model x = np. linspace ( xlim [ 0 ], xlim [ 1 ], 30 ) y = np. linspace ( ylim [ 0 ], ylim [ 1 ], 30 ) y, x = np. meshgrid ( y, x ) xy = np....
[ 0.9623222351074219, 0.4463817775249481, 0.8676919341087341, -0.5422700047492981, -0.34774622321128845, 0.6389762759208679, 0.4216703474521637, 0.6653109788894653, -0.2682074010372162, -0.016982270404696465, -0.2701217532157898, 1.4470582008361816, 0.33297058939933777, 0.3902614116668701, ...
def convert _ to _ freq _ domain ( self, data, nfft = 500, fftstep = 125 ) : fftstep = fftstep # do a new fft every fftstep data points overlap = nfft - fftstep # half - second steps spec _ psdperhz, freqs, t _ spec = mlab. specgram ( np. squeeze ( data ), nfft = nfft, window = mlab. window _ hanning, fs = self. sample...
[ -0.24420949816703796, 0.0044794450514018536, 0.579837441444397, 0.06602814793586731, -0.27469924092292786, -0.080711729824543, -0.3956037163734436, -0.6761999130249023, 0.31405770778656006, 0.005999070126563311, -0.03239651769399643, 0.03895695134997368, 0.136147141456604, 1.28117740154266...
def predict ( self ) : # update current state self. estimate = self. f ( self. previousestimate ) + self. processnoise # find current jacobian value jacval = self. fjac ( self. previousestimate ) + self. processnoise # update error prediction state self. errorprediction = np. dot ( jacval, np. dot ( self. previouserror...
[ 0.21316413581371307, -1.0233395099639893, 0.48699381947517395, -0.5521464347839355, -0.23372311890125275, -0.2284216582775116, 0.1345939040184021, 0.12663395702838898, -0.674881100654602, -0.09905300289392471, 0.34828251600265503, 1.089590072631836, 0.6311767101287842, 0.25160613656044006,...
def test _ auto _ verify _ time ( unode, simpleacq, archivefile, archivefilecopy ) : # enable auto _ verify unode. db. auto _ verify = 4 # files with different last update times copy9 = archivefilecopy ( node = unode. db, file = archivefile ( name = " file9 ", acq = simpleacq ), has _ file = " y ", last _ update = date...
[ 0.15348976850509644, 0.3943166434764862, 0.9181122183799744, 0.2598574757575989, 0.4897848069667816, 0.22765985131263733, 0.3941057622432709, 0.10034847259521484, 0.1381685435771942, -0.17619815468788147, -0.38260698318481445, -0.559009313583374, 0.1520792543888092, 0.3940044343471527, -...
def rnumlistwithreplacement ( howmany, max, min = 0 ) : if checkquota ( ) < 1 : raise exception ( " your www. random. org quota has already run out. " ) requestparam = build _ request _ parameterwr ( howmany, min, max ) request = urllib. request. request ( requestparam ) request. add _ header ('user - agent ','randomwr...
[ -1.7617487907409668, 0.2627619802951813, 0.6085307002067566, 0.15455541014671326, -0.11210078746080399, -0.1794743537902832, -0.4124999940395355, 0.6443725824356079, 0.9421641826629639, 0.5221055746078491, -1.257631540298462, 0.43381208181381226, -0.5769712924957275, 0.34235602617263794, ...
def apply ( self ) : self. gcalendar. insert _ events ( self. to _ insert ) self. gcalendar. update _ events ( self. to _ update ) self. gcalendar. delete _ events ( self. to _ delete ) self. logger. info ('sync done') self. to _ insert, self. to _ update, self. to _ delete = [ ], [ ], [ ]
[ -0.042374979704618454, 0.44240453839302063, 0.6003884077072144, -0.28243136405944824, 0.3742119073867798, 0.08489957451820374, 0.2856694459915161, 0.34730660915374756, 0.11709670722484589, 0.38870683312416077, -0.720816969871521, 0.37318912148475647, 0.04824843630194664, -0.299678325653076...
def _ parse _ file ( self, file ) : case = case ( ) file. seek ( 0 ) case. base _ mva = float ( file. next ( ). split ( ", " ) [ 1 ]. split ( " / " ) [ 0 ] ) case. name = " % s % s " % ( file. next ( ). strip ( ), file. next ( ). strip ( ) ) bustype _ map = { 1 : " pq ", 2 : " pv ", 3 : " ref ", 4 : " isolated " } # i,...
[ -0.6261690258979797, -0.7075065970420837, 0.7827630043029785, 0.33684882521629333, -0.6110167503356934, 0.7886912822723389, 0.49557557702064514, 0.2451770156621933, -0.7057888507843018, 0.1938510686159134, 0.21194075047969818, -0.5921058654785156, -0.37217414379119873, 0.6443507075309753, ...
def add _ environment _ secret ( * * kwargs ) : api. add _ environment _ secret ( * * kwargs ) common. cli _ success ( )
[ -0.5567731857299805, -0.10445646196603775, 0.4854629337787628, 0.9615864157676697, 0.9605794548988342, 1.191190242767334, -0.3687264621257782, -0.7505185604095459, -0.6747987866401672, 0.18754249811172485, -1.208194613456726, 0.9901443123817444, -0.6132451295852661, 0.33675065636634827, ...
def get _ auth _ constraints ( user ) : authchain = ('superuser ','staff ','authenticated ','anonymous') for authbit in authchain : auth = getattr ( user,'is _ % s'% authbit ) if auth = = 1 or ( callable ( auth ) and auth ( ) = = true ) : return ( settings. api _ limits [ authbit ], settings. api _ cache [ authbit ] ) ...
[ -1.4305449724197388, 0.4227466285228729, 0.5061389207839966, 1.3364330530166626, -0.7144526839256287, -0.09959612786769867, 0.11498605459928513, -1.3286542892456055, 0.253282755613327, 0.6283535361289978, -0.6145938634872437, 0.3222710192203522, -0.4265400767326355, 0.8254640698432922, 1...
def get _ tm27 ( lines : list [ str ], ignorespecialnoun = false ) : matrix = np. zeros ( ( 27, 27 ) ) characters = ascii _ letters [ 0 : 26 ] + " " for line in lines : trimmed _ line = trim _ line ( line, ignorecapitalzedword = ignorespecialnoun ) line = list ( trimmed _ line ) for i, c2 in enumerate ( line [ 1 : ] ) ...
[ -0.5137550234794617, -0.4560392498970032, 0.5698839426040649, -0.7275323271751404, 0.03698860853910446, -0.2280501127243042, 0.279419481754303, 0.5525065064430237, -0.33743005990982056, 0.6313537955284119, 0.5448391437530518, 0.045688044279813766, 0.2640066146850586, -0.006690497510135174,...
def get _ event _ by _ id ( self, project _ id, event _ id, additional _ columns ) : raise notimplementederror
[ 0.6684014797210693, 0.05364673584699631, 0.31018805503845215, 0.9118856191635132, 0.30917733907699585, 0.11096210777759552, -0.21483217179775238, -0.037840574979782104, -0.711911678314209, 0.25513070821762085, 0.18318647146224976, 0.8810413479804993, 0.541894257068634, -0.42485231161117554...
def notes _ owned ( self ) : url = lendingclub _ url ('accounts ', self. investor _ id,'notes') response = self. session. get ( url = url ) response. raise _ for _ status ( ) return [ namedtuple _ from _ json ('lendingclubnote ', d ) for d in response. json ( ). get ('mynotes') ]
[ -0.5304184556007385, -0.4412478506565094, 0.30262449383735657, 0.3233848214149475, 1.1330819129943848, -0.2729248106479645, -0.8717041015625, -0.8610157370567322, -0.46839407086372375, -0.3773377239704132, -0.2721290588378906, 0.5332460999488831, -1.0055254697799683, 0.01354198157787323, ...
def from _ config ( klass, augmentations ) : augmentation _ objs = [ getattr ( klass. augmentations _ store, augmentation [ " name " ] ) ( * * augmentation. get ( " params ", { } ) ) for augmentation in augmentations ] return klass ( klass. compose _ constructor ( augmentation _ objs ) )
[ -0.19506332278251648, -0.44001856446266174, 0.1154588907957077, 0.16127009689807892, -0.4916583001613617, -0.24849747121334076, -0.09502587467432022, 0.3726855516433716, 0.24553392827510834, 0.8888347744941711, -0.6688222289085388, -0.5008286237716675, 0.797915518283844, 0.7453339695930481...
def name ( self, name ) : if name is none : raise valueerror ( " invalid value for ` name `, must not be ` none ` " ) self. _ name = name
[ 0.014778664335608482, 0.1840142011642456, 0.041144631803035736, -0.23436057567596436, 0.18358543515205383, -0.2305835783481598, 0.10347366333007812, 0.3940497040748596, -0.11042408645153046, 0.847530722618103, -0.924835205078125, -0.7026101350784302, 0.09630832821130753, 0.7726419568061829...
def read _ file ( self, file _ name ) : self. connect _ file _ storage ( ) content = [ ] try : binary _ data = self. s3 _ resource. object ( self. file _ storage _ name, file _ name ). get ( ) ['body']. read ( ) content = self. process _ string _ data ( binary _ data. decode ('utf - 8') ) except exception as e : logger...
[ -0.4238898754119873, -0.8352512121200562, 0.9224667549133301, 0.05570989474654198, 0.00634782062843442, 0.44692355394363403, -1.2456167936325073, -0.16693873703479767, -0.6931339502334595, 0.878298819065094, -0.2324741780757904, -0.050509341061115265, -0.46218040585517883, -0.7245427966117...
def _ create _ info ( self, new _ paths ) : # split paths by files and directories new _ dirs = set ( ) new _ files = set ( ) for path in new _ paths : if os. path. isdir ( os. path. join ( self. _ target _ dir, path ) ) : new _ dirs. add ( path ) else : new _ files. add ( path ) # find all instances of our install pat...
[ -0.3722230792045593, -0.34226807951927185, 0.7320611476898193, -0.3555910587310791, 0.18015913665294647, -0.06916721165180206, 0.38511496782302856, 0.26261425018310547, -1.007485032081604, 0.19922968745231628, -0.1404474824666977, -0.7083423137664795, 0.5699130296707153, 0.9003166556358337...
def dfs ( tree, elem ) : from collections import deque # add the initial state ( root ) to the fringe mylist = deque ( tree ) curr = mylist. popleft ( ) print curr # repeat until the list is length zero or the target is found while curr! = elem : node = mylist. pop ( ) curr = node [ 0 ] print curr if len ( node ) > 1 :...
[ -0.6306794285774231, 0.23263368010520935, 0.7493418455123901, -0.016307810321450233, -0.3798397481441498, -0.023776821792125702, -0.5150327086448669, 0.5470113158226013, 0.19773772358894348, -0.26769641041755676, -0.3910035789012909, 0.2761382758617401, -0.7541590332984924, 0.8415912985801...
def retrieval _ eval _ collate ( data ) : # separate source and target sequences text, text _ length, segmentt _ ids, img, img _ loc, _ label = list ( zip ( * data ) ) _ inputs = [ torch. stack ( text, dim = 0 ), torch. stack ( text _ length, dim = 0 ), torch. stack ( segmentt _ ids, dim = 0 ), torch. stack ( img, dim ...
[ -0.8910819888114929, -0.3765096664428711, 0.652093231678009, -1.293890118598938, 0.41831642389297485, -0.27795669436454773, -0.10582190006971359, -0.17222096025943756, 0.22683943808078766, 0.5217095017433167, 0.424344003200531, -0.025366472080349922, 0.3213483393192291, -0.0500931255519390...
def external _ ref ( self, external _ ref ) : self. _ external _ ref = external _ ref
[ 0.35663023591041565, -0.6148275136947632, 0.28640228509902954, -0.10558765381574631, -0.22799697518348694, 1.2900344133377075, 0.03600528463721275, 1.2626452445983887, -0.7115224599838257, 0.5081835389137268, -0.11107248812913895, -0.06980480998754501, -0.4004424810409546, 0.47184860706329...
def tail ( f, n, offset = 0 ) : avg _ line _ length = 74 to _ read = n + offset while 1 : try : f. seek ( - ( avg _ line _ length * to _ read ), 2 ) except ioerror : # woops. apparently file is smaller than what we want # to step back, go to the beginning instead f. seek ( 0 ) pos = f. tell ( ) lines = f. read ( ). spl...
[ 0.3904152512550354, -0.1690996140241623, 0.6702178716659546, -0.617923378944397, -0.2506530284881592, 0.31337612867355347, -0.33570995926856995, -1.1044915914535522, -1.0268580913543701, -0.19068294763565063, 0.9250677227973938, 0.4586962163448334, 0.543590784072876, -0.029565701261162758,...
def start ( self ) - > none : if self. is _ alive ( ) or self. _ loop. is _ running ( ) : # pragma : nocover return super ( ). start ( ) self. call ( asyncio. sleep ( 0. 001 ) ). result ( 1 )
[ 0.05208423361182213, 0.3277948200702667, 0.4108875095844269, 1.5508599281311035, 0.19670510292053223, 0.3519478738307953, -0.05461611971259117, -0.008369986899197102, 0.21273821592330933, -0.018737411126494408, -0.06405453383922577, 0.2006043940782547, -0.4276885390281677, 0.60373651981353...
def period ( self ) : if self. current _ input = = " " : self. current _ input = " 0. " elif not ". " in self. current _ input : self. current _ input + = ". " self. update _ input ( )
[ -0.3538776934146881, -0.643734335899353, 0.8058940172195435, 0.41987210512161255, 0.0701221227645874, 0.7766632437705994, 0.9949139952659607, -0.15516702830791473, 0.5196245908737183, 0.2152722328901291, 1.4283050298690796, 0.8597629070281982, -0.8740077614784241, 0.23008756339550018, 0....
def accuracy _ function ( self, probs, labels ) : # todo : try beam search # hardcoded decoded _ vocabs = tf. cast ( tf. argmax ( input = probs, axis = 2 ), dtype = tf. int64 ) accuracy = tf. reduce _ mean ( ( tf. cast ( tf. equal ( decoded _ vocabs, labels ), dtype = tf. float32 ) ) ) return accuracy
[ -0.43459248542785645, -0.6192821860313416, 0.2629782259464264, -0.08567458391189575, 0.6661360263824463, -0.10254257172346115, 0.13741929829120636, 0.39351317286491394, -0.4742892384529114, 0.7381091117858887, 0.7624963521957397, 0.8453667163848877, -0.6000231504440308, -0.7818904519081116...
def frequency _ spectrum ( x, sf ) : x = x - np. average ( x ) # zero - centering n = len ( x ) print ( n ) k = arange ( n ) tarr = n / float ( sf ) frqarr = k / float ( tarr ) # two sides frequency range frqarr = frqarr [ range ( n / / 2 ) ] # one side frequency range x = fft ( x ) / n # fft computing and normalizatio...
[ 0.184942364692688, 0.10462036728858948, 0.3778354525566101, 0.2270442545413971, -0.14201077818870544, -0.7678545117378235, -0.4950064420700073, 0.31835436820983887, 0.28027358651161194, -0.27058547735214233, 0.5332295298576355, -0.2885283827781677, 0.6339661478996277, 1.0757431983947754, ...
def get _ track _ audio _ features ( self, track _ id ) : audio _ features _ data = self. _ make _ request ( f " https : / / api. spotify. com / v1 / audio - features / { track _ id } " ) if audio _ features _ data : return audio _ features _ data. json ( ) return none
[ -0.4319276809692383, -0.5099709033966064, 0.37688520550727844, 0.5367578268051147, 0.36119988560676575, -0.9166512489318848, -1.3096598386764526, -1.3184984922409058, -0.3401302099227905, 0.24306176602840424, -1.2324590682983398, 1.0724711418151855, -0.035537589341402054, -0.35782322287559...
def _ _ init _ _ ( self, movie _ title, movie _ storyline, poster _ image, trailer _ youtube ) : self. title = movie _ title self. storyline = movie _ storyline self. poster _ image _ url = poster _ image self. trailer _ youtube _ url = trailer _ youtube
[ -0.18216583132743835, -0.7904741764068604, 0.374384343624115, 0.8456664085388184, 0.09422507137060165, 0.19125114381313324, -1.274743914604187, 0.5596470832824707, -0.5017186403274536, 0.49431949853897095, -0.04388023540377617, 0.4134073853492737, 0.33088418841362, 0.8112617135047913, 0....
def resources ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input ['regioncommitmentresourceargs'] ] ] ] : return pulumi. get ( self, " resources " )
[ 0.6898173689842224, -0.06694681942462921, 0.350960373878479, -0.4094829261302948, 1.3969199657440186, 0.5205173492431641, 0.6315427422523499, 0.6176815032958984, 0.8267425298690796, 0.7166762948036194, 0.09600966423749924, -0.19958895444869995, -0.40472733974456787, -0.4262353479862213, ...
def test _ atomic _ any _ uri _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 4. xsd ", instance = " nistdata / atomic / any...
[ -0.01934868097305298, 0.013704225420951843, 0.4355059564113617, 0.5590339303016663, -0.15302789211273193, -0.1301501989364624, -0.3036366105079651, -0.03058960847556591, 0.20442156493663788, -0.16356013715267181, 0.005676057189702988, -0.7503995895385742, -0.4879595637321472, -0.0966138318...
def clicked ( val1 : stringvar, val2 : stringvar, graph : mapgraph, root : tk ) - > none : val1 _ str = str ( val1. get ( ) ) val2 _ str = str ( val2. get ( ) ) if val1 _ str = ='' or val2 _ str = ='' : my _ label = label ( root, text = " please select both the departure and the destination " " before clicking open map...
[ -0.3579617142677307, -0.3844347596168518, 0.676262617111206, -0.4640488624572754, -1.0255175828933716, 0.20536041259765625, -0.6028769612312317, 0.2605251669883728, -0.19084730744361877, -0.2063763588666916, 0.7939817905426025, 1.0392911434173584, 0.28260210156440735, 0.09075692296028137, ...
def tasks _ valid ( tasks ) : filenames = set ( ) msg = " duplicate preprocessor filename { }, please file a bug report. " for task in get _ flattened _ tasks ( tasks ) : if isinstance ( task, preprocessingtask ) : for product in task. products : if product. filename in filenames : raise valueerror ( msg. format ( prod...
[ -0.12032266706228256, 0.4074893891811371, 0.5954875946044922, 0.6472160816192627, 0.4454520642757416, 0.616588830947876, 0.6486958265304565, 0.06415289640426636, 0.27053302526474, 0.16097193956375122, -0.0980854332447052, 0.20593208074569702, 0.2767971158027649, 1.013303279876709, -1.018...
def testshortcitenopagessearch ( self ) : form = self. form form. enter _ value ('accids ','j : 148802') form. click _ search ( ) # finds the results table and iterates through the table table _ element = self. driver. find _ element ( by. id, " resultstable " ) table = table ( table _ element ) # finds the short citat...
[ 1.0385987758636475, 0.1123858392238617, 0.48085856437683105, 0.2544165551662445, 0.646373450756073, 0.2743844985961914, 0.7931035161018372, -0.1813996583223343, -0.059991203248500824, -0.9501092433929443, 0.38909271359443665, -0.07495635002851486, -0.3059025704860687, 0.045722220093011856,...
def getindexxmlstring ( self ) : return elementtree. tostring ( self. getindexxml ( ), method = " xml " ). decode ( " utf8 " )
[ -0.17117172479629517, -0.23206254839897156, 0.02179047279059887, -0.2696114480495453, -0.9750812649726868, 0.14824141561985016, -0.6650748252868652, 0.05222785845398903, 0.5261011719703674, -0.4026240408420563, 1.0468100309371948, -0.11146368831396103, -0.789091169834137, -1.48661029338836...
def timestep ( self ) : return timestep ( self. samplerate, self. c )
[ 0.9606953263282776, -0.27543678879737854, 0.3119983375072479, -0.421486496925354, 0.291402131319046, -0.05017012357711792, -0.19494886696338654, -0.5185307264328003, 0.09820448607206345, -0.09618733078241348, -0.5070641040802002, -0.2684946060180664, -0.448167622089386, 0.19330401718616486...
def _ get _ pr _ changed _ files ( self, owner, repo, pr _ num ) : url = " % s / repos / % s / % s / pulls / % s / files " % ( self. _ api _ url, owner, repo, pr _ num ) data = self. get _ all _ pages ( url ) filenames = [ ] if data and not self. _ bad _ response : for f in data : if " filename " in f : filenames. appe...
[ -0.22624313831329346, -0.09488621354103088, 0.6512472033500671, 0.11798702925443649, 0.6803135275840759, -0.6244083046913147, -1.1767321825027466, 0.3735145330429077, 0.10935703665018082, 0.1456364393234253, 0.22000637650489807, 0.6342582702636719, -0.07045303285121918, 0.19384676218032837...
def gd _ optimize ( self, num _ iterations = 1000, learning _ rate = 0. 01, tolerance = none ) : cur _ variable _ values = self. variable _ initialization val, der = differentiate ( self. objective _ function, cur _ variable _ values, self. scalar ) self. val _ history = [ val ] for i in range ( num _ iterations ) : de...
[ 0.7272900938987732, 0.9279817938804626, 0.5748640298843384, 0.5083691477775574, -0.36787185072898865, -0.14927297830581665, 0.2274259775876999, -0.5911580324172974, -1.001887321472168, 0.2578057646751404, 0.6443448066711426, 0.3294762372970581, -0.25383123755455017, 0.06296161562204361, ...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : attributeargs, opts : optional [ pulumi. resourceoptions ] = none ) :...
[ 0.40611860156059265, -0.155515655875206, 0.4801602363586426, -0.3027341067790985, 0.1363014280796051, 0.2510114014148712, 0.3296433389186859, 0.6008555293083191, 0.5937520861625671, 0.3617672920227051, 0.5986040234565735, 0.564602792263031, 0.5422744154930115, -0.7542557716369629, -0.796...
def draw ( self, scene ) : if scene : scene. drawimage ( self. _ img, self. _ point [ 0 ], self. _ point [ 1 ] )
[ -1.1452417373657227, 0.18150925636291504, 0.3133094310760498, -0.4397335648536682, 0.9014497399330139, 0.4892227053642273, -0.2834625840187073, 0.3342047333717346, -0.15966330468654633, -0.6356180906295776, 0.19597956538200378, 0.2691950798034668, 0.36674606800079346, 0.4098578095436096, ...