text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def localwprhost ( wpr _ archive _ path, record = false, network _ condition _ name = none, disable _ script _ injection = false, out _ log _ path = none ) : if wpr _ archive _ path = = none : _ verifysilentwprhost ( record, network _ condition _ name ) yield [ ] return with common _ util. temporarydirectory ( ) as tem... | [
0.3232560455799103,
-0.24756111204624176,
0.7109599113464355,
0.02740701101720333,
-0.44367995858192444,
-0.15170396864414215,
0.6246835589408875,
0.029342440888285637,
0.12851595878601074,
0.6125759482383728,
0.4537881016731262,
0.736009955406189,
-0.3182280957698822,
0.41541942954063416,... |
def wait _ for _ tests _ to _ finish ( real _ result, async _ results, results _ queue ) : def handle ( result ) : method _ name, args = result arglist = list ( args ) test _ info = arglist. pop ( 0 ) fake _ test = faketest. deserialize ( test _ info ) method = getattr ( real _ result, method _ name ) method ( fake _ t... | [
-0.1921118199825287,
-0.6580632925033569,
0.39751583337783813,
-0.3873133957386017,
0.7780632972717285,
-0.4467354118824005,
0.437664657831192,
-0.5654067397117615,
-0.5853719115257263,
-0.1073417216539383,
-0.5979620218276978,
-0.8372238278388977,
-0.125824436545372,
0.8786029815673828,
... |
def _ gaussians _ queue ( self ) : while not self. _ queue _ in. empty ( ) : try : n _ video = self. _ queue _ in. get ( timeout = 3 ) if n _ video % 20 = = 0 : logger. debug ('% d / % d'% ( n _ video, len ( self. _ videos ) ) ) self. _ gaussians _ fit ( idx _ exclude = n _ video, save = true ) except queue. empty : pa... | [
-0.6059412360191345,
-0.20726649463176727,
0.480413019657135,
-0.23784704506397247,
0.37353193759918213,
-0.23667192459106445,
-0.1528230607509613,
-0.5057733058929443,
0.025579331442713737,
0.07843611389398575,
-0.5445365309715271,
1.7012909650802612,
-0.6750161051750183,
0.73483401536941... |
def battery _ level ( self ) - > float : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " battery _ level " ) | [
0.2605188190937042,
0.21917960047721863,
0.16232182085514069,
0.9368628263473511,
0.8159829378128052,
0.7836228609085083,
-0.24746276438236237,
-0.8915585279464722,
-0.8465576171875,
-0.10291896760463715,
-0.47791221737861633,
0.8386549353599548,
-0.271482914686203,
0.3041921555995941,
0... |
def adwords _ service ( client _ customer _ id = none ) : if not client _ customer _ id : client _ customer _ id = settings. googleadwords _ client _ customer _ id oauth2 _ client = googlerefreshtokenclient ( client _ id = settings. googleadwords _ client _ id, client _ secret = settings. googleadwords _ client _ secre... | [
0.8887374997138977,
0.4670633375644684,
0.1480221152305603,
-0.38303250074386597,
-0.4298296868801117,
-0.07959087193012238,
-1.1021910905838013,
-0.915203869342804,
0.2693251371383667,
0.34076985716819763,
0.22393937408924103,
2.325242280960083,
-0.5569242238998413,
0.3475422263145447,
... |
def navigate _ to _ download _ page ( self, download _ selector ) : log. info ( " clicking on the download link " ) self. get _ download _ page _ link ( download _ selector ). click ( ) | [
-0.08069455623626709,
-0.14994336664676666,
0.4559546411037445,
0.0869133397936821,
1.2130045890808105,
-0.44068875908851624,
-0.1367567628622055,
-0.505501389503479,
0.015713190659880638,
0.5729926824569702,
0.1762230545282364,
0.24513044953346252,
0.28028374910354614,
0.09335825592279434... |
def coadd ( grouped _ spats _ list : list [ dict ], output _ path : str, spectrograph : str, user _ config _ lines : list [ str ], debug : bool = false ) - > list [ str ] : outfiles = [ ] for d in grouped _ spats _ list : fnames = d ['fnames'] spats = d ['spats'] basename ='_ '. join ( [ fname. split ( " _ " ) [ 1 ]. s... | [
0.12558230757713318,
-0.7478952407836914,
0.8802675008773804,
0.5244625806808472,
0.32498830556869507,
0.9967104196548462,
0.5800540447235107,
-0.2685801386833191,
0.3750652074813843,
0.3111554682254791,
0.6682782769203186,
0.16335240006446838,
0.08457686007022858,
0.4750290811061859,
-0... |
def _ _ str _ _ ( self ) : result ='' for row in range ( self. height ( ) ) : for col in range ( self. width ( ) ) : result + = str ( self [ row, col ] ) +'' result = result [ : - 1 ] +'\ n'return result [ : - 1 ] | [
-0.11941436678171158,
-1.099318265914917,
0.6930875778198242,
-0.8487415313720703,
-0.16489066183567047,
-0.07915454357862473,
-0.48299935460090637,
-1.2182849645614624,
-0.352760910987854,
-0.18649497628211975,
0.7389619946479797,
0.23418815433979034,
-0.08827129751443863,
-0.053241010755... |
def create _ portfolio ( self, portfolio _ name, portfolio _ description = none ) : url = lendingclub _ url ('accounts ', self. investor _ id,'portfolios') request _ data = { " actorid " : self. investor _ id, " portfolioname " : portfolio _ name, " portfoliodescription " : portfolio _ description } response = self. se... | [
-0.36220794916152954,
0.46846967935562134,
0.4184623956680298,
0.02465756982564926,
0.44430944323539734,
-0.052453670650720596,
-1.1180493831634521,
-0.565017819404602,
-0.2818054258823395,
0.4152785837650299,
-0.7076834440231323,
0.28108838200569153,
-1.5103563070297241,
-0.34613066911697... |
def initstorage ( self, init _ data _ link = " " ) : return self. _ _ swift. initstorage ( init _ data _ link = init _ data _ link ) | [
-0.3088012933731079,
0.2804364264011383,
0.4546259939670563,
0.48019230365753174,
0.531198263168335,
-0.4094804525375366,
-0.18980488181114197,
0.18546214699745178,
-0.5373912453651428,
-1.3414620161056519,
-0.7237269282341003,
0.5384392142295837,
-0.5968667268753052,
0.18476711213588715,
... |
def test _ example _ input _ one _ required _ field _ order _ by ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entit... | [
-0.8809654712677002,
0.06844733655452728,
0.7390974760055542,
0.47943150997161865,
0.6496873497962952,
0.38185083866119385,
0.4084659814834595,
-0.4745021164417267,
-0.11137528717517853,
0.2850111424922943,
-1.3277615308761597,
-0.5941550135612488,
-0.3636854588985443,
0.24001100659370422,... |
def sort _ str _ list ( str _ list, seperator ='_ ', end = none ) : indexes = range ( len ( str _ list ) ) values = [ ] for this _ str in str _ list : if end is not none : this _ str = this _ str. split ( end ) [ 0 ] this _ value = int ( this _ str. split ( seperator ) [ - 1 ] ) values. append ( this _ value ) indexes.... | [
-1.2048527002334595,
-0.8311983346939087,
0.677650511264801,
-0.11116848140954971,
-0.7313282489776611,
-0.3958289623260498,
-0.49017927050590515,
0.47773003578186035,
-0.6446613073348999,
-0.45712828636169434,
-0.7840192317962646,
-0.3867424726486206,
-0.26061078906059265,
0.8688480854034... |
def getsharesnovrfy ( self, shares ) : if type ( shares )! = list : raise typeerror ( " invalid shares : list expected " ) sharestosend = [ ] for share in shares : msg = message. listtostr ( share ) sharestosend. append ( msg ) return sharestosend | [
-1.176688551902771,
0.5456254482269287,
0.3642573356628418,
0.4359128773212433,
1.1475715637207031,
-0.9996980428695679,
-0.6341819763183594,
-0.8575090765953064,
0.16421374678611755,
0.4613770544528961,
-0.3177361786365509,
0.3737070858478546,
-0.6889075636863708,
1.122277855873108,
-0.... |
def cumulative _ reward ( logs ) : return np. mean ( np. cumsum ( logs ['reward'], axis = 1 ), axis = 0 ) | [
1.2742509841918945,
-0.135910764336586,
0.43172016739845276,
-0.6656252145767212,
0.5553507208824158,
-0.44806182384490967,
0.2332056760787964,
0.24936622381210327,
0.4654143750667572,
1.4601283073425293,
0.7487843632698059,
0.47743910551071167,
0.3130701780319214,
-0.7272268533706665,
0... |
def gameoflife ( self, board : list [ list [ int ] ] ) - > none : directions = [ ( i, j ) for i in [ - 1, 0, 1 ] for j in [ - 1, 0, 1 ] if i! = 0 or j! = 0 ] # print ( directions ) prev _ board = [ [ status for status in line ] for line in board ] for i in range ( len ( board ) ) : for j in range ( len ( board [ 0 ] ) ... | [
-0.3956054151058197,
0.4799644947052002,
0.9617627263069153,
0.6535051465034485,
0.06024331599473953,
0.3296132981777191,
0.4490211009979248,
0.7329438924789429,
0.5335694551467896,
0.768569827079773,
-0.413461834192276,
-0.8259645104408264,
-0.11682760715484619,
0.6864448189735413,
-0.0... |
def shipping _ state _ name ( self ) : return self. _ shipping _ state _ name | [
-0.5727377533912659,
-0.15377020835876465,
0.46467068791389465,
-0.4724465012550354,
-1.233587622642517,
0.9495633840560913,
-0.008343301713466644,
-0.34394797682762146,
0.47110438346862793,
0.770115077495575,
-0.1580113172531128,
-0.09039745479822159,
0.72698575258255,
-0.6646686792373657... |
def subtract ( x, y ) : return x - y | [
-0.09067685902118683,
0.06718342751264572,
0.6546949148178101,
-0.6454187035560608,
-0.61339271068573,
0.7869428992271423,
-1.0576010942459106,
-0.6357398629188538,
-0.9007657170295715,
-0.4434266984462738,
-0.2690482437610626,
0.46110638976097107,
0.07328029721975327,
-1.2700468301773071,... |
def list _ all ( self ) - > iterable [ scenario ] : pass | [
0.16629765927791595,
-0.6930480003356934,
0.1718895584344864,
2.17236590385437,
0.6663443446159363,
-0.04315963014960289,
-1.1792465448379517,
0.008143898099660873,
-0.13577474653720856,
-0.5348038673400879,
-0.2707822322845459,
-0.2236436903476715,
0.6563696265220642,
1.011408805847168,
... |
def draw _ logo ( motif, ref, alt, position, pseudocounts = 0. 8, background = {'a': 0. 25,'c': 0. 25,'g': 0. 25,'t': 0. 25 }, fontfamily ='arial ', size = 80, alt _ color ='gold ', ref _ color ='red') : if fontfamily = ='xkcd': plt. xkcd ( ) else : rcparams ['font. family'] = fontfamily snp _ colors = { alt : alt _ co... | [
1.2230794429779053,
0.7575271129608154,
1.0257689952850342,
-0.8353636264801025,
-0.6595417261123657,
0.19894351065158844,
0.3566814959049225,
-0.348270058631897,
0.1549811065196991,
0.1507672369480133,
-0.08228710293769836,
0.6665049195289612,
-0.0781865045428276,
-0.5492855310440063,
0... |
def write _ log ( self, step, * * logs ) : line = [ step ] + [ value for value in logs. values ( ) ] with open ( self. logdir +'/ log. csv ','a ', newline ='' ) as file : write = csv. writer ( file ) write. writerow ( line ) | [
-0.037134118378162384,
-0.5414832234382629,
0.2937951982021332,
1.0844597816467285,
0.666707456111908,
0.4871148467063904,
-0.7302631735801697,
0.5797356963157654,
-1.0986627340316772,
-0.7626148462295532,
-0.42816102504730225,
0.00667518749833107,
0.27089977264404297,
0.8115043044090271,
... |
def test _ atomic _ qname _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 2. xsd ", instance = " nistdata / atomic ... | [
0.27427396178245544,
-0.660200297832489,
0.2749084234237671,
0.42707252502441406,
-0.5455134510993958,
0.09877315163612366,
-0.5100536942481995,
-0.6037465929985046,
-0.05296029895544052,
0.11557106673717499,
-0.5425195097923279,
-0.11766498535871506,
0.13961851596832275,
0.217359662055969... |
def _ new _ connection ( cls ) : kwargs = cls. _ connection _ info ( ) kwargs. update ( {'max _ pool _ size': cls. config _ max _ pool _ size,'auto _ start _ request': cls. config _ auto _ start _ request,'use _ greenlets': cls. config _ use _ greenlets,'tz _ aware': cls. config _ tz _ aware,'w': cls. config _ write _ ... | [
-0.7130839228630066,
-0.28780245780944824,
0.8479857444763184,
0.5967552065849304,
-0.35013648867607117,
-0.2737674415111542,
-0.660165548324585,
-0.184505894780159,
-0.5297364592552185,
0.5562516450881958,
0.07474246621131897,
0.03451697528362274,
-0.0819358229637146,
0.6982792019844055,
... |
def process _ family ( self, family ) : if family is none or family. handle in self. referenced [ " family " ] : return self. referenced [ " family " ]. add ( family. handle ) self. queue _ object ( " person ", family. mother _ handle ) self. queue _ object ( " person ", family. father _ handle ) for child _ ref in fam... | [
-0.12686695158481598,
-0.4096461236476898,
0.8160578608512878,
-0.555130124092102,
0.7203923463821411,
-0.05139158293604851,
0.5259925127029419,
-0.5674243569374084,
0.04382124915719032,
-0.7415862679481506,
-0.0579286627471447,
-0.6296213269233704,
-0.24611571431159973,
1.2485911846160889... |
def load _ lazy ( self ) - > none : if self. _ load _ lazy is not none : self. _ load _ lazy ( self ) | [
0.4350053668022156,
0.11645107716321945,
0.4502823054790497,
-0.48697978258132935,
0.34973275661468506,
-0.37173616886138916,
0.05289039760828018,
-0.7294514775276184,
0.0679004117846489,
-1.3496534824371338,
-0.33730438351631165,
0.29506412148475647,
0.10706676542758942,
1.163842678070068... |
def batchdescentstep ( self, x, y ) : w _ new = np. copy ( self. w ) for i in range ( self. d ) : grad = sum ( self. vector _ cost ( x [ j ], y [ j ] ) * x [ j ] [ i ] for j in range ( len ( vectors ) ) ) w _ new [ i ] + = eta * grad w = w | [
-0.35136672854423523,
0.4795299470424652,
0.6983842253684998,
0.16000717878341675,
0.031647853553295135,
0.16556932032108307,
-0.3910227417945862,
-0.5451752543449402,
-0.7223138213157654,
0.32951006293296814,
-0.031232906505465508,
0.6735172271728516,
0.782484769821167,
0.9998419880867004... |
def parse ( self, response ) : page _ urls = response. xpath ( '. / / a [ @ class = " navpages " ] / @ href') page _ urls = page _ urls [ : 40 ] # page _ nos = page _ nos [ : 40 ] for page in page _ urls : # print ( page. extract ( ) ) yield scrapy. request ( url = response. urljoin ( page. extract ( ) ), callback = se... | [
-0.25063130259513855,
-0.03896443545818329,
0.7198057174682617,
0.32171952724456787,
0.8076468110084534,
-0.00853127334266901,
-0.6312194466590881,
0.28385233879089355,
0.9228528738021851,
-0.4526684284210205,
-0.12353428453207016,
-0.9331090450286865,
0.7179168462753296,
0.510556101799011... |
def getstreetsdict ( ) : ret = dict ( db. get ( street. id, street ). filter _ by ( active = 1 ). order _ by ( street. name ) ) ret [ 0 ] = street ('','', 0,'', 0, 0, 0, 1, 0 ) return ret | [
0.0093690175563097,
0.14089299738407135,
0.4239784777164459,
-0.23437772691249847,
-0.7655742168426514,
-0.3973495364189148,
-0.20927737653255463,
-0.22199112176895142,
-0.9874595403671265,
0.1756574511528015,
-0.7945407629013062,
-0.828765332698822,
-0.30939561128616333,
0.550668656826019... |
def name ( self, name ) : if self. local _ vars _ configuration. client _ side _ validation and name is none : # noqa : e501 raise valueerror ( " invalid value for ` name `, must not be ` none ` " ) # noqa : e501 self. _ name = name | [
-0.062418729066848755,
-0.2200835943222046,
0.009804025292396545,
-0.3340163826942444,
-0.5265452861785889,
0.3073537349700928,
0.4530707895755768,
-0.15540574491024017,
-0.3071087598800659,
0.8847489953041077,
-1.0313739776611328,
-0.6010193824768066,
-0.13306382298469543,
0.7297050356864... |
def test _ custom _ headers ( self ) : self. create _ volume _ objects ( index = 1 ) self. ep. req _ cfg. headers = { " foo " : " bar " } try : self. create _ volume _ objects ( index = 1 ) except krest. httperror as err : self. assertin ( " foo ", err. response. request. headers ) self. assertequal ( " bar ", err. res... | [
-0.15057432651519775,
-0.12446358054876328,
0.6342334747314453,
0.37083128094673157,
0.28290194272994995,
0.39202210307121277,
-0.3213697671890259,
-1.3691164255142212,
0.1333518773317337,
-0.3637819290161133,
-0.1304154396057129,
-0.617568850517273,
-0.32789745926856995,
-0.58016711473464... |
def associateddomains ( self ) : self. printstatus ( ) print " " " # reference : families = % s, domains = % s, evidence > = % i, overlap > = % i # family : cluster identifier # nunits : number of units in cluster # nseqs : number of sequences in cluster # nres : number of residues in cluster # length : length of maste... | [
0.12004636973142624,
-0.48336392641067505,
0.6939941644668579,
-0.7315198183059692,
-0.04946431145071983,
0.25988689064979553,
1.524322271347046,
-0.7547682523727417,
-0.12901540100574493,
-0.48667505383491516,
0.4328809678554535,
0.6275431513786316,
0.16273708641529083,
1.1678118705749512... |
def _ make _ timezone _ naive _ utc ( datetime _ object ) : if ( datetime _ object. tzinfo is not none ) and ( datetime _ object. tzinfo. utcoffset ( datetime _ object ) is not none ) : # convert to utc utc _ time = datetime _ object. astimezone ( pytz. utc ) # remove the timezone attribute to make it timezone - naive ... | [
-0.16711857914924622,
-0.7740246057510376,
0.6339446902275085,
-0.7307735681533813,
-1.2626383304595947,
-0.20976917445659637,
0.2560651898384094,
0.7431164383888245,
0.6558661460876465,
0.43407776951789856,
0.09430374205112457,
-1.0375242233276367,
0.5311024188995361,
-0.6064363121986389,... |
def _ random _ generate _ bspline _ ( fun, num ) : xmn = fun. xmin ( ) xmx = fun. xmax ( ) ymx = max ( fun. bspline ( ). pars ( ) ) i = 0 while i < num : x = _ uniform _ ( xmn, xmx ) y = _ uniform _ ( 0, ymx ) v = fun ( x ) if v > = y : i + = 1 yield x | [
-0.15200233459472656,
0.6983069777488708,
0.39207422733306885,
0.30457574129104614,
-0.34867843985557556,
0.6219020485877991,
-0.8287724852561951,
-0.7093121409416199,
0.20089247822761536,
-0.214387446641922,
-0.3461972177028656,
0.303145170211792,
0.20023523271083832,
-0.7279223203659058,... |
def draw _ vertical _ bar ( x = 1, y = 1, width = 1, height = 1, fore _ colour = 39, back _ colour = 49 ) : # execute function to check for valid colours and force correction fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # set foreground and background colours and turn on line drawing p... | [
0.18145817518234253,
0.14411908388137817,
0.632085382938385,
0.28712281584739685,
0.1021050214767456,
0.4183669686317444,
-0.28929534554481506,
-0.03677871823310852,
-0.6839624047279358,
0.05452125146985054,
-0.2710338234901428,
0.9849332571029663,
-1.1779205799102783,
0.5445082783699036,
... |
def _ createaliens ( self ) : li = [ ] for k in range ( aliens _ in _ row ) : list = [ ] for i in range ( alien _ rows ) : x = 0 y = 0 x = ( k + 1 ) * alien _ h _ sep + alien _ width * ( k + 1 / 2 ) y = game _ height - ( alien _ ceiling + ( alien _ rows - 0. 5 - i ) * alien _ height + ( alien _ rows - 1 - i ) * alien _... | [
-0.6584069728851318,
-0.4525785446166992,
0.6667320132255554,
-0.0985972136259079,
-0.025011127814650536,
0.5822445154190063,
-0.146531879901886,
-0.13742533326148987,
0.17942002415657043,
0.5545163154602051,
-0.2530896067619324,
-1.37371826171875,
0.2519156336784363,
0.41632530093193054,
... |
def sumgroup ( table : arrable, to _ add : str, groupon : list ) : orig _ groupon = groupon. copy ( ) group _ col _ name = " sumgroup " final _ columns = table. get _ col _ names ( ). append ( group _ col _ name ) all _ groups = [ table ] while groupon : next _ group _ col = groupon. pop ( ) print ( " nextgroup call = ... | [
-0.698893666267395,
0.6990790367126465,
1.0444955825805664,
0.9079673886299133,
-0.8080013394355774,
-0.5018775463104248,
0.17396007478237152,
-0.05562474578619003,
-0.38756439089775085,
0.45623812079429626,
0.17454999685287476,
-0.3676784634590149,
-0.17488373816013336,
0.0484221130609512... |
def lookup _ users ( usernames ) : users = { } t = connect ( ) for usrbatch in chunks ( usernames, 100 ) : usrbatch = list ( usrbatch ) databatch = _ lookup _ user _ batch ( t, usrbatch ) users. update ( databatch ) return users | [
-0.9684836864471436,
0.5201353430747986,
0.3846185505390167,
-0.08852483332157135,
-0.6181364059448242,
-0.11095398664474487,
0.10158222913742065,
-0.133502796292305,
-0.04069021716713905,
0.2935122847557068,
-0.9823017120361328,
-0.3420809507369995,
0.22129274904727936,
0.0905747935175895... |
def avg ( self, column ) : size = len ( self. _ _ data _ area ) return self. sum _ ( column ) / size if size else size | [
-0.24582219123840332,
0.9995988011360168,
0.43306365609169006,
-0.4806724488735199,
-0.08771539479494095,
0.3082684576511383,
0.9159613251686096,
-0.6404085159301758,
-0.4486966133117676,
0.29196974635124207,
-0.45821109414100647,
0.7743964195251465,
-0.05662447214126587,
0.442097485065460... |
def get _ exchange _ minute _ writer _ root ( exchange _ name ) : exchange _ folder = get _ exchange _ folder ( exchange _ name ) minute _ data _ folder = os. path. join ( exchange _ folder,'minute _ data') ensure _ directory ( minute _ data _ folder ) return minute _ data _ folder | [
-0.17373435199260712,
-0.2609611451625824,
0.3679440915584564,
-0.9364545345306396,
-0.018242351710796356,
0.29173630475997925,
0.06957084685564041,
-0.22242529690265656,
0.762727677822113,
-0.32476794719696045,
0.6246101260185242,
0.7108036279678345,
-1.1001818180084229,
0.002203212119638... |
def get _ return _ elements ( return _ columns, namespace, subscript _ dict ) : capture _ elements = list ( ) return _ addresses = dict ( ) for col in return _ columns : if col [ 0 ] = = col [ - 1 ] and col [ 0 ] = ='"': name = col address = none elif'['in col : name, location = col. strip (']'). split ('[') address = ... | [
-0.9745075106620789,
-0.17274679243564606,
0.5803813934326172,
-0.0005865631392225623,
0.11912760138511658,
-0.6710376143455505,
-0.47767212986946106,
-0.5638390779495239,
-0.12164775282144547,
0.8299190998077393,
-0.8232420682907104,
0.15438494086265564,
0.48586755990982056,
0.31129223108... |
def _ do _ storage _ update _ or _ save ( self ) : # the storage info storage _ data = self. local _ storage storage _ name = storage _ data [ " code " ] # a sg connect we can use to save / update sg = sgtk. platform. current _ engine ( ). shotgun if storage _ data. get ( " id " ) : # the storage exists in sg. we want ... | [
-0.046809617429971695,
-0.4704015254974365,
0.6332640647888184,
0.2811333239078522,
0.09056509286165237,
-0.3302968442440033,
0.14376293122768402,
-0.1264064759016037,
-0.4562276303768158,
0.4485045075416565,
-0.2984532415866852,
-0.31249383091926575,
0.04435526579618454,
0.716486215591430... |
def test _ atomic _ hex _ binary _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 4. xsd ", instance = " nistdata / ... | [
0.3073371350765228,
-0.003658424597233534,
0.42569416761398315,
0.40479564666748047,
0.20758585631847382,
0.35883769392967224,
-0.2616663873195648,
0.08793921768665314,
-0.09045432507991791,
0.16978421807289124,
-0.606078028678894,
-0.962510883808136,
-0.30499884486198425,
0.24087917804718... |
def mission ( request, pk ) : room = get _ object _ or _ 404 ( room, pk = pk ) # generate counts of some of the main objects room _ id, num _ players, num _ mission, num _ pass, num _ fail = room. mission _ result ( ) num _ visits = request. session. get ('num _ visits ', 0 ) request. session ['num _ visits'] = num _ v... | [
-0.7759577035903931,
0.1799105852842331,
0.685649573802948,
0.2845628559589386,
0.1508219987154007,
0.04377152398228645,
0.5201622843742371,
-0.11007555574178696,
0.3319185674190521,
0.3369646370410919,
0.35398709774017334,
-0.5470414757728577,
0.10972483456134796,
0.22042801976203918,
-... |
def test _ atomic _ language _ min _ length _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 1. xsd ", instance = " nistdata /... | [
0.4749721884727478,
-0.5283198952674866,
0.2822050154209137,
0.3702351152896881,
-0.48264214396476746,
0.047539934515953064,
-0.07593994587659836,
-0.38891953229904175,
0.6292540431022644,
0.4223792254924774,
-0.1882615089416504,
-0.21652871370315552,
-0.7770266532897949,
-0.02206701971590... |
def get _ joke ( joke _ id ) : joke = joke. query. filter _ by ( id = joke _ id, user = current _ user ). first _ or _ 404 ( ) current _ app. logger. info ( f'get joke { joke }') return jsonify ( joke. as _ dict ) | [
-0.7796074748039246,
-0.4964003562927246,
0.29552334547042847,
1.0226846933364868,
-0.019030718132853508,
-1.0261971950531006,
-0.568584144115448,
0.025287948548793793,
-0.6954143643379211,
0.1796882599592209,
0.2413705587387085,
0.8016964793205261,
-0.04287689924240112,
0.9531236886978149... |
def create _ new _ image ( self, image : image ) : id = int ( image. image _ id ) haz _ id = int ( image. hazard _ id ) sat _ id = int ( image. satellite _ id ) im _ type = image. image _ type. value im _ date = image. image _ date. to _ integer ( ) tif = image. tif _ image _ url. url raw = image. raw _ image _ url. ur... | [
-1.0703665018081665,
-0.12066887319087982,
0.6967942714691162,
-0.1962013691663742,
1.0743110179901123,
0.3800355792045593,
-0.24004802107810974,
-0.1380176544189453,
-0.47370123863220215,
0.2785518765449524,
0.09332463145256042,
-0.6257264018058777,
-0.26884007453918457,
1.063812971115112... |
def update _ bbox ( self, box ) : if box [ 0 ] is none or self. xmin < box [ 0 ] : box [ 0 ] = self. xmin if box [ 1 ] is none or self. ymin < box [ 1 ] : box [ 1 ] = self. ymin if box [ 2 ] is none or self. xmax > box [ 2 ] : box [ 2 ] = self. xmax if box [ 3 ] is none or self. ymax > box [ 3 ] : box [ 3 ] = self. yma... | [
-0.8583555817604065,
-0.5043343305587769,
0.8999916911125183,
-0.2312874048948288,
0.2554037570953369,
-0.3822510540485382,
-1.1564182043075562,
-1.1529825925827026,
0.28618717193603516,
-0.4153866469860077,
-0.5771352052688599,
0.9402102828025818,
-0.5428834557533264,
0.4938078224658966,
... |
def test ( session, extras, dilibraries = dilibraries ) : session. log ( f'run test in { lib _ name }') standard _ di _ test ( session, extras = extras, dilibraries = dilibraries ) | [
-0.8121216893196106,
0.4516133666038513,
0.40270090103149414,
0.20768100023269653,
-0.39575091004371643,
0.029348792508244514,
0.518825888633728,
0.5709640383720398,
0.9580472707748413,
-0.9161283373832703,
-0.4807266294956207,
-0.641710102558136,
0.08093111962080002,
-0.6959575414657593,
... |
def validate _ currency ( currency ) : if not currency : return false if not re. search ('^ \ d + $ ', currency ) : return false if not re. search ('^ 0 ', currency ) : return false try : decimal. decimal ( currency ) except : return false return true | [
-0.4913771450519562,
-0.25247812271118164,
0.6913496255874634,
0.6496725082397461,
-0.5478907823562622,
0.8118571043014526,
0.03737596049904823,
0.6063793897628784,
0.11685066670179367,
-0.7888016104698181,
0.32521504163742065,
-1.503894567489624,
-1.2000716924667358,
0.5684826374053955,
... |
def test _ atomic _ base64 _ binary _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 1. xsd ", instance = " nis... | [
0.26340344548225403,
-0.11258209496736526,
0.4242731034755707,
0.9344432353973389,
0.31264591217041016,
0.29379692673683167,
0.25295472145080566,
0.13691119849681854,
0.4360629916191101,
0.6155608296394348,
-0.34533441066741943,
-0.22922134399414062,
-0.6077059507369995,
0.1907252073287964... |
def test _ list _ integer _ pattern _ 4 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 5. xsd ", instance = " nistdata / list / integer / sc... | [
-0.787056028842926,
-0.1936400830745697,
0.43095213174819946,
0.6249304413795471,
-0.5226472020149231,
0.0069971755146980286,
0.5124837756156921,
0.24261870980262756,
0.8399019241333008,
1.0541175603866577,
-1.0366623401641846,
-0.37638360261917114,
-0.8597592115402222,
0.5769076943397522,... |
def _ _ str _ _ ( self ) : return " function " + str ( tuple ( self. formal _ parameters ) ) | [
-0.8281875848770142,
-0.8140524625778198,
0.3931555151939392,
-1.1157442331314087,
0.6246079802513123,
0.14892400801181793,
-0.7405673861503601,
0.25557100772857666,
-0.8762494325637817,
0.053556717932224274,
0.808212399482727,
0.8934969902038574,
0.5320726037025452,
-0.06733239442110062,
... |
def changefilms ( self, increase _ by, data _ to _ view ) : self. index + = increase _ by if self. index > = math. ceil ( len ( data _ to _ view ) / 5 ) : self. index = 0 elif self. index < 0 : self. index = math. ceil ( len ( data _ to _ view ) / 5 ) - 1 self. settable ( ) self. updatetable ( self. dataview ) | [
-1.363539218902588,
0.6023609638214111,
0.5701236724853516,
0.5193518996238708,
-0.4789367616176605,
-0.9949946403503418,
0.9075061082839966,
0.05783126875758171,
-0.1212833821773529,
-0.5897240042686462,
-0.816244900226593,
0.6796720027923584,
0.2173437923192978,
-0.08536601066589355,
0... |
def send _ ui _ notification ( error _ message, success _ message, error _ event _ type = event _ type _ error, migrate _ op = false, log _ exception = false ) : def func _ parms ( f ) : @ wraps ( f ) def wrapper ( * args, * * kwds ) : instance _ dict _ keys = ['uuid ','display _ name ','vm _ state ','task _ state'] mi... | [
-0.4934932589530945,
0.6304304599761963,
0.8144780993461609,
-0.011727035976946354,
-0.3766539990901947,
0.23168586194515228,
-0.3520291745662689,
0.4527304172515869,
-0.15571707487106323,
0.4763520359992981,
-0.2518787980079651,
0.23414181172847748,
0.4305844306945801,
0.543867290019989,
... |
def max _ ( self, column ) : index = self. _ _ columns [ column ] [ 1 ] return max ( map ( row [ index ], self. _ _ data _ area. values ( ) ) ) | [
0.04785677045583725,
0.2896997332572937,
0.38099315762519836,
0.16320841014385223,
-0.4137026369571686,
-0.43527474999427795,
-0.2771829664707184,
-0.709671676158905,
-0.12108905613422394,
0.28876399993896484,
-0.060054562985897064,
0.5012058615684509,
0.7410262823104858,
0.143152594566345... |
def is _ region _ moderator ( self ) : return self. role = = self. permissionchoice. region _ moderator | [
-0.6246405839920044,
-0.7432422041893005,
0.25220218300819397,
0.2518962621688843,
0.054043348878622055,
-0.19110481441020966,
-0.5574476718902588,
-0.4755125343799591,
1.083828091621399,
0.030759776011109352,
0.4781067669391632,
1.2235488891601562,
-0.6013734936714172,
0.24789610505104065... |
def build _ argparser ( ) : parser = argumentparser ( ) parser. add _ argument ( " - m ", " - - model ", required = true, type = str, help = " path to an xml file with a trained model. " ) parser. add _ argument ( " - i ", " - - input ", required = true, type = str, help = " path to image or video file " ) parser. add ... | [
0.004483975935727358,
-0.6405938863754272,
0.7567086219787598,
0.13278226554393768,
-0.1814899444580078,
0.09339051693677902,
-0.2793295085430145,
0.20782370865345,
-0.34677690267562866,
-0.4993988871574402,
-0.07304169982671738,
0.8726833462715149,
-0.5088596940040588,
0.5718345642089844,... |
def get _ average _ attempts ( self, request ) : return stringmessage ( message = memcache. get ( memcache _ moves _ remaining ) or'' ) | [
-0.8082808256149292,
-0.1836637407541275,
0.3182763457298279,
-0.8995772004127502,
-0.033709295094013214,
-0.14671073853969574,
-0.26918888092041016,
-1.2741020917892456,
-0.49197107553482056,
0.9962244629859924,
0.49446412920951843,
0.8651321530342102,
-0.7876458168029785,
0.4880460500717... |
def test _ atomic _ qname _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 3. xsd ", instance = " nistdata / atomic / qname / sc... | [
-0.3211701214313507,
-0.1116606816649437,
0.6272352337837219,
0.5930063128471375,
-0.3915461003780365,
0.9874196648597717,
-0.5881908535957336,
-0.22876106202602386,
0.6621119379997253,
0.9728052616119385,
-0.20267297327518463,
0.22045934200286865,
0.2433057576417923,
-0.8717917799949646,
... |
def delete ( self, request ) : for id in request. data : client. { { cookiecutter. panel } } _ delete ( request, id ) | [
-1.25181245803833,
-0.03496125712990761,
0.15484866499900818,
0.58805912733078,
0.7509196996688843,
-0.6649508476257324,
0.10448334366083145,
-0.5262778401374817,
-0.27378353476524353,
0.9791128039360046,
0.0019299915293231606,
0.7377156019210815,
-0.7323536276817322,
0.7549031972885132,
... |
def testgeterrorboxinfofunction ( self ) : errorinfo = self. po. get _ errorbox _ info ( ) assert len ( errorinfo ) = = 0, \ " get _ errorbox _ info ( ) returned % s, expected [ ] " % ( errorinfo ) | [
-0.32472383975982666,
-0.35324594378471375,
0.25133758783340454,
-0.15962503850460052,
0.7025361657142639,
-0.07872144132852554,
-0.13562674820423126,
-0.3887999355792999,
-0.18917876482009888,
-1.4876110553741455,
-1.2175554037094116,
0.007386277429759502,
0.1072312667965889,
0.0091757848... |
def move _ gradient _ to _ cluster ( self, hpc _ cluster = none, overwrite : bool = false ) : if hpc _ cluster is none : hpc _ cluster = get _ site ( self. comm. project. interpolation _ site ) has, path _ to _ mesh = self. has _ remote _ mesh ( event = none, interpolate _ to = true, gradient = true, hpc _ cluster = hp... | [
-0.5180003046989441,
0.6711392998695374,
0.7693649530410767,
0.10187340527772903,
1.2617202997207642,
1.248639464378357,
0.7655702829360962,
0.10343106836080551,
-1.1925662755966187,
0.2895289361476898,
-1.074625849723816,
0.9829463958740234,
-0.8564711213111877,
0.41661009192466736,
0.4... |
def test _ conversion ( self ) : result = config. _ preprocess ( input _ config ) assert result = = processed _ config | [
-0.633512556552887,
0.5325180888175964,
0.35446667671203613,
-0.2938227653503418,
0.32120180130004883,
0.34781232476234436,
-0.0257553867995739,
0.12239984422922134,
0.3329038918018341,
-0.10289028286933899,
-0.9836157560348511,
-0.30793270468711853,
-0.06750635802745819,
0.061894252896308... |
def test _ atomic _ boolean _ white _ space _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 1. xsd ", instance = " nistdata / ... | [
-0.4221235513687134,
-0.0957166850566864,
0.5290016531944275,
0.6537298560142517,
0.07778307795524597,
0.2502889335155487,
0.48978176712989807,
-0.2757643461227417,
0.41718265414237976,
1.0192774534225464,
0.31632575392723083,
0.35716280341148376,
-0.07943908870220184,
0.6449408531188965,
... |
def _ _ new _ _ ( cls, name, bases, attributes, ignore = false, * * kwds ) : # build the record record = super ( ). _ _ new _ _ ( cls, name, bases, attributes, ignore = ignore, * * kwds ) # for specially marked classes, we are all done if ignore or cls. isignorable ( bases ) : return record # the rest get some extra de... | [
-0.10696134716272354,
0.7297496795654297,
0.7623075842857361,
-0.36597147583961487,
0.3441053330898285,
0.08037829399108887,
0.41550734639167786,
0.41856157779693604,
0.17215244472026825,
-0.12367954850196838,
-0.29619333148002625,
-0.02781708724796772,
0.90602046251297,
0.0533163584768772... |
def _ updateconfiguration ( self, form ) : context = self. context sendto _ values = [ x. strip ( ) for x in form. get ( " sendto _ values " ). replace ( " \ r ", " " ). split ( " \ n " ) if x ] if form. get ( " sendto _ all " ) : sendto _ all = true else : sendto _ all = false if not sendto _ all and not sendto _ valu... | [
-0.6822451949119568,
0.15058164298534393,
0.6120533347129822,
-0.3341698944568634,
0.18069487810134888,
-0.9249293804168701,
0.21273650228977203,
0.6119620203971863,
-0.3179275095462799,
0.5469649434089661,
-0.32395514845848083,
-0.05847901850938797,
-0.1699753999710083,
0.7630102038383484... |
def check _ if _ float ( self, max _ number : float, min _ number : float, value, check : bool = true, msg : str ='' ) - > str : try : if not value : return f'{ msg } - value is empty'val = float ( value ) if check : if min _ number < val < max _ number : return'' return f'{ msg } - please enter value between { min _ n... | [
-0.15729577839374542,
0.4787273108959198,
0.4685359299182892,
0.7508119344711304,
-0.04624290391802788,
0.5957063436508179,
-0.07509955018758774,
-0.37657028436660767,
-0.9251156449317932,
-0.4114846885204315,
0.9222173094749451,
0.46423739194869995,
-0.2720690071582794,
0.617324948310852,... |
def on _ left _ dclick ( self, event _ unused ) : wx. getapp ( ). new _ window ( compute = self. compute, size = settings. explorer _ size ) | [
0.7917856574058533,
1.0908395051956177,
0.4650437533855438,
0.2624830901622772,
-0.034742169082164764,
0.04024398699402809,
0.5363509654998779,
-0.055077407509088516,
0.24031928181648254,
-0.49061527848243713,
0.4937707781791687,
0.5073569416999817,
0.2640730142593384,
1.2401056289672852,
... |
def main ( ) : head ( size ) belt ( size ) upper ( size ) lower ( size ) belt ( size ) head ( size ) | [
0.18685950338840485,
-0.33137065172195435,
0.4063727557659149,
0.26649346947669983,
0.9841845035552979,
0.062428757548332214,
0.13100652396678925,
-1.5433536767959595,
-0.12280995398759842,
-0.5337303876876831,
-0.7599707245826721,
0.788195013999939,
-0.5263213515281677,
0.4135410785675049... |
def x ( self, ispec = none, iflux = none, loglam = none, y = none ) : return self. eval _ param ('x ', ispec = ispec, iflux = iflux, loglam = loglam, y = y ) | [
-0.18176758289337158,
0.8006407618522644,
0.7272193431854248,
-0.11412181705236435,
0.5098827481269836,
-0.19789835810661316,
-0.8410474061965942,
0.6748874187469482,
-0.12820225954055786,
-0.0952349528670311,
0.23028016090393066,
1.3543751239776611,
0.2147023230791092,
-0.2203824520111084... |
def test _ example _ input _ two _ list _ example _ multiple _ select ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page. ... | [
-0.47534069418907166,
-0.19319216907024384,
0.49282699823379517,
0.656735897064209,
0.9572755694389343,
0.6593783497810364,
-1.1235908269882202,
-0.33727771043777466,
0.6142129898071289,
0.3039649724960327,
-1.0048942565917969,
-0.2434813231229782,
0.6731135249137878,
0.47844916582107544,
... |
def getasgrassasciigrid ( self, session ) : if type ( self. raster )! = type ( none ) : # make sure the raster field is valid converter = rasterconverter ( sqlalchemyengineorsession = session ) return converter. getasgrassasciiraster ( tablename = self. tablename, rasteridfieldname ='id ', rasterid = self. id, rasterfi... | [
0.47018322348594666,
-0.5645442605018616,
0.5713441371917725,
-0.4421416223049164,
-0.34654688835144043,
-0.808531641960144,
-0.584075927734375,
-0.6937106847763062,
-0.11695857346057892,
0.3572293221950531,
0.5867607593536377,
0.018677061423659325,
-0.638060450553894,
0.5375311970710754,
... |
def evaluate ( self, ) - > none : raise notimplementederror ( " please implement this method " ) | [
-0.8090346455574036,
-0.9418599605560303,
0.360653817653656,
0.019176485016942024,
0.5242995619773865,
0.8703076839447021,
0.4965532124042511,
0.5173035264015198,
-0.39368936419487,
-0.7637420892715454,
-0.4287368953227997,
0.12071673572063446,
-0.05018838495016098,
0.3288320302963257,
-... |
def timestamp ( self ) : if self. binding = = binding. exists : return self. _ timestamp elif self. flags & flag. temp : # report most recent prerequisite timestamps return max ( [ p. timestamp for p in self. prerequisites ], default = 0 ) else : return 0 | [
-0.21199625730514526,
0.4113593101501465,
0.6128817200660706,
0.0221377145498991,
0.6031015515327454,
0.4454779624938965,
0.6765952110290527,
0.8111610412597656,
0.6204726696014404,
0.37216851115226746,
0.37832650542259216,
-0.3933890461921692,
-0.2744387686252594,
1.587031364440918,
-0.... |
def draw ( self, surface ) : self. die1. draw ( surface ) self. die2. draw ( surface ) self. die1 _ face. draw ( surface ) self. die2 _ face. draw ( surface ) | [
-1.260941743850708,
-0.08427571505308151,
0.5985574126243591,
1.0450059175491333,
0.46678757667541504,
1.2080254554748535,
1.0977407693862915,
-0.45880284905433655,
-0.8357828259468079,
-0.37367668747901917,
-0.17635321617126465,
0.02640615403652191,
0.534299373626709,
1.1733559370040894,
... |
def test _ atomic _ any _ uri _ max _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 1. xsd ", instance = " nistdata / a... | [
0.015027212910354137,
0.05718492716550827,
0.40925031900405884,
1.0715012550354004,
-0.29850512742996216,
0.29223600029945374,
-0.42819273471832275,
0.23348844051361084,
0.5928319692611694,
0.021861737594008446,
0.30137813091278076,
-0.4104118347167969,
-0.44974690675735474,
0.055882520973... |
def test _ view ( self ) : pass | [
0.5307286977767944,
-0.30063924193382263,
0.2373536378145218,
0.2841492295265198,
0.2816338539123535,
0.4747054874897003,
1.485257625579834,
-0.05297459661960602,
0.5196750164031982,
-2.330660104751587,
0.1442926973104477,
0.4252548813819885,
-0.6630821228027344,
-0.19888898730278015,
-1... |
def compute _ p _ from _ fundamental ( f ) : e = compute _ epipole ( f. t ) # left epipole te = skew ( e ) return np. vstack ( ( np. dot ( te, f. t ). t, e ) ). t | [
-0.11721248924732208,
0.5798934102058411,
0.5367222428321838,
0.45648685097694397,
0.14407004415988922,
0.6659892797470093,
-0.19760172069072723,
0.8170267939567566,
0.003104975214228034,
2.0339999198913574,
0.653591513633728,
-1.286852240562439,
-0.10808370262384415,
-0.2793372869491577,
... |
def any _ str ( self, e, * * kwargs ) : ans = self. any _ n _ str ( e, 1, * * kwargs ) if len ( ans ) > 0 : return ans [ 0 ] else : raise simunsaterror ( " not satisfiable : % s " % e. shallow _ repr ( ) ) | [
-0.34397193789482117,
0.21902626752853394,
0.43296244740486145,
-0.054770998656749725,
-0.23348240554332733,
-0.311606764793396,
-0.67018723487854,
-0.33734843134880066,
-0.0001703112939139828,
-0.17890802025794983,
0.7385228872299194,
-0.20839229226112366,
-0.6235255002975464,
0.145368620... |
def to _ mysql ( dbtype, vin ) : if " float " in dbtype. _ _ str _ _ ( ) : vout = float ( vin ) elif " integer " in dbtype. _ _ str _ _ ( ) : vout = int ( vin ) else : vout = vin return vout | [
-0.3147980868816376,
-0.6129775643348694,
0.476439893245697,
0.040692295879125595,
0.40849119424819946,
-0.8464202284812927,
-0.6133973002433777,
-0.7957013249397278,
-0.027092186734080315,
1.064375638961792,
0.2047610580921173,
0.6069416403770447,
-1.0221772193908691,
-0.0917411670088768,... |
def test _ wisdom _ abilities ( app, qtbot ) : for wis in range ( 1, 26 ) : app. wis. settext ( str ( wis ) ) app. magical _ attack _ adj. settext ( str ( wisdom _ abilities. get _ wis _ ability ( wis, 0 ) ) ) app. cleric _ spell _ bonus. settext ( str ( wisdom _ abilities. get _ wis _ ability ( wis, 1 ) ) ) app. spell... | [
-0.32807597517967224,
-0.8605068922042847,
0.6195765137672424,
-0.7877771854400635,
-0.3751991391181946,
0.3679078221321106,
0.23051778972148895,
-0.006145942490547895,
0.41147738695144653,
-0.23116159439086914,
0.16181106865406036,
0.6499872207641602,
-0.4185297191143036,
0.48166728019714... |
def test _ atomic _ any _ uri _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 5. xsd ", instance = " nistdata... | [
0.04191308096051216,
-0.4996892213821411,
0.41432052850723267,
0.7346693277359009,
-0.5314836502075195,
-0.29747718572616577,
0.022321254014968872,
-0.6469575762748718,
0.22414615750312805,
-0.09027715027332306,
-0.04885564744472504,
-0.11529305577278137,
-0.9770121574401855,
0.24327664077... |
def _ index _ url ( self ) : return " http : / / " + self. domain + " / w / index. php " | [
-0.017945053055882454,
-0.20394447445869446,
0.19023337960243225,
0.35166409611701965,
0.03123113512992859,
0.7586895823478699,
0.4133829176425934,
0.8774926662445068,
-0.3008308410644531,
0.024650393053889275,
0.4174862504005432,
0.7565085291862488,
0.0861678346991539,
-0.2412453293800354... |
def setclusterid ( self, cutoff ) : ( nclusts, clusterids, bt ) = \ self. getclusterid ( self. pos, cutoff, aligndistancescython ) self. nclusts = nclusts self. clusterids = clusterids return bt | [
-0.23023036122322083,
-0.9115208387374878,
0.3650331199169159,
-0.521590530872345,
0.04596177861094475,
0.4506579339504242,
0.4366932213306427,
-0.011848200112581253,
0.6634050607681274,
0.4394926130771637,
-0.21327316761016846,
0.7589440941810608,
-0.9046480655670166,
-0.1496886909008026,... |
def getalldevicemanagementrequests ( self ) : mgmtrequests = apiclient. mgmtrequests % ( self. host ) r = requests. get ( mgmtrequests, auth = self. credentials, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " retrieved all device management requests " ) return r. json ( ) ... | [
-1.4868320226669312,
-0.028972502797842026,
0.4901050627231598,
0.3481111228466034,
0.15749649703502655,
-0.37013792991638184,
-0.6995647549629211,
-0.8723142147064209,
0.25514501333236694,
-0.48719996213912964,
-0.20653292536735535,
1.0115137100219727,
-0.8819910287857056,
0.8204761743545... |
def signal _ exit ( signum, frame ) : for job _ id in job _ ids : if job _ id not in instance. jobs _ completed : results = " % s job % s : time limit reached " % ( instance. scheduler. name, instance. scheduler. job _ id ) logger. error ( results ) instance. jobs _ failed. append ( { " id " : job _ id, " results " : r... | [
-0.8258224129676819,
-0.16609574854373932,
0.35847601294517517,
-0.26501819491386414,
0.5082823038101196,
-0.3703831136226654,
-0.020911864936351776,
-0.26967576146125793,
-0.6981185078620911,
0.7320600748062134,
-1.1781035661697388,
-0.5789886116981506,
0.17420615255832672,
0.849460482597... |
def parse _ date ( arg ) : import datetime import sys for fmt in ('% y - % m - % dt % h : % m : % sz ','% y - % m - % dt % h : % m : % s. % fz') : try : dt = datetime. datetime. strptime ( arg, fmt ) return dt except valueerror : pass raise valueerror ('cannot parse time data') | [
0.35143840312957764,
-0.20848526060581207,
0.7416284084320068,
0.13419610261917114,
-0.2883871793746948,
0.7732667922973633,
-0.11441455036401749,
-0.37035056948661804,
-0.13479100167751312,
-0.012418227270245552,
-0.3836139440536499,
-0.4314571022987366,
-0.07949309051036835,
0.3822618424... |
def sne _ grad _ cur _ obj ( x _ lds, p _ ij, log _ p _ ij, nit, early _ exa _ it _ stop, early _ exa _ factor ) : # computing the similarities in the lds. to compute the lds distances, we use " sqeuclidean " metric instead of " euclidean " to avoid squaring the distances. q _ ij, log _ q _ ij = sne _ lds _ similaritie... | [
-0.4274388551712036,
-0.30264919996261597,
0.9222779870033264,
-0.6795380115509033,
-0.676723301410675,
0.06525618582963943,
-0.15198028087615967,
0.3395686447620392,
-0.7101200819015503,
0.3527875542640686,
-0.10478295385837555,
0.6226611733436584,
0.45379069447517395,
-0.3879104554653168... |
def banner1 ( message, border ='*') : # print ( " enter a string " ) # response = input ( ) # take user input print ( " * ", border * len ( message ), " * " ) print ( " * ", message, " * " ) print ( " * ", border * len ( message ), " * " ) | [
0.9757428169250488,
0.03615104407072067,
0.6815963387489319,
1.526839017868042,
-0.7706804275512695,
1.2268130779266357,
0.7421951293945312,
-0.5431930422782898,
-0.06747639179229736,
-0.8582186698913574,
-0.998549222946167,
0.9011620879173279,
-1.3716111183166504,
0.5742804408073425,
0.... |
def slash _ route ( filepath ) : return redirect ( filepath ) | [
0.35641244053840637,
-0.9103174805641174,
0.32175540924072266,
0.26960480213165283,
0.6819437742233276,
1.0186861753463745,
1.264481544494629,
0.3958585858345032,
-0.8043769001960754,
-0.5419592261314392,
0.15173400938510895,
-0.026958195492625237,
0.43240121006965637,
-0.8004040718078613,... |
def get _ table _ name ( self, group = none, imputed = false ) : if group is none and not imputed : name ='" % s _ % s "'% ( self. prefix, self. suffix ) elif group is none and imputed : name ='" % s _ % s _ % s "'% ( self. prefix, self. suffix, " imputed " ) elif imputed : name ='" % s "'% to _ sql _ name ( " % s _ % ... | [
-0.4815943241119385,
-0.1924845427274704,
0.8022893667221069,
-0.6385942697525024,
-0.7636560797691345,
-0.09724054485559464,
-0.07269492000341415,
0.3478030562400818,
-0.8602182865142822,
0.3006543517112732,
0.2733270525932312,
0.7120908498764038,
0.016008106991648674,
0.4864785075187683,... |
def mean _ kl _ divergence ( observations, model ) : observations _ tensor = torch. cat ( [ variable ( torch. tensor ( observation ) ). unsqueeze ( 0 ) for observation in observations ] ) actprob = model ( observations _ tensor ). detach ( ) + 1e - 8 old _ actprob = model ( observations _ tensor ) return torch. sum ( o... | [
0.1803322583436966,
-0.1331057846546173,
0.5693870782852173,
0.3730096220970154,
-0.9165195822715759,
0.6935828328132629,
-0.04979150369763374,
0.5257032513618469,
0.5203205347061157,
1.1011600494384766,
0.20642492175102234,
0.23143872618675232,
0.33935680985450745,
-0.06795235723257065,
... |
def quick _ sort _ aux ( self, array : arraylist [ tuple ], start : int, end : int ) - > none : if start < end : boundary = self. partition ( array, start, end ) self. quick _ sort _ aux ( array, start, boundary - 1 ) self. quick _ sort _ aux ( array, boundary + 1, end ) | [
0.4779202342033386,
-0.616757333278656,
0.6899378299713135,
0.44941437244415283,
-0.9294360280036926,
-0.22008374333381653,
-0.06908533722162247,
-0.5584224462509155,
0.45837128162384033,
-0.00730619253590703,
-0.3256409168243408,
0.8212599158287048,
0.21716946363449097,
0.2178245782852172... |
def _ _ init _ _ ( self ) : pass | [
0.384575754404068,
-1.1162716150283813,
0.2936498522758484,
0.8026404976844788,
0.5190465450286865,
0.6533650755882263,
0.5970242023468018,
0.30950239300727844,
0.15195979177951813,
-1.2418946027755737,
-0.8523526787757874,
-0.016424469649791718,
-0.05249137803912163,
0.6643484234809875,
... |
def voluntary _ rebalance _ to _ increase _ leverage ( self, day, years _ remaining ) : if self. assets > 0 : if self. margin _ to _ assets ( ) < ( 1 - epsilon ) * self. personal _ max _ margin _ to _ assets _ ratio ( years _ remaining ) : additional _ debt = ( self. assets * self. personal _ max _ margin _ to _ assets... | [
0.2436525970697403,
-0.4086383581161499,
0.5856884121894836,
-0.8372290730476379,
0.5944803953170776,
0.30600103735923767,
-0.43662315607070923,
-0.7100412249565125,
0.5117695927619934,
-0.6652944684028625,
1.2508776187896729,
0.6432088613510132,
0.1784915179014206,
-0.19244402647018433,
... |
def process _ data ( self, data ) : data = self. serial. read ( 5 ) # in case we go out of sync, re - synchronise the stream. # this might happen if data upload is enabled on the device. if not data [ 0 ] & sync : self. sync _ stream ( ) self. waveform = data [ 1 ] self. heartrate = data [ 3 ] self. oxygen = data [ 4 ] | [
-0.14753858745098114,
0.08393833786249161,
0.4434688687324524,
0.1265989989042282,
0.4896303117275238,
-0.6041962504386902,
0.017283963039517403,
-1.4875327348709106,
0.5108768343925476,
-0.5738336443901062,
-0.8962746262550354,
0.42599958181381226,
-0.9867978096008301,
0.23101398348808289... |
def create _ psw _ file ( prefix : str = " dircrypt " ) - > tuple [ bytes, path ] : # pylint : disable = invalid - sequence - index psw = os. urandom ( default _ password _ size ) b64 _ psw = urlsafe _ b64encode ( psw ) psw _ file = force _ create _ file ( prefix, suffix = ". password " ) psw _ file. write _ bytes ( b6... | [
-0.06282546371221542,
-0.2755785584449768,
0.5174437165260315,
0.6562279462814331,
0.5808196067810059,
-0.17984826862812042,
-0.2595917582511902,
0.8010319471359253,
-0.27959975600242615,
-0.16363263130187988,
-0.5366183519363403,
0.022566985338926315,
0.21366724371910095,
0.91172862052917... |
def test _ login _ rightpass ( self ) : rv = self. app. post ('/ weblab / login ', data = dict ( username ='any ', password ='password') ) " " " : type : flask. wrappers. response " " " self. assertequal ( rv. status _ code, 302, " login post with right pass does not return 302 " ) self. asserttrue ( rv. location. ends... | [
0.057417768985033035,
-0.4328885078430176,
0.7631921172142029,
0.7571228742599487,
0.48816370964050293,
1.4186261892318726,
0.13226686418056488,
-0.30165261030197144,
0.7239416241645813,
-0.7967961430549622,
-0.04326601326465607,
0.20451560616493225,
-0.03865641728043556,
0.210729315876960... |
def get _ daemonset _ node _ name ( v1 _ pods ) : for i in v1 _ pods : if i. metadata. name = = socket. gethostname ( ) : return i. spec. node _ name | [
-1.2017803192138672,
-0.21925702691078186,
0.42134881019592285,
-0.15745006501674652,
-0.2258874475955963,
-0.41447052359580994,
-0.41659727692604065,
-0.8003156781196594,
-0.8287979364395142,
1.4879299402236938,
0.878963053226471,
0.7742947936058044,
0.3908447027206421,
-0.647756338119506... |
def billing _ state _ name ( self ) : return self. _ billing _ state _ name | [
0.06660392135381699,
0.10943977534770966,
0.5622562170028687,
0.21752385795116425,
-1.0904467105865479,
1.1830391883850098,
0.10160055011510849,
0.08150135725736618,
0.5597173571586609,
-0.06863045692443848,
0.07482380419969559,
-0.24005533754825592,
0.465451180934906,
0.565666913986206,
... |
def _ _ str _ _ ( self ) : return str ( self. _ items ) | [
-0.8260732889175415,
-1.6079521179199219,
0.2833574116230011,
-1.5889869928359985,
-0.015863999724388123,
0.7325749397277832,
-0.6238368153572083,
-0.48405346274375916,
-0.21403607726097107,
-0.17144085466861725,
0.16463534533977509,
0.4411095082759857,
0.32020118832588196,
-0.481125056743... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.