text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def target _ image _ folder _ member _ id ( self, target _ image _ folder _ member _ id ) : self. _ target _ image _ folder _ member _ id = target _ image _ folder _ member _ id | [
-0.9188302159309387,
-1.5710200071334839,
-0.27767154574394226,
0.1520082652568817,
0.17078743875026703,
1.0019110441207886,
-0.19004137814044952,
0.7036552429199219,
-0.595162570476532,
-0.27154865860939026,
0.15359385311603546,
0.36623460054397583,
0.07036121934652328,
0.4400818943977356... |
def provinces ( self ) : raise notimplementederror ( ) | [
-0.5653634667396545,
-0.9850693941116333,
0.581344485282898,
0.02105332911014557,
0.3570114076137543,
0.8099045753479004,
-0.404430091381073,
-0.028353819623589516,
1.2561622858047485,
-0.2733195424079895,
-0.3048410415649414,
-0.33092591166496277,
-0.0792573094367981,
-0.01277405768632888... |
def handle ( self, * app _ labels, * * options ) : if not django _ evolution _ settings. enabled : raise commanderror ( _ ('django evolution is disabled for this project.'' evolutions cannot be manually run.') ) self. purge = options ['purge'] self. verbosity = int ( options ['verbosity'] ) hint = options ['hint'] comp... | [
-0.1171264797449112,
1.0578354597091675,
0.7705199122428894,
1.0471664667129517,
1.1222412586212158,
0.257244348526001,
-0.416431725025177,
0.0696410983800888,
-0.11724814027547836,
0.5901139974594116,
-0.4566833972930908,
-0.18514686822891235,
0.30190733075141907,
0.43870967626571655,
-... |
def published ( self ) : return self. published _ at is not none | [
0.400216668844223,
-0.7824051380157471,
0.36288824677467346,
0.34485670924186707,
0.4846028685569763,
0.27366000413894653,
-0.5639016032218933,
0.7682387232780457,
-0.226647287607193,
-0.7132630944252014,
-0.3889579772949219,
-0.364462286233902,
0.2809616029262543,
0.30837327241897583,
-... |
def typecheck ( ctx ) : print _ and _ run ( f'cd { project _ dir } & &'f'mypy - - config - file = { project _ dir } /. mypy. ini { package _ dir } { scripts _ dir } ', pty = true, ) print ('type checking passed.') | [
-0.8348546028137207,
0.25320926308631897,
0.7419906258583069,
1.2465176582336426,
0.8914100527763367,
1.1530137062072754,
1.3468025922775269,
-0.5182933211326599,
-0.3346787095069885,
0.5673049688339233,
0.35673239827156067,
1.4518579244613647,
-1.1716175079345703,
0.12883809208869934,
1... |
def _ get _ rule _ size ( rule, config ) : size = 0. 0 for token in rule. source + rule. target : if qcfg _ rule. is _ nt ( token ) : size + = config [ " non _ terminal _ coef " ] else : size + = config [ " terminal _ coef " ] return size | [
0.22740550339221954,
0.7148790955543518,
0.34809407591819763,
-1.394558072090149,
0.7997651696205139,
-0.22389431297779083,
-0.21313390135765076,
0.1634315848350525,
-0.7512511014938354,
0.7466151118278503,
0.03222965449094772,
0.2586437165737152,
-0.302710622549057,
0.35828128457069397,
... |
def test _ get _ group _ list ( self ) : pass | [
-0.32524189352989197,
0.7400590181350708,
0.13259974122047424,
1.3686026334762573,
1.0803271532058716,
-0.22227992117404938,
0.44709470868110657,
-0.043556638062000275,
-0.12908567488193512,
-0.593720018863678,
-0.8209412097930908,
-0.07881737500429153,
-0.7627290487289429,
-0.117700986564... |
def pclues ( self ) : if self. _ pclues [ self. probsize ] is none : self. _ pclues [ self. probsize ] = self. _ sort _ permutations ( self. probsize ) return self. _ pclues [ self. probsize ] else : return self. _ pclues [ self. probsize ] | [
0.40408089756965637,
-0.6851862072944641,
0.6829760670661926,
0.07714693248271942,
-0.6066919565200806,
0.4545222818851471,
0.205293208360672,
-0.573265552520752,
0.9972974061965942,
0.2386685162782669,
0.9685264825820923,
0.07027090340852737,
-1.6390308141708374,
-0.211769700050354,
-0.... |
def graph ( self ) : return self. _ _ graph _ _ | [
-0.4246717393398285,
-0.45231136679649353,
0.2034669667482376,
0.2993352711200714,
-0.37059253454208374,
0.3952500522136688,
0.8032247424125671,
-0.16237346827983856,
0.8750041127204895,
-0.7005335092544556,
0.4008635878562927,
0.6079683899879456,
-0.08767294138669968,
-1.1035627126693726,... |
def get ( self, key, value =... ) : # - > none :... | [
-0.509896457195282,
0.14740106463432312,
0.0753951296210289,
0.6471560001373291,
-0.06863567233085632,
0.03920401260256767,
-0.5500455498695374,
-0.1941421627998352,
-0.8437276482582092,
-0.4424060583114624,
-0.3290807902812958,
0.8299999237060547,
-0.08581867069005966,
-0.3600263595581054... |
def linreg ( x, y, iterations = 10000, learning _ rate = 0. 001 ) : assert len ( x ) = = len ( y ) m = len ( x ) y _ mean = sum ( y ) / m def h ( x, b, a ) : return b + a * x # arbitrary initial values of a and b a = 0 b = 0 # gradient descent for jul in range ( iterations ) : tempb = b - ( learning _ rate / m ) * ( su... | [
0.35442110896110535,
0.23697508871555328,
0.924440324306488,
-0.7714583873748779,
-0.4944068193435669,
-0.08423274010419846,
-0.4053405225276947,
-0.15956808626651764,
-0.600924015045166,
0.7923753261566162,
-0.5508726835250854,
0.4054437279701233,
-0.22248920798301697,
0.23230279982089996... |
def image _ loader ( img _ name, transform = none ) : image = image. open ( img _ name ). convert ('rgb') image = transform ( image ). float ( ) image = torch. tensor ( image ) # image = variable ( image, requires _ grad = false ) image = image. unsqueeze ( 0 ) return image | [
-0.19294944405555725,
-0.3842119574546814,
0.32270288467407227,
-0.5607844591140747,
-0.5313984155654907,
-0.4424705505371094,
-0.4232960641384125,
0.18919587135314941,
-0.6959460973739624,
0.24767713248729706,
-0.408066987991333,
-0.04110022634267807,
0.2034256011247635,
-0.30555143952369... |
def get _ info ( cls, raw _ data ) - > union [ callinfo, none ] : pass | [
0.03474299982190132,
0.21647465229034424,
0.39236727356910706,
0.26066362857818604,
0.3879227638244629,
-0.30390477180480957,
-0.9261071681976318,
-1.342994213104248,
0.38529863953590393,
-0.9679376482963562,
-0.7558234333992004,
0.05288426950573921,
0.09284482151269913,
0.4559962749481201... |
def random _ ports ( port, n ) : for i in range ( min ( 5, n ) ) : yield port + i for i in range ( n - 5 ) : yield max ( 1, port + random. randint ( - 2 * n, 2 * n ) ) | [
-0.7024667263031006,
0.049087006598711014,
0.4726777672767639,
-0.3199360966682434,
-0.15543830394744873,
0.1955423802137375,
0.29334843158721924,
-1.3242994546890259,
0.6408737897872925,
-0.23717695474624634,
-1.019826054573059,
-0.017988296225667,
-0.7100156545639038,
0.00025232767802663... |
async def gamble ( self, ctx, bet : int = none ) : author = ctx. message. author server = ctx. message. server channel = ctx. message. channel # bet must be a multiple of 10, member must have enough xpreserve to bet msg ='usage : ` gamble [ xp reserve bet ] ( must be multiple of 10 ) `'if not ( bet or type ( bet ) = = ... | [
-0.7035982012748718,
1.2244863510131836,
1.1867759227752686,
0.6482609510421753,
0.18800251185894012,
0.7929844260215759,
-0.7342190146446228,
0.10372123122215271,
-0.4919155240058899,
0.32655981183052063,
0.2060212641954422,
0.5627396106719971,
-1.7018886804580688,
0.04159381613135338,
... |
def low _ pass _ isoenergy ( self, sigma = ( 2, 2, 2 ), truncate = 4. 0 ) : print ('applying low pass filter to each energy slice...') if sigma is not none : self. sigma _ lowpass = sigma self. processed. values = skfilt. gaussian ( self. processed, sigma = self. sigma _ lowpass, preserve _ range = true, truncate = tru... | [
0.8171677589416504,
-0.27449116110801697,
0.5541567802429199,
0.5811448097229004,
0.15778401494026184,
-0.15851923823356628,
0.2553337812423706,
0.47710901498794556,
0.04898791387677193,
0.189680278301239,
0.4807729423046112,
0.774635374546051,
-0.3580993115901947,
0.022419365122914314,
... |
def update _ direction ( self, button ) : # get a list of cardinal directions in clockwise order cardinal _ directions = list ( self. direction _ dict. keys ( ) ) # get index of the current direction direction _ index = cardinal _ directions. index ( self. current _ direction ) # shifts current direction by 1 index fro... | [
-0.8803013563156128,
-1.1496742963790894,
0.5690948963165283,
-0.051694776862859726,
0.7534303665161133,
0.6750819087028503,
-0.10998433828353882,
0.43687769770622253,
0.44094303250312805,
0.24811549484729767,
-0.2798250615596771,
0.39633673429489136,
-0.30895209312438965,
-0.0258995462208... |
def raise _ to _ power ( value1, value2 ) : new _ value = value1 * * value2 return new _ value | [
-0.07743609696626663,
-0.18818913400173187,
0.4988580346107483,
0.7028665542602539,
-0.2186778336763382,
-0.5201860070228577,
-1.7512552738189697,
-0.2486482411623001,
-1.6827714443206787,
0.9195810556411743,
0.578273355960846,
0.8176749348640442,
-0.20313318073749542,
-0.4383777976036072,... |
def _ _ str _ _ ( self ) : return f " { self. x, self. y, self. z } " | [
-0.196913942694664,
-1.686920404434204,
0.3155296742916107,
-1.5227898359298706,
-0.1499469131231308,
0.5944703817367554,
-0.1065962165594101,
-0.41486576199531555,
-0.6472892165184021,
-0.35911035537719727,
0.17708012461662292,
0.06738997995853424,
0.252044141292572,
-1.039307951927185,
... |
def _ size _ in _ list ( same _ arr _ size _ list, size ) : for elem in same _ arr _ size _ list : if elem. size = = size : return true return false | [
0.3275420069694519,
-0.47709107398986816,
0.3603699803352356,
0.6716329455375671,
-0.2970382571220398,
0.18646140396595,
-0.127589151263237,
0.44423502683639526,
1.3681720495224,
0.5797734260559082,
-1.0861446857452393,
0.044360216706991196,
-0.5416674613952637,
0.7561183571815491,
-0.20... |
async def script ( self, transform _ fn = lambda p : p ) : try : self. transform _ fn = transform _ fn self. before _ script ( ) self. staged _ script = [ ] self. colour = none yield self finally : self. after _ script ( ) script = self. staged _ script | [
-0.16558842360973358,
0.04887567088007927,
0.4433324933052063,
-0.22015388309955597,
0.03950931131839752,
-1.360546350479126,
0.7143709659576416,
0.19481968879699707,
-0.10631965845823288,
-0.5044171810150146,
-0.6694590449333191,
0.9618635177612305,
0.5814435482025146,
0.19026687741279602... |
def decode _ event ( data ) : obj = json. loads ( data ) trigger = triggerinfo ( obj ['trigger'] ['class'], obj ['trigger'] ['kind'], ) # headers are case insensitive headers = headers ( ) obj _ headers = obj ['headers'] or { } for key, value in obj _ headers. items ( ) : headers [ key ] = value return event ( body = d... | [
0.09085144102573395,
-0.671306312084198,
0.8419910073280334,
-0.4331305921077728,
-0.6210629343986511,
-0.6393004059791565,
-0.6516879200935364,
-0.002769523300230503,
0.5551736950874329,
-0.6617016196250916,
-0.9842683672904968,
0.04818393290042877,
0.19693824648857117,
-0.676819920539856... |
def zgt _ decode ( data ) : encoded = false decoded _ data = b'' def bxor _ join ( b1, b2 ) : # use xor for bytes parts = [ ] for b1, b2 in zip ( b1, b2 ) : parts. append ( bytes ( [ b1 ^ b2 ] ) ) return b''. join ( parts ) for x in data : if bytes ( [ x ] ) = = b'\ x02': encoded = true elif encoded is true : encoded =... | [
0.49766966700553894,
-0.29416897892951965,
0.7002424597740173,
0.4677298367023468,
-0.8593829870223999,
-0.3968578279018402,
-0.9989123344421387,
-0.2518314719200134,
0.31588494777679443,
0.22937092185020447,
-0.03434550017118454,
-0.04574492573738098,
-0.9877400994300842,
-0.2266909182071... |
def _ product ( self ) : return self ['product'] | [
-1.1572438478469849,
0.0381208136677742,
0.12549462914466858,
-0.1529674232006073,
0.15844042599201202,
0.7490163445472717,
0.32248884439468384,
-1.1931763887405396,
0.6995823979377747,
-0.035334277898073196,
0.0942852720618248,
-0.14561070501804352,
0.4756454825401306,
-1.4977518320083618... |
def _ solve _ all ( self, use _ cache = true, * * kwargs ) : # self. generate _ test _ instances ( ) self. results = [ ] if use _ cache : # load the cache dictionary from the cache file : cachedresults = { } try : with open ( self. cachefile, " rb " ) as f : cachedresults = pkl. load ( f ) except exception as e : # pra... | [
-0.2457091361284256,
0.19119100272655487,
0.6272473335266113,
-0.2611117660999298,
0.4924555718898773,
0.2509496510028839,
0.9270979166030884,
0.38121092319488525,
-0.3329285979270935,
-0.47757771611213684,
-0.4110049307346344,
-1.192420482635498,
-1.0748120546340942,
0.7986815571784973,
... |
def test _ datasamplers _ latin _ hcs ( initial _ guess, covar _ bounds, n _ samp ) : # number of covariates num _ covar = initial _ guess. shape [ 1 ] # define the class cls = datasamplers ( ) # set additional attribute device used to cast to right computational device device = torch. device ( " cuda " if torch. cuda.... | [
0.04815642535686493,
-0.5208411812782288,
0.5446795225143433,
-0.3637382388114929,
0.5195885896682739,
0.8809744715690613,
-0.8543386459350586,
-0.12181717902421951,
-0.6697357296943665,
-0.4339677393436432,
-0.6404163837432861,
-0.05414002016186714,
-0.7117009162902832,
-0.144234582781791... |
def admin _ required ( f ) : @ wraps ( f ) def decorated _ function ( * args, * * kwargs ) : if not current _ user. admin : return redirect ( url _ for ('page _ not _ found') ) return f ( * args, * * kwargs ) return decorated _ function | [
-0.8080421090126038,
-0.016860228031873703,
0.7861160039901733,
0.4332437217235565,
-0.09826894849538803,
1.174311637878418,
-0.43522557616233826,
-0.5632862448692322,
0.4979323446750641,
0.45465606451034546,
1.2364734411239624,
1.1457518339157104,
0.6275767683982849,
0.6804388165473938,
... |
def updatehighscore ( self, user ) : with self. con : id = true name = user. username userscore = user. score scores = self. gethighscorerecords ( " asc " ) for score in scores : for field in score : # print field try : if ( id ) : id _ = int ( field ) # print id _ id = false elif ( not id ) and ( int ( userscore ) > i... | [
-0.7528733015060425,
-0.3083670735359192,
0.9241382479667664,
0.4482996165752411,
-0.41561761498451233,
0.4631631076335907,
-0.41818779706954956,
-0.4592921733856201,
-0.4834780991077423,
0.8606696724891663,
-1.0444250106811523,
-0.7708542346954346,
-0.7212572693824768,
0.5188561677932739,... |
def _ response ( self, success, doc, responses, code = none ) : doc, code = response _ info ( success, doc, responses, code = code, request _ url = self. request. full _ url ) self. set _ header ('link ', self. base _ url ) self. set _ header ('content - type ','application / json') self. set _ status ( code ) self. wr... | [
-0.4165065288543701,
-1.028769850730896,
0.4463214874267578,
-0.06559465825557709,
0.470794677734375,
-0.2870192229747772,
0.5978468060493469,
0.12424300611019135,
0.3555605113506317,
-0.555543065071106,
-0.6307896375656128,
-0.691120445728302,
0.5536617636680603,
-0.3742823302745819,
0.... |
def test _ set _ guidelines ( ufo _ module ) : _ run _ guideline _ test ( [ { " position " : ( 1, 2 ), " angle " : 90 } ], [ { " x " : 1, " y " : 2, " angle " : 90 } ], ufo _ module ) | [
-0.7812555432319641,
0.8162900805473328,
0.37085220217704773,
-0.28542453050613403,
1.0370323657989502,
0.7435218095779419,
-0.131509467959404,
0.43159374594688416,
-0.43549081683158875,
0.8900198340415955,
-0.9930309057235718,
0.08491754531860352,
-0.15939705073833466,
-0.1137729585170745... |
def perform _ liquidity _ management ( self ) : # cet1e is returned here in order to cache its # computation cet1e = super ( ). perform _ liquidity _ management ( ) if cet1e < 0 : return params = self. model. parameters use _ rwa = params. bank _ rwa _ on use _ lcr = params. bank _ lcr _ on # 5. raise liquidity to reac... | [
0.04630583897233009,
-0.07326463609933853,
0.6471601724624634,
-0.11149005591869354,
0.4590420722961426,
0.1369742602109909,
0.1559346616268158,
-0.6116384267807007,
-0.1031586155295372,
-0.07865741103887558,
0.46273380517959595,
-0.3981153964996338,
-0.7772860527038574,
1.034880518913269,... |
def git _ set _ sha1 ( self, object ) : self. git _ mass _ set _ sha1 ( [ ( self, object ), ] ) | [
-0.5400874614715576,
-0.3808043897151947,
0.48176056146621704,
0.54698246717453,
0.316738098859787,
1.2912821769714355,
-0.2151888757944107,
0.043988365679979324,
0.2165505588054657,
0.6191076040267944,
-1.0881454944610596,
1.1035782098770142,
0.038474682718515396,
-0.08991467952728271,
... |
def vectordistance ( v1, v2 ) : sum = 0 for i in range ( len ( v1 ) ) : sum + = ( v1 [ i ] - v2 [ i ] ) * * 2 return sum * * 0. 5 | [
0.43928903341293335,
-0.8090415000915527,
0.39614543318748474,
0.13391992449760437,
-0.24949991703033447,
0.3837224543094635,
-0.15318067371845245,
0.2548883259296417,
0.3641620874404907,
1.4107950925827026,
-0.8837051391601562,
0.8810667395591736,
-0.35859283804893494,
-0.0404377840459346... |
def allow _ classic _ link _ to _ remote _ vpc ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " allow _ classic _ link _ to _ remote _ vpc " ) | [
-0.19916874170303345,
-0.2654877305030823,
0.7771393060684204,
0.1009218767285347,
0.43050312995910645,
2.5427308082580566,
-0.2075526863336563,
-0.24397581815719604,
-0.298194020986557,
-0.31149983406066895,
-0.27820947766304016,
1.1459811925888062,
-0.5631181597709656,
-0.973463773727417... |
def _ add _ vios ( server _ vios, host, context, db _ session, dom _ factory ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ vios _ add _ start') % {'host': server _ vios. get _ host _ name ( ),'vios': server _ vios. lpar _ id } ) ras. trace ( log, _ _ name _ _, ras. trace _ debug, msg ) # copy into a database b... | [
-0.007938407361507416,
0.10111440718173981,
0.7496165633201599,
0.5151967406272888,
1.0631808042526245,
-0.11913438141345978,
-0.029687652364373207,
0.3843841850757599,
0.8586581945419312,
-0.08412853628396988,
-0.49373364448547363,
0.34713390469551086,
0.324866384267807,
0.287801593542099... |
def addplanesymbol ( self, position, heading ) : planepoint = mapscript. pointobj ( ) planepoint. y = position [ 0 ] # lat planepoint. x = position [ 1 ] # lon # ryan, these must be in the right order. this is why i used to use the terrapoint class # project our point into the mapobj's projection gpsproj = mapscript. p... | [
-0.10692796856164932,
-0.5605234503746033,
0.7717344760894775,
-0.7686890959739685,
-0.08297626674175262,
0.9537997245788574,
-0.5286668539047241,
-0.0877704843878746,
0.33548954129219055,
-0.4561590552330017,
-0.2281658947467804,
0.041170910000801086,
0.5212389230728149,
0.269483387470245... |
def tenancy ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " tenancy " ) | [
0.38786908984184265,
-0.18668828904628754,
0.39606547355651855,
0.3689999580383301,
0.8993054032325745,
0.6728425621986389,
0.878238320350647,
0.31660357117652893,
0.6981695890426636,
0.6623997092247009,
-0.11782685667276382,
0.16822896897792816,
0.05055544152855873,
-1.801915168762207,
... |
def link _ device ( libnms _ name, netbox _ id, libnms _ session ) : try : response = libnms _ session. post ( libnms _ api + libnms _ name +'/ components / netbox _ id') if response. json ( ) [ " status " ] = = " error " : raise exception ( f'error received from librenms : { response. json ( ) [ " message " ] }') # ge... | [
-0.5371349453926086,
-0.46443668007850647,
0.8262263536453247,
-0.9019604325294495,
0.7289018630981445,
0.6881728172302246,
-0.11958759278059006,
-0.6459574103355408,
1.2480804920196533,
-0.7378224730491638,
-0.4773719310760498,
0.15621981024742126,
-0.7250028848648071,
0.6726981997489929,... |
def get _ armed _ status ( self, alarm _ state _ value = false ) : _ logger. info ('retrieving alarm state from adtpulse...') _ load _ cookies ('adtpulse _ cookies. pickle') session = requests. session ( ) dashboard = session. get ( dashboard _ url ) parsed = beautifulsoup ( dashboard. content, html _ parser ) # find t... | [
-0.04068229719996452,
-0.7033874988555908,
0.5197513699531555,
0.19288258254528046,
-0.5350416302680969,
0.19932207465171814,
0.17191393673419952,
0.31515899300575256,
0.10044648498296738,
-0.29175373911857605,
0.16082318127155304,
0.2517610192298889,
-0.3901444375514984,
0.093380115926265... |
def normpath ( path ) : # preserve unicode ( if path is unicode ) # slash, dot = ( u'/ ', u '.') if isinstance ( path, _ unicode ) else ('/ ', '.') slash, dot = ('/ ', '.') if path = ='' : return dot initial _ slashes = path. startswith ('/') # posix allows one or two initial slashes, but treats three or more # as sing... | [
0.269878089427948,
-0.6272397041320801,
0.8787270784378052,
0.18752792477607727,
-1.1174123287200928,
-0.06804575771093369,
1.09194815158844,
0.43571025133132935,
0.5966671109199524,
-0.7651971578598022,
0.48581528663635254,
-0.5597381591796875,
-0.4128057658672333,
-0.1657685935497284,
... |
def hist _ features _ for _ all _ superpixel ( img, masks, workers : int = 16 ) : tic = time. time ( ) pool = threadpool ( workers ) results = [ ] for label _ id in np. unique ( masks ) : results. append ( pool. apply _ async ( worker, args = ( img, masks, label _ id ) ) ) pool. close ( ) pool. join ( ) results = [ r. ... | [
0.47097066044807434,
0.16834214329719543,
0.5916094779968262,
0.9264511466026306,
0.7018291354179382,
-0.22868745028972626,
0.33170896768569946,
0.018051277846097946,
-0.04177846759557724,
-0.058051612228155136,
-0.5209990739822388,
0.3228689134120941,
-0.2607322335243225,
0.48895710706710... |
def normalise _ acn ( original _ acn ) : # strip all whitespace and dashes acn = re. sub ('( \ s | - ) ','', original _ acn ) if re. match ('[ 0 - 9 ] { 9 } ', acn ) is none : raise validationerror ('invalid acn : { } '. format ( original _ acn ) ) # see the following for algorithm details : # https : / / www. asic. go... | [
1.0871285200119019,
-0.5316140651702881,
0.7676410675048828,
-0.629003643989563,
-0.24022632837295532,
-0.13143080472946167,
0.797027587890625,
0.49928340315818787,
0.8004355430603027,
0.21046672761440277,
0.40087890625,
-0.025291910395026207,
0.7989631295204163,
-0.45261862874031067,
0.... |
def _ make _ traceable _ staticmethod ( method _ descriptor, logger ) : autologging _ traced _ staticmethod _ delegator = _ make _ traceable _ function ( method _ descriptor. _ _ func _ _, logger ) return staticmethod ( autologging _ traced _ staticmethod _ delegator ) | [
0.42250359058380127,
0.39097264409065247,
0.6538655161857605,
0.05687006935477257,
-0.08611740916967392,
-0.556208074092865,
0.6856759190559387,
-0.6060136556625366,
0.2359653264284134,
0.008848466910421848,
-0.09623586386442184,
0.3315761983394623,
1.3096070289611816,
0.009601742960512638... |
def mark _ sent ( self ) : self. sent = true self. save ( ) | [
-0.4010792374610901,
-0.4086238741874695,
0.2889799177646637,
-0.21843580901622772,
1.2740355730056763,
0.3245185315608978,
0.6177794337272644,
0.6017940044403076,
-0.9162099361419678,
0.6805478930473328,
-1.5609092712402344,
0.20220765471458435,
-0.25932300090789795,
0.2648382782936096,
... |
def actionconfig ( self ) : frc = self. _ installvbox ( ) ; if frc is none : self. _ persistentvarset ( self. ksvar _ skipped,'true') ; else : self. _ persistentvarunset ( self. ksvar _ skipped ) ; # # @ todo vbox. py still has bugs preventing us from invoking it seperately with each action. if frc is true and'execute'... | [
0.09592463821172714,
-0.13144727051258087,
0.499880313873291,
1.4270213842391968,
0.4919332265853882,
-0.8344559073448181,
0.11320704966783524,
0.007122273091226816,
0.3506292700767517,
0.23627419769763947,
0.3532453775405884,
-0.10761476308107376,
-0.46391573548316956,
1.3381702899932861,... |
def task _ listen ( ser, listener ) : logger. info ('listen') result = listener. listening ( ) if listener. is _ wakeup ( ) : if ser : # execute the command if there exists a serial port. ardserial. execute ( ser,'m0 - 40') ardserial. execute ( ser,'m0 0') logger. info ('end') listener. reset ( ) return result | [
0.511978805065155,
-1.2127254009246826,
0.7345445156097412,
0.15350385010242462,
0.35024383664131165,
-0.021563811227679253,
0.5460883378982544,
0.4663419723510742,
0.5001454949378967,
0.4173319637775421,
-0.18275269865989685,
-0.06115547940135002,
0.12426602840423584,
-0.17189310491085052... |
def heuristic ( cube _ position ) : min _ distance = float ('inf') for solution in solutions : distance = sum ( [ 1 for i in range ( 8 ) if cube _ position [ 0 ] [ i ] [ 1 ]! = solution [ i ] [ 1 ] ] ) if distance < min _ distance : min _ distance = distance return min _ distance | [
0.2831350266933441,
-0.428899347782135,
0.6451660394668579,
0.3319297432899475,
0.08966287970542908,
0.0968264788389206,
0.1544039100408554,
-0.21602611243724823,
0.12237213551998138,
0.3932112455368042,
-0.3872711658477783,
-0.9091930389404297,
-1.0019385814666748,
-0.21231870353221893,
... |
def data ( self ) : return ( self. _ _ data ) | [
-0.791009783744812,
-0.8721309304237366,
0.30880188941955566,
-0.6982503533363342,
-0.08840157091617584,
1.1120840311050415,
-0.3926766812801361,
-0.9729279279708862,
0.635625958442688,
-1.5780880451202393,
-0.4595162570476532,
0.5969663262367249,
-0.34589439630508423,
-0.40882351994514465... |
def play ( self ) : self. print _ welcome ( ) super ( ). play ( ) self. print _ result ( ) | [
-0.021423468366265297,
0.5661139488220215,
0.536799430847168,
0.7195447087287903,
0.7561907172203064,
0.3059932589530945,
0.563662052154541,
-0.733465313911438,
0.14497679471969604,
-0.3598431348800659,
0.17464390397071838,
0.37144893407821655,
-0.2944677174091339,
0.15642258524894714,
0... |
async def _ close _ http _ session ( self ) - > none : # graceful shutdown recommended by the documentation # https : / / aiohttp. readthedocs. io / en / stable / client _ advanced. html \ # # graceful - shutdown if self. _ http _ session is not none and not self. _ http _ session. closed : await self. _ http _ session... | [
-0.5839810967445374,
-0.3314225375652313,
0.4697825014591217,
-0.22314751148223877,
-0.4248933494091034,
0.33321475982666016,
-0.15219640731811523,
-0.9462505578994751,
-0.15729103982448578,
0.3290407061576843,
0.8729024529457092,
-0.052305884659290314,
0.07860421389341354,
0.0260170530527... |
def authenticator ( realm, handle, password ) : if handle = = password : return ( handle,'user name') return none | [
-0.06783036142587662,
-0.8932612538337708,
0.23929338157176971,
0.5342645049095154,
-1.2913026809692383,
-0.4404900074005127,
-0.3449721932411194,
-0.4542021155357361,
0.3449355661869049,
-0.21780849993228912,
0.0370059497654438,
-0.20850889384746552,
-0.6556712985038757,
-0.22506868839263... |
def stochhillclimb ( startstate, numneighs = 10, maxrounds = 1000 ) : curr = startstate value = startstate. getvalue ( ) maxvalue = startstate. getmaxvalue ( ) count = 0 if verbose : print ( " = = = = = = = = = = = = = = = = = = = = = start = = = = = = = = = = = = = = = = = = = = = = " ) while value < maxvalue and coun... | [
0.9807801842689514,
0.04109916463494301,
0.6584798693656921,
0.5404525399208069,
-0.32729408144950867,
0.1578696370124817,
0.452527791261673,
-0.1959369033575058,
-0.5639950633049011,
0.40420058369636536,
-0.7500593066215515,
0.5100542306900024,
-0.03190954029560089,
0.2561127543449402,
... |
def test _ ground _ cancellation _ space _ varying ( self ) : ( nrg, naz, data _ stack _ dict, wave _ number _ dict, multi _ master _ flag, enhanced _ forest _ height _ scalar, equalization _ flag, resolution _ m _ slant _ rg, off _ nadir _ angle, slope, ) = self. initial _ values ( ) # converting to 2d map, in order t... | [
0.9553678035736084,
-0.442746639251709,
0.5999838709831238,
0.5228527188301086,
0.39475399255752563,
0.9403557777404785,
0.39043015241622925,
0.30336323380470276,
-0.4932558238506317,
-0.4985158145427704,
-0.6936343312263489,
0.24223943054676056,
-0.5133863091468811,
1.3204452991485596,
... |
def rs ( g = none, xs = none, ys = none, met ='boole ', h = 10 * * - 4 ) : if ys is not none : return sum ( [ ( ys [ i ] - g ( xs [ i ] ) ) * * 2 for i in xrange ( len ( xs ) ) ] ) elif g : return numint ( g, xs [ 0 ], xs [ - 1 ], met, h ) else : raise valueerror ('not enough information. check help ( rs ).') | [
-0.09184471517801285,
0.8573362827301025,
0.40730026364326477,
-0.20227177441120148,
0.06281059980392456,
-0.5856925845146179,
0.0863589197397232,
-0.2126130610704422,
-0.5777602195739746,
0.12422093749046326,
-0.4116727113723755,
0.9077646732330322,
-0.19505907595157623,
-0.13390262424945... |
def get _ database _ env _ vars ( scheme, user, password, host, port, database ) : if scheme in ['postgres ','postgresql'] : env _ vars = {'pgpassword': password,'pghost': host,'pgdatabase': database } if user : env _ vars ['pguser'] = user if port : env _ vars ['pgport'] = str ( port ) return env _ vars elif scheme = ... | [
-0.8192293047904968,
0.3311079144477844,
0.6375569105148315,
-0.5506877899169922,
0.07189112901687622,
0.2392837405204773,
-0.24903351068496704,
-0.610626757144928,
-0.9998254776000977,
0.5749312043190002,
-0.8079661130905151,
0.7936387658119202,
-0.05034804716706276,
0.806553065776825,
... |
async def button _ cleanup ( self, ctx : commands. context ) : guild = ctx. guild async with ctx. typing ( ) : async with self. config. guild ( guild ). buttons ( ) as buttons : for name, button _ settings in self. settings [ guild. id ]. get ( " buttons ", { } ). items ( ) : messages = set ( button _ settings [ " mess... | [
0.18229813873767853,
-0.18206478655338287,
0.9273772835731506,
-0.4504050314426422,
0.8391172289848328,
-0.016950231045484543,
0.1770961433649063,
-1.035723090171814,
0.04968615621328354,
0.5208282470703125,
-0.30201542377471924,
0.6322699785232544,
-1.0018457174301147,
1.314368486404419,
... |
def cat _ encode ( self, data, var, regroup _ dict = none ) : new _ data = data. fillna ( value = { var :'na'} ) grouped = new _ data. groupby ( new _ data [ var ] ) classes = list ( grouped. groups. keys ( ) ) if regroup _ dict is none : dict _ encode = dict ( zip ( classes, range ( len ( classes ) ) ) ) # new _ data ... | [
-0.6460127830505371,
0.046304620802402496,
0.5658214092254639,
-0.30578747391700745,
-0.6137744188308716,
-0.45262181758880615,
-0.23720000684261322,
0.6152912974357605,
-0.13207818567752838,
0.39514198899269104,
-0.06874237209558487,
1.0116581916809082,
0.7351027131080627,
1.0175381898880... |
def test _ not _ write _ duplicate _ yaml _ keys ( self ) : with assert _ setup _ component ( 1, device _ tracker. domain ) : assert setup _ component ( self. hass, device _ tracker. domain, test _ platform ) device _ tracker. see ( self. hass,'mac _ 1 ', host _ name ='hello') device _ tracker. see ( self. hass,'mac _ ... | [
-0.5574178099632263,
0.4174160957336426,
0.44587844610214233,
0.24140915274620056,
0.5274347066879272,
-0.2402617633342743,
0.7506749629974365,
0.6173888444900513,
-0.7898944616317749,
-0.13963571190834045,
-1.0997263193130493,
-0.2788430154323578,
0.4451943337917328,
0.8505846858024597,
... |
def contains _ required _ files ( resource, required _ list ) : for req in required _ list : found _ req = false for f in resource ['files'] : if f ['filename']. endswith ( req ) : found _ req = true if not found _ req : return false return true | [
-0.42251262068748474,
-0.9050729274749756,
0.5357178449630737,
0.40524670481681824,
0.22208121418952942,
0.6676753163337708,
-1.0272592306137085,
0.8090513944625854,
-0.8811711072921753,
0.10275505483150482,
-0.09783881902694702,
-0.8329712748527527,
-0.526444673538208,
1.4337455034255981,... |
def cylinder ( * * named ) : return _ newnode ( geometry. vpcylinder, named ) | [
-0.375505268573761,
0.18867051601409912,
0.3536970615386963,
0.08638609200716019,
-0.4399658739566803,
0.1360139697790146,
-0.3659248650074005,
-0.6388962864875793,
-1.3497720956802368,
0.007249714341014624,
-0.5969781279563904,
0.43108677864074707,
-0.4102180302143097,
-1.2685513496398926... |
def exists ( self ) : return os. path. exists ( self. filepath ) and os. path. isfile ( self. filepath ) | [
-0.4323464334011078,
-1.3865602016448975,
0.26807665824890137,
-0.6643826961517334,
1.49991774559021,
0.9751313924789429,
0.00631076842546463,
0.8111577033996582,
-0.15554068982601166,
-0.28169679641723633,
0.2708408236503601,
-0.3046910762786865,
0.055672548711299896,
0.4880356788635254,
... |
def upsampling ( input _ tensor, size, name ) : return tf. keras. layers. upsampling2d ( size = size, interpolation = " nearest ", name = name ) ( input _ tensor ) | [
-0.10094120353460312,
-0.7271853089332581,
0.479483962059021,
-0.4223802983760834,
-1.7892073392868042,
-0.08744984865188599,
-0.45961055159568787,
-0.04140733554959297,
-0.10083555430173874,
0.513245165348053,
-0.6230579018592834,
-0.28456246852874756,
0.3749485909938812,
-1.2236266136169... |
def table _ requests _ flight ( request ) : flight _ id = request. get. get ( key. flight _ id, " " ) " " " ` requested _ table ` is either ` 1 ` or ` 2 `. ` 1 ` refers to arrival flight table, while ` 2 ` refers to departure flight. " " " requested _ table = request. get. get ( key. requested _ table, " 0 " ) " " " we... | [
-0.8117825984954834,
-0.19075655937194824,
0.8052837252616882,
0.08303838968276978,
-0.37299075722694397,
-0.32869619131088257,
-0.22186508774757385,
-0.4953458309173584,
-0.6878484487533569,
-0.032439813017845154,
0.6246545910835266,
0.033933158963918686,
0.3882673978805542,
1.36516010761... |
def run _ command ( command, * args ) : cmd = " ". join ( [ command ] + list ( args ) ) proc = subprocess. popen ( cmd, shell = true, stdout = subprocess. pipe, stderr = subprocess. pipe ) stdout, stderr = proc. communicate ( ) return proc. returncode = = 0, proc. returncode, cmd, stdout, stderr | [
-0.07307761907577515,
-0.4824022352695465,
0.8000912666320801,
-0.22478948533535004,
0.6919605731964111,
0.3208337128162384,
-0.6139624118804932,
0.6331626772880554,
-0.5962252020835876,
0.10446584969758987,
-0.166738823056221,
0.15914015471935272,
-0.4886952340602875,
0.41582295298576355,... |
def test _ cant _ update _ driver _ invalid _ parameters ( self ) : json _ response = api _ call ( self, " put ",'/ driver / update ', dict ( first _ name = " henry ", last _ name = " ford " ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message "... | [
-1.1376749277114868,
-0.5504880547523499,
0.9808100461959839,
0.2673704922199249,
0.549299955368042,
0.2080436497926712,
-0.43072277307510376,
-0.16596892476081848,
-0.11564440280199051,
0.13097861409187317,
-0.6676383018493652,
-0.5317597389221191,
-0.6256457567214966,
0.749305784702301,
... |
def deletevim ( self, vimid ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / admin / v1 / vim _ accounts / { vimid } " headers = {'content - type':'application / yaml ','accept':'application / json ','authorization': f'bearer { self. token } ', } while true : headers = {'content - type':'application / yaml '... | [
0.37845104932785034,
-1.1865683794021606,
0.8277420401573181,
0.6387258768081665,
0.04493020847439766,
-0.7650644779205322,
-0.6116394400596619,
-0.49860283732414246,
0.6100225448608398,
0.2090025395154953,
-0.39806464314460754,
1.281990885734558,
-0.7539768815040588,
-0.5710809230804443,
... |
def teardownclass ( cls ) : sys. path. remove ( cls. app _ directory ) shutil. rmtree ( cls. app _ directory ) | [
0.4796420633792877,
-1.0650626420974731,
0.5220223665237427,
0.2954862713813782,
0.8148379921913147,
0.8930368423461914,
1.49332857131958,
0.2795223295688629,
1.1171926259994507,
-0.21609464287757874,
0.6125332713127136,
0.16219058632850647,
0.18292945623397827,
0.4557908773422241,
0.321... |
def test _ config _ fuzzer ( dir, aprx, inc, ref, fuzz, input _ file ) : if fuzz : ( ice, illumination, rt _ config, model _ config, plot _ config, impurities, ) = setup _ snicar ( " default " ) ice, illumination, impurities, rt _ config, model _ config = match _ matlab _ config ( ice, illumination, rt _ config, model ... | [
0.10138677805662155,
0.39937758445739746,
0.6846112012863159,
0.5563501715660095,
0.18752723932266235,
0.18008212745189667,
1.2698646783828735,
0.20876015722751617,
-0.10190645605325699,
-0.17564035952091217,
-0.4817304313182831,
-0.6605418920516968,
-0.5830714106559753,
0.6420307755470276... |
def cartoonize _ model _ and _ chain ( model, chain, color ='auto ', rep ='cartoon ', show _ bonds = false ) : reps = ['cartoon ','wire ','beads'] colors = ['auto ','green ','red ','blue ','yellow ','cyan ','magenta ','orange ','grey ','black ','white'] if rep not in reps : print ( " rep not understood. available : ", ... | [
-0.3751654326915741,
-0.39940181374549866,
0.6870325207710266,
-0.6298360228538513,
0.029641274362802505,
-0.4494752883911133,
0.0025823984760791063,
-0.664340078830719,
-0.3727339804172516,
0.10805512964725494,
-0.6067695021629333,
0.6862828731536865,
-0.2592659890651703,
-0.0676127299666... |
def totalconexiones ( analyzer ) : cont = gr. numedges ( analyzer ['connections'] ) return cont | [
-0.058491867035627365,
-0.11982222646474838,
0.3264111578464508,
-0.0046683549880981445,
0.6400548219680786,
-1.1105748414993286,
1.1901429891586304,
0.12233706563711166,
-0.014758140780031681,
0.336094468832016,
0.725034773349762,
-1.3694418668746948,
-0.07364186644554138,
-0.757658541202... |
def _ value _ sorter ( feature _ value ) : toks = feature _ value. split ( " ", maxsplit = 1 ) assert len ( toks ) = = 2, " % s : invalid feature value " % feature _ value val = int ( toks [ 0 ] ) assert val > 0, " % s : feature value should be positive. found % d " % ( feature _ value, val ) return val | [
-0.21452106535434723,
-0.36189350485801697,
0.7997022271156311,
0.03633812814950943,
-1.0195988416671753,
-0.20137149095535278,
-0.21597573161125183,
-0.09584860503673553,
-1.1988322734832764,
-0.34971633553504944,
1.122278094291687,
-0.2232358753681183,
-0.002430533291772008,
1.1077556610... |
def delete ( self, obj ) : # override deleted _ object = objectrepository. delete ( self, obj ) if deleted _ object is none : return none if self. _ update _ commands is not none : log. debug ('% s is deleted. ', str ( obj ) ) self. _ update _ commands. append ( ( dynamoinventory. cmd _ delete, repr ( deleted _ object ... | [
-0.05075179412961006,
-1.051231861114502,
0.46999236941337585,
0.371395081281662,
0.36507508158683777,
0.08125017583370209,
0.4448491632938385,
-0.08822114020586014,
1.525554895401001,
-0.7839885950088501,
-0.3288067877292633,
-0.33635613322257996,
-0.07969153672456741,
-0.6821756362915039... |
def extract _ product _ from _ text ( text ) : def extract ( pattern ) : return extract _ ocr _ pattern ( pattern, text ) item _ no = extract ( r " ( [ 0 - 9 ] { 5, 6 } ) " ) price = extract ( r " \ $ ( [ 0 - 9. ] + ) " ) upc = extract ( r " ( [ 0 - 9 ] { 13 } ) " ) text _ without _ prices _ item _ no _ and _ upc = re.... | [
-0.47628161311149597,
-0.32042646408081055,
0.6503065824508667,
0.0956747978925705,
-1.0277711153030396,
-0.23739492893218994,
0.0721418485045433,
-0.24381200969219208,
0.23483827710151672,
0.914734423160553,
-1.309078574180603,
-0.13060082495212555,
0.33469685912132263,
-0.197638526558876... |
def load _ chaos _ matfile ( filepath, name = none, satellites = none ) : filepath = str ( filepath ) if name is none : # get name without extension name = os. path. splitext ( os. path. basename ( filepath ) ) [ 0 ] mat _ contents = du. load _ matfile ( filepath ) pp = mat _ contents ['pp'] order = int ( pp ['order'] ... | [
-0.4881361722946167,
-0.20401985943317413,
0.7814837694168091,
-0.8315532207489014,
-0.8625494241714478,
0.5775423645973206,
0.2781640291213989,
0.18358726799488068,
0.12788215279579163,
0.23338216543197632,
-0.670907735824585,
-0.3255122900009155,
0.8001902103424072,
-0.26141783595085144,... |
def test ( self, item, * identifiers ) : raise notimplementederror | [
-1.047963261604309,
-0.3406873643398285,
0.24868565797805786,
0.36134716868400574,
0.5236016511917114,
0.8832824230194092,
0.13133299350738525,
0.19003787636756897,
0.39364171028137207,
-0.3809584081172943,
-0.8944471478462219,
-0.3492404818534851,
-0.9150539636611938,
-0.639037549495697,
... |
def test _ trajectories ( ) : x _ pnts1, y _ pnts1, x _ pnts2, y _ pnts2, x _ pnts3, y _ pnts3, z _ pnts1, z _ pnts2, z _ pnts3 = trajectories ( h = 50000 ) size = len ( x _ pnts1 ) assert ( len ( x _ pnts2 ) = = len ( x _ pnts3 ) = = size ) assert ( len ( y _ pnts1 ) = = len ( y _ pnts2 ) = = len ( y _ pnts3 ) = = siz... | [
0.569690465927124,
0.17141279578208923,
0.5644439458847046,
-0.16910381615161896,
0.7329084277153015,
0.7376413345336914,
0.14426596462726593,
-0.28189679980278015,
0.30128908157348633,
-0.09783916175365448,
-1.2104724645614624,
-0.762207567691803,
-0.050350651144981384,
-0.318277627229690... |
def oldnewsurvival ( self, bootstrap = false, n _ iter = 200 ) : def cid _ hid _ cat _ count ( x ) : return x [ ['cohortid ','h _ popuid'] ]. drop _ duplicates ( ). shape [ 0 ] def calculate _ percentages ( df ) : chc _ counts = df. \ groupby ( ['date _ bin ','true _ new'] ). \ apply ( lambda x : cid _ hid _ cat _ coun... | [
0.2196500301361084,
0.4258641302585602,
1.1208544969558716,
0.6844761967658997,
-0.5532518625259399,
0.07967012375593185,
0.1652095466852188,
-0.0008556216489523649,
-0.19683529436588287,
0.4582768976688385,
0.41548383235931396,
0.413707971572876,
0.34803497791290283,
-0.028933437541127205... |
def load _ tweets ( sample = true, frac = 1 ) : positive _ file ='train _ pos. txt'if sample else'train _ pos _ full. txt'negative _ file ='train _ neg. txt'if sample else'train _ neg _ full. txt'positive _ tweets = pd. read _ csv ( os. path. join ( data _ folder, positive _ file ), delimiter = " \ t ", header = none, ... | [
-0.38897696137428284,
0.047327134758234024,
0.5884829759597778,
-0.2782389223575592,
0.3130655884742737,
0.24428531527519226,
0.08449887484312057,
0.2814992070198059,
-0.6640917062759399,
-0.00414480222389102,
0.6592155694961548,
-0.3579048812389374,
0.33473291993141174,
-0.243867829442024... |
def update _ time ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " update _ time " ) | [
0.37003856897354126,
-0.4385957419872284,
0.48224321007728577,
0.3174677789211273,
0.35577768087387085,
1.0837032794952393,
-0.5336642861366272,
0.18436770141124725,
0.6644679307937622,
1.178867220878601,
-0.09171973168849945,
0.352131724357605,
-0.1818964183330536,
-0.9649901390075684,
... |
def convert _ to _ geojson ( self, queryset, model, modelserializer ) : serializer = modelserializer ( queryset, many = true ) response = httpresponse ( content = json. dumps ( serializer. data ), content _ type ='text / geojson') response ['content - disposition'] = \'attachment ; filename = " download. geojson "'retu... | [
-0.42561933398246765,
-1.530003309249878,
0.449147492647171,
-0.5606045722961426,
-0.6320555806159973,
-0.03474004939198494,
0.17004211246967316,
-0.15853305160999298,
0.16134771704673767,
0.48189228773117065,
-0.5829885601997375,
0.034587133675813675,
0.2871154546737671,
-0.17902047932147... |
def backup _ to _ repo ( sym _ arr, sday, eday, repo _ l1 = '. / repo _ back ', repo _ hist = '. / repo') : repo. copy _ from _ repo ( sym _ arr, repo _ path _ write = repo _ l1, repo _ path _ read _ arr = [ repo _ hist ], bar _ sec = 1, sday = sday, eday = eday, keep _ overnight ='no') | [
-0.3731441795825958,
0.2066057175397873,
0.4838426411151886,
0.06799367815256119,
0.4492596387863159,
0.8633293509483337,
0.5329185724258423,
0.022898461669683456,
0.19010308384895325,
0.5418856739997864,
-0.33464476466178894,
0.2692609429359436,
0.6144885420799255,
-0.14946512877941132,
... |
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, daily _ recurrence _ time : optional [ pulumi. input [ str ] ] = none, enabled : optional [ pulumi. input [ bool ] ] = none, location : optional [ pulumi. input [ str ] ] = none, notification _ settings : op... | [
-0.3130396902561188,
0.4359149932861328,
0.5846121907234192,
0.04573414847254753,
0.05058889463543892,
0.13011661171913147,
0.2504895031452179,
0.3952571451663971,
0.1579352468252182,
0.9827308058738708,
-0.11504419893026352,
0.7857857942581177,
-0.38399699330329895,
-0.47081291675567627,
... |
def _ _ getitem _ _ ( self, item ) : if isinstance ( item, tuple ) : return self. get ( item [ 0 ], item [ 1 ] ) return list ( self. graph [ self. asnode ( ) : item ] ) | [
-1.5651824474334717,
0.18289276957511902,
0.42613357305526733,
0.46043863892555237,
0.23264993727207184,
-0.019640786573290825,
-0.3246672749519348,
-0.5444306135177612,
0.29378750920295715,
0.218361958861351,
0.18519079685211182,
-0.09241566061973572,
0.22516204416751862,
-1.4966875314712... |
def _ _ init _ _ ( self ) : self. ram = [ 0 ] * 256 self. registers = [ 0 ] * 8 self. pc = 0 self. running = true self. ops = { hlt : self. op _ hlt, ldi : self. op _ ldi, prn : self. op _ prn, mul : self. op _ mul, push : self. op _ push, pop : self. op _ pop, call : self. op _ call, add : self. op _ add, ret : self. ... | [
0.46383175253868103,
0.6507980823516846,
0.8868907690048218,
0.5719410181045532,
0.07785346359014511,
-0.1637435257434845,
1.1374238729476929,
-0.368135929107666,
0.2357061505317688,
0.29084423184394836,
-0.6495881676673889,
-0.5483460426330566,
-0.739072859287262,
0.5771597027778625,
0.... |
def getincrementindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ getincrementindex ( self ) | [
-0.22246654331684113,
0.01595270074903965,
0.1821412742137909,
0.42171719670295715,
0.01894577033817768,
-0.07242434471845627,
0.07710513472557068,
-0.5099053978919983,
-0.2680291533470154,
-0.25061506032943726,
-0.23187454044818878,
0.15905232727527618,
-0.7139027118682861,
0.002589068841... |
def update ( self, dt ) : dt = 0. 03 if dt < 0. 03 else dt dt = 1. 0 if dt > 1. 0 else dt self. angularvelocity - = self. angularvelocity * ( dt * self. damping ) self. movevelocity - = self. movevelocity * ( dt * self. damping ) self. orient ( * ( self. angularvelocity * dt ). values ( ) ) self. position + = self. mov... | [
-0.17697149515151978,
-0.5315871238708496,
0.5035714507102966,
-0.11140810698270798,
-0.6117255687713623,
0.17829179763793945,
-0.08346682041883469,
-1.0622568130493164,
0.6043630838394165,
0.11310746520757675,
0.25910794734954834,
-0.5705544352531433,
0.3275580406188965,
-0.26800903677940... |
def self ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " self " ) | [
-0.16218619048595428,
-0.015859592705965042,
0.5155493021011353,
1.162592887878418,
0.9593921899795532,
1.3729948997497559,
0.4999020993709564,
0.10261976718902588,
0.3970452547073364,
-0.1155935600399971,
-0.2615056335926056,
0.9930550456047058,
-0.563472330570221,
-0.6812379360198975,
... |
def generate _ movie _ list ( ) : movie _ list = [ ] connection = urllib. urlopen ( url _ list. format ( api _ key ) ) file _ json = open ('movie _ list. json ','w') data _ json = json. loads ( connection. read ( ) ) for movie in data _ json ['results'] : title = movie ['title'] overview = movie ['overview']. encode ('... | [
-1.8079456090927124,
-0.846778154373169,
0.5698785185813904,
-0.19462168216705322,
0.488231897354126,
0.15041124820709229,
-0.8560078740119934,
0.6190444827079773,
-0.5266708135604858,
0.609556257724762,
-1.0465478897094727,
-0.013179385103285313,
-0.11117913573980331,
1.470484972000122,
... |
def process _ chart ( self ) - > bool : if self. config. has _ changed : update _ psychrochart _ data ( self, self. config ) return true return false | [
-0.43470802903175354,
0.004668558947741985,
0.6924479007720947,
-0.17660483717918396,
-0.02532953768968582,
0.6144092679023743,
0.008361768908798695,
-0.5618010759353638,
-0.4198716878890991,
0.45352256298065186,
-0.8220369815826416,
0.12779520452022552,
-0.7635096311569214,
-0.07224986702... |
def filter ( self, context, args ) : # all logging collections use projectid, so we can set a default value. resources. registry. setparamdefault ( api ='logging ', collection = none, param ='projectsid ', resolver = resolvers. fromproperty ( properties. values. core. project ) ) context ['logging _ resources'] = resou... | [
0.07816784828901291,
0.9413338899612427,
0.41670605540275574,
-0.5766926407814026,
0.9316926002502441,
0.5037274360656738,
0.13945823907852173,
0.16100430488586426,
0.19609905779361725,
0.02172466367483139,
0.42471784353256226,
0.6221729516983032,
-0.7412123084068298,
0.34308239817619324,
... |
def add _ coverage _ 2 _ merged ( merged, coverage _ df ) : merged _ w _ cov = pd. merge ( merged, coverage _ df [ ['pos ','coverage'] ], on ='pos ', how ='left') return merged _ w _ cov | [
-0.1880037933588028,
-0.788214921951294,
0.7049073576927185,
0.5442498326301575,
0.40841537714004517,
0.28489023447036743,
-0.7631207704544067,
0.5908658504486084,
0.5069194436073303,
-0.2229478806257248,
-0.0017024296103045344,
0.17821137607097626,
-0.07900673151016235,
0.5565195083618164... |
def extract _ datestamp ( self, date _ string ) : # check the string if not _ _ internal _ _. is _ string ( date _ string ) : return none date _ string _ len = len ( date _ string ) if date _ string _ len < = 0 : return none # find a date for part in date _ string. split ('-') : for form in self. date _ format _ regex ... | [
0.12916986644268036,
-0.18385568261146545,
0.8302550315856934,
0.16417863965034485,
-0.25079917907714844,
-0.39106857776641846,
-0.46348944306373596,
-0.16263899207115173,
0.6321756839752197,
-0.2601982653141022,
-0.18325281143188477,
-0.2931695878505707,
-0.20212307572364807,
-0.363370567... |
def create _ product ( data : list [ productmodel ], token : optional [ str ] = header ( none ) ) : token _ decoded = decode _ token ( token ) if ( token _ decoded = = none ) : return {'msg':'token is required'} controller = productcontroller ( ) product _ list = controller. create ( data, token _ decoded ['id'] ) wish... | [
-0.6342650651931763,
0.1724189668893814,
0.4120759069919586,
0.34185802936553955,
0.9390996694564819,
0.6763402819633484,
-0.615166962146759,
-0.03707157447934151,
0.070135198533535,
-0.0468185618519783,
-1.6831402778625488,
-0.3697851598262787,
0.3330397307872772,
0.27278459072113037,
-... |
def model _ or _ inconsistency ( formulae : list [ formula ] ) - > union [ model, proof ] : for formula in formulae : assert formula. operators ( ). issubset ( {'- > ','~'} ) # task 6. 5 # all _ var - union of all the variables in all of the formulas all _ var = set ( ) for form in formulae : for var in form. variables... | [
-0.4251614212989807,
-0.5565171241760254,
0.6635210514068604,
0.1889941394329071,
1.0025728940963745,
0.4619520902633667,
0.2521418035030365,
0.8056463599205017,
-0.1907300353050232,
-0.5001748204231262,
0.6438003182411194,
-1.3586968183517456,
-0.7991495132446289,
1.0838080644607544,
-0... |
def most _ informative _ features ( model, vectorizer, feature _ selector, classifier, text = none, n = 20 ) : # check to make sure that we can perform this computation if not hasattr ( classifier,'coef _') : raise typeerror ( " cannot compute most informative features on { } model. ". format ( classifier. _ _ class _ ... | [
-0.18112535774707794,
-0.3393614888191223,
0.7367584109306335,
0.2043873816728592,
-0.329961359500885,
-0.7480295300483704,
-0.36013782024383545,
0.0560137964785099,
-1.196032166481018,
-0.12007744610309601,
-0.22972793877124786,
0.18794143199920654,
0.393725723028183,
0.00625314936041832,... |
def test _ get _ feature _ setting ( self ) : pass | [
0.08408117294311523,
1.0732871294021606,
0.20044559240341187,
1.6801607608795166,
0.7102727293968201,
-1.2382113933563232,
1.1136513948440552,
-0.6075047254562378,
-0.11092225462198257,
-0.64261394739151,
-0.6976906657218933,
0.39601728320121765,
-0.859111487865448,
0.0067430827766656876,
... |
def generate _ checkbox _ check _ template ( specifics : dict, placeholders : dict, * * kwargs ) - > dict : template = generate _ generic _ template ( specifics = specifics, placeholders = placeholders, meta = {'value':'{ { checkbox - value } }'} ) template ['action - type'] ='check'return template | [
-0.8177676796913147,
-0.04865501821041107,
0.20735740661621094,
-0.4844173491001129,
0.2606271207332611,
0.3695816993713379,
-0.4711417257785797,
0.8025785684585571,
-0.2426818609237671,
1.3211854696273804,
-0.21609075367450714,
-0.002430577529594302,
0.5621081590652466,
-0.042597994208335... |
def get _ dom _ from _ xml ( swift _ xml ) : return dom. parsestring ( swift _ xml ) | [
0.9992415904998779,
-0.314788818359375,
0.23767511546611786,
-0.6007112860679626,
-0.349030077457428,
0.16602946817874908,
-1.1499979496002197,
0.10249246656894684,
-0.06612858176231384,
-0.9704819917678833,
1.0354065895080566,
-0.10463839024305344,
0.6302728652954102,
-0.7321851253509521,... |
def chunk _ shape _ 3d ( varshape, valsize = 4, chunksize = 4096 ) : rank = 3 # this is a special case of n - dimensional function chunk _ shape chunkvals = chunksize / float ( valsize ) # ideal number of values in a chunk numchunks = varshape [ 0 ] * varshape [ 1 ] * varshape [ 2 ] / chunkvals # ideal number of chunks... | [
0.6079950332641602,
-0.029129253700375557,
0.8481226563453674,
-0.013824505731463432,
-0.5523983836174011,
-0.1471218317747116,
0.47015380859375,
-0.37083637714385986,
-0.6641321778297424,
0.1958737075328827,
0.3750377595424652,
0.6463435292243958,
0.23933550715446472,
-0.01548692677170038... |
def get _ all _ players ( ) : start = time. time ( ) players = pd. read _ sql ( " select * from player _ attributes ", conn ) print ('time to get all players : ', time. time ( ) - start ) return players | [
-0.3385811448097229,
-0.4601688086986542,
0.5908615589141846,
0.8018231391906738,
0.3749496042728424,
0.0086888512596488,
-0.7036287784576416,
0.487906277179718,
-1.136966586112976,
0.4730529189109802,
0.7374593615531921,
0.8840108513832092,
-0.6326600313186646,
-0.36231139302253723,
0.3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.