text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ parsesshowintdesc ( self ) : expected = output _ description _ processed result = parsesshowintdesc ( output _ description ) assert result = = expected | [
0.8655897378921509,
0.7071555256843567,
0.408597856760025,
0.14692352712154388,
0.3633763790130615,
-0.04055837541818619,
0.06292420625686646,
0.3917483687400818,
-0.2513750195503235,
-0.622065007686615,
0.2673060894012451,
0.8800433278083801,
1.1953208446502686,
0.11137256771326065,
0.2... |
def _ _ init _ _ ( self, name, length, location, orientation ) : self. _ _ name = name self. _ _ length = length self. _ _ location = location self. _ _ orientation = orientation | [
0.479794979095459,
-1.1369702816009521,
0.43135565519332886,
-0.8098238706588745,
0.03088235855102539,
0.46698495745658875,
-0.23146876692771912,
0.5582272410392761,
0.34018269181251526,
0.33378520607948303,
-1.5606061220169067,
0.06421258300542831,
-0.18003183603286743,
-0.497317790985107... |
def simulate _ rocket _ launch ( mission, rocket _ thrust, rocket _ mass _ loss _ rate, initial _ fuel _ mass ) : # insert awesome code here... # you will probably also need these quantities : # const. g # const. m _ sun # mission. spacecraft _ mass # system. masses # system. radii # calculate escape velocity v _ esc =... | [
0.6844621300697327,
-0.1807950735092163,
0.8919938206672668,
0.13080668449401855,
-0.8527274131774902,
0.41549456119537354,
-0.21314774453639984,
-0.1187090277671814,
-0.7337177395820618,
0.025056282058358192,
0.06255726516246796,
0.17579025030136108,
0.15435880422592163,
0.539797663688659... |
def pad _ mask ( lengths : torch. tensor, max _ length : optional [ union [ torch. tensor, int ] ] = none ) - > torch. tensor : if max _ length is none or max _ length < 0 : max _ length = cast ( int, torch. max ( lengths ). item ( ) ) max _ length = cast ( int, max _ length ) idx = torch. arange ( 0, max _ length, dev... | [
0.2706279158592224,
0.13950572907924652,
0.5361360907554626,
-0.10711032897233963,
0.603281557559967,
0.8733872771263123,
-0.19441168010234833,
0.17157010734081268,
0.18438220024108887,
0.3024902045726776,
0.33255699276924133,
0.06645377725362778,
0.06337432563304901,
-0.2083936482667923,
... |
def event _ attributes ( event ) : event _ type = event ['eventtype'] attributes _ key ='{ } { } eventattributes '. format ( event _ type [ 0 ]. lower ( ), event _ type [ 1 : ] ) return event. get ( attributes _ key ) | [
-0.11179099231958389,
-0.7818537354469299,
0.3916569948196411,
0.027452416718006134,
0.26727092266082764,
-0.41416382789611816,
-0.2299828827381134,
0.5922181606292725,
0.36696988344192505,
1.1053916215896606,
0.2269747108221054,
0.36637237668037415,
-0.26287803053855896,
0.090816177427768... |
def _ _ init _ _ ( self, profiles : profiles = profiles ( ), cl _ args : list [ str ] = none ) : self. _ profiles = profiles self. _ args = args ( profiles, cl _ args ) self. profile = self. _ args. profile self. _ config = self. _ read _ config _ file ( self. _ profiles. get _ config _ file _ path ( self. profile ) ) | [
0.3208836615085602,
-0.012895151041448116,
0.5780286192893982,
0.6850369572639465,
1.0319023132324219,
0.4751775562763214,
0.4948152005672455,
-0.05051332339644432,
-0.7685437202453613,
0.3126525282859802,
-0.38837048411369324,
-0.0303290244191885,
-0.12437658756971359,
0.04058603197336197... |
def _ count _ surrounding _ empty _ cells ( self, rand _ nb _ coords : tuple ) - > int : a = [ self. maze [ self. _ add _ coord _ tuples ( rand _ nb _ coords, _ ) ] = = cell. empty. value for _ in list ( step ) ] return sum ( a ) | [
-0.6957584023475647,
0.3984159231185913,
0.44597581028938293,
0.38608476519584656,
0.5088019967079163,
0.5740029811859131,
1.6981281042099,
-0.1992730051279068,
-0.5349122881889343,
-0.3014020025730133,
-0.7353506088256836,
-0.6999915242195129,
-0.5865156650543213,
0.5417883992195129,
-0... |
def run ( self ) : # print self. wdinfo # print self. lodinfo cleanregex = u'^ https? \ : \ / \ / (. + ) \ $ 1 $'for propertyinfo in self. wdinfo : print propertyinfo. get ( u'formatterurl') # print propertyinfo if propertyinfo. get ( u'formatteruri') : # already has rdf link continue formatmatch = re. match ( cleanreg... | [
-0.7728478312492371,
-0.8282697796821594,
0.5173473358154297,
-0.728256344795227,
0.5814359784126282,
-0.3388579785823822,
0.39807218313217163,
0.10227733850479126,
-0.20427075028419495,
-0.5751840472221375,
0.4536856710910797,
0.3909552991390228,
-0.633836567401886,
0.24613149464130402,
... |
def test _ get _ cve _ filter _ by _ unrecognized _ state _ reserved ( ) : res = requests. get ( f'{ env. awg _ base _ url } { cve _ url } / ', headers = utils. base _ headers, params = {'state':'reserved'} ) assert res. status _ code = = 400 assert'reserved'not in res. content. decode ( ) | [
-0.15421071648597717,
0.5233485698699951,
0.44153937697410583,
0.23765918612480164,
0.9045509696006775,
0.07822207361459732,
-0.5781038403511047,
0.3150815963745117,
0.2011842578649521,
-0.629624605178833,
-0.5469707250595093,
0.5681214332580566,
0.8754420280456543,
-0.48933666944503784,
... |
async def set _ climate _ keeper _ mode ( self, keeper _ id : int ) - > none : # if car is asleep, climate is already off wake _ if _ asleep = keeper _ id > 0 data = await self. _ send _ command ( " set _ climate _ keeper _ mode ", climate _ keeper _ mode = keeper _ id, wake _ if _ asleep = wake _ if _ asleep, ) if dat... | [
-0.6481720209121704,
-0.3317505121231079,
0.2474963217973709,
0.41485729813575745,
0.4130724370479584,
1.7690536975860596,
-0.6235332489013672,
0.5050792694091797,
-1.1733163595199585,
0.17156286537647247,
-0.7208561897277832,
-0.11533717811107635,
0.045125965029001236,
0.8289852142333984,... |
def listmethods ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!') | [
-1.3172931671142578,
0.08753995597362518,
0.6417624354362488,
0.3452013432979584,
0.8334006071090698,
-0.06001811847090721,
0.29026639461517334,
-0.6125462651252747,
0.5413837432861328,
0.0739709660410881,
0.007963069714605808,
0.8768208622932434,
-0.7804222702980042,
0.32936471700668335,
... |
def deserialize _ numpy ( self, str, numpy ) : try : if self. mapxy is none : self. mapxy = geometry _ msgs. msg. point32 ( ) if self. id is none : self. id = art _ msgs. msg. mapid ( ) end = 0 _ x = self start = end end + = 51 ( _ x. latitude, _ x. longitude, _ x. mapxy. x, _ x. mapxy. y, _ x. mapxy. z, _ x. id. seg, ... | [
0.1626332700252533,
-0.8874197602272034,
0.7990912795066833,
-0.7179194688796997,
-0.3408215641975403,
0.30175116658210754,
0.11079680174589157,
-0.7145612239837646,
0.11554857343435287,
-0.384367972612381,
-0.3367977440357208,
0.2158406376838684,
-0.4487152397632599,
-0.6743969321250916,
... |
def read _ len ( self ) - > int : pass | [
0.7135304808616638,
0.07615864276885986,
0.42181554436683655,
-0.030456891283392906,
0.30753377079963684,
0.69659823179245,
0.3020223081111908,
0.539582371711731,
-0.37408241629600525,
-0.7656240463256836,
0.025043079629540443,
0.08814102411270142,
0.3802531957626343,
-0.7064241766929626,
... |
def type ( self ) - > str : return pulumi. get ( self, " type " ) | [
0.8003926277160645,
0.8377370238304138,
0.29941272735595703,
0.568932056427002,
1.4956936836242676,
1.2456002235412598,
-0.08049681037664413,
-0.5250646471977234,
0.6882314085960388,
0.22470416128635406,
0.617591142654419,
0.864101767539978,
-0.22339650988578796,
-1.0697098970413208,
-0.... |
def test _ update _ index ( self ) : index = self. helper _ index _ construct ( name ='id ', field _ type ='int ', index _ type ='hash ', is _ pk = true ) status, body = self. api _ create _ index ( self. current _ db, self. test _ ns, index ) self. assertequal ( true, status = = self. api _ status ['success'], body ) ... | [
-0.48761242628097534,
-0.06665175408124924,
0.6054226756095886,
0.11622096598148346,
0.5974867939949036,
0.4094431400299072,
-0.020057013258337975,
-0.27256739139556885,
0.9481214284896851,
-0.3536318242549896,
-0.9750925302505493,
0.6343085169792175,
-0.046963248401880264,
0.1829437464475... |
def stochasticdescentstep ( self, x, y ) : w _ new = np. copy ( w ) for i in range ( d ) : grad = ( y - np. dot ( x, self. w ) ) * x [ i ] w _ new [ i ] + = eta * grad return newweights | [
-0.4198082685470581,
0.22100220620632172,
0.679572582244873,
0.05698313191533089,
-0.25964972376823425,
0.2546716332435608,
-0.6384163498878479,
-1.2481733560562134,
-0.48349612951278687,
0.9280883073806763,
-0.05104239657521248,
0.5979032516479492,
0.5745522975921631,
0.7640924453735352,
... |
def addresses _ to _ distance _ matrix ( api _ key, addresses ) : # distance matrix api only accepts 100 elements per request, so get rows in multiple requests. max _ elements = 100 num _ addresses = len ( addresses ) # 16 in this example. # maximum number of rows that can be computed per request ( 6 in this example ).... | [
-1.1520590782165527,
0.23789912462234497,
0.5683180689811707,
-0.3156854212284088,
0.20015615224838257,
-0.9828037619590759,
0.055955205112695694,
0.12506943941116333,
1.0068763494491577,
0.4398709833621979,
-0.6437294483184814,
0.08611384779214859,
0.28946301341056824,
0.00954252760857343... |
def test _ list _ decimal _ pattern _ 2 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 3. xsd ", instance = " nistdata / list / decimal / sc... | [
-0.1198224276304245,
0.028615038841962814,
0.6873199939727783,
0.5569911599159241,
0.33089226484298706,
0.13164395093917847,
-0.6047717332839966,
0.3061305284500122,
1.1619553565979004,
0.3194677531719208,
-0.8102480173110962,
-0.5494557619094849,
-0.09107745438814163,
0.05781716853380203,... |
def _ read _ tuple ( self, items, subtypes ) : nitems = self. _ read _ int ( ) ntypes = len ( subtypes ) if nitems < = ntypes : for i in xrange ( nitems ) : items. append ( self. read _ value ( subtypes [ i ] ) ) else : for i in xrange ( ntypes ) : items. append ( self. read _ value ( subtypes [ i ] ) ) for i in xrange... | [
-1.6483733654022217,
0.4840796887874603,
0.9090750813484192,
-0.030986705794930458,
-0.026214975863695145,
0.12114587426185608,
-0.23181591928005219,
-0.47999462485313416,
-1.0019587278366089,
0.6269681453704834,
0.13401120901107788,
-0.7073425650596619,
-0.36371493339538574,
-1.1295593976... |
def set _ backlight _ blue ( self ) : self. set _ backlight _ rgb ( 0, 0, 0xff ) | [
0.09426950663328171,
-0.3011351525783539,
0.6082161068916321,
0.5435665845870972,
1.0575183629989624,
0.21597374975681305,
-0.06328853219747543,
-0.11451126635074615,
-0.45043066143989563,
-0.10656547546386719,
-0.22415782511234283,
1.900939702987671,
-0.9495507478713989,
0.321093261241912... |
def run ( self ) : if self. dupersids : events = list ( self. pm _ lookups [ self. year ] [ " model " ]. objects. filter ( dupersid _ _ in = self. dupersids ). values ( * self. pm _ lookups [ self. year ] [ " fields " ] ) ) else : events = list ( self. pm _ lookups [ self. year ] [ " model " ]. objects. all ( ). values... | [
-0.4768161475658417,
-0.6214648485183716,
0.4840020537376404,
-1.3921430110931396,
0.24467560648918152,
-0.4101671278476715,
0.0705791637301445,
0.14184047281742096,
0.8511171340942383,
0.3076518177986145,
-0.516563892364502,
-0.17745257914066315,
-0.45054832100868225,
-0.2483062595129013,... |
def initialize _ sample ( opts ) : root _ dir = opts. root _ dir if not ensure _ dir _ exists ( root _ dir ) : return false if os. listdir ( root _ dir ) : err ('unable to initialize sample project is non - empty directory') return false sample _ dir = os. path. join ( root _ dir,'package ','sample') success = true if ... | [
0.5460798740386963,
0.3558124601840973,
0.7644408941268921,
0.07606247812509537,
0.4481504559516907,
0.477759450674057,
0.5505838394165039,
0.19005228579044342,
0.2757096290588379,
0.3827013671398163,
-0.43949776887893677,
0.13528618216514587,
-0.5049024820327759,
0.5666987895965576,
-0.... |
def be _ good ( reddit ) : for reply in praw. models. util. stream _ generator ( reddit. inbox. comment _ replies ) : try : og = reply. parent ( ) author = reply. author bad _ vote ='bad bot'bad _ comment = reply. body if bad _ vote in bad _ comment. lower ( ) : print ( " found bad vote " ) og. delete ( ) print ( f'com... | [
0.8307978510856628,
-0.550452470779419,
0.7354491353034973,
-0.07777319103479385,
1.1682870388031006,
0.23329508304595947,
-0.4941021502017975,
-0.2485753893852234,
0.33834004402160645,
0.3691474497318268,
0.27617350220680237,
1.0556890964508057,
-0.790746808052063,
0.7411892414093018,
-... |
def isempty ( self ) : return len ( self ) = = 0 | [
-1.2240921258926392,
-0.806848406791687,
0.30091357231140137,
-0.028505492955446243,
1.6473698616027832,
0.5741703510284424,
-0.46682009100914,
0.3088662028312683,
0.41160011291503906,
-0.4493876099586487,
-0.6522249579429626,
0.35603067278862,
-0.7475663423538208,
0.2317488044500351,
-1... |
def get _ hazards _ by _ type ( self, hazard _ type : hazardtype ) - > list [ hazard ] : with self. database. cursor ( ) as cursor : sql = " select * from ` hazards ` where ` type ` ='{ }'". format ( hazard _ type. value ) cursor. execute ( sql ) # execute to the sql statement result = cursor. fetchall ( ) # fetch all ... | [
-0.004441095050424337,
-0.2575267553329468,
0.5761868357658386,
0.5661797523498535,
1.1754143238067627,
0.10254847258329391,
-0.645798921585083,
-0.7211371660232544,
-0.2265123724937439,
0.3628387153148651,
-0.1326701045036316,
-0.3784487545490265,
0.0861906185746193,
0.5588611960411072,
... |
async def story ( self ) : curstory = " " storyfile = open ( " data / story / story. txt ", " r " ) curstory = storyfile. read ( ) storyfile. close ( ) await self. bot. say ( curstory ) | [
0.529084324836731,
-0.3915663957595825,
0.2206602543592453,
0.558121383190155,
0.5124341249465942,
0.2473147213459015,
0.1911708414554596,
0.4312567412853241,
-1.4286328554153442,
0.1520044058561325,
0.0844603031873703,
0.43607667088508606,
-0.3078725337982178,
-0.14703115820884705,
-0.2... |
def delete _ pair ( namespace, workspace, pair _ id ) : body = [ { " entitytype " : " pair ", " entityname " : pair _ id } ] res = firecloud _ api. delete _ entities ( namespace, workspace, body ) return res | [
-0.9812171459197998,
0.4102121591567993,
0.2350701093673706,
0.3091968297958374,
-0.04872160032391548,
-0.12085451185703278,
-0.35439494252204895,
-0.032187506556510925,
0.7095934152603149,
-0.10339940339326859,
0.04545207321643829,
0.6598731279373169,
-1.0841832160949707,
1.48656070232391... |
def test _ atomic _ language _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 2. xsd ", instance = " nistdata / atomic ... | [
0.08478087186813354,
-0.7495425939559937,
0.5255603790283203,
0.7802553772926331,
-0.5298646688461304,
0.18133556842803955,
-0.2199040651321411,
0.07895857840776443,
-0.3794150948524475,
0.6420331001281738,
-0.2945094406604767,
0.2144276648759842,
0.39267754554748535,
0.11103234440088272,
... |
def accelerometer _ pointdata ( ) : xloborg. printfunction = xloborg. noprint xloborg. init ( ) x, y, z = xloborg. readaccelerometer ( ) mx, my, mz = xloborg. readcompassraw ( ) st = time. strftime ( " % y - % m - % dt % h : % m : % s " ) data = [ { " sensorid " : 5, " timestamp " : st, " data " : [ { " acceleration " ... | [
0.10727261751890182,
-0.7189434766769409,
0.6420664191246033,
-0.04231113940477371,
-0.6041355133056641,
0.7210966944694519,
-0.7850159406661987,
-0.19126208126544952,
-0.38427743315696716,
0.4795326590538025,
-0.8289720416069031,
-0.029993979260325432,
0.22041887044906616,
-0.418392449617... |
def test _ call _ with _ properties _ file ( self ) : id _ to _ taxonomy _ file = namedtemporaryfile ( prefix ='rdptaxonassignertest _ ', suffix = '. txt') id _ to _ taxonomy _ file. write ( rdp _ id _ to _ taxonomy2 ) id _ to _ taxonomy _ file. seek ( 0 ) app1 = rdptaxonassigner ( {'id _ to _ taxonomy _ fp': id _ to _... | [
0.22088108956813812,
-0.8596481084823608,
0.7572566270828247,
-0.2020568549633026,
0.6013261079788208,
0.672351062297821,
-0.0073838140815496445,
-0.14138895273208618,
-0.7484415769577026,
0.15944790840148926,
-0.125510573387146,
0.12990714609622955,
-0.0038308470975607634,
-0.028956683352... |
def _ alienfire ( self ) : if self. _ steps = = self. _ steprandom : self. _ steps = 0 self. _ createalienbolt ( ) | [
-0.36704328656196594,
0.8284587860107422,
0.1780344694852829,
0.9701710343360901,
0.8470090627670288,
0.3931896388530731,
0.08009950816631317,
0.4362715780735016,
-0.4407934248447418,
-0.5477487444877625,
-0.535057008266449,
-0.5780153274536133,
-0.2835926413536072,
1.3257124423980713,
0... |
def test _ query _ serialize ( self ) : vg, vol = self. create _ volume _ objects ( ) svol = self. ep. search ( " volumes ", volume _ group = vg ) self. asserttrue ( svol, msg = " returned empty search result " ) svol = svol. hits [ 0 ] self. assertequal ( vol. id, svol. id, msg = " search yielded different volume " ) | [
-0.3204438090324402,
-0.03400743380188942,
0.2814505696296692,
-0.355137437582016,
1.0035184621810913,
-0.09657441824674606,
-0.5251370072364807,
-1.0918198823928833,
0.353943794965744,
-0.5843055844306946,
0.10505551844835281,
-0.6365967392921448,
-0.923395574092865,
-0.8657841682434082,
... |
def generateedfheaderaddkey2dcommands ( self ) : edverbose. debug ( " * * * edpluginexecsaxsaddmetadatav1 _ 0. generateedfheaderdelkeycommands " ) if edverbose. isverbosedebug ( ) : stroptions = " 0 1 1 1'% s'' % s'' % s'" % ( self. strkey, self. strvalue, self. strimage ) else : stroptions = " 0 0 1 1'% s'' % s'' % s'... | [
-1.5118982791900635,
-0.3413317799568176,
0.7330297231674194,
-0.03973676264286041,
0.3139248490333557,
-0.01652747578918934,
-0.34547439217567444,
-0.6430415511131287,
-0.29813438653945923,
0.7121055722236633,
0.08229047060012817,
0.73320472240448,
-0.21556808054447174,
0.9222935438156128... |
def test _ atomic _ qname _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 5. xsd ", instance = " nistdata / atomic ... | [
0.327462762594223,
-0.6881316304206848,
0.318410187959671,
-0.09111213684082031,
-0.7269761562347412,
0.09000208973884583,
0.021127337589859962,
-1.14561128616333,
0.3999443054199219,
0.37429139018058777,
-0.5904260277748108,
-0.04777609184384346,
-0.7248371839523315,
-0.1070147305727005,
... |
async def async _ setup _ platform ( hass, config, async _ add _ entities, discovery _ info = none ) : _ logger. warning ( " loading nuki by lock platform configuration is deprecated and will be removed in the future " ) | [
0.19140061736106873,
0.9267417788505554,
0.2760944068431854,
0.6453307271003723,
0.5868868231773376,
-0.7828564047813416,
0.20258884131908417,
-0.07787121832370758,
-0.1640193909406662,
0.34566622972488403,
-0.2816028296947479,
-1.3646849393844604,
0.03641412407159805,
0.5786888003349304,
... |
def spotify _ exception _ handler ( func ) : def wrapper ( self, * args, * * kwargs ) : try : result = func ( self, * args, * * kwargs ) self. _ attr _ available = true return result except requests. requestexception : self. _ attr _ available = false except spotifyexception as exc : self. _ attr _ available = false if... | [
-0.7238374948501587,
-0.9373433589935303,
0.6766564846038818,
0.07684367895126343,
-0.575016975402832,
0.1294512301683426,
0.7489767074584961,
0.20944395661354065,
-0.023290563374757767,
0.09288284182548523,
1.0877605676651,
-0.6063295602798462,
-0.42968279123306274,
-0.49295246601104736,
... |
def _ append _ to _ tx _ list ( file _ path _ list ) : from.. rfb _ utils import texture _ utils bl _ scene = bpy. context. scene txmgr = texture _ utils. get _ txmanager ( ). txmanager texture _ utils. parse _ for _ textures ( bl _ scene ) for fpath in file _ path _ list : # pass none as the nodeid and a hash will be ... | [
-0.14871172606945038,
0.23960599303245544,
0.5786145925521851,
0.35652944445610046,
0.5043409466743469,
-0.4074227213859558,
-0.03815025836229324,
0.7585502862930298,
0.42772409319877625,
0.6745991706848145,
-0.6973288059234619,
-1.3249430656433105,
-0.15184155106544495,
0.5644699931144714... |
def _ _ str _ _ ( self ) : return json. dumps ( self. _ _ dict _ _, indent = 4 ) | [
-0.5640169382095337,
-2.233808755874634,
0.8093122243881226,
-1.2817144393920898,
-0.7246333360671997,
0.49567627906799316,
-0.28233325481414795,
-0.8067559003829956,
0.07614627480506897,
-0.33544212579727173,
0.04335283115506172,
0.7561942338943481,
0.1569080948829651,
-0.3818495869636535... |
def disttocommuc ( self, dist ) : # self. logger. debug ( " translated xy move command from { } to { } ". format ( dist, float ( dist ) * 1000 ) ) encoder _ units = float ( dist ) * 39. 3701 * ( 1633 / 9. 89 ) self. logger. debug ( " translated xy move command from { } to { } ". format ( dist, encoder _ units ) ) # mar... | [
-0.6566938757896423,
-0.40243998169898987,
0.47609391808509827,
-0.8014167547225952,
0.08872713893651962,
-0.12983116507530212,
0.43802738189697266,
-0.022929303348064423,
0.4126879870891571,
0.059434693306684494,
-0.43953073024749756,
0.5989002585411072,
-0.41792258620262146,
0.0453388094... |
def _ join _ overlapping _ gaps ( unjoined _ gaps : tuple [ blockrange,... ] ) - > iterable [ blockrange ] : unyielded _ low = none unyielded _ high = none for low, high in unjoined _ gaps : if unyielded _ high is not none : if low < unyielded _ low : raise validationerror ( f " unsorted input! { unjoined _ gaps! r } "... | [
0.3321772515773773,
-0.8499740362167358,
0.6622030735015869,
0.15204693377017975,
-0.11088259518146515,
0.9912624955177307,
0.06893864274024963,
-0.17557287216186523,
-0.3642437160015106,
-0.9297720789909363,
0.1561751663684845,
-0.42211973667144775,
-0.3345310389995575,
0.9024657011032104... |
def put _ many ( self, items : iterable [ t ], context : pipelinecontext = none ) - > none : logger. info ( " creating transform generator for items \ " { items } \ " for sink \ " { sink } \ " ". format ( items = items, sink = self. _ sink ) ) transform _ generator = ( self. _ transform ( data = item, context = context... | [
-1.902984380722046,
0.5956230163574219,
0.6567316651344299,
-1.0075790882110596,
1.3227838277816772,
-0.7838367819786072,
-0.042855579406023026,
0.22364398837089539,
-0.3087868392467499,
-0.1612275093793869,
-1.3353086709976196,
-0.4306733310222626,
-0.14187705516815186,
0.2182575017213821... |
def defaultgp ( theta, y, order = none, white _ noise = - 12, fitamp = false ) : # tidy up the shapes and determine dimensionality theta = np. asarray ( theta ). squeeze ( ) y = np. asarray ( y ). squeeze ( ) if theta. ndim < = 1 : ndim = 1 else : ndim = theta. shape [ - 1 ] # guess initial metric, or scale length of t... | [
0.47225552797317505,
0.2575524151325226,
1.0549190044403076,
0.3065910041332245,
-0.007259732112288475,
-0.21738585829734802,
-0.8606590032577515,
0.031740278005599976,
-0.10657837241888046,
0.462943434715271,
0.7732136249542236,
0.4143725335597992,
-0.13690172135829926,
0.5872294902801514... |
def compare _ flat _ ntuples ( file1, file2, keys, tree _ name ='' ) : not _ found _ keys = [ ] skipped _ keys = [ ] identical _ keys = set ( ) diff _ keys = set ( ) for key in keys : # check that key exists in both files found _ key = file1. getlistofkeys ( ). contains ( key ) found _ key = found _ key and file2. getl... | [
-0.7166617512702942,
-0.10593225806951523,
0.8652164936065674,
0.09686185419559479,
0.5894405245780945,
0.416244238615036,
-0.21333162486553192,
0.180860698223114,
-1.1629804372787476,
0.9027729034423828,
-0.11378631740808487,
0.11951716244220734,
-0.7290423512458801,
1.200790286064148,
... |
def test _ atomic _ hex _ binary _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 4. xsd ", instance ... | [
0.28830069303512573,
0.2572666108608246,
0.3733106255531311,
0.8333408236503601,
-0.40811410546302795,
0.6356035470962524,
-0.5169183611869812,
0.20530591905117035,
-0.3942529261112213,
0.3116343021392822,
-1.0315051078796387,
-0.841449499130249,
-0.23148943483829498,
0.11225562542676926,
... |
def test _ nz ( arr _ nz ) : nz = arr _ nz assert isinstance ( nz, int ), " nz should be an integer " # use bit operation to check for a power of 2 assert nz! = 0 and ( nz & ( nz - 1 ) = = 0 ), " nz should be a power of 2 " | [
-0.6467898488044739,
-0.9486432075500488,
0.19980184733867645,
1.1326217651367188,
-0.01165517047047615,
-0.008912164717912674,
0.5649126172065735,
-0.30276885628700256,
1.1421773433685303,
-0.6665487289428711,
-0.0959906280040741,
0.47219884395599365,
-0.6475793123245239,
1.80991733074188... |
def count _ code ( string ) : # no need to check the length - range ( ) automatically check the range code _ cnt = 0 for i in range ( 0, len ( string ) - 3 ) : if string [ i : i + 2 ] = = " co " and string [ i + 3 ] = = " e " : code _ cnt + = 1 return code _ cnt | [
-0.00020754481374751776,
-0.2923019826412201,
0.5072999000549316,
0.03186255693435669,
0.3448503017425537,
0.1133994609117508,
0.8348414301872253,
1.0562794208526611,
-0.21677352488040924,
0.34143203496932983,
-0.6107761263847351,
0.2280454784631729,
-0.49908286333084106,
-0.23618634045124... |
def get _ a _ question ( id ) : question = questionsmodel ( ). get _ a _ specific _ question ( id ) if question : return make _ response ( jsonify ( { " status " : 200, " data " : question } ), 200 ) else : return make _ response ( jsonify ( { " status " : 404, " error " : " no question created yet " } ), 404 ) | [
-0.35995814204216003,
-0.7401552200317383,
0.4314027428627014,
0.5670375227928162,
0.7649624347686768,
-0.05359458923339844,
-0.6106882691383362,
-0.3512672483921051,
0.2586175799369812,
0.10668858140707016,
0.22944645583629608,
0.7576726078987122,
0.35469791293144226,
0.1975546032190323,
... |
def get _ accounts _ connector ( admin _ api _ key, env ) : if check _ invalid _ env ( env ) : return none api _ url = env + " / api / account. json / get _ accounts _ v4? access _ key = " + str ( admin _ api _ key ) r7 = requests. get ( api _ url ) if " accounts _ and _ users " in r7. json ( ) : accounts _ and _ users... | [
-0.5941561460494995,
-0.771116316318512,
0.7606267333030701,
-0.32321345806121826,
0.04234679788351059,
-0.19288943707942963,
-0.13040997087955475,
-0.26367971301078796,
0.4806976020336151,
-0.03893958777189255,
0.6305756568908691,
0.48859837651252747,
-0.6848575472831726,
0.46815651655197... |
def min _ avail _ temp ( self ) - > float : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " min _ avail _ temp " ) | [
-0.0008178578573279083,
-1.1177729368209839,
0.15484359860420227,
-0.4180840253829956,
-0.17796507477760315,
0.4024396240711212,
-0.31196847558021545,
0.2580544650554657,
0.10532326996326447,
0.5800001621246338,
-0.2646836042404175,
-0.7294003963470459,
-0.12260369956493378,
0.246747463941... |
def generate _ notes _ single ( model, int _ to _ note, network _ input, n _ vocab ) : # pick a random sequence from input as starting point for prediction start = np. random. randint ( 0, len ( network _ input ) - 1 ) pattern = network _ input [ start ] prediction _ output = [ ] # generate 500 notes for note _ index i... | [
-1.0421212911605835,
0.04552290588617325,
0.6364880800247192,
0.38814476132392883,
0.38916271924972534,
0.32743096351623535,
0.8990939259529114,
-0.07562606036663055,
0.1809026300907135,
1.0459705591201782,
-0.8031401634216309,
-0.15779182314872742,
-0.049325842410326004,
0.336009174585342... |
def test _ atomic _ hex _ binary _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 1. xsd ", instance = " nistdata / atom... | [
0.19800348579883575,
0.0656806081533432,
0.477106511592865,
0.5148975849151611,
0.1923069953918457,
0.7046015858650208,
-0.21576815843582153,
0.47765815258026123,
0.4276442229747772,
0.42828208208084106,
-0.5043609142303467,
-0.7832996845245361,
-0.2131398767232895,
0.44573113322257996,
... |
def create ( ) : return processor ( eshelper ( index _ config = default _ index _ config ), s3helper ( ) ) | [
0.5564565062522888,
0.32652050256729126,
0.1048271507024765,
0.15508097410202026,
0.7255626916885376,
-0.3153148889541626,
-0.1970253437757492,
0.5585001707077026,
0.184193953871727,
-0.12427651137113571,
-0.6143051385879517,
0.14216266572475433,
0.5714356899261475,
-1.056083083152771,
0... |
def test _ atomic _ qname _ min _ length _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 1. xsd ", instance = " nistdata / atomic / qn... | [
0.543983519077301,
-0.7079773545265198,
0.3440936207771301,
-0.04819498583674431,
-0.4100467264652252,
0.19573980569839478,
-0.17613010108470917,
-0.8787042498588562,
0.7485759854316711,
0.1416170448064804,
-0.22308343648910522,
-0.2321145087480545,
-0.7123384475708008,
-0.1244600936770439... |
def calculate _ multipoly _ radius _ km ( multipolygon ) : if not isinstance ( multipolygon, multipolygon ) : # pragma : no cover raise typeerror ('object is not a multipolygon') target = multipolygon. centroid max _ radius _ km = 0 for polygon in multipolygon : points = polygon. exterior _ ring distance = calculate _ ... | [
0.024661462754011154,
-0.709213137626648,
0.6774343848228455,
0.6195365190505981,
-0.6226673126220703,
0.06171342357993126,
-0.1647426187992096,
0.19502128660678864,
0.5574356317520142,
0.9331461191177368,
-0.7048911452293396,
0.0212179496884346,
-0.6039370894432068,
0.5597767233848572,
... |
def solve ( grid ) : values = grid _ values ( grid ) values = naked _ twins ( values ) values = search ( values ) return values | [
-0.7776402831077576,
1.1585330963134766,
0.35186606645584106,
0.33960235118865967,
0.08930408209562302,
-1.117690920829773,
-0.3237082064151764,
-0.6910486817359924,
-0.40412914752960205,
0.14909155666828156,
-1.0571601390838623,
0.11820301413536072,
0.14853540062904358,
0.6729142665863037... |
def get _ new _ filenames ( self ) : files = [ ] for file in self. filename _ objects : files. append ( file. get _ new ( ) ) files. sort ( ) return files | [
0.060694366693496704,
-1.2949239015579224,
0.6350256204605103,
0.8238095641136169,
0.6206153631210327,
-0.031920235604047775,
-0.4331290125846863,
-0.8845708966255188,
-0.3948175311088562,
-0.11309996992349625,
-0.20213715732097626,
0.5884414315223694,
0.46716830134391785,
1.25940120220184... |
def serialize ( self, buff ) : try : _ x = self buff. write ( _ struct _ 2d3f4h7bif. pack ( _ x. latitude, _ x. longitude, _ x. mapxy. x, _ x. mapxy. y, _ x. mapxy. z, _ x. id. seg, _ x. id. lane, _ x. id. pt, _ x. index, _ x. is _ entry, _ x. is _ exit, _ x. is _ goal, _ x. is _ lane _ change, _ x. is _ spot, _ x. is ... | [
-0.8603928089141846,
-0.45067569613456726,
0.7249113917350769,
-0.48133742809295654,
0.4582515358924866,
0.3435744047164917,
0.03418092802166939,
-0.7393931746482849,
0.525973916053772,
-0.581820011138916,
-1.0005635023117065,
0.29124921560287476,
-0.25996139645576477,
-0.39998069405555725... |
def _ _ getitem _ _ ( self, job _ name ) : for row in self. jenkins. _ data. get ('jobs ', [ ] ) : if row ['name'] = = job _ name : return self. jenkins. job ( row ['url'], row ['name'], self. jenkins ) raise exception. unknownjob ( job _ name ) | [
-0.2335444986820221,
-0.27529311180114746,
0.3669421970844269,
0.21809227764606476,
-0.21222904324531555,
-0.41837266087532043,
-0.9233216643333435,
0.1055895984172821,
-0.17560453712940216,
-0.4269716143608093,
0.08342371135950089,
0.002288478659465909,
-0.0005194725235924125,
-0.97855681... |
def sayword ( self, obj ) : text = obj. querytext ( ) offset = text. caretoffset lastkey, mods = self. utilities. lastkeyandmodifiers ( ) lastword = self. _ lastword [ word, startoffset, endoffset ] = \ text. gettextatoffset ( offset, pyatspi. text _ boundary _ word _ start ) if not word : self. saycharacter ( obj ) re... | [
-0.06796905398368835,
-0.7433376908302307,
0.9588261246681213,
0.1388477236032486,
-0.04023878276348114,
0.15001773834228516,
-0.11467399448156357,
-0.47654417157173157,
0.5909532308578491,
0.054283928126096725,
-0.026183469220995903,
0.36788761615753174,
-0.576806902885437,
0.538620412349... |
def test _ null _ hyp _ fail _ error ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) tree = " ( ( mouse, rat ), human, opossum ) " m1... | [
0.09098634123802185,
-0.5072954893112183,
0.4831637740135193,
0.14934808015823364,
0.738294780254364,
0.5109740495681763,
-0.5525316596031189,
0.18892310559749603,
-0.4011276364326477,
0.0823274627327919,
-0.2745214104652405,
0.7413365840911865,
0.16747942566871643,
-0.10387624055147171,
... |
def add ( self, item ) : if self. _ size = = self. default _ capcity : self. default _ capcity + = 1 self [ len ( self ) ] = item self. _ size + = 1 | [
-0.8170557022094727,
0.3858955204486847,
0.6127951741218567,
0.5773932337760925,
0.8332951068878174,
0.9822813272476196,
0.03431565314531326,
-0.010361584834754467,
0.5274474024772644,
-0.6466413736343384,
-1.3562109470367432,
-0.06868861615657806,
-0.5579029321670532,
0.254757821559906,
... |
def test _ atomic _ any _ uri _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 5. xsd ", instance = " nistdata... | [
-0.7261013388633728,
-0.938529372215271,
0.446271687746048,
0.7040558457374573,
-0.34889835119247437,
-0.42077597975730896,
0.44138792157173157,
-0.675054669380188,
-0.18582190573215485,
0.1983964592218399,
-0.13594205677509308,
-0.4186493158340454,
-0.7292144894599915,
0.3078479766845703,... |
def flake8 ( session, extras, dilibraries = dilibraries ) : session. log ( f'run flake8 for { lib _ name }') standard _ di _ flake8 ( session, extras = extras, dilibraries = dilibraries ) | [
-0.8802837133407593,
0.047243036329746246,
0.204080730676651,
0.7659630179405212,
-0.7176357507705688,
-0.2909107506275177,
0.32578974962234497,
1.1021825075149536,
1.3158516883850098,
-0.4205087721347809,
-0.10566297173500061,
0.19018959999084473,
0.24882149696350098,
0.06072989106178284,... |
def serialize ( test ) : if isinstance ( test, error _ holder _ classes ) : return ( test. id ( ), str ( test ), test. shortdescription ( ), ) return ( test _ to _ dotted ( test ), str ( test ), test. shortdescription ( ) ) | [
-0.09306905418634415,
-0.8717439770698547,
0.3466731905937195,
-0.6714352369308472,
0.15456028282642365,
0.18354125320911407,
-0.1057664304971695,
-1.3386168479919434,
0.9306647181510925,
-0.6692435145378113,
-0.7624209523200989,
0.740092396736145,
-0.3754742443561554,
-0.35347607731819153... |
def get _ remote _ folder ( environ = none ) : if not environ : environ = os. environ root = data _ root ( environ ) remote _ folder = os. path. join ( root,'remote') ensure _ directory ( remote _ folder ) return remote _ folder | [
0.4111579954624176,
-0.11413662135601044,
0.7079948782920837,
-0.2056296318769455,
-0.18305040895938873,
1.3325031995773315,
-0.04570237174630165,
0.09254398941993713,
-0.8686773180961609,
-0.8984104990959167,
-0.35242030024528503,
1.2459533214569092,
-0.7706711888313293,
0.132052123546600... |
def filename ( cls ) : raise contextfilenameerror ( " could not figure out scene name " ) | [
0.3867579698562622,
-1.0784225463867188,
0.6315081119537354,
0.3350939154624939,
-0.007860159501433372,
0.29700928926467896,
0.6427294015884399,
0.48390015959739685,
-0.025576090440154076,
0.048244409263134,
0.5596117377281189,
0.3736462891101837,
0.30920636653900146,
0.0921514481306076,
... |
def validate ( reference _ onsets, estimated _ onsets ) : # if reference or estimated onsets are empty, warn because metric will be 0 if reference _ onsets. size = = 0 : warnings. warn ( " reference onsets are empty. " ) if estimated _ onsets. size = = 0 : warnings. warn ( " estimated onsets are empty. " ) for onsets i... | [
0.44528642296791077,
-0.17478574812412262,
0.6101989150047302,
0.5457798838615417,
0.6412510871887207,
0.6974610686302185,
0.24731378257274628,
-0.4996260106563568,
-0.24181772768497467,
0.6989538669586182,
0.6404744982719421,
0.6186193227767944,
1.0322418212890625,
1.0602831840515137,
0... |
def test _ atomic _ base64 _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 5. xsd ... | [
0.3807827830314636,
-0.3672846257686615,
0.3290987014770508,
0.7776835560798645,
-0.1825704276561737,
-0.2654918432235718,
0.13572973012924194,
-0.9581847786903381,
-0.07707272469997406,
0.2803618907928467,
-0.7287949323654175,
-0.00803824421018362,
-1.2988855838775635,
0.17629313468933105... |
def test _ procreation _ callable ( self ) : self. cell. herb _ procreation ( ) self. cell. carn _ procreation ( ) | [
-0.017609911039471626,
0.6939756870269775,
0.3136616349220276,
1.76284658908844,
0.8056466579437256,
-0.31950846314430237,
0.06643014401197433,
-0.8756686449050903,
-0.6697220206260681,
-0.7089444398880005,
0.2514643669128418,
0.16852207481861115,
0.870717465877533,
0.30200809240341187,
... |
def operatorderivation ( cls, record ) : # make a managed dependent yield from cls. manageddependentderivation ( ) # my operators know how to compute their values yield cls. evaluator # and whatever else my superclass says yield from super ( ). operatorderivation ( record ) # all done return | [
0.460636705160141,
0.3940805494785309,
0.6522897481918335,
0.314771831035614,
-0.3513447046279907,
0.16542337834835052,
0.39874401688575745,
0.2209833860397339,
0.15333065390586853,
-0.7740640044212341,
-0.2950141727924347,
0.08184438943862915,
0.15499712526798248,
0.8153595924377441,
-0... |
def _ aliengone ( self ) : a = true for i in self. _ aliens : if i is not none : for j in i : if j is not none : a = false self. _ allkilled = a | [
-0.19386790692806244,
-0.23159606754779816,
0.471377968788147,
-0.5913729071617126,
1.0743426084518433,
-0.4589066505432129,
-0.3834557831287384,
0.6618932485580444,
-0.5609946846961975,
1.3120311498641968,
-0.45205822587013245,
-0.25064727663993835,
-0.5129685401916504,
0.964120626449585,... |
def initalize _ counter ( self, spark _ context, name ) : self. counters [ name ] = spark _ context. accumulator ( 0 ) | [
0.3998463749885559,
-0.1181909367442131,
0.44578027725219727,
-0.6600623726844788,
0.11830774694681168,
-0.18481798470020294,
-0.24418379366397858,
-0.29130545258522034,
0.28687384724617004,
-0.7820797562599182,
-0.5185486674308777,
0.27327942848205566,
0.7777117490768433,
0.79491412639617... |
def array2patches _ new ( arr, patch _ size = ( 64, 64 ), step _ size = 64 ) : logging. info ('array2patches, arr. shape : { }, patch _ size : { } '. format ( arr. shape, patch _ size ) ) # обрезаем картинку, чтобы подошли размеры под окошко slice _ 0 = ( arr. shape [ 0 ] - patch _ size [ 0 ] ) / / step _ size slice _ ... | [
-0.5880401730537415,
-1.0481832027435303,
0.992344319820404,
0.14630310237407684,
-1.2433234453201294,
0.23369473218917847,
0.8292524814605713,
-0.26102694869041443,
0.40580877661705017,
0.456032395362854,
0.0013694165972992778,
0.2956286072731018,
0.621707022190094,
0.6916161179542542,
... |
def modifystock ( stock, action ) : " " " stock is a string that is already verifiied " " " db = sqlite3. connect ( db _ file ) c = db. cursor ( ) stock _ list = retrievestock ( ). split ( ',') cmd = " " if stock in stock _ list : if action < 0 : stock _ list. pop ( stock _ list. index ( stock ) ) stocks = join ( stock... | [
-1.198629379272461,
-0.7299003601074219,
0.8604931235313416,
0.3232686221599579,
1.0726593732833862,
0.09787637740373611,
-0.16984345018863678,
0.5093876123428345,
1.1999337673187256,
0.4985749125480652,
0.007172752171754837,
-0.031125951558351517,
-0.8843455910682678,
0.6433046460151672,
... |
def test _ atomic _ any _ uri _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 4 _ 1 ( 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.048942871391773224,
-0.05918502435088158,
0.411874920129776,
0.8913268446922302,
-0.1511552333831787,
-0.014234824106097221,
-0.08499103039503098,
0.08302639424800873,
0.0037538702599704266,
0.11151597648859024,
0.06667125225067139,
-0.5609186887741089,
-0.3893797993659973,
-0.160908371... |
def dist ( self, t _ addr, s _ addr = none ) : gmaps = googlemaps. client ( key = self. googlemaps _ key ) if s _ addr is none : lat01 = self. lat lng01 = self. lng else : lat01 = s _ addr. lat lng01 = s _ addr. lng directions = gmaps. directions ( origin = ( lat01, lng01 ), destination = ( t _ addr. lat, t _ addr. lng... | [
-0.15187972784042358,
-0.734255850315094,
0.8538097739219666,
-0.5495296120643616,
-0.5928165912628174,
0.7101725339889526,
-0.6032336950302124,
1.1048046350479126,
0.1850515753030777,
0.8950417041778564,
-0.7368722558021545,
0.6227492690086365,
0.04048573598265648,
0.5243784189224243,
0... |
def _ getroomsfromjsonfile ( self, json _ file _ name, start _ offset, num _ rooms ) : logging. info ('reading % d rooms, starting at offset % d ', num _ rooms, start _ offset ) f = open ( json _ file _ name,'r') json _ room _ list = simplejson. loads ( f. read ( ) ) json _ room _ list = json _ room _ list [ start _ of... | [
-1.145064115524292,
-1.374871850013733,
0.6422752141952515,
-0.5143256187438965,
-1.356095314025879,
0.9797425270080566,
-0.23081271350383759,
0.6686674952507019,
-0.5012652277946472,
0.7748590707778931,
-0.8501661419868469,
0.33286818861961365,
0.012349870055913925,
0.20961454510688782,
... |
def get _ version _ for _ elem _ validation _ or _ none ( self ) - > optional [ version ] : guide = self. get _ guide _ object _ or _ none ( ) if guide is none : return if self. _ version _ id is not none : version = self. get _ version _ object _ by _ id _ or _ none ( ) if ( version is not none and self. is _ glossary... | [
-0.01705637387931347,
-0.4121645390987396,
0.5548160076141357,
1.4439067840576172,
0.3162649869918823,
0.6840449571609497,
0.4032723009586334,
-0.1908457726240158,
0.4129551649093628,
0.7978717684745789,
0.11036882549524307,
0.1072283610701561,
-0.4689177870750427,
0.5525898933410645,
1.... |
def found _ solution ( values ) : for box in boxes : if len ( values [ box ] )! = 1 : return false return true | [
-1.064300298690796,
0.5815767645835876,
0.49478304386138916,
0.9510834813117981,
0.3758900761604309,
0.16655662655830383,
0.00036700841155834496,
-0.5139315128326416,
-0.13851672410964966,
-0.3886893689632416,
-0.7838073968887329,
-1.4251949787139893,
-0.10969658195972443,
1.46854734420776... |
def refresh ( self, src, dilation _ width = none, opening _ width = none, normalize = none, handle _ borders = none ) : # use the parameters as passed to initial constructor unless explicitly updated here if not dilation _ width : dilation _ width = self. dw if not opening _ width : opening _ width = self. ow if not no... | [
-0.1520959436893463,
0.24482719600200653,
0.43397337198257446,
0.2649741768836975,
-0.8195598125457764,
0.1337435096502304,
0.2482166290283203,
-0.25899675488471985,
1.360701560974121,
-0.7047358751296997,
0.12746310234069824,
0.645645797252655,
-0.4231642484664917,
0.9751613140106201,
0... |
def msort ( array ) : return divide ( array ) | [
-0.33641886711120605,
-0.34635376930236816,
0.5575206875801086,
0.5858423113822937,
-0.9747521281242371,
0.5518870949745178,
-0.13343968987464905,
-1.0156887769699097,
0.4804959297180176,
0.2723718583583832,
0.6721203327178955,
-0.8347817063331604,
-0.16897358000278473,
1.0443376302719116,... |
def get _ content ( self, title ) : raise notimplementederror | [
-0.44374698400497437,
-0.34977349638938904,
0.5952919721603394,
0.7999302744865417,
-0.9185264110565186,
0.12761157751083374,
-0.8356431722640991,
-1.2922114133834839,
-0.554368257522583,
0.24879175424575806,
0.16990984976291656,
0.10927588492631912,
0.2009487897157669,
-0.8005862832069397... |
def refresh _ display ( self ) : # selected storage info storage _ name = self. ui. storage _ select _ combo. currenttext ( ) storage _ data = self. local _ storage # clear everything out to its default state self. _ set _ default _ edit _ state ( ) if not storage _ data : # no storage data to process. if storage _ nam... | [
0.05569852143526077,
-0.749996542930603,
0.5508352518081665,
0.4127542972564697,
-0.29013335704803467,
0.04760609194636345,
0.8243986368179321,
-0.12667721509933472,
-0.15630127489566803,
0.22254379093647003,
0.19482405483722687,
-0.07983601093292236,
0.22067102789878845,
0.797491073608398... |
def close _ img ( self, img ) : kernel = np. ones ( self. kernel _ close ) img = cv2. morphologyex ( img, cv2. morph _ close, kernel = kernel, iterations = self. iterations _ close ) return np. array ( img, dtype ='uint8') | [
-1.0895146131515503,
-0.08452276885509491,
0.7096939086914062,
0.3995535373687744,
-1.1479370594024658,
0.2930207848548889,
0.48813802003860474,
-0.5454596877098083,
0.5681980848312378,
0.3381471037864685,
1.1668059825897217,
0.27534377574920654,
-0.4544779360294342,
0.702506422996521,
0... |
def test _ example _ input _ one _ deselect _ multiple _ select _ test ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) selected _ values = [ " a ", " b " ] input _ page. create _ new _ input. select ( ... | [
-0.15473945438861847,
-0.24715004861354828,
0.5661184787750244,
0.5009618401527405,
0.9154404997825623,
0.10699203610420227,
-0.21401908993721008,
0.10746981203556061,
0.6183307766914368,
0.07977298647165298,
-0.34762996435165405,
-0.3954960107803345,
-0.27392128109931946,
0.27574804425239... |
def fibo ( n ) : if n < 1 : raise typeerror if n = = 1 : result = [ 1 ] if n > 1 : result = [ 1, 1 ] for i in range ( n - 2 ) : result. append ( result [ - 1 ] + result [ - 2 ] ) return result | [
-1.367883563041687,
0.8443568348884583,
0.38121169805526733,
1.2517484426498413,
0.7612568736076355,
-0.37628403306007385,
0.3771216571331024,
-0.040404148399829865,
0.12436012923717499,
-0.045537661761045456,
-1.504643201828003,
-0.23834240436553955,
-0.7443902492523193,
1.079310417175293... |
def test _ list _ integer _ enumeration _ 2 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 3. xsd ", instance = " nistdata / list / ... | [
-0.6527112126350403,
-0.6072000861167908,
0.5114624500274658,
0.34691017866134644,
-0.046482838690280914,
0.10454818606376648,
-0.4885881841182709,
0.27255165576934814,
1.3076592683792114,
0.8450822234153748,
-0.6924281716346741,
-0.4380948543548584,
-0.5427136421203613,
0.3679834008216858... |
def playerstandings ( ) : # connect to the database conn = connect ( ) curs = conn. cursor ( ) # get the player id, name, wins, and number of matches from the matches table, and order by the number of wins query = " select players. player _ id, name, wins, num _ matches from matches join players on matches. player _ id... | [
0.01768396981060505,
-0.9080697894096375,
0.7312478423118591,
0.21146099269390106,
-0.14772950112819672,
-0.44092029333114624,
-0.45856574177742004,
-0.04953756928443909,
-0.5123971700668335,
0.41712063550949097,
-0.6267069578170776,
-0.9746848940849304,
-0.9444468021392822,
-0.55859231948... |
def truncate ( self ) : self. _ _ data _ area. clear ( ) return self | [
0.5817986726760864,
0.24112826585769653,
0.45444807410240173,
-0.822388231754303,
-0.07478594779968262,
0.6388318538665771,
0.821807861328125,
-0.19693639874458313,
0.12699724733829498,
-0.763797402381897,
-0.028519732877612114,
1.2806607484817505,
-0.18741130828857422,
-0.1734821796417236... |
def test _ example _ input _ one _ select _ multiple _ values _ multiple _ select _ test ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) selected _ values = [ " a ", " b " ] input _ page. create _ new ... | [
-0.2772779166698456,
-0.07000989466905594,
0.5148279666900635,
0.8278560042381287,
1.2436801195144653,
0.27118247747421265,
-0.30430397391319275,
-0.21831892430782318,
0.734101414680481,
-0.22376230359077454,
-0.29376354813575745,
-0.46004143357276917,
0.011435878463089466,
0.3219955861568... |
def paragraphs _ gen ( self ) : counter = 0 for tag, paragraph in itertools. izip ( self. tags, self. paragraphs ) : yield ( tag, paragraph ) counter + = 1 | [
-0.5754548907279968,
-0.5229671597480774,
0.5287113785743713,
-0.7291191816329956,
-0.5960045456886292,
0.4412139356136322,
-0.5950734615325928,
0.1881643831729889,
-0.3009208142757416,
0.5180323123931885,
-0.3120981454849243,
-0.6171337366104126,
-0.6070122718811035,
0.2132357656955719,
... |
def get _ data _ type ( self, dtype ) : datatypes = ['varchar ','int ','text ','float'] for datatype in datatypes : if dtype [ 0 : len ( datatype ) ] = = datatype : return datatype | [
0.25407955050468445,
0.8063607811927795,
0.2828857898712158,
-0.19437527656555176,
-0.11402799189090729,
-0.3360965847969055,
-0.5544279217720032,
-1.1927462816238403,
0.32026252150535583,
0.07510317116975784,
-0.5249509215354919,
0.8021075129508972,
-0.8423649072647095,
0.597075343132019,... |
def _ merge _ nics ( management _ network _ id, * nics _ sources ) : merged = [ ] for nics in nics _ sources : merged. extend ( nics ) if management _ network _ id is not none and \ not any ( nic ['net - id'] = = management _ network _ id for nic in merged ) : merged. insert ( 0, {'net - id': management _ network _ id ... | [
-0.3618864119052887,
0.6044875383377075,
0.45250403881073,
-0.10006552934646606,
0.8362497687339783,
0.3982279598712921,
-1.1077638864517212,
-0.7072705030441284,
0.8252905011177063,
-0.2660948932170868,
-0.5102432370185852,
-0.8940475583076477,
-0.3083324730396271,
0.2752413749694824,
-... |
def native _ location _ supported ( self ) - > int : return self. _ vehicle _ data. get ( " drive _ state ", { } ). get ( " native _ location _ supported " ) | [
-0.793487548828125,
-0.2386171817779541,
0.4169462323188782,
0.1540171056985855,
-0.5542336106300354,
0.4687892198562622,
-0.46758833527565,
0.6722725033760071,
-0.322346955537796,
-0.3511243164539337,
-0.09760215878486633,
-0.28631412982940674,
-0.09083933383226395,
-0.28857603669166565,
... |
def process _ link ( self, env, refnode, has _ explicit _ title, title, target ) : target = target. lower ( ). replace ( " _ ", " " ) refnode ['refexplicit'] = true return title, target | [
-0.7356477379798889,
-0.8535270690917969,
0.3625670373439789,
-1.4233957529067993,
0.6063283085823059,
-0.12104987353086472,
-1.1656051874160767,
0.48361796140670776,
-0.2616046071052551,
0.1926703006029129,
0.5425098538398743,
1.1544907093048096,
0.234466552734375,
0.25148332118988037,
... |
def plane2point ( leftx, lefty, rightx, righty, baseline = 2. 7, focal _ length = 100 ) : if ( leftx = = rightx ) : return ( 0, 0, 0 ) z = ( baseline * focal _ length ) / ( leftx - rightx ) x = leftx * z / focal _ length y = lefty * z / focal _ length return ( x, y, z ) | [
0.6795544624328613,
-0.8022977113723755,
0.3806513249874115,
-0.12683957815170288,
0.14483053982257843,
0.23532241582870483,
-1.0007492303848267,
-0.15763330459594727,
-0.35220903158187866,
1.0452004671096802,
-0.6911091804504395,
-0.5849773287773132,
-1.010757327079773,
-0.445824325084686... |
def parse _ config _ file ( self, file _ path ) : config _ file = open ( file _ path ) lines = config _ file. read ( ). replace ('\ r \ n ','\ n'). split ('\ n') num _ found _ params = 0 i = 0 video _ name ='' video _ resolution = ( 0, 0 ) prefix ='' while i < len ( lines ) and num _ found _ params < 3 : if lines [ i ]... | [
-0.24457284808158875,
-0.40091434121131897,
0.8246557116508484,
0.04146936908364296,
-0.13093648850917816,
-0.2849101126194,
-0.1487370729446411,
0.5838495492935181,
-0.8615144491195679,
1.1160635948181152,
-0.8639050126075745,
0.037187669426202774,
0.3298467993736267,
0.8554902076721191,
... |
def get _ entity _ from _ token _ or _ tablename ( self, decoded _ token : dict [ str, any ] = none, *, tablename = none, email _ value = none, ) - > union [ str, none ] : if decoded _ token : self. decoded _ token = decoded _ token if tablename : # this means that the user has logged in via a oauth 2. 0 strategy self.... | [
-0.3545331060886383,
-0.4371941089630127,
0.698610782623291,
0.23507019877433777,
-0.4420411288738251,
-0.41536977887153625,
-0.36482861638069153,
-0.329108864068985,
0.032782964408397675,
-0.6827095150947571,
0.47686871886253357,
0.8473302125930786,
0.530628502368927,
0.08897386491298676,... |
def shunting _ yard _ postfix ( infix _ string ) : ops = [ ] output = [ ] for c in infix _ string : if c. isnumeric ( ) and int ( c ) in range ( 0, 10 ) : output. append ( c ) elif c! ='' : # we have an operator while not can _ push _ op _ to _ stack ( ops, c ) : output. append ( ops. pop ( ) ) ops. append ( c ) # remo... | [
0.26558125019073486,
0.6542659997940063,
0.6972556114196777,
0.9470739960670471,
0.31743571162223816,
-0.868707001209259,
-0.030871573835611343,
0.28312379121780396,
-0.4150601029396057,
0.43212389945983887,
-0.45160090923309326,
-0.4266622066497803,
-1.0179758071899414,
-0.125782400369644... |
def check _ edges ( self ) : screen _ rect = self. screen. get _ rect ( ) if self. rect. right > = screen _ rect. right : return true elif self. rect. left < = 0 : return true | [
-0.9254715442657471,
-0.36347100138664246,
1.0452057123184204,
0.32955530285835266,
0.32038283348083496,
1.0529639720916748,
-0.6790740489959717,
-0.71816086769104,
0.1347193568944931,
0.2182663530111313,
0.3468824625015259,
-0.2237703502178192,
-0.79408860206604,
0.9989307522773743,
-0.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.