text
stringlengths
25
2.19k
embedding
listlengths
768
768
def printprogress ( self, iteration, total, prefix ='', suffix ='', decimals = 1, barlength = 100 ) : formatstr = " { 0 :. " + str ( decimals ) + " f } " percent = formatstr. format ( 100 * ( iteration / float ( total ) ) ) filledlength = int ( round ( barlength * iteration / float ( total ) ) ) bar ='' * filledlength ...
[ 0.32544490694999695, 0.3244229555130005, 0.728998601436615, -0.34442031383514404, -0.2534065842628479, 0.2286539077758789, 0.42468586564064026, -0.7045812010765076, -0.9763942360877991, 0.21570943295955658, 0.23100027441978455, -0.06395377218723297, -0.5472846031188965, -0.0918799713253974...
def _ resolve _ automl _ job _ inputs ( self, job : automljob ) - > none : if isinstance ( job, automljob ) : self. _ resolve _ job _ input ( job. training _ data, job. _ base _ path ) if job. validation _ data is not none : self. _ resolve _ job _ input ( job. validation _ data, job. _ base _ path ) if hasattr ( job, ...
[ -0.18161319196224213, -0.26351895928382874, 0.6273770332336426, 0.3525264263153076, -0.234909787774086, 0.3468203544616699, -0.16358745098114014, -0.2700905501842499, -0.9888206720352173, -0.839011013507843, 0.140482097864151, 0.21979275345802307, -0.08374691009521484, 0.8596513867378235, ...
def sanitize ( string ) : santized = [ ] for stringy in string. replace ( ', ','' ). split ( ) : santized. append ( re. sub ( r'\ w + ','', stringy ). lower ( ) ) return santized
[ 0.6275970935821533, -0.977832555770874, 0.6985690593719482, -0.7307039499282837, -0.16849364340305328, -0.43858805298805237, -0.7385210990905762, 0.4066564738750458, 0.6897980570793152, 0.9895687103271484, -0.4235324263572693, 0.37254494428634644, -0.9824104905128479, 0.20287872850894928, ...
def _ get _ register ( self, cr, uid, ids, fields, args, context = none ) : register _ pool = self. pool. get ('event. registration') res = { } for event in self. browse ( cr, uid, ids, context = context ) : res [ event. id ] = { } for field in fields : res [ event. id ] [ field ] = false state = [ ] if'register _ curr...
[ -0.9956161975860596, 0.46473437547683716, 0.4598461985588074, -0.5153508186340332, 0.27074769139289856, -0.9471765756607056, 0.5290492177009583, 0.1898556798696518, -0.7787180542945862, 0.7836627960205078, -0.4055090546607971, -0.39055153727531433, -0.05294162407517433, 0.3528313934803009,...
def get _ negative _ context _ gradients ( positive _ result : result, negative _ results : iterable [ result ] ) - > list [ np. ndarray ] : # done ( ~ 2 - 4 lines ) : implement return [ res [ " probability " ] * res [ " target _ word _ embedding " ] for res in negative _ results ]
[ -0.8102008700370789, -0.08005594462156296, 0.5346581339836121, 0.8213170766830444, 0.5682759881019592, 0.25649577379226685, -0.310921311378479, -0.28204822540283203, -0.47407978773117065, 0.9446958303451538, 0.11839559674263, 0.3630020320415497, -0.5372605919837952, 0.7442910075187683, -...
def addtofmid ( * args ) : return _ snap. tstr _ addtofmid ( * args )
[ -0.46951574087142944, -0.23480014503002167, 0.5471839904785156, -0.4384090006351471, 0.4564219117164612, 0.23373988270759583, -0.02296464890241623, -0.24254834651947021, 0.44557005167007446, -0.41648298501968384, 0.03270382434129715, -0.5539633631706238, 0.07250979542732239, 1.109274029731...
def test _ list _ decimal _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 3. xsd ", instance = " nistdata / list / ...
[ -0.10549594461917877, 0.24177946150302887, 0.491752028465271, 0.6816391944885254, -0.005217567086219788, 0.43894442915916443, -0.9606135487556458, 0.5220299363136292, 1.333775281906128, 0.1546788215637207, -1.0458379983901978, -0.27118587493896484, 0.16788077354431152, -0.08723200112581253...
def coco _ get _ metrics ( captions _ dict, eval _ dir, annotations _ file ) : time _ now = time. time ( ) with open ( os. path. join ( eval _ dir, " results. " + str ( time _ now ) + ". json " ), " w " ) as f : json. dump ( captions _ dict, f ) coco = coco ( annotations _ file ) cocores = coco. loadres ( os. path. joi...
[ -0.2661135494709015, -0.34832021594047546, 0.5870808959007263, -0.7109335064888, 0.02355547435581684, 0.9024285674095154, 0.4133680462837219, -0.056300532072782516, -0.8484461307525635, 0.45631518959999084, -0.6104519367218018, -0.2078818678855896, 0.7810471653938293, 0.7836661338806152, ...
def idacq ( retmaximum, queryterm : str ) : # constants api _ key = # add api key here baseurl ='https : / / eutils. ncbi. nlm. nih. gov / entrez / eutils / esearch. fcgi? api _ key ='+ api _ key +'&'retmax = retmaximum database = " db = pubmed " # process the query to not have spaces but " + " query ='' advquery = que...
[ -0.3918743133544922, -0.29943567514419556, 0.720056414604187, -0.05912543088197708, 0.059863366186618805, -0.040324993431568146, -0.9966062903404236, 0.4001837968826294, -0.13830654323101044, 0.5355727076530457, -0.009211461991071701, 0.47971779108047485, -0.7180522680282593, -0.1532553583...
def credential _ name ( self ) : return self. _ credential _ name
[ 0.6182920336723328, -1.094481348991394, 0.26975950598716736, 0.6616421341896057, -0.4465857148170471, 0.9544962048530579, 0.22240601480007172, 0.8213173747062683, 0.22646181285381317, 0.5018545389175415, -0.3643331825733185, 0.3747425079345703, 0.4508284628391266, -0.7102455496788025, 0....
def event _ invocation _ id ( self, event ) : attributes = self. root _ event _ attributes ( event ) candidate _ keys = ['id ','activityid ','timerid ','workflowid ','markername ','signalname'] for key in candidate _ keys : if key in attributes : return attributes [ key ] return none
[ 0.4067933261394501, -1.0813227891921997, 0.526772677898407, 0.34306517243385315, -0.30146580934524536, -0.4168508052825928, -0.038415051996707916, -0.15530574321746826, 0.16544799506664276, 0.23224394023418427, 0.4079517424106598, 0.46203136444091797, -0.602832019329071, 0.6846543550491333...
def load _ cifar _ batch ( filename ) : with open ( filename,'r') as f : datadict = pickle. load ( f ) ; x = datadict ['data'] ; y = datadict ['labels'] ; x = x. reshape ( 10000, 3, 32, 32 ). transpose ( 0, 2, 3, 1 ). astype ( " float " ) ; y = np. array ( y ) ; return x, y ;
[ -0.14446192979812622, -0.5326476693153381, 0.4280639588832855, -0.9233283996582031, 0.2852420508861542, 0.023400994017720222, -0.3924607038497925, 0.9007735252380371, -1.0406407117843628, 0.7660068869590759, -0.8466708064079285, -0.02451595477759838, -0.5372260212898254, -0.521667361259460...
def sync ( self, source _ bucket : str, destination _ bucket : str, source _ object : str | none = none, destination _ object : str | none = none, recursive : bool = true, allow _ overwrite : bool = false, delete _ extra _ files : bool = false, ) - > none : client = self. get _ conn ( ) # create bucket object source _ ...
[ -0.10417056083679199, -0.22688914835453033, 0.8812616467475891, 0.746979832649231, -0.3126750886440277, -0.08927024155855179, 0.6948366761207581, -0.7180367708206177, -0.39761778712272644, 0.9878337979316711, -0.8622987270355225, 0.23634980618953705, 0.9229908585548401, -0.2565012574195862...
def dump ( self ) : attr _ name = {'reduce _ axis':'axis'} inputs, outputs = self. deduce _ parameters ( ) input _ desc, output _ desc, op _ desc = [ ], [ ], [ ] for t in inputs : input _ desc. append ( [ {'data _ type': t. dtype,'shape': t. shape,'tensor _ name': t. name,'format': t. data _ format } ] ) for t in outpu...
[ -0.3163438141345978, 0.1703493744134903, 0.8989291191101074, -1.3284660577774048, 0.07398118078708649, -0.4419552683830261, 1.143855094909668, -0.34452107548713684, -0.8247743844985962, 0.3329499065876007, -0.19180823862552643, 0.4179929196834564, 1.0692976713180542, 0.6051973104476929, ...
def set _ file _ owner ( self, file _ path, owner ) : pass
[ 0.27520978450775146, -0.9294844269752502, 0.21696516871452332, 1.3045990467071533, 0.6500626802444458, 0.18277238309383392, 0.47786590456962585, 0.6101762056350708, -1.5389469861984253, -0.8062170147895813, 0.11026377975940704, 0.5777154564857483, 0.3268289566040039, -0.6300126314163208, ...
def s2 _ band _ jp2 ( ) : return testdata _ dir / " s2 _ band. jp2 "
[ 0.38271257281303406, -1.4739758968353271, 0.2664603590965271, 0.9837866425514221, -0.9020107388496399, 0.6775199174880981, 0.7835869789123535, -0.96346116065979, 0.04185117036104202, -0.9444693326950073, -0.09511298686265945, 1.8106268644332886, 0.311836838722229, 0.11176754534244537, -0...
def algorithm _ tonal _ key _ essentia _ basic ( sound ) : results = dict ( ) audio = load _ audio _ file ( file _ path = sound [ sound _ file _ key ], sample _ rate = 44100 ) key _ extractor = estd. keyextractor ( ) key, scale, strength = key _ extractor ( audio ) results ['essentiabasic'] = {'key':'% s % s'% ( key, s...
[ -0.6408255100250244, -0.5557578206062317, 0.5063249468803406, -0.7880420684814453, -0.6754142045974731, -0.28159481287002563, -0.5310527682304382, -0.2336338460445404, -1.5581063032150269, 1.5703204870224, -0.9788454174995422, -0.4970425069332123, 0.12855418026447296, 0.41988810896873474, ...
def sgd _ momentum ( cost, params, learning _ rate = 0. 1, decay = 0. 0001, momentum = 0. 1 ) : grads = t. grad ( cost = cost, wrt = params ) updates = [ ] for param, grad in zip ( params, grads ) : vel = theano. shared ( param. get _ value ( ) * 0. ) vel _ new = momentum * vel - ( grad + decay * param ) * learning _ r...
[ 0.19613826274871826, -0.5590378642082214, 0.7027391791343689, 0.9235023856163025, -0.15122045576572418, 0.5848512649536133, 0.10754706710577011, 0.5421198606491089, -0.6549369096755981, 1.1596026420593262, 0.09701207280158997, -0.10767889022827148, -0.07251542806625366, 1.3075231313705444,...
def test _ atomic _ hex _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 3. xsd ", instance ...
[ -0.503329873085022, -0.09526778012514114, 0.674340009689331, 0.523642361164093, 0.10364009439945221, 0.8570417761802673, -0.5025041699409485, 0.2672486901283264, 0.46056005358695984, 0.7126685976982117, -0.4159514904022217, -0.4992658495903015, -0.15877395868301392, -0.04658550024032593, ...
def _ _ repr _ _ ( self ) - > str : return f " < transaction { self. status } : { self. amount } { self. currency } [ { self. description } ] > "
[ 0.6536446213722229, -1.0110856294631958, 0.560396671295166, -1.4072279930114746, -0.5728704929351807, 0.21465210616588593, -0.6473145484924316, 0.162149578332901, -0.07602494955062866, 0.24001486599445343, -0.23936598002910614, 0.4307059347629547, 0.6680970788002014, -0.33171382546424866, ...
def test _ atomic _ language _ max _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 3. xsd ", instance = " nistda...
[ 0.4608343541622162, -0.29614880681037903, 0.35235530138015747, 0.5323260426521301, -0.6256237030029297, 0.4508773386478424, -0.9869189262390137, 0.14386455714702606, 0.391889363527298, 0.9759894609451294, -0.5914591550827026, 0.1583622694015503, 0.2891131639480591, -0.280556321144104, 0....
def get _ csrf _ token _ from _ request ( request ) : if request. line. uri. startswith ('/ assets /') : return if request. line. uri. startswith ('/ callbacks /') : return try : csrf _ token = _ sanitize _ token ( request. headers. cookie ['csrf _ token']. value ) except keyerror : csrf _ token = none request. context...
[ 0.029646115377545357, 0.03164569288492203, 0.6071246266365051, 0.9711637496948242, 0.4633491635322571, -1.0670952796936035, 0.008437473326921463, -0.9151877164840698, 0.39493945240974426, -0.8691899180412292, 0.5411387085914612, 0.35266223549842834, 0.4544762969017029, 0.15594525635242462,...
def contains ( self ) - > bool : try : with open ( self. filename, " r " ) as f : # pylint : disable = c0103 filetext = f. read ( ) return self. is _ within ( filetext ) except exception : # pylint : disable = w0718 return false
[ 0.3601914346218109, -0.6709379553794861, 0.4385921359062195, -0.11678510159254074, -0.6485443115234375, 0.8884120583534241, 0.023331817239522934, 0.1911814957857132, -1.095206618309021, -0.5033382773399353, 0.8243676424026489, -0.17220935225486755, -1.0680924654006958, -0.11980263888835907...
def index ( ) : if request. method = ='post': search _ term = request. form ['search _ term'] sort _ type = request. form ['sort _ type'] song _ list = get _ songs ( genre, sort _ type, search _ term ) return render _ template ('results. html ', song _ list = song _ list ) return render _ template ('search. html')
[ -0.6223548054695129, 0.8985750079154968, 0.5337026715278625, 0.7645952105522156, 1.3557567596435547, 0.43826499581336975, -0.11708560585975647, -0.22702856361865997, -1.4723825454711914, 0.04315878078341484, 0.5188692808151245, -0.002566790906712413, -0.4046814441680908, 0.4877902865409851...
def swap ( self, qs ) : try : replacement = qs [ 0 ] except indexerror : # already first / last return if not self. _ valid _ ordering _ reference ( replacement ) : raise valueerror ( " % r can only be swapped with instances of % r which % s equals % r. " % ( self, self. _ _ class _ _, self. order _ with _ respect _ to...
[ -1.3198060989379883, -0.14621864259243011, 0.29829949140548706, -0.32451337575912476, 0.6737008094787598, -0.0016089687123894691, -0.19078274071216583, -0.0034444022458046675, 0.7028557062149048, 0.12070748955011368, -0.7699386477470398, 0.13515083491802216, -0.5592492818832397, -0.4115431...
def get _ packages ( ) : packages = find _ packages ( exclude = ['tests'] ) packages. append ('' ) packages. append ('js') packages. append ( locales _ directory ) for directory in os. listdir ( locales _ directory ) : packages. append ( locales _ directory + '.'+ directory ) return packages
[ -0.042702894657850266, 0.07427823543548584, 0.5031827688217163, 0.05502472445368767, 0.5552544593811035, -0.340013325214386, 0.024922719225287437, -0.16793255507946014, 1.1346116065979004, 0.8220281004905701, -0.0777149349451065, -0.37530332803726196, 0.5096422433853149, 0.7563928365707397...
def get _ description ( ) : desc = dict ( ) desc ['data'] = true desc ['description'] = " " " this chart presents the frequency of observed minimum wind chill for a winter season each year over the period of record for the observation site. " " " desc ['cache'] = 86400 desc ['arguments'] = [ dict ( type ='zstation ', n...
[ 0.01903662085533142, 0.11453224718570709, 0.38696902990341187, -0.5394705533981323, -0.4890844523906708, -0.5790936946868896, 0.0021100863814353943, -0.4082450270652771, -0.4305301904678345, 0.48921942710876465, -0.13729631900787354, 0.8257511854171753, 0.0743860974907875, -0.1270270049571...
def remove ( value ) : if isinstance ( value, str ) : value = get _ by _ jid ( value ) bookmarks. remove ( value )
[ 0.1154666468501091, 0.12026002258062363, 0.3934299349784851, 0.5505021214485168, -1.119269847869873, -0.3001519739627838, 0.444164514541626, 0.04129329323768616, -0.24085742235183716, 0.4498230516910553, -0.635590672492981, 0.2848387658596039, -1.0756545066833496, 0.6224320530891418, -0....
def _ _ check _ key _ validity ( self, key ) : if not isinstance ( key, tuple ) : raise typeerror ( " key must be a tuple " ) if len ( key )! = 2 : raise valueerror ( " key must be of length two " ) if not ( isinstance ( key [ 0 ], int ) and isinstance ( key [ 1 ], int ) ) : raise typeerror ( " elements of key must be ...
[ -1.7041566371917725, 0.30206239223480225, 0.8313533663749695, 0.22430717945098877, -0.07101815938949585, 0.9009743928909302, -0.25638437271118164, -0.3706289231777191, -0.7824255228042603, 0.7059471607208252, 0.8385267853736877, -0.09668055921792984, -0.9869731068611145, 0.6259844303131104...
def shuffle ( self ) : decklen = len ( self. deck ) # it makes sense to have the number of cards exchanged grow as # the number of cards in the deck grows. for shuffle _ count in xrange ( ( decklen * 10 ) + int ( random ( ) * decklen * 5 ) ) : card1 = int ( random ( ) * decklen ) card2 = int ( random ( ) * decklen ) sw...
[ -0.618980884552002, 1.1882489919662476, 0.6360315084457397, -1.0065116882324219, 0.4586273729801178, -0.47469115257263184, 0.006503526121377945, 0.5434606671333313, 0.2918735146522522, -1.3263648748397827, -0.06812173873186111, 0.30825525522232056, 0.3501926362514496, 0.5850354433059692, ...
def getinrng ( * args ) : return _ snap. tint _ getinrng ( * args )
[ -0.062209710478782654, 0.1894153654575348, 0.3372093737125397, 0.4669696092605591, 0.3065059781074524, -0.4174182713031769, -0.45773017406463623, -0.3380325734615326, -1.0588159561157227, -0.42933228611946106, -0.4910879135131836, 0.8103606700897217, -1.717481017112732, 0.44527894258499146...
def test _ view _ edit _ user _ settings _ page _ uses _ correct _ template ( self, client, proto _ user ) : client. login ( username = f " { proto _ user. username } ", password = " m = 9uak ^ c, tbq9n = t ", ) response = client. get ( reverse ( " edit _ user _ settings " ) ) assert response. status _ code = = 200 ass...
[ -0.9139878153800964, 0.861552894115448, 0.2125886231660843, 0.38984212279319763, 0.08417148888111115, -0.13964031636714935, 1.2932426929473877, 0.08751825243234634, -0.0007436623563989997, 0.015916891396045685, -0.147030308842659, -0.02120189741253853, 0.22736257314682007, -0.0095492657274...
def test _ create _ basic _ liked _ movie ( self ) : payload = {'movie': self. movie. id } res = self. client _ nonadmin. post ( liked _ movie _ url, payload ) self. assertequal ( res. status _ code, status. http _ 201 _ created ) liked _ movie = likedmovie. objects. get ( id = res. data ['id'] ) self. assertequal ( se...
[ -0.586607038974762, -0.03673648461699486, 0.598859429359436, 0.4652749001979828, 0.608872652053833, 1.6223061084747314, -1.0882714986801147, -0.597970187664032, -0.36453741788864136, -0.8007284998893738, -1.3863617181777954, 0.8908008933067322, -1.0327295064926147, 0.5269190073013306, 0....
def print _ sum ( ) : sum = 0 for item in data : sum + = item [ " price " ] print ( f " the sum is : { sum } " )
[ -0.1656675934791565, -0.4007176160812378, 0.46743661165237427, 0.09764084964990616, 1.045159935951233, 0.2965599596500397, -0.13797764480113983, 0.20880326628684998, 0.01521357987076044, 0.4921336770057678, -0.4461280107498169, 0.5471404790878296, 0.24570176005363464, 0.05734687298536301, ...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -0.2185434103012085, 0.14910338819026947, 0.9879021048545837, -0.9060484170913696, -0.505497932434082, -0.8192917704582214, 0.1900097280740738, -0.3973279595375061, 0.4310860335826874, -0.5673738121986389, -0.45581796765327454, -0.1207650825381279, 0.2540605664253235, 0.828380286693573, ...
def encode _ integer ( signed, length, small, zero, value ) : if zero and value = = 0 : return b'' if ( ( signed and ( 128 > value > = - 128 ) ) or ( not signed and value < 256 ) ) \ and small : length = 1 return compat. to _ bytes ( value, length,'big ', signed = signed )
[ 0.6077091693878174, 0.006755389738827944, 0.39630749821662903, 0.48871031403541565, -0.6862569451332092, 0.11405784636735916, -0.48385190963745117, -0.628831684589386, 0.9601019620895386, -0.04440369829535484, -0.20629864931106567, 0.1028166189789772, -0.8209814429283142, 0.495712965726852...
def api _ auth ( ) : url _ api = { " https : / / api. radar. f - secure. com / api / integration / account / details " } headers = {'content - type':'application / json ','apiaccesskey':'% s'% accesskey,'apisecretkey':'% s'% secretkey } # headers ['apiaccesskey'] = accesskey # headers ['apisecretkey'] = secretkey # ser...
[ -0.7295942306518555, -0.7100269794464111, 0.7649986147880554, 0.06290411204099655, 0.5882272124290466, -0.07091230154037476, -0.392967164516449, -0.06374577432870865, -0.2600645422935486, -0.4329287111759186, -0.3603840470314026, 0.16966784000396729, 0.24985307455062866, 0.2478432208299636...
def set _ params ( self, params ) : if not isinstance ( params, dict ) : raise typeerror ( " params must be dict. " ) qcirc _ set _ params ( self, params )
[ -1.0153937339782715, 0.15099051594734192, 0.0058680870570242405, -0.6597087979316711, 0.5993848443031311, 0.25963377952575684, 0.049155931919813156, -0.34864547848701477, -0.18630200624465942, 0.6024682521820068, -0.9126519560813904, 0.36297544836997986, -0.9316028952598572, 0.675912439823...
def _ _ init _ _ ( self, cid, name, cls ) : self. cid = cid self. name = name self. cls = cls
[ 0.9056792259216309, -0.8073102235794067, 0.5829402208328247, 0.6742436289787292, 0.03776603564620018, 0.2650929391384125, -0.8743303418159485, -0.11158803105354309, 0.027108993381261826, -0.2749228775501251, -0.9817672967910767, -0.3000636100769043, 0.01233205758035183, -0.4316056370735168...
def getlocation ( self ) : return self. _ location
[ -0.532512903213501, -0.6822754740715027, 0.4541527330875397, 0.14100204408168793, 0.09601565450429916, 0.20054982602596283, 1.7977200746536255, 0.3196106553077698, 0.1339404284954071, -0.9948370456695557, 0.12474841624498367, 0.30161741375923157, -0.025820361450314522, -0.6556176543235779,...
def main ( in _ file ) : headers = ['vendor id ','vendor name ','product id ','product name ','revision ','uid ','first installation date'] data = [ ] device _ information = parse _ setupapi ( in _ file ) usb _ ids = prep _ usb _ lookup ( ) for device in device _ information : parsed _ info = parse _ device _ info ( de...
[ -1.0518884658813477, -0.4142936170101166, 0.6176769733428955, 0.8779095411300659, 0.05111605301499367, -0.24626733362674713, 0.22092624008655548, 0.7228299379348755, -0.5287110805511475, 0.3413196802139282, -0.2927412688732147, -0.955545961856842, 0.14462099969387054, 0.5361013412475586, ...
def clonemultiple ( ctx, # mandatory main parameter volumes, # mandatory subparameter of a mandatory main parameter ( not fully decomposed ) volumeid, # non mandatory subparameter of a mandatory main parameter ( not fully decomposed ) accessvolumes = none, # non mandatory subparameter of a mandatory main parameter ( no...
[ -0.3420945703983307, -0.62115877866745, 1.0502209663391113, 0.881023645401001, -0.21046926081180573, -0.20629243552684784, -0.13436421751976013, -0.7696640491485596, -0.03266949951648712, 0.674782395362854, -0.3976491391658783, 0.3138357996940613, -0.6830859184265137, 0.3203418254852295, ...
def on _ session _ ended ( session _ ended _ request, session ) : print ( " on _ session _ ended requestid = " + session _ ended _ request ['requestid'] + ", sessionid = " + session ['sessionid'] ) # add cleanup logic here
[ 0.11942692846059799, -1.7699819803237915, 0.44301024079322815, 0.020936954766511917, 0.2185303419828415, -0.2194417417049408, -0.25981783866882324, -0.5167511701583862, 1.340659499168396, 0.5084563493728638, 0.053319502621889114, 1.072373390197754, 0.46164241433143616, 0.9843176603317261, ...
def increment ( self, seconds ) : seconds + = self. time _ to _ int ( ) return int _ to _ time ( seconds )
[ -1.205962896347046, 0.5780024528503418, 0.5691184997558594, 0.35861116647720337, -0.9925221800804138, -0.4133954346179962, -0.36197152733802795, -1.5496398210525513, 0.02981301210820675, -0.3704512417316437, -0.5045934319496155, -0.037807125598192215, 0.1135597676038742, 0.1669207215309143...
def execute ( ) : global outfile _ loc, m _ or _ f m. showinfo ('procedure ','where would you like the encoded file to be saved? \ n'' select the path in the next window.') outfile _ loc = asksaveasfilename ( title ='save your encoded file as ', filetypes = [ ('text file ', '. txt') ], defaultextension = '. txt ', init...
[ -0.18892382085323334, -0.8124587535858154, 0.8168503642082214, 0.4230157136917114, -0.18008863925933838, 0.36207157373428345, 0.6840607523918152, 0.36635226011276245, -0.7910983562469482, 0.1825701892375946, 0.12177781760692596, 0.6511098742485046, -0.39662331342697144, 0.10536234825849533...
def resource _ path ( relative _ path ) : try : # pyinstaller creates a temp folder and stores path in _ meipass base _ path = sys. _ meipass except exception : base _ path = os. path. abspath ( ". " ) return os. path. join ( base _ path, relative _ path )
[ 0.34704911708831787, -1.3478693962097168, 0.5122095942497253, 0.9498268961906433, -0.604132354259491, 0.6195217370986938, 0.920831024646759, -0.7598080039024353, 0.3549345135688782, -0.049488916993141174, 0.8164733648300171, -1.6908010244369507, -0.72061687707901, 0.11805517226457596, 0....
def optlock ( self, optlock ) : self. _ optlock = optlock
[ -0.08420917391777039, 0.6043288707733154, 0.31975120306015015, 0.6054149270057678, -0.017200849950313568, 0.5038506388664246, 0.7374778389930725, 0.11471470445394516, 0.2554660439491272, -0.37434759736061096, -0.15569904446601868, -0.5273662209510803, -0.44600996375083923, -0.6310803294181...
def replace ( self, subpath : str, permissions : list [ list [ str ] ], identities : list [ dict ], rev : int ) - > dict : payload = self. _ payload ( permissions, identities ) return self. _ http. put ( [ self. segment, subpath ], payload, rev = rev )
[ -0.9256076216697693, 0.18292665481567383, 0.4709514379501343, -0.01431350689381361, 0.37881484627723694, 0.19686198234558105, -0.13571950793266296, 1.0494942665100098, -0.5984950661659241, 0.06995648145675659, -0.8147825002670288, 0.3623102307319641, -1.220934271812439, -1.7329726219177246...
def _ create _ individual _ show _ dict _ 2 ( self ) : temp _ dict = {'venue _ id': self. venue _ id,'venue _ name': self. venue. name,'venue _ image _ link': self. venue. image _ link,'artist _ id': self. artist _ id,'artist _ name': self. artist. name,'artist _ image _ link': self. artist. image _ link,'start _ time'...
[ -0.5786685347557068, -0.424073189496994, 0.4771362543106079, -0.7794234752655029, -1.2078520059585571, 0.147592231631279, 0.16836419701576233, 0.17273560166358948, -0.005928021855652332, 0.22283616662025452, -0.5486442446708679, 0.2735985219478607, 0.2847940921783447, 0.6869139075279236, ...
def random _ a ( m, n, con _ num = 0, col _ normalized = true ) : a = np. random. normal ( scale = 1. 0 / np. sqrt ( m ), size = ( m, n ) ). astype ( np. float32 ) if con _ num > 0 : u, _, v = la. svd ( a, full _ matrices = false ) s = np. logspace ( 0, np. log10 ( 1 / con _ num ), m ) a = np. dot ( u * ( s * np. sqrt ...
[ 0.1857207864522934, 0.1434011608362198, 0.9304491877555847, 0.09678236395120621, -1.1685796976089478, 0.3290787637233734, 0.22178258001804352, 0.8528792262077332, 1.0892406702041626, 0.6509218215942383, 1.6655738353729248, 0.11158934235572815, 0.14245401322841644, -0.12319345027208328, 0...
def get _ game ( self, request ) : game = get _ by _ urlsafe ( request. urlsafe _ game _ key, game ) if game : return game. to _ form ('here is the requested game') else : raise endpoints. notfoundexception ('game not found!')
[ -0.5808238983154297, 0.1731899082660675, 0.437696635723114, 0.1257326304912567, 0.33338627219200134, 0.016662221401929855, -1.2833278179168701, -0.9342462420463562, -0.2888967990875244, 0.8969526886940002, 1.422043800354004, 0.1600589007139206, -0.27314066886901855, 0.1048067957162857, -...
def get _ data _ loader ( config ) : loader _ type = config ['data _ loader'] ['type'] if loader _ type = ='mnistdataloader': return mnistdataloader ( config ) elif loader _ type = ='imagedataloader': return imagedataloader ( config ) else : raise notimplementederror ( f " loader { loader _ type } not implemented. " )
[ -0.370950311422348, -0.008537049405276775, 0.31459110975265503, -0.21207982301712036, -0.4270119071006775, 0.4370693564414978, -0.8108699917793274, -0.637779176235199, -0.08817488700151443, -0.3976565897464752, -0.3027760088443756, 0.866360604763031, 0.3966904282569885, 0.9529865980148315,...
def real _ session _ wrapper ( func ) : async def wrapper ( event ) : if addressed : # check if this message is meant for us bot _ user = await event. client. get _ me ( ) username = bot _ user. username. lower ( ) recipient _ string = f " @ { username } " # accept all commands coming directly from a user # only accept...
[ -0.03404875099658966, -0.10526959598064423, 0.7498378157615662, 0.2902720868587494, -0.6674506664276123, -0.7468986511230469, 0.8010868430137634, -0.33882230520248413, 0.9688650369644165, 0.3944658935070038, 0.7849792838096619, 0.2115219235420227, 0.43383467197418213, -0.5746968984603882, ...
def _ create _ node _ name ( operation, * args ) : if isinstance ( args, tuple ) and len ( args ) = = 1 : args = args [ 0 ] node _ name = [ ] for arg in args : # unwrap list of lists, if it's only one element if isinstance ( arg, list ) and len ( arg ) = = 1 : arg = arg [ 0 ] if isinstance ( arg, node ) : # try to find...
[ -0.6813884377479553, 0.4239974021911621, 0.9918643236160278, -0.36937087774276733, 0.028890175744891167, -0.7221064567565918, 0.1325983852148056, 0.2980595827102661, -0.43610256910324097, 0.7442681789398193, 0.5388094782829285, 0.3046088218688965, 0.979191780090332, 0.08337724208831787, ...
def getuc ( * args ) : return _ snap. tch _ getuc ( * args )
[ 0.435596227645874, 0.9213640689849854, 0.5981215834617615, 0.6489047408103943, 1.2681312561035156, 0.3579391837120056, 0.9002223610877991, 0.5431306958198547, -1.0873883962631226, -0.14889083802700043, -0.15299825370311737, -0.020922748371958733, 0.136776402592659, 0.5575302839279175, 0....
def process _ img ( self, rawimg ) : print ( type ( rawimg ) ) rawimg = np. asarray ( rawimg ) print ( rawimg. shape ) img = rawimg [ round ( rawimg. shape [ 0 ] / 2 ) : ] img = resize ( img, ( 120, 320 ) ) self. predict _ img = img
[ -1.2447112798690796, 0.40931081771850586, 0.8067135214805603, -0.5745512843132019, -0.07986985892057419, 0.053812526166439056, 0.2477952092885971, 0.44795531034469604, 0.15693093836307526, -0.02269860729575157, 0.4746599793434143, 0.40839308500289917, 0.8251405358314514, 0.6834399104118347...
def deleteend ( self ) : lastnode = self. head while lastnode. next is not none : previousnode = lastnode lastnode = lastnode. next previousnode. next = none
[ 0.24709762632846832, 0.36917081475257874, 0.7240729331970215, -0.5013576149940491, 0.5307899713516235, -0.2526684105396271, 0.28125932812690735, 0.8971047401428223, 0.2908588945865631, 0.7920916080474854, -0.1484931856393814, 1.294634222984314, -1.5152419805526733, 0.8599540591239929, 0....
def remove _ field ( stream, field ) : stream = stream | transformer ('/ / label [ @ for = " field - % s " ]'% field ). replace ( " " ) stream = stream | transformer ('/ / * [ @ id = " field - % s " ]'% field ). replace ( " " ) return remove _ changelog ( remove _ header ( stream, field ), field )
[ -0.001763558597303927, -0.25597238540649414, 0.5958179235458374, -0.8356972336769104, -1.2379273176193237, -0.14972858130931854, -0.9583956599235535, 0.19069600105285645, -0.7939441204071045, 0.3576112687587738, -1.0367350578308105, 0.16590577363967896, -0.5303236842155457, -0.159187778830...
def cp ( file ) : import os dirname = os. path. dirname ( _ _ file _ _ ) copy ='copy _ of _'+ file with open ( os. path. join ( dirname, file ), " rb " ) as my _ file : with open ( os. path. join ( dirname, copy ), " wb " ) as copy _ file : data = my _ file. read ( 16 ) check _ empty = not data while check _ empty! = t...
[ 0.44075724482536316, -0.08074307441711426, 0.9392930865287781, -0.23274223506450653, 0.014218772761523724, 0.8161963820457458, 0.9039379954338074, -0.010401178151369095, -0.6887455582618713, 0.2996104955673218, -0.1241440549492836, -0.24238528311252594, -0.16413897275924683, 0.004728108178...
def _ _ get _ _ ( self, locator ) : element = self. driver. instance. find _ element ( * locator ) return element. get _ attribute ( " text " )
[ -0.7234915494918823, -0.9102858304977417, 0.5544556379318237, -0.09744581580162048, -0.4154035449028015, -0.9513662457466125, 0.12628024816513062, 0.06195109337568283, 0.3795580267906189, 0.4272669851779938, 0.2065773457288742, -0.5558856725692749, 0.042007770389318466, -0.4185449481010437...
def f _ spectrum ( im, shifted = false ) : if ( shifted ) : im = np. fft. fftshift ( im ) f = np. vectorize ( amplitude ) return f ( im )
[ -0.1359221190214157, -0.014609289355576038, 0.42557987570762634, 0.3808835744857788, -0.5226883888244629, -0.7025357484817505, -0.18358108401298523, 0.050681889057159424, 0.685226559638977, -0.18858155608177185, 0.7076365351676941, -0.12671159207820892, 0.41427090764045715, 1.3104285001754...
def colorextractorall ( impath, resultspath ) : r = np. load ( resultspath ). item ( ) masks = r ['masks'] masks = np. moveaxis ( masks, 2, 0 ) people = { } for mask, cid, roi in zip ( masks, r ['class _ ids'], r ['rois'] ) : if cid = = 1 : people [ str ( roi ) ] = colorextractor ( impath, mask ) return people
[ -0.6130913496017456, -0.7705209255218506, 0.5228376388549805, 0.33030760288238525, 0.013333446346223354, -0.4143395721912384, 0.5972852110862732, -0.3605852723121643, 0.20428448915481567, 0.23553279042243958, -0.4520183801651001, -0.3191359043121338, -0.12661397457122803, 0.343741089105606...
def write _ report ( doc, upipe, rpipe, uduct, rduct ) : workset _ table = doc. getworksettable ( ) rogue = len ( rpipe ) + len ( rduct ) unhosted = len ( upipe ) + len ( uduct ) report = [ ] # write header with general information report. append ( " reporting time, { now } ". format ( now = datetime. datetime. now ( )...
[ -1.135859489440918, -0.1776924878358841, 0.704556941986084, -0.6184674501419067, 0.5078479051589966, 0.05889962241053581, 0.6993057727813721, 0.2560146749019623, -0.5237213969230652, -0.43205955624580383, -0.4026303291320801, -0.04372071847319603, 0.0033254530280828476, 0.1929764747619629,...
def mvkeyh5 ( filepath, ksf, kst, sep = '.') : ksf = [ ksf ] if type ( ksf ) is not list else ksf kst = [ kst ] if type ( kst ) is not list else kst f = h5py. file ( filepath,'a') for keyf, keyt in zip ( ksf, kst ) : keyf = keyf. split ( sep ) keyt = keyt. split ( sep ) grp = f for kf, kt in zip ( keyf [ : - 1 ], keyt ...
[ -0.8840261697769165, -0.14737115800380707, 0.8514042496681213, 0.3494390845298767, -0.8478915691375732, 0.21182623505592346, 0.16565778851509094, 0.3349095284938812, -0.8434149026870728, 0.7744432091712952, -0.2711528539657593, -0.04706156253814697, -0.2735317349433899, -0.2122431397438049...
def move ( self ) : self. location = self. location + self. direction
[ -0.7131013870239258, -1.2744499444961548, 0.44356364011764526, -0.572372555732727, 0.591585636138916, 0.9973889589309692, 0.370858758687973, 0.6717678904533386, 0.28421929478645325, -0.006694032810628414, -0.41200369596481323, 0.4769273102283478, 0.4679720997810364, -0.6787993311882019, ...
def create _ folder ( self, base _ folder, new _ folder _ name ) : try : new _ folder = base _ folder. create _ subfolder ( new _ folder _ name ) logging. info ( " folder " + new _ folder _ name + " created successfully. " ) return new _ folder except boxapiexception as ex : if ex. code = = " item _ name _ in _ use " :...
[ -0.7529075741767883, -0.49373912811279297, 0.6343414783477783, 0.7469375133514404, 0.4961980879306793, 0.11204679310321808, -0.3994527757167816, -0.710125744342804, -0.5880033373832703, 0.05341409891843796, 0.008533668704330921, 0.03369070217013359, -0.8589474558830261, -0.2427486628293991...
def opensim ( self, vis = true, walls = true, contrast = 50, cmap = none, pipe = none, fps = none, skip = none ) : if self. simfile is none : print ( " simulation needs to be written " ) self. write ( ) return open _ sim _ in _ lambda ( self. simfile, vis = vis, walls = walls, contrast = contrast, cmap = cmap, pipe = p...
[ -0.3078072965145111, 0.4136892259120941, 0.5627319812774658, -0.41886255145072937, -0.18453124165534973, -0.09415703266859055, 0.9089401960372925, 0.4254833459854126, 0.45743125677108765, -0.3333715498447418, 0.004024722147732973, 0.1456037312746048, -0.5660712718963623, 0.1938346177339553...
def triggervulnerability ( self, length ) : print ( " triggering vulnerability... " ) self. parent. processerror ('unsupportedplatform') return
[ 0.13735555112361908, 0.2052694857120514, 0.02884618192911148, 0.5842366814613342, 0.22266936302185059, 0.26234883069992065, 0.5546401143074036, 0.5316693186759949, 0.09790909290313721, -0.1834161877632141, -1.4984649419784546, 0.21053941547870636, -1.0417933464050293, -0.04504083842039108,...
def _ getnumofinstances ( self ) : numb _ dict = { } numb = mc. ls ( " *. hindleg " ) for i in numb : item = i. split ( ". " ) [ 0 ] pos = mc. xform ( item, q = 1, ws = 1, t = 1 ) mat = mc. xform ( item, q = 1, ws = 1, matrix = 1 ) numb _ dict [ item. split ( " _ " ) [ 2 ] ] = [ item, pos, mat ] return numb _ dict
[ -0.09803007543087006, 0.24775782227516174, 0.5601444840431213, -1.577135443687439, -0.9593353867530823, -0.3440912961959839, 0.7776103615760803, 0.4141136109828949, -1.487418293952942, 0.4916577935218811, -1.3853424787521362, -0.4120188057422638, 0.56484454870224, 0.536650538444519, 0.93...
def getnotifications ( self ) : return self. _ notifications
[ -0.42433440685272217, 0.12745048105716705, 0.44236940145492554, 0.91361004114151, 0.4997238218784332, 0.04231159761548042, 0.6430005431175232, -0.9107469916343689, 0.15141187608242035, -0.7140792608261108, -1.3760755062103271, 0.0008899986860342324, -0.1469568908214569, 0.02243342809379100...
def query ( self, dns _ dict ) : base _ url ='https : / / cloudflare - dns. com / dns - query?'domain _ name = '. '. join ( self. domain _ list ) url = base _ url +'name ='+ domain _ name +'& type ='+ self. dns _ type try : r = requests. get ( url, headers = {'accept':'application / dns - json'} ). json ( ) except requ...
[ -0.8710516095161438, 1.1237289905548096, 0.7260071039199829, 0.29130446910858154, 0.2585083246231079, -0.04699476808309555, -0.7529642581939697, 0.12380444258451462, 1.185730218887329, 0.2776394188404083, -0.42780280113220215, -0.2282426357269287, -0.7028816342353821, 0.5431105494499207, ...
def pred2logpdf ( y _ true, y _ pred ) : pdf = 1 / ( f. sqrt ( 2 * np. pi * f. square ( self. actor _ sigma ) ) ) * \ f. exp ( - 0. 5 * f. square ( ( y _ true - y _ pred ) / self. actor _ sigma ) ) log _ pdf = f. log ( pdf + f. epsilon ( ) ) return log _ pdf
[ 0.6500148773193359, -1.4721932411193848, 0.5513631105422974, -0.5492430329322815, -1.0084587335586548, 0.06032085418701172, -0.5389876365661621, 1.067946434020996, -0.4522937536239624, 0.1968252956867218, 0.382567822933197, 1.3437427282333374, 0.8801748752593994, -0.2688750922679901, 0.8...
def group _ start ( self ) : if self. has _ error ( ) : return'< fieldset class = " form - group has - danger " >'else : return'< fieldset class = " form - group " > '
[ 0.04592687636613846, 0.28959885239601135, 0.4803931713104248, -0.2381882518529892, -0.19022949039936066, -0.6848007440567017, -0.23672841489315033, -0.3869425058364868, 0.47083646059036255, -0.6644225120544434, 0.8580210208892822, 1.1104178428649902, 0.21640366315841675, 0.4449045956134796...
def _ _ eq _ _ ( self, other ) : return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.6778807640075684, -1.1012353897094727, 0.7477349638938904, -0.46895134449005127, -0.06940138339996338, 0.31501948833465576, -0.04707590490579605, -0.44794392585754395, 0.6671789884567261, -0.2189469188451767, -1.0724388360977173, 0.12544633448123932, 0.3129737079143524, -0.2266865074634...
def send _ decision ( self, uid, decision : str ) : decision = decision. lower ( ) if decision not in [ " approved ", " rejected " ] : raise valueerror ('decision may be be either " approved " or " rejected "') data = dict ( uid = uid, decision = decision ) return self. post ('lender / set _ loan _ request _ decision /...
[ -0.1826181560754776, -0.26336216926574707, 0.3820433020591736, 0.21229588985443115, -0.6610567569732666, 1.3183256387710571, -1.43753182888031, -0.21179665625095367, 0.3081917464733124, 0.3306303024291992, 0.23074764013290405, 1.7011635303497314, -1.1185734272003174, 0.5663349628448486, ...
def pix2ang ( nside, pix, nest = false ) : theta, phi = hp. pix2ang ( nside, pix, nest = nest ) lon = phi2lon ( phi ) lat = theta2lat ( theta ) return lon, lat
[ -1.0306428670883179, -0.7560194730758667, 0.37979403138160706, -0.7968879342079163, -0.7321042418479919, 0.11621146649122238, -1.5803807973861694, 0.33424636721611023, 0.3634202480316162, 0.11730147153139114, -0.13376596570014954, -0.09466341882944107, -0.22992874681949615, 0.2633185684680...
async def _ async _ stop _ long _ polling ( self ) : if self. _ long _ poll _ task is not none : self. _ long _ poll _ task. cancel ( ) self. _ long _ poll _ task = none await self. _ api. unsubscribe ( sub _ type = subtype. long _ poll )
[ -0.05441408231854439, 0.3263712227344513, 0.49797770380973816, -0.12231417745351791, -0.29245686531066895, 0.7752642631530762, -0.903139591217041, 0.9030632376670837, 0.04691283404827118, 0.3781089186668396, -0.5029314160346985, -0.2468424290418625, 0.08135896176099777, 0.04833118617534637...
def testmultithreadproduce ( self ) : random. seed ( 0 ) def producerthread ( ) : # random sleep so that each thread produce isn't in sync. time. sleep ( random. randrange ( 3 ) * 0. 1 ) for unused _ i in range ( 10 ) : self. sf. produce ( [ self. e1, self. e2, self. e3 ] ) threads = [ ] for unused _ i in range ( 10 ) ...
[ -0.1039729043841362, 0.5538023114204407, 0.9073987603187561, 0.3669682741165161, 1.1990206241607666, -0.18687143921852112, 0.5743412971496582, -0.4291844069957733, 0.5372412204742432, 0.08878915756940842, -0.0688360333442688, -0.2877134382724762, -0.2501780092716217, -0.239168182015419, ...
def reduce _ sum _ v1 ( input _ tensor, axis = none, keepdims = none, name = none, reduction _ indices = none, keep _ dims = none ) : axis = deprecation. deprecated _ argument _ lookup ( " axis ", axis, " reduction _ indices ", reduction _ indices ) keepdims = deprecation. deprecated _ argument _ lookup ( " keepdims ",...
[ 0.09723478555679321, 0.25882014632225037, 1.0473906993865967, 0.6044487953186035, -0.41432154178619385, -0.25162312388420105, 0.022855589166283607, 0.06238403543829918, 0.046575602144002914, 1.0397131443023682, -0.8853774070739746, 0.5921884179115295, 0.3147861659526825, -1.051416873931884...
def mc _ move ( board, player, trails ) : score _ board = [ [ 0 for dummy _ col in range ( board. get _ dim ( ) ) ] for dummy _ row in range ( board. get _ dim ( ) ) ] for dummy _ i in range ( trails ) : trial _ board = board. clone ( ) mc _ trial ( trial _ board, player ) mc _ update _ scores ( score _ board, trial _ ...
[ -0.09042894095182419, 0.3554414212703705, 0.6333549618721008, 0.8299302458763123, -0.28147169947624207, -0.32517242431640625, 0.6756744384765625, -0.5125675201416016, -0.7458596229553223, 0.575791597366333, 0.12100166827440262, -0.2639642059803009, -0.16406890749931335, -0.2646804749965668...
def align _ centre _ of _ mass _ to _ light ( self, mass _ prior _ model : af. priormodel ( mp. massprofile ), light _ centre : ( float, float ), ) : if self. align _ bulge _ mass _ centre : mass _ prior _ model. centre = light _ centre else : mass _ prior _ model. centre. centre _ 0 = af. gaussianprior ( mean = light ...
[ 0.6068888306617737, -1.2453017234802246, 0.6470239758491516, -0.7174549102783203, 0.19749364256858826, 0.35906991362571716, 0.5385014414787292, -0.14252054691314697, 0.4391040503978729, -0.1418679654598236, 0.6655471324920654, 0.2474210560321808, -0.3594404458999634, 1.0739068984985352, ...
def test _ get _ github _ keys ( self ) : pass
[ -0.24386517703533173, 0.7911598682403564, -0.1426222175359726, 1.0357649326324463, 0.6032534241676331, -0.0911908820271492, 0.34794437885284424, -0.12241314351558685, -0.6100186109542847, -0.1309603899717331, -0.5590053796768188, 0.2813165783882141, -1.4689828157424927, -0.0614712387323379...
def _ status _ device _ characteristic ( self ) : characteristics = self. connection. getcharacteristics ( uuid = status _ notification _ uuid ) if not characteristics : return none return characteristics [ 0 ]
[ -0.21989506483078003, -0.47090619802474976, 0.33142217993736267, 0.4303700029850006, -0.3275304138660431, -0.20766696333885193, -0.1223953440785408, 0.31068187952041626, 0.0838104709982872, 0.2661460340023041, 0.052380651235580444, 0.7254639267921448, -0.37965843081474304, -1.0482084751129...
def count ( self, source, target ) : try : source _ value = self. _ response _ holder [ source ] except keyerror : # source value hasn't been determined yet, we need # to generate the source value first raw = self. fake _ response [ source ] source _ value = self. _ parse _ syntax ( raw ) if isinstance ( source _ value...
[ -1.02676522731781, 0.19015076756477356, 0.5627443790435791, -0.7389294505119324, 0.5042946338653564, -1.0834956169128418, -0.7286823391914368, 0.3081248104572296, 0.07280972599983215, 0.12370993942022324, -0.6878130435943604, 0.20677830278873444, 0.3063673675060272, 0.2695198953151703, -...
def updateartjoblist ( request ) : valid, response = initrequest ( request ) if not valid : return response query = setupview ( request,'job') starttime = datetime. now ( ) # adding to art _ results _ queue jobs with not loaded result json yet cur = connection. cursor ( ) cur. execute ( " " " insert into { 0 }. art _ r...
[ -1.4166711568832397, -0.6281638741493225, 0.5683178901672363, -1.1931945085525513, 0.20213927328586578, 0.0694059357047081, 0.1275806576013565, -0.6469083428382874, -0.7458362579345703, 0.442617803812027, -0.8077350854873657, -0.3001420199871063, -0.19247296452522278, -0.01576932892203331,...
def test _ processor _ not _ creates _ entry _ db _ if _ change _ inst _ notemodel ( self ) : # check created object after loaded fixtures all _ note = notemodel. objects. all ( ) self. assertequal ( len ( all _ note ), 12 ) only _ note = all _ note [ 11 ] self. assertequal ( only _ note. model,'contact') # change obje...
[ -0.6443250179290771, -0.07156925648450851, 0.46972888708114624, 0.014835523441433907, 0.675825297832489, 1.0321100950241089, 0.9587627053260803, 0.30469027161598206, 0.605868399143219, -0.11551529914140701, -1.128096342086792, 0.6632433533668518, -0.343037873506546, 0.7004495859146118, 0...
def get _ code ( ) : return inspect. getsource ( sort )
[ 0.5994265675544739, -0.0033310484141111374, 0.44377613067626953, 0.010342363268136978, -0.11718425154685974, -0.7075150609016418, 0.9957804679870605, -0.03601434826850891, -0.3303788900375366, -0.6093432903289795, 0.39183762669563293, 0.5081601738929749, 0.26213014125823975, 0.338917046785...
def characters ( self, c ) : if ( len ( c. strip ( ) ) > 0 ) : self. chars = self. chars + c
[ 0.1138480007648468, 0.5140727758407593, 0.4903762638568878, -1.572039246559143, 0.293851763010025, 0.8682870268821716, -0.08388867229223251, 0.3015678822994232, 0.2798464894294739, -0.4499554932117462, -1.1183366775512695, 0.3980906307697296, -0.17064276337623596, 0.42634275555610657, -0...
def _ render _ template _ block ( template, block _ name, context ) : return _ render _ template _ block _ nodelist ( template. nodelist, block _ name, context )
[ -0.8915380835533142, 0.44698256254196167, 0.30954423546791077, -0.607327401638031, -1.2123160362243652, -0.47851866483688354, -0.7779486179351807, 0.023056993260979652, -0.22299082577228546, 1.04080331325531, -0.22813522815704346, -0.3518262207508087, -0.249277263879776, 0.4139131307601928...
def test _ create _ delete _ group ( self ) : group _ name = self. group _ name self. _ test _ create _ group ( group _ name ) self. _ test _ delete _ group ( group _ name )
[ -0.11301814019680023, 1.2727270126342773, 0.12411084771156311, 0.04828942194581032, 1.1599777936935425, -0.3328838646411896, 0.5194622874259949, -0.1738557070493698, 0.1958489716053009, -0.4352767765522003, 0.12122156471014023, 0.28351593017578125, 0.002713290974497795, 1.1502974033355713,...
def displayframe ( self, qidataframe ) : if self. _ displayed _ object is not none : if qidataframe is not none \ and isinstance ( self. _ displayed _ object, qidata. qidataframe ) \ and self. _ displayed _ object. files = = qidataframe. files : # if the displayed frame is the same as the one we want to show # do nothi...
[ 0.6201766729354858, 0.007724354974925518, 0.6386562585830688, -0.4605172872543335, -0.44392338395118713, -0.03932615742087364, 0.5850535035133362, 0.17619332671165466, 1.0111020803451538, -0.8457233309745789, 0.22336505353450775, 0.6651215553283691, -0.09165021032094955, 0.1963220238685608...
def make _ trg _ mask ( trg, trg _ pad _ idx ) : # trg _ pad _ mask = [ batch size, 1, 1, trg len ] trg _ pad _ mask = ( trg! = trg _ pad _ idx ). unsqueeze ( 1 ). unsqueeze ( 2 ) trg _ len = trg. shape [ 1 ] # trg _ sub _ mask = [ trg len, trg len ] trg _ sub _ mask = torch. tril ( torch. ones ( ( trg _ len, trg _ len...
[ -0.2844155430793762, 0.6705125570297241, 0.45110946893692017, -0.9596161842346191, 0.22712230682373047, 0.15124018490314484, 0.5732090473175049, -0.09194034337997437, 0.04983879625797272, 0.31380602717399597, -0.9964161515235901, -0.2352720946073532, 0.589529275894165, -1.2014288902282715,...
def objectfieldwidget ( field, request ) : return fieldwidget ( field, objectwidget ( request ) )
[ -0.046020764857530594, -0.16509336233139038, 0.14290958642959595, -0.6108943819999695, -0.22267360985279083, 0.645165205001831, -0.6918877959251404, 0.11303074657917023, 0.5439450144767761, -0.7626528739929199, -0.8971266150474548, -0.06463590264320374, 0.3890509009361267, -0.6522062420845...
def add _ prerequisite ( self, p ) : if self. progress > = progress. bound : raise dependency _ error ( f'can not add { p. frontend } :'f'{ self. frontend. boundname } already bound') self. prerequisites. add ( p ) if cyclic ( self ) : raise dependency _ error ( f'dependency cycle detected while adding'f'{ self. fronte...
[ -0.9315291047096252, -0.12665444612503052, 0.7564844489097595, -0.1819075644016266, 0.008142036385834217, 1.444132924079895, 0.5718493461608887, -0.36386021971702576, 0.3824964165687561, -0.593159556388855, -0.6393041610717773, 0.5816644430160522, -0.565801739692688, 1.0238232612609863, ...
def _ _ init _ _ ( self, username, session = none, load = true ) : self. username = username self. _ session = session self. _ soup _ works = none self. _ soup _ profile = none self. _ soup _ bookmarks = none self. _ works = none self. _ bookmarks = none if load : self. reload ( )
[ -0.6405775547027588, 0.015286321751773357, 0.5447800159454346, 0.13954006135463715, -0.4036102294921875, -0.4722658395767212, 0.8757711052894592, -0.23441942036151886, 0.8349891304969788, -0.935326337814331, -1.3413652181625366, -0.0524359755218029, 0.14002451300621033, 0.09590743482112885...
def test _ collect _ parameters ( self ) : self. assertequals ( collect _ parameters ( ), [ ] ) # check against uri _ query parameters = collect _ parameters ( uri _ query = self. uri _ query ) correct _ parameters = [ ('b5 ','= % 3d'), ('a3 ','a'), ('c @ ','' ), ('a2 ','r b'), ('c2 ','' ), ('a3 ','2 q') ] self. assert...
[ 0.11952150613069534, -0.0014849447179585695, 0.7795408964157104, 0.3538241982460022, 0.6722441911697388, -0.006880520842969418, -0.3780513405799866, -0.6611692905426025, 0.28362756967544556, 0.8128467202186584, 0.2114049345254898, 0.5337154865264893, -0.23882746696472168, 0.173600673675537...
def get _ all _ deployed _ l7 _ policys ( self ) : log. debug ('getting all deployed l7 _ policys on big - ip \'s') deployed _ l7 _ policys _ dict = { } for bigip in self. get _ all _ bigips ( ) : folders = self. system _ helper. get _ folders ( bigip ) for folder in folders : tenant _ id = folder [ len ( self. service...
[ -0.005245806183665991, -0.5828539133071899, 0.47526058554649353, -0.906977117061615, -0.7738980054855347, 0.6036264896392822, -1.0446401834487915, 0.4290654957294464, 0.1703464686870575, 0.44624218344688416, -0.21761910617351532, -0.3890959322452545, 0.31307104229927063, 0.9193273782730103...
def test _ kwargs ( mode ) : allowed = _ all _ modes [ mode ] not _ allowed = { } for kwargs in _ all _ modes. values ( ) : if kwargs! = allowed : not _ allowed. update ( kwargs ) # test if allowed keyword arguments pass np. pad ( [ 1, 2, 3 ], 1, mode, * * allowed ) # test if prohibited keyword arguments of other modes...
[ 0.01855982467532158, 0.5503733158111572, 0.724536657333374, -0.3559025228023529, -0.0769123062491417, 1.1563712358474731, -0.23698079586029053, -0.43668484687805176, -0.19992011785507202, 0.7018434405326843, -0.2626101076602936, -0.3454299569129944, -0.6669561862945557, 0.6709523797035217,...
def get _ sponsored _ news _ count ( service _ identity _ user, app _ ids ) : price _ per _ apps = [ ] for app _ id in app _ ids : news _ items = newsitem. list _ sticky _ by _ sender _ in _ app ( service _ identity _ user, app _ id ). fetch ( free _ sponsored _ items _ per _ app ) count = 0 if len ( news _ items ) = =...
[ 0.4799249470233917, 0.5277444124221802, 0.20090678334236145, 1.0605653524398804, -0.7118985056877136, 0.3659891188144684, -0.1924535483121872, -0.5219776630401611, 0.01472579874098301, 0.8541756868362427, -0.7230908870697021, -0.6362881064414978, -0.14096909761428833, 1.0493055582046509, ...
def create _ new _ task ( self, request ) : try : task _ description = json. load ( request. body _ file ) except valueerror : self. log. error ('failed to load task data') return webob. response ( status = 400, body = constants. error _ task _ invalid _ payload ) task _ id _ candidate = str ( uuid. uuid4 ( ) ) if self...
[ -0.4567064046859741, 0.13996468484401703, 0.6163228750228882, 0.6181178092956543, 0.14632587134838104, 0.8071165680885315, -0.14557257294654846, 0.0425981767475605, -1.1211236715316772, 0.6652939319610596, -0.1579216867685318, 0.35878244042396545, -0.4631302058696747, 0.3359041213989258, ...