text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, temboo _ session ) : super ( addrow, self ). _ _ init _ _ ( temboo _ session,'/ library / microsoft / powerbi / addrow') | [
0.5192080736160278,
0.3547435700893402,
0.5890297889709473,
0.8731204867362976,
0.894984245300293,
-0.058136168867349625,
-0.09813500195741653,
0.25910165905952454,
-0.11607301980257034,
-0.6612574458122253,
0.6946206092834473,
-0.5870857834815979,
0.03056662157177925,
1.5753613710403442,
... |
def getmapfrommali ( seq1, seq2, gap _ char = " - " ) : xpos = 0 ypos = 0 map _ a2b = alignlib _ lite. py _ makealignatavector ( ) # build map between genomic sequences : for p in range ( len ( seq1 ) ) : if seq1 [ p ]! = gap _ char and \ seq2 [ p ]! = gap _ char and \ seq1 [ p ] in string. uppercase and \ seq2 [ p ] i... | [
-0.578940749168396,
-1.9435087442398071,
0.8641453385353088,
-0.1909174621105194,
-1.2370010614395142,
0.7170676589012146,
-0.14613567292690277,
0.6620281934738159,
0.3138810992240906,
0.3804740011692047,
0.6118915677070618,
0.5644152760505676,
0.08658728748559952,
-0.2923438847064972,
0... |
def predict _ fn ( input _ data, model ) : device = torch. device ( " cuda " if torch. cuda. is _ available ( ) else " cpu " ) # process input _ data so that it is ready to be sent to our model # convert data to numpy array then to tensor data = torch. from _ numpy ( input _ data. astype ('float32') ) data = data. to (... | [
-0.25341561436653137,
-0.3234499394893646,
0.38315245509147644,
-0.06648191064596176,
-0.236466646194458,
-0.19113187491893768,
0.11171819269657135,
0.4720696210861206,
-0.8316102623939514,
-0.4738123416900635,
-0.05753379315137863,
0.3418884575366974,
-0.15877892076969147,
-0.616842329502... |
def characteristics ( self ) : # get params from class j = self. j t = self. t x _ jt = self. x _ jt # initialize jt = list ( itertools. product ( range ( 1, j + 1 ), range ( 1, t + 1 ) ) ) data = pd. dataframe ( index = jt, columns = ['x _ jt'], dtype ='float64'). fillna ( 0 ) # generate x _ jt x _ mean = x _ jt [ 1 ]... | [
-1.239328145980835,
0.25273004174232483,
0.5292461514472961,
-0.1421731412410736,
-0.682332456111908,
0.6127492785453796,
0.7530664801597595,
0.2686063349246979,
-0.35136228799819946,
0.3665315508842468,
-0.06339311599731445,
0.8177940249443054,
0.12691237032413483,
-0.49900394678115845,
... |
def swap _ type ( t, left, right, boat ) : if len ( boat. contents ) = = 0 : return 0 if t = ='p': tt ='t'else : tt ='p'try : x = boat. contents. index ( t ) except valueerror : # no such creature left on boat return 0 if boat. side = = 0 : active _ list = left else : active _ list = right try : y = active _ list. inde... | [
-1.5040160417556763,
-0.5775964856147766,
0.702488362789154,
-1.1038930416107178,
0.5020679235458374,
0.2897709608078003,
-0.2752121388912201,
0.36597898602485657,
-0.618215799331665,
0.6886642575263977,
-0.25296950340270996,
-0.13466563820838928,
-0.3858630061149597,
0.24908111989498138,
... |
def test _ gf _ write _ feature _ footer _ blank _ line _ if _ no _ description _ and _ no _ rules ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. description = [ ] feature. rules = [ ] # when write _ feature _ footer ( feature ) # then stdout = capsys. readouterr... | [
0.4165184795856476,
0.37822070717811584,
0.2989382743835449,
0.6249698996543884,
1.4358187913894653,
0.5483536720275879,
-0.009608125314116478,
0.03597211837768555,
-0.8228785991668701,
-0.7391738891601562,
0.40138858556747437,
0.20829932391643524,
-0.20140744745731354,
1.6979814767837524,... |
def get _ new _ docs ( t _ id ) : for doc in get _ rows ( t _ id ) : coords = doc. get ( " coords " ) if not doc _ already _ exists ( { " coords " : coords } ) : acct _ num = find _ acct _ num ( coords ) if acct _ num : doc [ " assessoraccountnumber " ] = acct _ num yield doc | [
-0.1668749898672104,
-0.46123409271240234,
0.5237230658531189,
-0.457562655210495,
0.2126375138759613,
-0.13205012679100037,
0.573896050453186,
-0.8962386250495911,
0.622593343257904,
-0.3440125584602356,
0.4226197600364685,
-0.7431320548057556,
1.1793787479400635,
-0.21581274271011353,
... |
def trim _ table ( list _ of _ strings ) : # definitely not an efficient implementation. table = list _ of _ strings j = 0 while true : if j = = min ( len ( row ) for row in table ) : break if all ( row [ j - 1 : j + 1 ] = = " " for row in table ) : # check if col has 2 spaces table = [ row [ : j ] + row [ j + 1 : ] fo... | [
0.6543667912483215,
-0.15753616392612457,
0.7566191554069519,
0.37000545859336853,
-0.17311716079711914,
-0.44970184564590454,
0.47388651967048645,
-0.024997528642416,
0.1054241806268692,
0.8055830001831055,
-0.3590523898601532,
0.08567390590906143,
-0.27642080187797546,
0.3537185788154602... |
def componentfactory ( factory _ name ) : def class _ builder ( original _ class ) : # print ('componentfactory call { } '. format ( _ ipopo _ explorer ) ) new _ class = original _ class name = get _ name ( new _ class ) # create fields in component info _ component _ info [ name ] ['factory'] = factory _ name # rebind... | [
-0.7223989367485046,
-1.384236454963684,
0.6587132215499878,
-0.38135460019111633,
-0.5444952845573425,
0.12354107201099396,
0.2836504876613617,
0.36922159790992737,
0.853814959526062,
-0.6938835978507996,
-0.005004667676985264,
-0.47243160009384155,
0.9595875144004822,
-0.3510654270648956... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, account _ name : optional [ pulumi. input [ str ] ] = none, expiration _ date : optional [ pulumi. input [ str ] ] = none, invitation _ id : optional [ pulumi. input [ str ] ] = none, resource _ group _ name : op... | [
0.6319252252578735,
0.1993609517812729,
0.6025101542472839,
-0.230442076921463,
0.08838926255702972,
-0.6137441396713257,
-0.4326365888118744,
0.30878138542175293,
0.7911787629127502,
0.46456706523895264,
0.12053000926971436,
0.7132935523986816,
0.1651732474565506,
-1.1117501258850098,
-... |
def extract _ resources ( e : operation ) : url, base _ path = pathutils. remove _ non _ informative _ segments ( e. url, e. base _ path ) segments = pathutils. extract _ segments ( url ) skip = false ret = [ ] for i in reversed ( range ( 0, len ( segments ) ) ) : if skip : skip = false continue current, previous = seg... | [
-0.665519118309021,
-0.3036612570285797,
0.7904985547065735,
0.002989033004269004,
0.799853503704071,
-0.6317923069000244,
0.42738765478134155,
0.4976969063282013,
0.02364126220345497,
0.8385280966758728,
-0.006473752204328775,
-0.7953689694404602,
-0.1104215756058693,
0.1500626653432846,
... |
def activatecontext ( self, datapath, isdirectory ) : conn = boto. connect _ s3 ( ) parsed = _ botos3client. parses3query ( datapath ) bucketname = parsed [ 0 ] keyname = parsed [ 1 ] if isdirectory and ( not keyname. endswith ( " / " ) ) : keyname + = " / " bucket = conn. get _ bucket ( bucketname ) self. _ conn = con... | [
-0.5397709608078003,
-0.6792027950286865,
0.4191093146800995,
0.06719141453504562,
-0.020143769681453705,
-0.283824622631073,
0.07047538459300995,
0.7355800867080688,
0.5794147849082947,
-0.05317443609237671,
-0.3993934094905853,
0.9190949201583862,
-0.04379460588097572,
-1.324379563331604... |
def get _ entry ( self, name, field = none ) : self. log. debug ( " retrieving entry in field'{ }'for name'{ }'". format ( field, name ) ) if self. name _ view. get ( name, none ) is none : self. log. warn ( " no field'{ }'for name'{ }'". format ( field, name ) ) return none if field : return self. db. get ( self. name... | [
-0.06386422365903854,
0.22817178070545197,
0.39743295311927795,
-0.49173256754875183,
-0.07840798050165176,
-0.3205949664115906,
-0.4776168465614319,
-0.6129176020622253,
-0.13295845687389374,
-0.12856034934520721,
0.420448362827301,
0.3186827600002289,
-0.7233225703239441,
0.6990926861763... |
def uniqueindicatornames ( ) : return jsonify ( list ( indicators. values ( ) ) ), 200 | [
-1.9632670879364014,
-0.9258227944374084,
0.13867975771427155,
-0.6381217241287231,
-0.2582991421222687,
0.01442614197731018,
-0.5373654961585999,
-0.018141916021704674,
0.8842786550521851,
0.8170661926269531,
-1.2623212337493896,
-0.253520131111145,
0.13901789486408234,
-0.306147783994674... |
def setstartindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ setstartindex ( self, * args ) | [
-0.927975594997406,
-0.9021755456924438,
0.3960479199886322,
0.2079453319311142,
0.18625833094120026,
0.6916394829750061,
0.42552298307418823,
0.11528772115707397,
-0.18165047466754913,
0.15060466527938843,
-1.6772871017456055,
1.3660805225372314,
-1.0634479522705078,
-0.5947389602661133,
... |
def ensure _ windows _ docker _ compose _ file _ exists ( path ) : import yaml windows _ path = os. path. join ( path, windows _ docker _ compose _ filename ) if os. path. isfile ( windows _ path ) : return unix _ path = os. path. join ( path, unix _ docker _ compose _ filename ) if not os. path. isfile ( unix _ path )... | [
0.293978214263916,
-1.4009277820587158,
1.0473461151123047,
-0.19391445815563202,
0.5641111135482788,
0.26388290524482727,
0.9863004684448242,
0.5926300287246704,
-0.29002296924591064,
0.4031461179256439,
-0.4669792950153351,
-0.5156517624855042,
0.7130858898162842,
0.7472950220108032,
0... |
def sockets ( self ) : log. debug ( " executing volatility sockets plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " sockets " ] ( self. config ) for sock _ obj in command. calculate ( ) : new = { " offset " : hex ( int ( sock _ obj. obj _ offset ) ), " loc... | [
-0.47202691435813904,
-0.595775842666626,
0.6518134474754333,
-1.1737555265426636,
0.20704945921897888,
-0.6484854221343994,
-0.13350220024585724,
-0.23733684420585632,
0.3543715476989746,
0.5594576597213745,
-0.7188011407852173,
0.7964420914649963,
-0.39924341440200806,
0.4862535893917084... |
async def voices ( self ) - > voicesiterable : for voice in self. larynx _ voices. values ( ) : model _ path = self. models _ dir / voice. locale / voice. id if model _ path. exists ( ) : yield voice | [
0.34880396723747253,
-0.860584020614624,
0.42324796319007874,
0.48622891306877136,
1.0754908323287964,
0.061597973108291626,
-1.6301684379577637,
-0.42611879110336304,
-0.8542542457580566,
0.383309930562973,
0.5191510915756226,
0.183138906955719,
0.4254198968410492,
0.46077123284339905,
... |
def font _ size ( self ) : return self. document. get _ style ('font _ size') | [
0.2488146275281906,
0.38533732295036316,
0.3906034529209137,
0.41387641429901123,
-0.3861684501171112,
-0.3547053933143616,
0.7499225735664368,
0.14703068137168884,
0.500828206539154,
-0.6390484571456909,
0.019774461165070534,
0.08121265470981598,
-0.3027549386024475,
-0.2967063784599304,
... |
def handler _ print _ debug _ user _ map ( update : update, context : callbackcontext ) : debug _ message = " users : \ n " for user in user _ map : us = user _ map [ user ] count = update. message. message _ id - us. get _ id _ last _ message _ stickered ( ) probability = 1 - ( 500 / ( count + 400 ) ) # if ( us. get _... | [
-0.11239346861839294,
-0.943140983581543,
0.8323202133178711,
-0.15519952774047852,
-0.3346441984176636,
0.5628761649131775,
0.29764047265052795,
-0.6439499855041504,
0.17825569212436676,
0.11559254676103592,
0.2593930661678314,
0.5113288760185242,
-1.1136201620101929,
0.6639867424964905,
... |
def test _ get _ vcs _ root _ entry ( self ) : pass | [
1.0592784881591797,
-0.3355060815811157,
0.1537596732378006,
1.4128191471099854,
0.689533531665802,
-0.10153481364250183,
1.0039448738098145,
-0.6173880100250244,
0.46571028232574463,
-0.5169566869735718,
-0.04549603909254074,
1.0084702968597412,
-1.254895567893982,
-0.0972476601600647,
... |
def openweightsfile ( wt _ file, type _ str ) : fp = openfile ( wt _ file, type _ str ) line = ensure _ string ( fp. readline ( ) ) field = line. split ( ) if not util. isfloat ( field [ 0 ] ) : err _ msg ( weight _ str + wt _ file ) fp. seek ( 0, 0 ) return fp | [
0.9395927786827087,
-0.763887882232666,
0.4990878701210022,
-0.5847575068473816,
-0.019045855849981308,
1.0865389108657837,
0.6016746759414673,
-0.3432905375957489,
-0.9457730054855347,
0.2017383575439453,
1.0891362428665161,
0.22786858677864075,
-0.4182246923446655,
-0.4243142604827881,
... |
async def allow _ witness ( self, ctx, member : discord. member = none ) : if not member : return await ctx. send ( " * * inform a witness to allow! * * " ) user _ channel = await self. get _ case _ channel ( ctx. channel. id ) if user _ channel : confirm = await confirmskill ( f " * * are you sure you want to allow { ... | [
0.7024633884429932,
0.17128068208694458,
0.8703129887580872,
0.2710117697715759,
-0.17961366474628448,
0.20881716907024384,
0.4527313709259033,
-0.2482846975326538,
0.1324152946472168,
0.17010317742824554,
0.7292107343673706,
1.4820549488067627,
-1.2034257650375366,
0.48521578311920166,
... |
def myinfoupdated ( self, view ) : raise notimplementederror | [
-0.4345729351043701,
-1.599636435508728,
0.5096513628959656,
0.18494264781475067,
-0.8885210156440735,
0.4297296404838562,
0.11799376457929611,
-0.191696897149086,
-0.07853670418262482,
-0.658568799495697,
-0.6818649172782898,
-0.06986185908317566,
0.5490822792053223,
-0.13524574041366577,... |
def merge _ overlapping _ elements ( elements, unique _ elements, syllable _ start _ times, syllable _ end _ times, overlapping _ element _ merge _ thresh, ) : # sort syllables by length sort _ mask = np. argsort ( syllable _ end _ times - syllable _ start _ times ) syllable _ end _ times = syllable _ end _ times [ sor... | [
-0.1404658854007721,
0.3694436848163605,
0.8036842346191406,
0.008080033585429192,
-0.38066843152046204,
0.22115130722522736,
0.6320188045501709,
0.88221675157547,
0.6934633851051331,
0.4705556631088257,
-0.6924239993095398,
-0.00991428829729557,
0.24901145696640015,
0.12275926023721695,
... |
def category ( self, category ) : self. _ category = category | [
-0.4612368941307068,
0.2752905488014221,
-0.19870994985103607,
0.2733752131462097,
0.14491894841194153,
0.6601898074150085,
0.4979337155818939,
0.7814051508903503,
-0.281612366437912,
-0.846106231212616,
-0.07568253576755524,
0.13895247876644135,
0.54072105884552,
0.9765610098838806,
-0.... |
def getinput ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ getinput ( self, * args ) | [
-0.469375342130661,
0.10473035275936127,
0.5152036547660828,
0.185954749584198,
0.27020716667175293,
0.25060197710990906,
0.21150170266628265,
-0.47962790727615356,
-0.1802348643541336,
0.07120884209871292,
0.10612199455499649,
0.381076455116272,
-1.570849061012268,
-0.5508883595466614,
... |
def test _ sample _ exception ( self ) : log. info ( " = = = = = = = = start integ test sample exception family = = = = = = = = = = " ) self. clear _ async _ data ( ) self. create _ sample _ data _ set _ dir ('rec _ excess. dat ', dir _ rec, file _ rec1 ) self. driver. start _ sampling ( ) # an event catches the sample... | [
0.852734386920929,
-0.059501420706510544,
0.6415066123008728,
-0.28613951802253723,
0.06936997175216675,
0.03559143841266632,
0.6984361410140991,
0.2784310579299927,
0.13495363295078278,
-0.44638803601264954,
-0.497715562582016,
0.11644313484430313,
-0.5271053910255432,
0.09275679290294647... |
def _ _ init _ _ ( self, store _ filename, * * kwargs ) : super ( modifiedhamiltonianexchange, self ). _ _ init _ _ ( store _ filename, * * kwargs ) self. _ fully _ interacting _ expanded _ context = none self. fully _ interacting _ expanded _ state = none self. _ noninteracting _ expanded _ context = none self. nonint... | [
0.31172236800193787,
-0.07260160893201828,
0.47456344962120056,
0.2570575177669525,
-0.154231458902359,
0.17456312477588654,
0.5520232915878296,
0.8230170607566833,
0.727601170539856,
-0.34549593925476074,
-0.5474762916564941,
-0.6605737805366516,
-0.6097581386566162,
0.32906559109687805,
... |
async def _ _ call _ _ ( self, _ _ task : t ) - > r : result : " asyncio. future [ r ] " = asyncio. get _ event _ loop ( ). create _ future ( ) # queue item first so that the dispatch task does not finish before self. _ queue. put _ nowait ( ( _ _ task, result ) ) # ensure there is a worker to dispatch items for comman... | [
-0.06955230236053467,
0.763102650642395,
0.8085858821868896,
0.01531574223190546,
0.7130454182624817,
-0.8434270024299622,
-0.6494201421737671,
-0.03959721326828003,
-0.03952871263027191,
-0.32906898856163025,
-0.9126904606819153,
-0.42036110162734985,
0.8424243330955505,
0.230346888303756... |
def getnoise _ mlm ( self, init _ batch, init _ batch _ len, mode = " pll " ) : with torch. no _ grad ( ) : if mode = = " pll " : # mask each token and obtain its pll for sampling noise = init _ batch. new _ zeros ( init _ batch. shape ) noise [ :, 0 ] = init _ batch [ :, 0 ] noise [ :, - 1 ] = init _ batch [ :, - 1 ] ... | [
0.28210315108299255,
-1.1663613319396973,
0.9025728702545166,
0.4217435419559479,
0.13719472289085388,
-0.12504804134368896,
-0.4968521296977997,
-0.08057921379804611,
0.08228516578674316,
0.6733351945877075,
-0.821816623210907,
0.7634722590446472,
0.22398237884044647,
-0.3800703287124634,... |
def save _ pars ( filename, modcomps = [ ], clobber = false ) : if not isinstance ( filename, basestring ) : raise typeerror ( " filename'% s'is not a string " % str ( filename ) ) clobber = bool ( clobber ) if os. path. isfile ( filename ) and not clobber : raise valueerror ( " file'% s'exists and clobber is not set "... | [
-1.2312047481536865,
-0.7547121644020081,
0.9488319754600525,
-0.6609556078910828,
-0.308523565530777,
0.6287258863449097,
-0.03937804698944092,
-0.5641946792602539,
-0.8655494451522827,
0.9081221222877502,
-0.9762553572654724,
-0.6576640605926514,
-0.20687907934188843,
0.48653823137283325... |
def tail ( self ) : return self. _ dll. tail | [
0.32135969400405884,
-0.5554094910621643,
0.6179805397987366,
-0.5755330324172974,
0.4169953465461731,
1.2082570791244507,
0.32534143328666687,
-1.6737254858016968,
-0.013978400267660618,
-0.6611482501029968,
-0.265924334526062,
1.0624974966049194,
-1.003969430923462,
-0.47678038477897644,... |
def display _ clusters ( self ) : plt. figure ( ) data1 = np. array ( [ self. data [ n ] for n in np. arange ( self. n ) if self. partition [ n ] = = 0 ] ) data2 = np. array ( [ self. data [ n ] for n in np. arange ( self. n ) if self. partition [ n ] = = 1 ] ) plt. scatter ( data1 [ :, 0 ], data1 [ :, 1 ], c ='y') plt... | [
0.23773109912872314,
0.26698538661003113,
0.7185831069946289,
-0.5438452363014221,
-0.25099989771842957,
0.5608945488929749,
0.6066144108772278,
0.007876748219132423,
0.05246177315711975,
-0.1785544902086258,
1.2447234392166138,
1.7253458499908447,
-0.04350283741950989,
-0.2941805124282837... |
def data ( self, k, s, y ) : self. d [ k ]. data ( s = s, y = y, calc _ post = true ) # initialize | [
-0.06689474731683731,
0.42127326130867004,
0.31452256441116333,
-0.06386564671993256,
-0.22953610122203827,
0.2278118133544922,
-0.5657604932785034,
0.3152923583984375,
-0.2807847559452057,
-0.5432740449905396,
-0.9256685972213745,
0.45506730675697327,
1.3432952165603638,
0.314334392547607... |
def duration ( self ) : return ( self. end - self. start ). seconds / float ( 60 * 60 ) | [
0.5515777468681335,
-0.3765278160572052,
0.48655104637145996,
0.02055964432656765,
-0.16439907252788544,
0.824191153049469,
0.11728347837924957,
-0.45410406589508057,
-0.597050130367279,
0.5294980406761169,
-0.24070432782173157,
0.019095392897725105,
-0.0572066605091095,
-0.007852056063711... |
def stats ( self, debug : bool = false ) - > dict : data = { " added _ count " : self. _ num _ timesteps _ added, " added _ count _ wrapped " : self. _ num _ timesteps _ added _ wrap, " eviction _ started " : self. _ eviction _ started, " sampled _ count " : self. _ num _ timesteps _ sampled, " est _ size _ bytes " : s... | [
-0.36557015776634216,
0.6077449321746826,
0.43457403779029846,
-0.4206063151359558,
0.30746424198150635,
0.18823780119419098,
-0.2975357472896576,
-0.7030677199363708,
-0.20153231918811798,
0.24902021884918213,
-0.34288567304611206,
0.04921480640769005,
0.2995932102203369,
0.58650898933410... |
def from _ service _ account _ file ( cls, filename : str, * args, * * kwargs ) : return smartdevicemanagementserviceclient. from _ service _ account _ file. _ _ func _ _ ( smartdevicemanagementserviceasyncclient, filename, * args, * * kwargs ) # type : ignore | [
0.31225109100341797,
-0.34821176528930664,
0.36158180236816406,
0.1121644526720047,
-0.7355039119720459,
-0.5569227337837219,
1.1742764711380005,
-0.10461383312940598,
-0.19792337715625763,
-0.8377962112426758,
0.5164340138435364,
0.7131851315498352,
0.3388911485671997,
-0.0251780003309249... |
def testupdatevaluesforquerieswithintvalue ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / bar': 42 } } valuesapi = securetagvalueapi ( self. ... | [
-0.39125171303749084,
0.09905481338500977,
0.40405890345573425,
-0.29817822575569153,
0.07061285525560379,
0.23202663660049438,
-0.08910482376813889,
-0.6102043986320496,
-0.23337095975875854,
-0.26959937810897827,
-0.5562854409217834,
-0.4066223204135895,
-0.1344221979379654,
-0.010695517... |
def lines _ to _ relationships ( lines ) : for line in lines : line = line. split ( ) if line : dependent = line [ 0 ] for dependency in line : yield dependent, dependency | [
-0.024188177660107613,
-1.3744542598724365,
0.6629029512405396,
-0.6324692368507385,
0.008947810158133507,
0.34021544456481934,
-0.3295566439628601,
0.12413489818572998,
-0.1185542568564415,
-0.3078823685646057,
0.6158462762832642,
-0.6840375661849976,
0.13688620924949646,
0.06500109285116... |
def getaction ( self, state ) : # pick action legalactions = self. getlegalactions ( state ) action = none " * * * your code here * * * " s1 = self. computeactionfromqvalues ( state ) s2 = random. choice ( self. getlegalactions ( state ) ) s = util. flipcoin ( self. epsilon ) if state! ='terminal _ state': # not termin... | [
0.021700406447052956,
-0.7825328707695007,
0.6060360074043274,
-0.054536256939172745,
0.23341584205627441,
0.38096028566360474,
0.290709525346756,
-0.4329260289669037,
1.0338225364685059,
0.13244518637657166,
-0.1184966191649437,
0.826750636100769,
0.32437342405319214,
-0.18905194103717804... |
def test _ add _ trigger ( self ) : pass | [
0.24281007051467896,
0.8596293926239014,
0.282747358083725,
1.2133361101150513,
0.8528335094451904,
0.1510491669178009,
0.2076227068901062,
0.3956564664840698,
0.26353999972343445,
-1.9840412139892578,
-1.2808971405029297,
-0.4668930768966675,
-1.0518234968185425,
0.10033547878265381,
-0... |
def created ( self ) : return self. _ created | [
0.5144539475440979,
-0.7184832096099854,
0.1883491575717926,
0.2382466197013855,
1.1517448425292969,
0.9621126055717468,
0.28305771946907043,
-0.29127034544944763,
-0.2765543758869171,
-1.536549687385559,
-0.657193124294281,
0.20284956693649292,
0.7731008529663086,
-0.29986336827278137,
... |
def generate _ edge _ esn ( self ) : import random esn = ['nfcdie - 02 -'] possible ='abcdefghijklmnopqrstuvwxyz0123456789'for _ in range ( 0, 30 ) : esn. append ( random. choice ( possible ) ) edge _ esn =''. join ( esn ) self. addon. setsetting ('edge _ esn ', edge _ esn ) return edge _ esn | [
-0.8140936493873596,
0.08062277734279633,
0.6217188239097595,
-0.36931854486465454,
0.6655898690223694,
0.6820173859596252,
-0.9267662763595581,
0.5381610989570618,
1.3261045217514038,
0.4491814374923706,
-0.7506167888641357,
0.0774616226553917,
0.10633140057325363,
0.020486582070589066,
... |
def _ isrightcolorbgr ( pixelcolor, color ) : b, g, r = pixelcolor cb, cg, cr = color return b > = cb - treshold and b < cb + treshold \ and g > = cg - treshold and g < cg + treshold \ and r > = cr - treshold and r < cr + treshold | [
0.6608424782752991,
-0.03996814042329788,
0.9500741958618164,
0.396196186542511,
-0.23771235346794128,
0.5519295930862427,
-0.3129536807537079,
-1.1639786958694458,
-0.5269842743873596,
-0.04470869153738022,
0.5009373426437378,
0.6905152797698975,
-1.3191722631454468,
0.47429633140563965,
... |
def select _ only _ discharge _ notes ( data ) : for d in data : if'notes'in d : new _ notes = [ ] for note in d ['notes'] : if'discharge'in note ['note _ type']. lower ( ) : new _ notes. append ( note ) d ['notes'] = new _ notes return data | [
0.3406220078468323,
-0.3817230463027954,
0.4466935694217682,
-0.6467275023460388,
0.9226562976837158,
0.10478857159614563,
-0.37399470806121826,
-0.24120591580867767,
0.49169063568115234,
0.9405154585838318,
0.3545801043510437,
0.5385679602622986,
-0.29386255145072937,
0.6558527946472168,
... |
def testcatalogdistancemodulus ( self ) : address ='sqlite : / / /'+ self. dbname dbobj = mytestgals ( address = address ) cosmocat = cosmologicalgalaxycatalog ( dbobj ) controlcat = absolutegalaxycatalog ( dbobj ) cosmoiter = cosmocat. iter _ catalog ( chunk _ size = self. dbsize ) controliter = controlcat. iter _ cat... | [
-0.45750272274017334,
-0.2715778350830078,
0.599341630935669,
-0.45453590154647827,
0.4611503481864929,
1.1023552417755127,
-0.0010663714492693543,
0.09033133834600449,
0.0017128342296928167,
-0.28536728024482727,
-0.07797804474830627,
0.11281171441078186,
0.17062924802303314,
0.2426773607... |
def nlp _ from _ text ( self, text, display = true, debug = false ) : payload = self. get _ doc _ payload ( text ) result = self. post ( payload, self. nlp _ syntax _ endpoint ) tokens = result. get ('tokens ', [ ] ) if display : self. display _ nlp _ tokens ( tokens ) if debug : print ( " " ) print ( " nlp fields : " ... | [
0.46872401237487793,
-0.028296111151576042,
0.44257786870002747,
-0.0878574401140213,
-1.1393072605133057,
0.23594561219215393,
-1.1060340404510498,
-0.6523422002792358,
0.4760538637638092,
0.3798770308494568,
-0.5193256735801697,
0.028772132471203804,
-1.149024248123169,
0.454822480678558... |
def test _ category _ exists ( self ) : response = self. app. post ('/ api / v1 / category ', data = json. dumps ( self. data1 ), content _ type ='application / json') result = json. loads ( response. data. decode ( ) ) self. assertequal ( result [ " message " ], " please enter a unique category name, category name alr... | [
-0.6442550420761108,
0.33213862776756287,
0.40107861161231995,
-0.4106387794017792,
1.0978540182113647,
0.3021804392337799,
-0.03999633714556694,
-0.052916932851076126,
-0.3107605278491974,
-0.8436174392700195,
-0.868311882019043,
0.47478652000427246,
0.3234449625015259,
0.3142902553081512... |
def scheduled _ status _ delete ( self, id : union [ status, idtype ] ) : id = self. _ _ unpack _ id ( id ) self. _ _ api _ request ('delete ', f'/ api / v1 / scheduled _ statuses / { id }') | [
-0.3169025182723999,
-0.7188400030136108,
0.02315434068441391,
0.606083333492279,
-0.26004135608673096,
-0.23671355843544006,
-0.7265995740890503,
0.7410145401954651,
0.9957190752029419,
-0.47215428948402405,
-0.9791399240493774,
0.7787438035011292,
-0.027074413374066353,
-0.25618427991867... |
def square _ sum ( a, b ) : a = a * * 2 b = b * * 2 return a + b | [
-0.22516584396362305,
-1.0515398979187012,
0.7095140218734741,
0.0674329325556755,
0.5986441373825073,
-0.6114112138748169,
-0.47777271270751953,
-1.1967289447784424,
0.49694252014160156,
0.19022512435913086,
-0.7821956872940063,
1.5172209739685059,
0.38179636001586914,
-0.9690037965774536... |
def test _ addcircuit _ op _ error ( self ) : add = elementary. addcircuit ( ) circuit = cirq. circuit ( cirq. x ( cirq. gridqubit ( 0, 0 ) ) ) with self. assertraisesregex ( tf. errors. invalidargumenterror, expected _ regex = " matching sizes " ) : # append is wrong shape. add ( circuit, append = [ circuit, circuit ]... | [
-0.21935005486011505,
0.2958720624446869,
0.6464353799819946,
-0.7615623474121094,
0.3777651786804199,
0.3940039575099945,
0.4995201826095581,
0.10621209442615509,
0.0881471112370491,
-0.006702915299683809,
0.008865720592439175,
0.43132519721984863,
-0.438104510307312,
0.3588087260723114,
... |
def compute ( cls, real _ data, synthetic _ data, metadata = none, key _ fields = none, sensitive _ fields = none, model _ kwargs = none, loss _ function = none, loss _ function _ kwargs = none ) : key _ fields, sensitive _ fields, metadata = ( cls. _ validate _ inputs ( real _ data, synthetic _ data, metadata, key _ f... | [
-0.2743109464645386,
0.28817319869995117,
0.9648875594139099,
0.2718580365180969,
0.21654058992862701,
-0.16872340440750122,
-0.163479283452034,
0.2977801561355591,
-1.1556856632232666,
0.887340247631073,
-0.6564010381698608,
0.4718223214149475,
0.6083970069885254,
-0.2293476015329361,
0... |
def end _ frame ( self ) : return hou. playbar. framerange ( ) [ 1 ] | [
-0.6410560607910156,
0.24922136962413788,
0.5259842276573181,
1.038173794746399,
0.4788673520088196,
0.2378200888633728,
0.6528351902961731,
-0.532674252986908,
-0.2457682341337204,
-0.3608929514884949,
0.08386702835559845,
0.16369469463825226,
-1.5239695310592651,
0.48715677857398987,
0... |
async def choose _ coin ( self, amt ) - > coinwrapper : start _ balance = self. balance ( ) coins _ to _ spend = self. compute _ combine _ action ( amt, [ ], dict ( self. usable _ coins ) ) # couldn't find a working combination. if coins _ to _ spend is none : return none if len ( coins _ to _ spend ) = = 1 : return co... | [
-0.3048793375492096,
0.3084355890750885,
0.4485677480697632,
0.2767561972141266,
0.43993186950683594,
-0.7812068462371826,
0.4855824112892151,
-0.91489577293396,
0.23109787702560425,
0.32007870078086853,
-0.012271564453840256,
0.6275699138641357,
0.22643668949604034,
-0.5114577412605286,
... |
def set _ selector ( self, selector, * args, * * kwargs ) : self. selector = tree _ node _ selector _ registry. find ( selector, * args, * * kwargs ) | [
-0.6956498622894287,
0.17622078955173492,
0.2023293524980545,
-0.42344486713409424,
1.3176231384277344,
-0.7761889696121216,
-0.335872620344162,
-0.21896108984947205,
-0.5031412243843079,
-0.11462701857089996,
-0.5260050892829895,
1.255667805671692,
-0.23379729688167572,
0.3307245969772339... |
def _ _ init _ _ ( self, host ='127. 0. 0. 1 ', port = 27017 ) : self. host = host self. port = port self. connection = none | [
0.3588985204696655,
-0.5982935428619385,
0.6220152378082275,
-0.36294853687286377,
-0.10560876131057739,
-0.236366406083107,
-0.8824791312217712,
0.4379187822341919,
-1.2593241930007935,
-0.32618415355682373,
-0.39838773012161255,
0.31037023663520813,
-0.7152114510536194,
0.088218964636325... |
def _ insert ( self, curs ) : curs. execute ( " insert into mailbox ( id, name, account _ id ) values ( null,?,? ) ", ( self. name, self. account. id ) ) self. id = curs. lastrowid if self. flags is none : return self for flag in self. flags : curs. execute ( " " " insert into mailbox _ flag ( mailbox _ id, key, value ... | [
0.056447774171829224,
0.6938191056251526,
0.4830525815486908,
-0.4606522023677826,
0.28083112835884094,
0.16450949013233185,
0.13302133977413177,
-0.005462801083922386,
0.28419381380081177,
-0.4988131821155548,
-0.18359437584877014,
-0.3780643343925476,
-1.5679383277893066,
0.1238675415515... |
def merge _ interval ( intervals ) : length = len ( intervals ) if not length : return [ ] result = [ ] # sort the intervals based on the start time intervals. sort ( key = lambda x : x. start ) start, end = intervals [ 0 ]. start, intervals [ 0 ]. end for i in range ( 1, length ) : s = intervals [ i ]. start e = inter... | [
-0.9344761967658997,
-0.2129630744457245,
0.8242291212081909,
1.016945242881775,
0.14674516022205353,
1.0526074171066284,
-0.7516209483146667,
-0.39780211448669434,
0.4234955906867981,
0.11186210811138153,
-0.5666555762290955,
-0.5199866890907288,
-1.326751947402954,
-0.34349048137664795,
... |
def mar _ exp _ linear _ y _ set ( self, x, y, s ) : # s doesn't take str ( y ) x _ in = x. copy ( ) [ : self. d ] s _ bar = [ i for i in self. index if i not in s ] cond _ dist _ param = marmvn ( self. mean [ y ], self. cov [ y ], s _ bar, s, x _ in [ s ] ) mu _ bar = cond _ dist _ param [ 0 ] if len ( s )! = self. d ... | [
0.587166428565979,
-0.6294268369674683,
0.4191625714302063,
-0.7117780447006226,
-0.8987482786178589,
-0.2724080979824066,
0.1582106053829193,
0.4325487017631531,
0.7099129557609558,
-0.15939466655254364,
-0.33738788962364197,
1.3180677890777588,
-0.5740948915481567,
-0.83562171459198,
-... |
def getinput ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterif3if2 _ getinput ( self, * args ) | [
0.22474846243858337,
0.9631617069244385,
0.49206507205963135,
0.44383448362350464,
0.3453159034252167,
0.37326303124427795,
0.5322754383087158,
-0.3900505006313324,
-0.3844928741455078,
0.2009315937757492,
0.07582797855138779,
0.20904886722564697,
-0.9915925860404968,
-0.4339469075202942,
... |
def _ _ init _ _ ( self, algorithm : str, key : bytearray ) - > none : if algorithm not in ('magma ','kuznechik') : key = zero _ fill ( key ) raise gostciphererror ('unsupported cipher algorithm') if not check _ value ( key, _ key _ size ) : key = zero _ fill ( key ) raise gostciphererror ('invalid key value') if algor... | [
-0.09099405258893967,
0.2787725627422333,
0.3918883204460144,
-0.22603799402713776,
-0.7058079242706299,
0.13525280356407166,
0.20945966243743896,
-0.3232119381427765,
0.22519172728061676,
0.9708665013313293,
-0.3938513696193695,
0.7096254229545593,
-0.06252189725637436,
0.9764997959136963... |
def area ( self ) : return self. _ _ size * * 2 | [
-0.21086539328098297,
-0.7560749053955078,
0.400326132774353,
-0.05084773525595665,
-0.08520037680864334,
0.6013194918632507,
0.6685692071914673,
-0.20586737990379333,
0.6268900036811829,
-1.0211883783340454,
0.3757685720920563,
0.21245813369750977,
-0.2638740837574005,
0.9532212615013123,... |
def _ _ len _ _ ( self ) : return self. trees. size | [
0.16222815215587616,
-0.29529109597206116,
0.30882591009140015,
-1.4798240661621094,
0.8143784999847412,
-0.1898382604122162,
-0.0096504595130682,
0.520959198474884,
0.2294243574142456,
-0.41819387674331665,
-0.9031945466995239,
-0.3692486882209778,
0.17689600586891174,
0.16245976090431213... |
def _ reversemap _ vhosts ( names : iterable [ str ], vhosts : iterable [ virtualhost ] ) - > list [ virtualhost ] : return _ vhosts = [ ] for selection in names : for vhost in vhosts : if vhost. display _ repr ( ). strip ( ) = = selection. strip ( ) : return _ vhosts. append ( vhost ) return return _ vhosts | [
-0.5636721253395081,
-0.6711559891700745,
0.3602141737937927,
-0.032540541142225266,
-0.6075413823127747,
-0.04100549966096878,
-1.078119158744812,
0.06941742449998856,
0.02582572028040886,
1.431955337524414,
-0.17033545672893524,
0.8945024609565735,
-0.638601541519165,
-0.2124752551317215... |
def contextmenuevent ( self, event ) : menu = qtwidgets. qmenu ( self ) open _ node = menu. addaction ( " open node ( s ) " ) select _ node = menu. addaction ( " select node ( s ) " ) reset _ overrides = menu. addaction ( " reset settings " ) action = menu. exec _ ( self. maptoglobal ( event. pos ( ) ) ) if action = = ... | [
-0.7574517130851746,
0.18920879065990448,
0.7137249112129211,
0.6283255219459534,
0.5346227288246155,
-0.1708042472600937,
0.7794668674468994,
-0.3405136168003082,
0.7361486554145813,
0.3922693729400635,
-0.1231033205986023,
0.9185406565666199,
-0.006646706257015467,
-0.42749059200286865,
... |
def require _ scalar ( self, * args : type ) - > none : node = node ( self. yaml _ node ) if len ( args ) = = 0 : if not node. is _ scalar ( ) : raise recognitionerror ( ('{ } { } a scalar is required'). format ( self. yaml _ node. start _ mark, os. linesep ) ) else : for typ in args : if node. is _ scalar ( typ ) : re... | [
-0.30628353357315063,
0.04790424555540085,
0.6844317317008972,
-0.049252573400735855,
0.6695422530174255,
0.3594956696033478,
0.29454678297042847,
0.2725105881690979,
-1.0174038410186768,
-0.13964393734931946,
0.22015003859996796,
0.7836610078811646,
-0.6379114985466003,
1.8450191020965576... |
def postproc ( self ) : results = [ ('','none'), ('u ','[ displacement ]'), ('u0 ','x - displacement'), ('u1 ','y - displacement'), ('u2 ','z - displacement'), ('s0 ','x - normal stress'), ('s1 ','y - normal stress'), ('s2 ','z - normal stress'), ('s3 ','xy - shear stress'), ('s4 ','xz - shear stress'), ('s5 ','yz - sh... | [
-0.20671454071998596,
0.20309709012508392,
0.7082628607749939,
0.26337045431137085,
-0.1694597750902176,
0.5792801380157471,
1.0092064142227173,
-0.4223645329475403,
-0.5080764889717102,
-0.4727332592010498,
-0.3688916563987732,
-0.5111944079399109,
-0.737251341342926,
0.18765918910503387,... |
def get _ file _ name _ by _ hash ( self, hash _ ) : return self. _ hash _ to _ file _ path. get ( hash _ ) | [
0.4917619228363037,
-0.35411739349365234,
0.505272626876831,
0.597489058971405,
0.1442541629076004,
0.1720326989889145,
0.37573865056037903,
-0.08087927103042603,
-1.0118207931518555,
0.28650686144828796,
0.08558136224746704,
-0.34366247057914734,
0.8062371611595154,
0.23577868938446045,
... |
def rel _ trans _ 2 _ abs _ pl ( bounding _ boxes, t _ matrix ) : x, y, w, h = tf. split ( bounding _ boxes, 4, axis = 1 ) tx, ty = tf. split ( t _ matrix, 2, axis = 1 ) x _ center = x + ( tx + 1 ) * w / 2 y _ center = y + ( ty + 1 ) * h / 2 return tf. concat ( [ x _ center, y _ center ], axis = 1 ) | [
0.45229822397232056,
-0.9515625238418579,
0.759797990322113,
-0.44280239939689636,
-0.3233642578125,
-0.005125720053911209,
0.13430318236351013,
0.03826768696308136,
-0.3299550712108612,
1.1629211902618408,
0.10387250781059265,
-0.533259928226471,
0.6471823453903198,
-1.3295584917068481,
... |
def socket _ middleware ( self, middleware : t ) - > t : self. _ socket _ middlewares. append ( middleware ) return middleware | [
-0.6469203233718872,
0.5030858516693115,
0.526003360748291,
-0.275026798248291,
-1.0431923866271973,
0.6168515682220459,
-1.0829648971557617,
-0.8357005715370178,
1.170161247253418,
-0.6774380207061768,
-0.6556513905525208,
1.0870851278305054,
-1.084718108177185,
0.8912900686264038,
-1.2... |
def visit ( self, node : ast. whileloop ) : while _ label = self. define _ internal _ lname ( ) loop _ label = self. define _ internal _ lname ( ) pool _ label = self. define _ internal _ lname ( ) self. register _ instruction ( cil. cillabel, while _ label ) predicate _ vinfo = self. visit ( node. predicate ) self. re... | [
-0.8882420659065247,
0.5013642311096191,
0.8683232069015503,
-0.5396918058395386,
-0.14812156558036804,
0.535480797290802,
0.7292854189872742,
-0.19657288491725922,
-0.09434082359075546,
0.43067285418510437,
0.016945667564868927,
0.6585729122161865,
-0.14483104646205902,
0.849540650844574,... |
def test _ default _ language _ required _ for _ create ( self, mock _ sync ) : self. data. pop ('language') form = self. form _ class ( data = self. data, instance = none ) self. assertfalse ( form. is _ valid ( ) ) self. assertequal ( form. errors. keys ( ), ['language'] ) self. assertequal ( form. errors ['language'... | [
-0.34902042150497437,
0.790083646774292,
0.25247424840927124,
-0.671615719795227,
1.3626313209533691,
1.0605334043502808,
-0.550000786781311,
0.18809908628463745,
-0.8036922812461853,
-0.38269704580307007,
-1.4820733070373535,
-0.8723636269569397,
0.1091497391462326,
1.1106953620910645,
... |
def created _ time ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " created _ time " ) | [
0.9981042146682739,
0.03252546861767769,
0.3228085935115814,
0.32276982069015503,
1.674429178237915,
1.4325629472732544,
-0.32469308376312256,
-0.3615964353084564,
0.2960638105869293,
-0.14064450562000275,
-0.28357386589050293,
0.5827318429946899,
0.3865455090999603,
-0.760839581489563,
... |
def index ( request ) : return httpresponse ( ) | [
-0.1668182909488678,
-1.0572915077209473,
0.1462143212556839,
0.04249387979507446,
-0.43998983502388,
0.047980282455682755,
0.5150792598724365,
-0.258980929851532,
0.5419018268585205,
-0.6924339532852173,
-0.05564408004283905,
-0.40611255168914795,
-0.39349526166915894,
-0.8751807808876038... |
def sections _ enabled ( self, request, application _ instance, course ) - > bool : return bool ( self. sections _ type ) | [
0.039324380457401276,
-0.12104974687099457,
0.6078060269355774,
0.21472974121570587,
0.5220147371292114,
1.1702769994735718,
-0.2616804540157318,
-0.44636645913124084,
0.5007100701332092,
0.5030992031097412,
0.7345653772354126,
-0.852207362651825,
-0.2858738303184509,
0.9967216849327087,
... |
def generate ( env ) : static _ obj, shared _ obj = scons. tool. createobjbuilders ( env ) # get the basic c + + flags ( unix based stuff only?? ) cplusplus. generate ( env ) parts. tools. cc. generate ( env ) # set up shell env for running compiler parts. tools. gnucommon. clang. mergeshellenv ( env ) env ['cc'] = par... | [
0.2803468108177185,
-0.14807426929473877,
0.6818884015083313,
-0.1372174620628357,
0.07604474574327469,
0.9925051927566528,
0.5015343427658081,
0.13283826410770416,
-0.2614634037017822,
-0.5384561419487,
-1.237042784690857,
0.09513432532548904,
0.948428213596344,
1.0270084142684937,
0.72... |
def insert _ header _ comment ( line _ num ) : try : line _ num = int ( line _ num ) except exception as e : raise ioexception ( " you must give a line number " ) header _ type = _ check _ header _ type ( line _ num ) if header _ type is none : return false elif header _ type = = " func _ dec " : _ insert _ function _ ... | [
-0.3714544177055359,
0.022279417142271996,
1.1144381761550903,
0.07464028149843216,
0.7395055294036865,
0.07953333854675293,
0.7649630308151245,
-0.3848121762275696,
-0.541560173034668,
-0.13038942217826843,
-0.6844652891159058,
-0.1608540266752243,
-1.0933396816253662,
0.14461521804332733... |
def montepi ( numdarts ) : count = 0 for i in range ( numdarts ) : x = random ( ) y = random ( ) r = 1 if isincircle ( x, y, r ) : count + = 1 pi = ( count / numdarts ) * 4 return pi | [
-0.2644897401332855,
-0.07125826925039291,
0.4929112493991852,
-0.8978201150894165,
-0.883346676826477,
-0.35639992356300354,
0.2179190069437027,
-0.37238821387290955,
0.8932592272758484,
0.21243064105510712,
-0.11096537858247757,
-0.589240550994873,
-1.6601219177246094,
-0.252505719661712... |
def associate _ project _ with _ quality _ profile ( self, project, name, language ) : params = {'qualityprofile': name,'language': language,'project': project } self. sonarqube. _ make _ call ('post ', api _ qualityprofiles _ add _ project, * * params ) | [
-0.19704948365688324,
0.22263790667057037,
0.22163666784763336,
0.2323199063539505,
0.7967033386230469,
0.28113260865211487,
-0.4945047199726105,
-1.1229230165481567,
-0.12836270034313202,
0.3651066720485687,
-1.090437889099121,
0.007609015796333551,
-1.3925598859786987,
-0.173333927989006... |
def process _ invoices ( invoices, selling _ point ) : wsfev1 = _ get _ afip ( ) # init pdf builder fepdf = fepdf ( ) fepdf. cargarformato ( os. path. join ( settings. base _ dir, " templates ", " factura. csv " ) ) fepdf. fmtcantidad = " 0. 2 " fepdf. fmtprecio = " 0. 2 " fepdf. cuit = settings. afip ['cuit'] for k, v... | [
0.07976241409778595,
-0.5712756514549255,
0.6157413721084595,
0.3798026740550995,
0.2049107849597931,
-0.2585727870464325,
0.24247819185256958,
0.836708128452301,
-0.1771858036518097,
-0.49588221311569214,
0.9004567861557007,
0.21406348049640656,
0.25237324833869934,
-0.09866398572921753,
... |
def process _ text ( self, context ) : self. logger. debug ( " text detected " ) try : if " / " in context [ " text " ] : self. process _ command ( context ) else : self. process _ file _ format ( context ) except unsupportedformatexception : self. send _ message ( context, " wrong _ format " ) self. logger. error ( " ... | [
0.23810644447803497,
-0.6665090918540955,
0.6490992903709412,
0.5982376933097839,
0.5355450510978699,
-0.15530253946781158,
-0.27446460723876953,
-0.20907263457775116,
0.6024951338768005,
0.11845022439956665,
0.7210270762443542,
0.0795687884092331,
-0.23443147540092468,
0.9496720433235168,... |
def decode _ request _ body ( request ) : try : body _ type = request. headers [ " content - type " ] if body _ type = = " application / json " : body = json _ decode ( request. body ) else : body = request. body except ( typeerror ) : body = request. body return body | [
-1.1088846921920776,
-0.4420945942401886,
0.7927263975143433,
0.8713486194610596,
0.0690678134560585,
-0.19012026488780975,
-0.8917356133460999,
-1.1622941493988037,
0.9266561269760132,
-0.21604236960411072,
0.7450057864189148,
0.3283657431602478,
-0.7101572751998901,
0.5776342749595642,
... |
def get ( self, url, expected _ response = none, params = none, auth = none, * * kwargs ) : pnote ( " perform a http get ", " info " ) try : response = self. req. get ( url, params = params, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : s... | [
-0.7657940983772278,
-0.5894294381141663,
0.6417081356048584,
-0.08494701981544495,
0.9087488651275635,
0.1733715534210205,
-0.18459126353263855,
0.25031042098999023,
0.45102551579475403,
-0.23155371844768524,
0.2489703744649887,
0.4566441774368286,
-0.5114017724990845,
-0.3368701338768005... |
def load ( self, id ) : sql = " select * from % s where id = % s " % ( self. table, id ) self. conn. query ( sql ) result = conn. store _ result ( ) record = result. fetch _ row ( how = 1 ) for k, v in record [ 0 ]. iteritems ( ) : setattr ( self, k, v ) | [
-0.8248454928398132,
-0.04115016385912895,
0.4512535333633423,
-0.3407469093799591,
-0.7693493366241455,
-0.4152514636516571,
-0.788562536239624,
-0.22745682299137115,
-0.37849533557891846,
0.16132040321826935,
-0.6431772708892822,
-0.34274375438690186,
-0.134481281042099,
0.23446835577487... |
def test _ show _ new _ task _ user _ is _ creator ( self ) : task = taskfactory ( creator = self. user ) pk = task. pk response = self. client. get ( self. url ) self. assertcontains ( response,'href = " { 0 } " '. format ( reverse ( " tasks : update _ task ", kwargs = {'pk': pk } ) ), status _ code = 200, ) self. ass... | [
0.3575321137905121,
1.2709591388702393,
0.4960249960422516,
0.9747146964073181,
0.02856377139687538,
0.7660683393478394,
1.1716036796569824,
0.2359112799167633,
-0.35510626435279846,
-1.3364403247833252,
-0.2179168313741684,
-0.01645076647400856,
1.1966015100479126,
1.040483832359314,
-0... |
def main ( ) : send _ cmd = " show running - config " # run session start commands and save session information into a dictionary session = start _ session ( crt, script _ dir ) # make sure we completed session start. if not, we'll receive none from start _ session. if session : # generate filename used for output file... | [
0.2385406494140625,
-0.9479022026062012,
0.6746541857719421,
0.6625230312347412,
-0.3261484205722809,
-0.704958438873291,
1.198367953300476,
0.2595526874065399,
-0.24899175763130188,
0.5263794660568237,
-0.05487166717648506,
0.6598690748214722,
0.1640968769788742,
-0.38732242584228516,
1... |
def drawplot ( self, plot _ data, plot _ settings ) : self. axes. cla ( ) self. plot _ renderer. drawplot ( self. axes, plot _ data, plot _ settings ) if plot _ data. getxdatatype ( ) = = " time " : self. fig. autofmt _ xdate ( ) | [
0.2612105906009674,
0.7906163334846497,
0.20065568387508392,
0.4075546860694885,
-0.28779932856559753,
0.4451623857021332,
-0.15142974257469177,
-0.22335781157016754,
0.00789076928049326,
-0.8033825159072876,
0.7402091026306152,
0.2325294315814972,
0.20326967537403107,
0.026927340775728226... |
def test _ mirrors _ different _ bar ( minimal _ conf _ noscreen, manager _ nospawn ) : config = minimal _ conf _ noscreen tbox = textbox ( " testing mirrors " ) config. fake _ screens = [ libqtile. config. screen ( top = libqtile. bar. bar ( [ tbox ], 10 ), x = 0, y = 0, width = 400, height = 600 ), libqtile. config. ... | [
-0.41674453020095825,
0.3014829456806183,
0.6219419240951538,
-0.5680317878723145,
-0.4929385781288147,
0.6728347539901733,
0.479685515165329,
0.2797742784023285,
0.106173075735569,
-0.17530176043510437,
-0.7675961256027222,
0.6433258652687073,
-0.4886285066604614,
1.3419619798660278,
0.... |
def test _ array _ delete _ element _ inexistent ( self ) : arr = array ( 10, 0 ) res = delete ( arr, 1 ) self. assertequal ( res, none ) | [
0.21632401645183563,
-1.2244309186935425,
0.49395760893821716,
0.610225260257721,
1.073153018951416,
0.8781141042709351,
-0.013859167695045471,
1.1644824743270874,
1.0304884910583496,
0.3518127202987671,
-0.617762565612793,
0.056649137288331985,
-0.7557011842727661,
0.15476202964782715,
... |
def prepare _ image _ telangana ( x, y, w, h, parts, final _ output, predictions ) : part = int ( w / parts ) for i in range ( parts ) : # isolating the region of interest - the digit # also, y shouldn't go beyond image ( negative y ) roi = final _ output [ y : y + h, x + part * i : x + part * ( i + 1 ) ] # creatinga a... | [
0.05158257484436035,
-0.2588414251804352,
0.6429543495178223,
-0.10330599546432495,
-0.3318673074245453,
-0.3336121141910553,
0.5570820569992065,
-0.2573298513889313,
-0.235580712556839,
0.3848668932914734,
0.29301807284355164,
-0.3578953444957733,
0.4325265884399414,
0.047769613564014435,... |
def run ( self, * args ) : raise notimplementederror ( self. _ _ class _ _. _ _ name _ _ + " must define a run ( ) method " ) | [
-0.6714451909065247,
-0.48324859142303467,
0.49555277824401855,
0.37692829966545105,
0.8195037841796875,
1.103164792060852,
0.34270748496055603,
-0.04717104882001877,
-0.4913673400878906,
-0.27970102429389954,
-0.7847549319267273,
0.22540855407714844,
-0.1768159121274948,
0.366179585456848... |
def _ call _ api ( self, endpoint, params = none, return _ response = false, version = " ", method = " get " ) : if version : version ='/'+ version url = " { 0 } { 1 } ". format ( constant. api _ base _ url. format ( version = version ), endpoint ) headers = self. default _ headers response = none if ( self. settings. ... | [
-0.9636954069137573,
-0.4693462550640106,
1.0115032196044922,
0.40692415833473206,
0.1997755616903305,
-0.17387878894805908,
-1.0555205345153809,
-0.20310428738594055,
-0.3360154628753662,
1.1230196952819824,
0.5277485251426697,
-0.14789128303527832,
-0.8988342881202698,
-0.115580916404724... |
def merge _ zip _ archives ( individual _ archives, archive _ name ) : import zipfile archive = zipfile. zipfile ( archive _ name,'w ', zipfile. zip _ deflated, allowzip64 = true ) if isinstance ( individual _ archives, ( list, tuple ) ) : filenames = individual _ archives elif isinstance ( individual _ archives, str )... | [
-0.45154252648353577,
-0.6068216562271118,
0.8165262341499329,
0.280686616897583,
0.9221159219741821,
0.3558547794818878,
0.6083346605300903,
0.44413959980010986,
0.4523715674877167,
0.06580311805009842,
-0.3561192452907562,
-0.8375933170318604,
-0.5969294309616089,
0.21018865704536438,
... |
def setup ( self ) : self. logger. debug ('successfully entered setup code') np. random. seed ( ) # actions # init the 6 possible actions # 0. up - > ( x, y - 1 ) # 1. down - > ( x, y + 1 ) # 2. left - > ( x - 1, y ) # 3. right - > ( x + 1, y ) # 4. wait - > ( x, y ) # 5. bomb - > ( x, y ) self. actions = ['up ','down ... | [
0.06473955512046814,
0.34686726331710815,
0.8832600116729736,
0.12257903069257736,
1.6670598983764648,
-1.119816780090332,
0.3734355866909027,
-0.12643878161907196,
0.21382835507392883,
0.4781649112701416,
-0.726915717124939,
-0.29394009709358215,
-0.29294848442077637,
0.14946652948856354,... |
def fallback _ reason ( self, fallback _ reason ) : allowed _ values = [ " technical ", " empty _ candidate _ list " ] # noqa : e501 if fallback _ reason not in allowed _ values : raise valueerror ( " invalid value for ` fallback _ reason ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ( fallback _ reason, al... | [
0.2628701627254486,
-0.10843323916196823,
-0.3303167521953583,
-0.11641887575387955,
0.5622266530990601,
0.35210171341896057,
0.2942153215408325,
0.6827183365821838,
-0.06875860691070557,
0.08476186543703079,
-1.0995614528656006,
1.4337852001190186,
-1.207018256187439,
0.307205468416214,
... |
def _ _ init _ _ ( self, n _ differences = 1, enhance = true, vectorizer = vectorizer ( complexity = 3 ), n _ jobs = - 1, random _ state = 1 ) : self. random _ state = random _ state self. n _ jobs = n _ jobs self. n _ differences = n _ differences self. enhance = enhance self. vectorizer = vectorizer self. estimator =... | [
0.47763773798942566,
0.9283284544944763,
0.5887249112129211,
1.0247336626052856,
0.21629874408245087,
-0.02276785857975483,
0.08155600726604462,
0.12295621633529663,
0.266606867313385,
-0.5210654139518738,
-1.0915913581848145,
0.11857599020004272,
0.17400848865509033,
1.0650845766067505,
... |
def setallowoversizeprotos ( * args, * * kwargs ) : # real signature unknown pass | [
-0.0584709458053112,
0.44238102436065674,
0.5846103429794312,
0.5839623808860779,
-1.4910385608673096,
0.6890007257461548,
1.5484192371368408,
-1.0726873874664307,
0.838409960269928,
0.14207963645458221,
-0.5402048230171204,
0.32742321491241455,
-1.0802589654922485,
0.15502136945724487,
... |
def _ _ init _ _ ( self, socket _ path ) : self. socket _ path = socket _ path self. sock = none # make sure the socket does not already exist try : os. unlink ( socket _ path ) except oserror : if os. path. exists ( socket _ path ) : raise try : self. sock = socket. socket ( socket. af _ unix, socket. sock _ stream ) ... | [
0.49149104952812195,
0.36581262946128845,
0.6770251393318176,
0.3402930796146393,
-0.3559376001358032,
-0.3024035096168518,
0.2939605116844177,
0.7971855998039246,
0.8384629487991333,
-1.4432634115219116,
0.044577278196811676,
0.933218777179718,
0.5259283185005188,
0.29911530017852783,
-... |
def show _ policy ( self, policy ) : import matplotlib. pyplot as plt plt. rcdefaults ( ) import numpy as np import matplotlib. pyplot as plt import matplotlib. patches as mpatches from matplotlib. collections import patchcollection number _ i = policy. shape [ 0 ] number _ j = policy. shape [ 1 ] fig, ax = plt. subplo... | [
0.4909931719303131,
0.19626490771770477,
0.8743163347244263,
-0.670592188835144,
-0.6620038747787476,
1.07161545753479,
1.4645084142684937,
0.1606307029724121,
1.2298274040222168,
0.20436999201774597,
-0.0585462711751461,
1.1746865510940552,
-0.3345714509487152,
0.04172908514738083,
0.67... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.