text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def maxcolum ( m, c ) : r = c # fila maximum = m [ c ] [ c ] for i in range ( c + 1, len ( m ) ) : if ( fabs ( maximum ) < fabs ( m [ i ] [ c ] ) ) : maximum = m [ i ] [ c ] r = i return r | [
0.960200309753418,
-0.8448501825332642,
0.7223719358444214,
0.4389767348766327,
-0.5357177257537842,
0.03390032798051834,
0.3811812400817871,
-0.37900060415267944,
-1.2875401973724365,
0.15814900398254395,
0.09101013094186783,
0.3622516989707947,
-0.15914121270179749,
-0.47582128643989563,... |
def copy ( self ) : return directory ( self. path, relto = self. _ relto, make _ absolute = self. _ absolute ) | [
-0.55615234375,
-1.4420926570892334,
0.6891034245491028,
0.20451566576957703,
-1.1314977407455444,
1.0601705312728882,
0.8551914095878601,
-0.8424941301345825,
0.13723835349082947,
-0.6965756416320801,
0.3550955653190613,
0.7539287805557251,
0.6566388607025146,
-1.040175199508667,
-0.781... |
def load _ local _ dataset ( request ) : if request. method = ='post': file _ path = request. body. get ( " filepath " ) else : file _ path = request. get. get ( " filepath " ) print ( file _ path ) response = apiresponse ( ) if os. path. exists ( file _ path ) : # read file ca = get _ mongo _ client ( uri ='mongodb : ... | [
-0.769875168800354,
-0.49343255162239075,
0.7901784181594849,
-0.7011668086051941,
-0.030054764822125435,
0.6819929480552673,
-0.2264941781759262,
0.6978687644004822,
0.1681138128042221,
0.5282740592956543,
-0.20275504887104034,
0.048966243863105774,
-0.2143305242061615,
0.0069236676208674... |
def secondary _ connection _ string ( self ) - > optional [ str ] : return pulumi. get ( self, " secondary _ connection _ string " ) | [
1.0400886535644531,
-1.3673917055130005,
0.5801824331283569,
0.6814923286437988,
0.17085114121437073,
0.28578686714172363,
-0.0978521928191185,
-0.8529408574104309,
0.1869148164987564,
-0.5404130220413208,
0.1677711308002472,
1.0541715621948242,
0.18224573135375977,
-1.366950511932373,
-... |
def recover ( self, array ) : for pos in self. cells : self [ pos ] = array [ pos ] self. caption ='' self. setback = false | [
-0.6029683351516724,
-0.8843076825141907,
0.3310108184814453,
-0.255536824464798,
-0.4266360402107239,
-0.28911495208740234,
0.0025318234693259,
0.46212607622146606,
0.47091349959373474,
0.14456675946712494,
-0.5846959948539734,
-0.06152818351984024,
-0.339634507894516,
-0.4265011847019195... |
def get _ field _ option ( self, field _ id, context _ id, * * kwargs ) : data = self. _ optional _ variable ( kwargs, ['optionid ','onlyoptions ','startat ','maxresults'] ) return self. _ raw _ execution ( path = f'/ field / { field _ id } / context / { context _ id } / option ', data = data ) | [
-0.23170071840286255,
0.5091924071311951,
0.37585821747779846,
0.31752076745033264,
1.1449670791625977,
-0.5634540915489197,
-0.16745232045650482,
-0.7484474182128906,
0.3396870493888855,
0.14931151270866394,
0.3506212830543518,
0.9483833312988281,
-0.5947890877723694,
-0.5478554368019104,... |
def test _ source _ from _ url ( self ) : test _ uri = " http : / / testme. com / test. cfg " httpretty. register _ uri ( httpretty. get, test _ uri, body = http _ manifest ) m = manifest ( test _ uri ) assert m. source ( ) = = test _ uri | [
-0.29345282912254333,
0.16889727115631104,
0.2862597405910492,
0.22830648720264435,
-0.385039359331131,
-0.06374937295913696,
-0.13890168070793152,
0.5825999975204468,
0.676923394203186,
-0.5660349726676941,
-1.124504804611206,
-0.04292265325784683,
-0.7672280073165894,
0.17271935939788818... |
def allow _ origins ( self ) - > optional [ sequence [ str ] ] : return pulumi. get ( self, " allow _ origins " ) | [
0.6650384068489075,
0.282166451215744,
0.6524739265441895,
0.725238561630249,
0.47078627347946167,
2.137219190597534,
-0.10196492075920105,
0.25030672550201416,
0.7636709213256836,
0.4527401924133301,
-0.13033626973628998,
1.066659927368164,
0.2585497796535492,
-0.6852514743804932,
-1.20... |
def _ samples _ by _ plate ( get, api _ path ) : url ='% s / platemaps'% ( api _ path ) r = get ( url ) samples _ urls = ['samples? platemapid = % s & limit = 9007199254740991'% x ['_ id'] for x in r. json ( ) ] return samples _ urls | [
-0.5501347780227661,
-0.42356956005096436,
0.5451508164405823,
-0.48675885796546936,
0.7291480898857117,
-0.1948878914117813,
-0.45256131887435913,
-0.10080186277627945,
-0.0002629625960253179,
0.3126082718372345,
-0.3167274296283722,
0.07562294602394104,
-0.22919969260692596,
0.3786660432... |
def test _ has _ jacobian ( ) : assert distanceconverter. has _ jacobian is false assert nulldistanceconverter. has _ jacobian is true assert powerlawconverter. has _ jacobian is true assert comovingdistanceconverter. has _ jacobian is false | [
-0.303743451833725,
-0.37558281421661377,
0.5952798128128052,
0.2216455638408661,
0.2458609938621521,
1.144150733947754,
0.07730039209127426,
0.3501207232475281,
-0.9178063273429871,
-0.48852044343948364,
-1.060621738433838,
-1.063464641571045,
0.5486922264099121,
1.611997127532959,
-0.1... |
def daily _ recurrence _ time ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " daily _ recurrence _ time " ) | [
0.3469400703907013,
0.3313312828540802,
0.5529828667640686,
0.6897850036621094,
1.218347191810608,
0.5497654676437378,
0.2682953178882599,
-0.27238258719444275,
0.2683471441268921,
-0.263472318649292,
0.2033916413784027,
0.5493400692939758,
0.06928831338882446,
-0.7136839032173157,
-0.42... |
def on _ key _ release ( self, event ) : command = self. _ keycode _ to _ command _ map. get ( event. keycode, none ) if command is none : return released _ key = self. _ keys _ pressed [ command ] released _ key. is _ pressed = false released _ key. press _ time = none released _ key. has _ been _ processed _ once = f... | [
0.12764552235603333,
0.31003209948539734,
0.4989868104457855,
0.11926113814115524,
0.504151463508606,
-0.592825174331665,
-0.10005373507738113,
0.512260377407074,
0.7458359003067017,
0.6889832615852356,
-0.6296907663345337,
0.5116023421287537,
-0.3318723738193512,
0.706457257270813,
0.38... |
def test _ classes _ list ( self ) : query _ params = {'subject': self. _ class. subject,'week _ day': self. schedules _ 2. week _ day,'schedule': convert _ minutes _ to _ hour ( self. schedules _ 2. from + 10 ) } response = self. client. get ( self. url, query _ params ) self. assertequal ( 200, response. status _ cod... | [
-1.208913803100586,
0.19365209341049194,
0.4117412269115448,
-0.46559593081474304,
0.9226312637329102,
0.631243109703064,
-1.243987798690796,
-0.2499803900718689,
0.5970064997673035,
-0.5548656582832336,
-0.15669693052768707,
-0.00978364422917366,
0.7616792321205139,
0.1709212213754654,
... |
def payment _ confirm ( request, payment _ id ) : payment = get _ object _ or _ 404 ( payment, user = request. user, id = payment _ id ) return render ( request,'pegasus / examples / payments / payment _ confirm. html ', {'payment': payment,'active _ tab':'payments ', } ) | [
1.3585638999938965,
-0.1799895018339157,
0.2752300500869751,
0.42455312609672546,
-0.5296720266342163,
-0.2160937339067459,
-0.9070612192153931,
0.47511157393455505,
0.04342614486813545,
0.8641111850738525,
1.0688679218292236,
0.47280511260032654,
0.47952383756637573,
0.21728286147117615,
... |
def basic _ authenticate ( realm, authenticator, user _ extractor ) : def wrapper ( self, transforms, * args, * * kwargs ) : request = self. request format ='' clazz = self. _ _ class _ _ print'intercepting for class : % s ', clazz try : auth _ hdr = request. headers. get ('authorization') if auth _ hdr = = none : retu... | [
-1.0518864393234253,
-0.6437004804611206,
0.7169228792190552,
0.4204079806804657,
-0.7448788285255432,
0.10863641649484634,
-0.18635916709899902,
-0.6144741773605347,
0.3675612211227417,
-0.43112096190452576,
-0.032078806310892105,
-0.36965447664260864,
0.16920115053653717,
-0.603004157543... |
def process ( self, context ) : text _ line = context. element. strip ( ) if not text _ line : context. aggregate _ to ( empty _ line _ aggregator, 1 ) return re. findall ( r'[ a - za - z \'] + ', text _ line ) | [
-0.10246243327856064,
0.4862920343875885,
0.6470352411270142,
-0.22003912925720215,
0.49549755454063416,
-0.32030001282691956,
-0.5614966750144958,
-0.07543519884347916,
0.02114948444068432,
0.34733882546424866,
0.13874451816082,
-0.0562596321105957,
0.17334650456905365,
0.4904259741306305... |
def predict _ proba ( x, coeffs ) : x. dot ( coeffs ) predicted _ probabilities = 1 / ( 1 + np. exp ( - x. dot ( coeffs ) ) ) return predicted _ probabilities | [
-0.07997068762779236,
-0.62865149974823,
0.38000383973121643,
0.20662176609039307,
-0.27645084261894226,
0.33483651280403137,
-0.6816954016685486,
-0.09415145218372345,
0.4607684910297394,
0.01995175890624523,
-0.257826030254364,
0.21946072578430176,
-0.30255240201950073,
-1.22683835029602... |
def list ( self, status : union [ " hostednumberorderinstance. status ", object ] = values. unset, sms _ capability : union [ bool, object ] = values. unset, phone _ number : union [ str, object ] = values. unset, incoming _ phone _ number _ sid : union [ str, object ] = values. unset, friendly _ name : union [ str, ob... | [
-0.05198643356561661,
0.38219672441482544,
0.44707825779914856,
0.2089967280626297,
-0.0564379021525383,
0.5314422845840454,
-0.8758970499038696,
0.5216919779777527,
0.3653823733329773,
-0.6224839091300964,
-1.3161087036132812,
0.4124283492565155,
-0.2033311426639557,
0.3243924081325531,
... |
async def test _ controlling _ state _ via _ mqtt _ rgbww _ tuya ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 5 # 5 channel light ( rgbcw ) config [ " ty " ] = 1 # tuya device mac = ... | [
-0.1875939816236496,
-0.21542827785015106,
0.39233866333961487,
-0.33456745743751526,
0.40273717045783997,
0.6794085502624512,
0.3094857633113861,
-0.6036521792411804,
-0.015164749696850777,
-0.3728463649749756,
-0.2791025936603546,
-0.32578030228614807,
0.47742873430252075,
0.619376242160... |
def add _ genome _ to _ node ( self, node, genome ) : node. add _ feature ( " genome ", genome ) genome. set _ taxon ( node ) if isinstance ( genome, extantgenome ) : self. leaves. add ( node ) elif isinstance ( genome, ancestralgenome ) : genome. name = node. name self. internal _ nodes. add ( node ) else : raise type... | [
-0.19584129750728607,
-0.10688785463571548,
0.8136664628982544,
0.07152929157018661,
0.10648568719625473,
0.6828396320343018,
-0.5100621581077576,
0.5473212003707886,
-0.5060880184173584,
-0.38953936100006104,
0.4697309136390686,
1.4832290410995483,
-0.48105907440185547,
1.0932992696762085... |
def _ read _ range ( self, start, end = 0 ) : stream = _ bytesio ( ) try : with _ handle _ azure _ exception ( ) : self. _ get _ to _ stream ( stream = stream, start _ range = start, end _ range = ( end - 1 ) if end else none, * * self. _ client _ kwargs, ) except _ azurehttperror as exception : if exception. status _ ... | [
-0.1312398463487625,
0.05121345818042755,
0.6419376730918884,
0.44090190529823303,
-0.20319564640522003,
-0.1279647946357727,
-0.5985962152481079,
-0.9009402990341187,
-1.0470445156097412,
-0.16152840852737427,
0.7439783215522766,
0.636852502822876,
-0.7755061984062195,
-0.6527134776115417... |
def index ( ) : app _ name = os. environ. get ('flask _ app _ name ','nothing set') instance _ name = os. environ. get ('flask _ instance _ name ','' ) return render _ template ('index. html ', app _ name = app _ name, instance _ name = instance _ name ) | [
0.3814152181148529,
-0.26963093876838684,
0.4688015878200531,
-0.24474744498729706,
-0.13391141593456268,
0.7719665169715881,
-0.3529475927352905,
0.45213258266448975,
-1.0071866512298584,
0.6251099705696106,
0.754176914691925,
0.7086024284362793,
0.002266793744638562,
-0.3908672332763672,... |
def get _ instance _ changes ( self, instance _ id = none ) : | [
-0.8105150461196899,
-0.2716071307659149,
0.33273106813430786,
-0.22590768337249756,
0.02631440758705139,
-0.12865382432937622,
-0.09549412876367569,
0.45417386293411255,
-0.07628472149372101,
0.4194941520690918,
-0.5876873731613159,
1.3490405082702637,
0.06302645802497864,
0.9370552301406... |
def _ on _ scroll ( self, x, y, dx, dy ) : if not self. _ pressing : if self. _ index > = self. _ key _ length : self. _ index = 0 if dy > = 1 : if self. _ modifier is not none : self. _ key _ controller. press ( self. _ modifier ) self. _ key _ controller. press ( self. _ keys [ self. _ index ] ) self. _ key _ control... | [
-1.3132749795913696,
1.0224969387054443,
0.6892427802085876,
-0.5902918577194214,
-0.23906132578849792,
-0.975858747959137,
0.03236834704875946,
-1.049264907836914,
-0.04828311502933502,
0.04980943351984024,
-1.20123291015625,
-0.4815826416015625,
0.05812487378716469,
0.2502713203430176,
... |
def test _ transformedlist ( ) : l1 = transformedlist ( [ 10, 10, 6, 5, 1 ] ) l2 = transformedlist ( [ 10, 6, 5, 1, 1 ] ) l3 = transformedlist ( [ 8, 6, 5, 1, 1 ] ) l4 = transformedlist ( [ 10, 10, 6, 5, 2 ] ) assert l1 = = [ 10, 6, 5 ] assert l2 = = [ 6, 5, 1 ] assert l3 = = [ 8, 6, 5, 1, 1 ] assert l4 = = [ 10, 10, 6... | [
-0.4140256643295288,
-0.11784772574901581,
0.5524335503578186,
-0.18520624935626984,
0.7026136517524719,
-0.6556494235992432,
0.9380888342857361,
0.5010660886764526,
0.6213297843933105,
-0.426520973443985,
-2.206721782684326,
-0.530898928642273,
-0.5339982509613037,
0.04130180552601814,
... |
def word _ count ( self ) : return { word : self. phrase. split ( ). count ( word ) for word in self. phrase. split ( ) } | [
0.5000088214874268,
-0.2832488417625427,
0.523184061050415,
-1.5437500476837158,
-0.14866772294044495,
0.03287619352340698,
-0.8820862770080566,
1.0663827657699585,
-0.7113288640975952,
0.6794764995574951,
-0.6763151288032532,
-0.6547072529792786,
-0.41001200675964355,
0.646021842956543,
... |
def decompose _ plant _ data _ frame _ into _ resources _ and _ areas ( df, resources, areas, grid ) : resources _ areas = defaultdict ( dict ) areas _ resources = decompose _ plant _ data _ frame _ into _ areas _ and _ resources ( df, areas, resources, grid ) for a in areas _ resources. keys ( ) : for r in areas _ res... | [
-0.3098088204860687,
-0.3724346458911896,
0.3234766721725464,
-0.5927941799163818,
-0.6212447285652161,
-0.7930824160575867,
0.2969627380371094,
0.496274471282959,
0.1475740373134613,
0.006324365269392729,
0.1346970647573471,
-1.0327234268188477,
0.9153391718864441,
-0.056455668061971664,
... |
def f ( ) : return symbolic ('f') | [
0.4363209009170532,
1.0357431173324585,
0.09387705475091934,
-0.04249757528305054,
0.3654737174510956,
-1.373313307762146,
0.8391714096069336,
0.1565721482038498,
-1.0030981302261353,
-1.31538987159729,
-0.1975383758544922,
-0.30982571840286255,
1.5980829000473022,
-0.7805712223052979,
-... |
def initialize _ simulator ( self, simulator = none, mode = " headless ", scene _ id = none, scene _ kwargs = none, load _ clutter = false, should _ debug _ sampling = false, online _ sampling = true, ) : # set self. scene _ name, self. scene, self. sampled _ simulator _ objects, and self. sampled _ dsl _ objects if si... | [
-0.2343340665102005,
0.2585632801055908,
0.8368021845817566,
0.5226905345916748,
-0.6802799105644226,
-0.6563476920127869,
0.5689559578895569,
-0.19088847935199738,
0.5547817349433899,
-0.0714937150478363,
-1.073765754699707,
-0.8350063562393188,
-0.5453235507011414,
0.23896686732769012,
... |
def _ reverse3 ( self, head ) : if head is none : return head if head. next is none : head. prev = none return head new _ head = self. _ reverse3 ( head. next ) head. next. next = head head. prev = head. next head. next = none return new _ head | [
-0.2581137418746948,
0.5962238907814026,
0.8831957578659058,
-0.20840846002101898,
-0.5424848794937134,
-0.6280776262283325,
-0.4280237853527069,
0.42023658752441406,
0.5784124135971069,
0.559673547744751,
-0.4226410984992981,
0.8032910227775574,
-1.5287902355194092,
-0.9238457679748535,
... |
def sympinv ( m, verbose = false ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy, sys from scipy import linalg ( l, v, info ) = linalg. lapack. dsyev ( m ) if verbose : print ('- - info from li... | [
0.43822577595710754,
0.06968243420124054,
0.487383097410202,
-0.5284876227378845,
-1.1961132287979126,
-0.06988819688558578,
0.6584016680717468,
0.7561889290809631,
0.12070193886756897,
0.9173929691314697,
-0.669695258140564,
0.15095838904380798,
-0.20316408574581146,
0.21571403741836548,
... |
def stations ( ) : session = session ( engine ) results = session. query ( stations. station, stations. name ). all ( ) station _ list = [ ] for station, name in results : station _ dict = { } station _ dict [ " station " ] = station station _ dict [ " name " ] = name station _ list. append ( station _ dict ) return js... | [
-1.9363832473754883,
-0.8106108903884888,
0.3199513852596283,
-0.49495142698287964,
-0.04970922693610191,
-0.5639264583587646,
-0.8565670251846313,
0.35308364033699036,
-0.7037235498428345,
1.0732314586639404,
-1.556958794593811,
-0.8958632349967957,
0.37536248564720154,
0.6461787819862366... |
def validate _ byte _ length ( self ) : class _ len = self. num _ bytes contents _ len = len ( self. contents ) if class _ len! = contents _ len : logger. warning ( f " the length of the file contents does not match with { type ( self ) } " ) logger. warning ( f " expected { class _ len } bytes. given { contents _ len ... | [
0.7639574408531189,
-0.5417646765708923,
0.3074015974998474,
-0.8397230505943298,
0.6195922493934631,
0.464610755443573,
0.14601963758468628,
0.08639142662286758,
0.6463887691497803,
-0.8903577327728271,
0.014069735072553158,
-0.23036187887191772,
0.29660436511039734,
0.5226189494132996,
... |
def make _ function _ cv ( xtr, ytr, iteration, k, rand ) : cv = crossvalidation ( xtr, ytr ) cv. slice _ data _ k _ fold ( k ) def get _ roc _ f1 ( layer ) : # print ( layer ) layer = tuple ( layer ) f1 = 0 for i in range ( k ) : xtmp, ytmp, xval, yval = cv. choose _ i _ fold ( i ) _, f1 _ tmp = get _ perf _ model _ t... | [
0.48491033911705017,
0.3971019685268402,
0.5219076871871948,
0.7237382531166077,
-0.1908661276102066,
-0.20279087126255035,
0.9274290204048157,
-0.035246409475803375,
-0.9776910543441772,
0.6067466735839844,
-0.2530996799468994,
-0.4593711197376251,
0.8845767378807068,
-0.30416247248649597... |
def connect ( self, connection, * args, * * kwargs ) : print " connecting ", connection. mark distance = base. dist2marksigned ( connection. mark ) direction _ in = np. array ( [ self. direction. real, self. direction. imag ] ) direction _ out = np. array ( [ connection. direction. real, connection. direction. imag ] )... | [
-0.22086389362812042,
-0.570433497428894,
0.7902052998542786,
0.09484332799911499,
0.17669273912906647,
0.09869594871997833,
0.6595638394355774,
-0.24085471034049988,
0.04736357182264328,
0.40152299404144287,
-0.027391526848077774,
0.5962802171707153,
0.08523544669151306,
0.336777448654174... |
def simulate ( self, n = 100, pack = false, cutoff ='truncate') : return super ( ). _ simulate ( ( n, false, lambda s : self. r * s, lambda s, sigma : _ modify ( sigma, cutoff ) * s, true, lambda sigma : self. kappa * ( self. theta - sigma ), lambda sigma : self. xi * np. sqrt ( _ modify ( sigma, cutoff ) ), self. rho ... | [
-0.2693555951118469,
1.2433087825775146,
0.5485184192657471,
0.1814887374639511,
-0.5315583348274231,
-0.21791164577007294,
-0.1950986236333847,
-0.5839440226554871,
0.5865752100944519,
0.40823638439178467,
-0.7627134919166565,
-0.4848858416080475,
0.09149084985256195,
-0.3784889578819275,... |
def visit ( self, node, parent = none ) : if node is none : return " " nodetype = node. _ _ class _ _. _ _ name _ _ f = getattr ( self, " visit _ " + nodetype, none ) if f : code = f ( node ) else : code = self. visit _ children ( node ) if code is none : code = " " elif isinstance ( code, basestring ) : pass else : co... | [
-0.6199551820755005,
0.5265932083129883,
0.8367250561714172,
-0.39153602719306946,
-0.9816033840179443,
-1.2156736850738525,
0.12414848804473877,
-0.20254650712013245,
-0.09220882505178452,
-0.029906930401921272,
0.9441882967948914,
0.43538960814476013,
0.284292995929718,
0.502701222896575... |
def test _ iocpnotwin32 ( self ) : self. assertin ( twisted _ reactors. iocp. description, self. message ) self. assertin ( "! " + twisted _ reactors. iocp. shortname, self. message ) | [
0.15525394678115845,
0.18718373775482178,
0.30950477719306946,
-0.45956549048423767,
0.47005772590637207,
1.3231713771820068,
-0.16024821996688843,
0.023763040080666542,
-0.06399405002593994,
0.17295099794864655,
0.17910133302211761,
0.7372671961784363,
-1.7948697805404663,
0.2467545866966... |
def start _ recording ( self ) : raise notimplementederror ( ) | [
0.02045551687479019,
0.28393587470054626,
0.5670250654220581,
0.8447855114936829,
0.36541327834129333,
0.8611023426055908,
0.3215218484401703,
0.739766001701355,
-0.12262606620788574,
-0.261186808347702,
-0.22560660541057587,
1.1293543577194214,
0.4676147997379303,
0.7780440449714661,
-0... |
def write _ xml ( self, file _ name : str ) - > none : xml _ root = et. element ( " regs " ) for reg in self. registers : reg. add _ et _ subelement ( xml _ root ) with open ( file _ name,'w ', encoding = " utf - 8 " ) as xml _ file : no _ pretty _ data = minidom. parsestring ( et. tostring ( xml _ root, encoding = " u... | [
-0.007307120133191347,
0.6182817816734314,
0.3448217213153839,
-0.1411333680152893,
1.097070574760437,
0.35110950469970703,
0.44456279277801514,
1.2261439561843872,
-0.15374453365802765,
-0.5797902345657349,
-0.14612916111946106,
-0.2276930958032608,
0.026628093793988228,
0.425687462091445... |
def write _ tree ( self, name : str, depth : int, graph _ type : str = " digraph ", simplify : bool = true ) : depth = min ( depth, self. max _ depth ) self. graph = pydot. dot ( graph _ type = graph _ type, simplify = simplify ) self. populate _ graph ( self. json _ tree, depth = depth ) self. graph. write _ png ( nam... | [
-1.3236241340637207,
0.514082133769989,
0.5727345943450928,
-0.652427077293396,
-0.05766290798783302,
-0.10013143718242645,
-0.22343145310878754,
-0.32075920701026917,
0.2801607549190521,
-0.08994895219802856,
-0.7007721662521362,
0.4676297605037689,
0.5452281832695007,
0.6867482662200928,... |
def one _ hot3d ( labels : torch. tensor, num _ classes : int, device : optional [ torch. device ] = none, dtype : optional [ torch. dtype ] = none, eps : optional [ float ] = 1e - 6 ) - > torch. tensor : if not torch. is _ tensor ( labels ) : raise typeerror ( " input labels type is not a torch. tensor. got { } ". for... | [
-0.4773254990577698,
0.6828970909118652,
0.5743421912193298,
0.07938520610332489,
-0.25150129199028015,
0.47586381435394287,
-0.2912384271621704,
0.169155091047287,
0.5003021955490112,
0.3434734642505646,
0.7131050229072571,
0.613219141960144,
-0.05747196078300476,
-0.8175510764122009,
-... |
def make _ license _ notifications _ feed _ uri ( app _ id = none, startdatetime = none, max _ results = none, params = none ) : parameters ='[ appid = % s ]'% app _ id if startdatetime : parameters + ='[ startdatetime = % s ]'% startdatetime else : parameters + ='[ startdatetime = 1970 - 01 - 01t00 : 00 : 00z ]'if max... | [
0.6406653523445129,
0.10929267108440399,
0.7198203802108765,
-0.38153019547462463,
-0.2945595383644104,
-0.23814712464809418,
-0.6920634508132935,
1.170233130455017,
-0.60291987657547,
-0.47405916452407837,
0.04544954001903534,
0.5676547884941101,
0.15534403920173645,
-0.002728966763243079... |
def creation _ timestamp ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " creation _ timestamp " ) | [
1.1950898170471191,
0.13491952419281006,
0.2297448068857193,
0.38660091161727905,
0.9641528725624084,
0.7940235733985901,
-0.08758056908845901,
-0.2335732877254486,
-0.028658684343099594,
-0.19932158291339874,
0.17731769382953644,
0.27284789085388184,
0.9455556273460388,
-0.869307458400726... |
def get _ task _ type _ epic ( action _ classes, verb _ classes, noun _ classes ) : task _ types = [ ] if action _ classes > 0 : task _ types. append ( " epicactions " ) if verb _ classes > 0 : task _ types. append ( " epicverbs " ) if noun _ classes > 0 : task _ types. append ( " epicnouns " ) return task _ types | [
-0.40978261828422546,
0.061709120869636536,
0.6049466729164124,
1.055936574935913,
1.8465222120285034,
0.3231942653656006,
0.01597151719033718,
-0.12734267115592957,
-0.7609322667121887,
0.8956684470176697,
-0.06269888579845428,
0.22997067868709564,
1.1579163074493408,
0.0838920921087265,
... |
def update ( self ) : self. _ device. update ( ) | [
-1.1485518217086792,
-0.8827341794967651,
0.0959991067647934,
0.10383672267198563,
-0.2170492708683014,
0.3494870066642761,
0.5069790482521057,
-0.31054171919822693,
-0.3571389615535736,
-0.411898136138916,
0.28155359625816345,
0.7677690386772156,
-0.30466264486312866,
0.38792651891708374,... |
def sum ( self, axis : int = 0 ) - > " dataframe " : if axis = = 0 : return wrap _ df ( self. _ df. sum ( ) ) if axis = = 1 : return wrap _ s ( self. _ df. hsum ( ) ). to _ frame ( ) raise valueerror ( " axis should be 0 or 1 " ) | [
-0.8883313536643982,
1.1035183668136597,
0.5335867404937744,
1.4255300760269165,
0.431647926568985,
-0.37564781308174133,
0.5620739459991455,
-0.4839991629123688,
0.22423408925533295,
-0.8187153339385986,
0.08865291625261307,
0.9657977223396301,
-0.06882383674383163,
-0.7035803198814392,
... |
def getsignaltonoise ( self ) : signaltonoise = 10 return ( signaltonoise ) | [
-0.04680778086185455,
0.09555134177207947,
0.2762530744075775,
-0.16881167888641357,
0.7283217310905457,
-0.6218224763870239,
0.23292486369609833,
-0.15734295547008514,
0.13312262296676636,
0.1860349029302597,
-2.6977100372314453,
-0.025670718401670456,
0.46618103981018066,
0.5214540362358... |
def loop _ once ( self ) : # move data for a random move on a random simplex mdata = moves. try _ random ( moves. list _ of _ try _ functions ) # if a move is topologically acceptable, check the fitness # function, and possibly accept it. otherwise, do nothing. if mdata : do _ move = self. confirm _ move ( mdata ) if d... | [
-0.4228503704071045,
0.7567786574363708,
0.4429633319377899,
0.7982698082923889,
0.4533510208129883,
0.37973055243492126,
0.19966651499271393,
-0.593854546546936,
0.06171517074108124,
-0.6035563945770264,
0.31794145703315735,
0.5507888793945312,
-0.5420681238174438,
0.3163933753967285,
-... |
def appendr ( self, r, prim ) : self. rlst. append ( r ) self. primlst. append ( prim ) | [
-0.19484512507915497,
-0.5641719102859497,
0.28683170676231384,
-0.2585459351539612,
-0.6926218867301941,
1.0110433101654053,
-1.4937375783920288,
0.25783881545066833,
0.70767742395401,
-0.44991642236709595,
-0.8276202082633972,
0.8879615068435669,
-0.5145111083984375,
1.2101893424987793,
... |
def mockup ( request ) : return render ( request,'the _ snowmen _ snowpack _ viewer / mockup. html') | [
-0.34465402364730835,
0.8099984526634216,
0.17871055006980896,
0.2524745464324951,
-0.2574579119682312,
-0.1568385809659958,
0.9794234037399292,
0.8031885623931885,
0.3892158567905426,
-0.22340282797813416,
0.7415618896484375,
-0.6527873277664185,
0.17707130312919617,
0.06913916766643524,
... |
def policy _ iteration ( mdp ) : u = { s : 0 for s in mdp. states } pi = { s : random. choice ( mdp. actions ( s ) ) for s in mdp. states } while true : u = policy _ evaluation ( pi, u, mdp ) unchanged = true for s in mdp. states : a = max ( mdp. actions ( s ), key = lambda a : expected _ utility ( a, s, u, mdp ) ) if ... | [
-0.12019625306129456,
-0.08269509673118591,
0.44865354895591736,
-0.7129653692245483,
-0.48867884278297424,
0.9311980605125427,
-0.32465097308158875,
-0.04311198741197586,
1.1663645505905151,
0.29745611548423767,
0.5839634537696838,
-0.6819297671318054,
-0.2635152041912079,
-0.521971344947... |
def select _ next _ move ( self, stats, board, c ) : bestscore = none bestmove = none children = [ ( m, stats [ board. move ( m ). hashkey ( ) [ 0 ] ] ) for m in board. moves ( ) ] total _ n = sum ( x [ 0 ] for ( _, x ) in children ) for child _ move, child _ stat in children : n, w = child _ stat if n = = 0 : return c... | [
0.7941347360610962,
0.303143709897995,
0.7668853998184204,
0.5925451517105103,
-0.0881744921207428,
-0.6572340130805969,
0.1442459523677826,
-0.5683767795562744,
-0.266435831785202,
-0.2883627414703369,
-0.38821151852607727,
-0.2026449590921402,
0.09127872437238693,
0.07107795029878616,
... |
def inner _ func ( model, x _ train, y _ train, x _ val : pd. dataframe, y _ val : pd. series ) - > pd. dataframe : try : if model. greedyfit : # attribute might not be found for standard sklearn models model. fit ( x = x _ train, y = y _ train, fullx = pd. concat ( [ x _ train, x _ val ], axis = 0 ), fully = pd. conca... | [
0.5798801779747009,
0.5745510458946228,
0.867059588432312,
0.4032805263996124,
0.15104754269123077,
0.14705504477024078,
-0.19323047995567322,
0.369527667760849,
-0.03249023109674454,
0.060108400881290436,
0.7571333646774292,
0.78828364610672,
0.4788624346256256,
0.10944007337093353,
0.6... |
def add _ list _ property ( self, property : str, values : list ) : self. properties [ property ] + = values | [
-0.27885228395462036,
-0.584227979183197,
0.24910123646259308,
0.31927841901779175,
1.0628560781478882,
1.1856765747070312,
-2.1484177112579346,
0.6436981558799744,
0.6595045924186707,
-0.35071876645088196,
-0.5243169665336609,
-0.7163873314857483,
-0.10935000330209732,
0.39397621154785156... |
def image _ tensor ( image ) : image3d = gray2rgb ( image ). astype ( np. float32 ) x = 255 * image3d. transpose ( ( 2, 0, 1 ) ) x = np. expand _ dims ( x, axis = 0 ) return preprocess _ input ( x ) | [
-1.1068568229675293,
0.2183530330657959,
0.5526483654975891,
-0.6121790409088135,
-0.2825786769390106,
0.1626644730567932,
0.7118216156959534,
-0.21852034330368042,
0.30613622069358826,
1.0050814151763916,
-0.3479141294956207,
0.3989504277706146,
0.4770296514034271,
-0.5261265635490417,
... |
def reduce _ dims ( frameset ) : return [ frame [ :, :, 0 ] for frame in frameset ] | [
-1.0301480293273926,
0.030470184981822968,
0.535771369934082,
0.28531211614608765,
0.19110074639320374,
-0.9423709511756897,
0.3949257433414459,
-0.6086821556091309,
0.703921377658844,
0.5051199197769165,
-0.1462462991476059,
-0.02008327841758728,
0.09712612628936768,
0.9580016732215881,
... |
def clean _ float ( num ) : ntmp = num. replace ( '. ','' ). replace ( ', ', '.') return float ( ntmp ) | [
0.7594099044799805,
-0.32697534561157227,
0.5402257442474365,
-0.09922876954078674,
0.047275908291339874,
-0.7252333164215088,
-0.08836285769939423,
0.21241594851016998,
-0.0026402880903333426,
-0.22111529111862183,
-0.08357235789299011,
0.002119049895554781,
-0.2947137951850891,
0.0075088... |
def ipv4 _ addresses ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input [ str ] ] ] ] : return pulumi. get ( self, " ipv4 _ addresses " ) | [
-0.7841322422027588,
-0.18156658113002777,
0.4120643734931946,
0.4638991951942444,
1.1245251893997192,
0.33435919880867004,
0.2532309293746948,
-0.3316589891910553,
0.7020474076271057,
0.14800305664539337,
-0.7583955526351929,
0.419800728559494,
-0.7999839186668396,
-1.4585657119750977,
... |
def main ( ) : # parse the arguments parser = argparser ( description = " ", epilog = " ", formatter _ class = argumentdefaultshelpformatter ) parser. add _ argument ( " routemap ", help = " file where the map is defined " ) parser. add _ argument ( " client ", help = " file where all clients'requests are defined " ) #... | [
0.8059447407722473,
0.5212944746017456,
1.3522250652313232,
0.2177484929561615,
0.17284609377384186,
-0.03533220663666725,
0.6652226448059082,
0.03017444536089897,
-0.6590290069580078,
0.3007952570915222,
-0.04314882680773735,
0.1370793581008911,
0.269962877035141,
0.3306156396865845,
-0... |
def create _ grid2 ( cloud ) : minx, maxx = cloud [ lat ]. min ( ), cloud [ lat ]. max ( ) miny, maxy = cloud [ long ]. min ( ), cloud [ long ]. max ( ) minz, maxz = cloud [ ele ]. min ( ), cloud [ ele ]. max ( ) im _ range = ( 1 + maxx - minx, 1 + maxy - miny, 1 + maxz - minz ) cell _ size =. 10 #. 1 meters = 10 cms #... | [
0.1422594040632248,
0.026230737566947937,
0.8498941659927368,
-0.18939918279647827,
0.5908671021461487,
0.38409170508384705,
0.45789670944213867,
-0.29113373160362244,
-0.4994790554046631,
0.23814721405506134,
0.4125935733318329,
0.27972155809402466,
-0.09691697359085083,
1.010779857635498... |
def _ departures _ today _ handler ( self, icao : str ) - > list [ flightconnection ] : return self. _ flight _ connections _ today ( icao, callback = self. client. get _ flight _ departures ) | [
-1.041530728340149,
-0.3469213843345642,
0.6137828230857849,
0.15987332165241241,
0.7907344102859497,
-0.36390578746795654,
-0.418108731508255,
-0.4580378532409668,
-0.03558376058936119,
-0.5182752013206482,
-0.03626049682497978,
-1.298387050628662,
0.708878755569458,
0.5771329998970032,
... |
def unpack ( dirpath, filename ) : filepath = os. path. join ( dirpath, filename ) if not os. path. isfile ( filepath ) : raise filenotfounderror ( " file not found : % s " % filepath ) elif not os. access ( filepath, os. r _ ok ) : raise permissionerror ( " cannot read : % s " % filepath ) log. debug ( " unpack : % s ... | [
0.1655612289905548,
0.1496012955904007,
0.5728782415390015,
-0.20278573036193848,
-0.1391056329011917,
0.13565680384635925,
0.8732317686080933,
1.1566836833953857,
-0.4148236811161041,
0.2557862102985382,
0.4523210823535919,
-0.14843229949474335,
0.3753044307231903,
-0.7282837629318237,
... |
def test _ campaign _ assign _ layout ( self ) : pass | [
-0.18056485056877136,
-0.7277308702468872,
0.48841652274131775,
0.2245657593011856,
-0.7712462544441223,
0.8785271048545837,
1.4091212749481201,
0.6286354064941406,
-0.028933078050613403,
-0.46721699833869934,
-0.06362982839345932,
-0.7122266292572021,
-0.7476975321769714,
0.52185940742492... |
def mappings ( self ) - > mapping [ str, str ] : return pulumi. get ( self, " mappings " ) | [
-0.7958643436431885,
0.47756487131118774,
0.6326560974121094,
-0.0525280237197876,
0.25126224756240845,
0.7512375712394714,
-0.4142899811267853,
0.16599276661872864,
1.233211874961853,
-0.2557469308376312,
-0.08072818070650101,
0.2227708101272583,
0.4291462004184723,
-1.1384495496749878,
... |
def get _ mojo _ box _ office ( self ) : # create list of box office objects but also keep df box _ office _ df = database _ helper. select _ query ( " weekend _ box _ office _ mojo ", { " movieid " : int ( self. movieid ) } ) box _ office _ df = box _ office _ df. sort _ values ( by = " start _ date " ) self. mojo _ b... | [
-0.7302975058555603,
0.2795812785625458,
0.590592086315155,
0.1083393543958664,
-0.09996329247951508,
-0.32162731885910034,
-0.3613131046295166,
0.5001184940338135,
0.08874114602804184,
0.3677315413951874,
-0.43497592210769653,
-0.15347392857074738,
-0.3623766601085663,
0.08116231113672256... |
def handle _ disconnect ( consumer ) : group _ name = channel _ group _ name _ onlinelist ws _ message = none channel _ message = none for group _ name in consumer. mygroups : async _ to _ sync ( consumer. channel _ layer. group _ discard ) ( group _ name, consumer. channel _ name ) try : user = models. user. objects. ... | [
-0.3106675446033478,
-0.4898050129413605,
0.5126270055770874,
-0.12575016915798187,
-0.041877031326293945,
-0.530886173248291,
0.036698777228593826,
-0.2008027881383896,
-0.5810444951057434,
1.2394273281097412,
-0.16336382925510406,
-0.2229943871498108,
-0.4653717279434204,
0.9644677639007... |
def stackedrnn ( inners, num _ layers, dropout = 0, train = true ) : num _ directions = len ( inners ) total _ layers = num _ layers * num _ directions def forward ( input, hidden, weight, batch _ sizes ) : assert ( len ( weight ) = = total _ layers ) next _ hidden = [ ] ch _ dim = input. dim ( ) - weight [ 0 ] [ 0 ]. ... | [
-0.18101151287555695,
0.6991812586784363,
0.6479486227035522,
-0.008731679990887642,
-0.5589442253112793,
-1.0770416259765625,
0.3135021924972534,
0.060819290578365326,
-0.15568234026432037,
0.1679224967956543,
-0.9845654964447021,
-0.12228083610534668,
0.14793431758880615,
0.1337298452854... |
def do _ shell ( self, line ) : os. system ( line ) | [
-0.06291668862104416,
-0.2030937522649765,
0.28105974197387695,
0.5540132522583008,
0.9515317678451538,
0.8236271142959595,
-0.5460004806518555,
-0.8013173341751099,
-0.2721732258796692,
-0.6633811593055725,
-0.6205306649208069,
0.6906936168670654,
0.6096550226211548,
0.39971351623535156,
... |
def filter _ image _ with _ size ( height, width, sizes _ to _ filter ) : return ( height, width ) in sizes _ to _ filter | [
-0.3184739351272583,
0.14202357828617096,
0.4186636805534363,
-0.225506991147995,
-0.6074042320251465,
-0.5562455654144287,
-0.9196311831474304,
-0.1620701551437378,
-0.2558109164237976,
0.6994646787643433,
0.28974324464797974,
0.6409172415733337,
-0.010855969041585922,
0.4116014540195465,... |
def _ _ init _ _ ( self, encoding = none, config = jsonrpclib. config. default ) : simplexmlrpcdispatcher. _ _ init _ _ ( self, allow _ none = true, encoding = encoding or " utf - 8 " ) self. json _ config = config # notification thread pool self. _ _ notification _ pool = none | [
0.9281745553016663,
-0.40979287028312683,
0.711840808391571,
-0.08577420562505722,
-0.3947761654853821,
0.27525851130485535,
-0.3733271658420563,
0.3922315537929535,
0.13887380063533783,
-0.46775999665260315,
-1.1652144193649292,
-0.6614874005317688,
-0.554786205291748,
0.4609326422214508,... |
def get _ tables _ for _ org ( self, org _ uuid ) : q = db. session. query ( tableinfo ). filter ( tableinfo. org. has ( uuid = org _ uuid ) ) return [ {'uuid': t. uuid,'org _ uuid': org _ uuid,'name': t. name,'description': t. description,'pii _ flag': t. pii _ flag,'warehouse': t. warehouse,'warehouse _ full _ table ... | [
-0.8878052830696106,
-0.07207837700843811,
0.5752058625221252,
-0.14333656430244446,
0.1398971974849701,
0.027998600155115128,
-0.2895771861076355,
0.24246490001678467,
-0.8315558433532715,
0.6484770774841309,
-1.2277683019638062,
-0.4727819263935089,
0.37368297576904297,
0.667356312274932... |
def create _ webhook _ app ( self, path, loop = none ) : app = web. application ( loop = loop ) app. router. add _ route ( " post ", path, self. webhook _ handle ) return app | [
0.9431869983673096,
-0.885199248790741,
0.5151336193084717,
0.9931808114051819,
-0.013462899252772331,
1.1712387800216675,
0.2977812886238098,
-0.25576138496398926,
-0.03073229268193245,
-0.33671844005584717,
-0.41316479444503784,
0.227878600358963,
-0.523316502571106,
0.6600678563117981,
... |
def _ init _ params _ widget ( self ) - > noreturn : self. upload _ title. grid ( column = 0, row = 0, sticky = w, padx = 150, pady = 30 ) self. upload _ button. grid ( column = 0, row = 1 ) | [
-0.3543546795845032,
0.3933810889720917,
0.6273598074913025,
-0.800601601600647,
0.4855010211467743,
0.17262089252471924,
0.08881509304046631,
0.01649494655430317,
-1.007957100868225,
0.21467487514019012,
0.014375608414411545,
0.5093311667442322,
0.1335538923740387,
2.012049913406372,
-0... |
def send _ event ( self, event ) : msg = proto. message ( ) msg. payload = event. serializetostring ( ) logger. debug ('sending event to echo device : \ 033 [ 90m { { { } } } \ 033 [ 00m '. format ( json _ format. messagetodict ( event, including _ default _ value _ fields = true ) ) ) self. _ bluetooth. send ( msg. se... | [
-1.1288907527923584,
0.47780221700668335,
0.5880622267723083,
0.3662647604942322,
0.3742902874946594,
0.38677623867988586,
-0.8004351258277893,
-0.6848767399787903,
-0.30024901032447815,
-0.12067630141973495,
-0.8611036539077759,
1.009611964225769,
0.009310104884207249,
0.6440463066101074,... |
def map _ container ( value, func ) : if isinstance ( value, tuple ) : return tuple ( func ( v ) for v in value ) if isinstance ( value, list ) : return list ( func ( v ) for v in value ) if isinstance ( value, dict ) : return dict ( [ ( k, func ( v ) ) for k, v in viewitems ( value ) ] ) raise valueerror ( " value { }... | [
-0.6323871612548828,
0.31212058663368225,
0.6756048202514648,
0.42608118057250977,
-1.0499051809310913,
-0.6182572245597839,
0.3554014563560486,
-0.05284636840224266,
0.9221559166908264,
-0.6296518445014954,
0.48653385043144226,
0.1679283231496811,
1.0768810510635376,
0.47340458631515503,
... |
def endcdatasection ( self ) : self. in _ cdata = false | [
-0.650226354598999,
-0.0057188342325389385,
0.15517675876617432,
-1.2200708389282227,
-0.46816185116767883,
1.7352544069290161,
0.41159069538116455,
0.184493288397789,
-1.68769109249115,
0.21468715369701385,
-0.33069100975990295,
0.762354850769043,
-0.8461448550224304,
0.6153738498687744,
... |
def last _ sent _ received _ messages ( conn : sqlite3. connection, limit = 10 ) : last _ sent = last _ sent _ messages ( conn, limit ) last _ received = last _ received _ messages ( conn, limit ) last _ messenguers = [ ] for received in last _ received : contact = {'mac _ address': received ['sender _ contact'],'times... | [
-0.4046820104122162,
-0.7785851359367371,
0.9808627963066101,
-0.9440667629241943,
0.5438470244407654,
-0.4716607630252838,
-0.6121734976768494,
-0.4167412519454956,
0.2205316722393036,
0.7582219839096069,
-0.0960984081029892,
-0.30588042736053467,
-0.21301676332950592,
0.5585538148880005,... |
def get ( self ) : raise notimplementederror | [
-0.2482602894306183,
-0.5710881948471069,
0.3594559133052826,
0.026830699294805527,
0.4062619209289551,
0.43134090304374695,
-0.15279892086982727,
-0.44363418221473694,
-0.09317132085561752,
-1.2066446542739868,
-0.10521405935287476,
1.098429799079895,
0.31789085268974304,
-0.0611552186310... |
def upcoming _ games ( self, season, week ) : content = self. _ s. schedule _ week ( season, week ) return self. _ p. upcoming _ week _ page ( content ) | [
-1.171037197113037,
0.69601970911026,
0.4659093916416168,
-1.2252564430236816,
-0.07780233025550842,
-1.076125144958496,
-0.4141904413700104,
-0.5100757479667664,
0.21015805006027222,
0.862629234790802,
0.8538349270820618,
-0.22686198353767395,
0.20473049581050873,
-0.8887372016906738,
-... |
def recv _ int ( self ) : # reading integer bytes int _ data = self. _ recvall ( calcsize ( int _ fmt ) ) return unpack ( int _ fmt, int _ data ) [ 0 ] | [
0.26575666666030884,
0.1020064577460289,
0.6305555701255798,
-1.1594741344451904,
-0.8111720085144043,
-0.0023554086219519377,
-0.48998650908470154,
-0.5666338205337524,
-0.008596641942858696,
-0.3946840763092041,
-0.18862731754779816,
0.1692374348640442,
-0.8804054260253906,
-0.4089686870... |
def set _ start ( self, intv ) : self. start = _ check _ arg _ interval ( intv, " intv " ) | [
-0.8204110860824585,
0.10908402502536774,
0.2784757912158966,
-0.048161834478378296,
0.6168144941329956,
0.7193328142166138,
0.7363867163658142,
-0.16009484231472015,
-0.5409644246101379,
0.7613932490348816,
-0.7342137098312378,
0.8174517750740051,
-1.0276223421096802,
0.22051295638084412,... |
def _ postback ( self ) : logger. debug ('seinding postback to % s % s'% ( self. get _ endpoint ( ), " cmd = _ notify - validate & % s " % self. query ) ) return urllib2. urlopen ( self. get _ endpoint ( ), " cmd = _ notify - validate & % s " % self. query ). read ( ) | [
-0.29553210735321045,
0.14188489317893982,
0.4882274866104126,
-0.6356691718101501,
0.14699450135231018,
-0.5838930606842041,
-0.11243831366300583,
-0.32067015767097473,
-0.20190837979316711,
-0.2737315893173218,
0.7611508369445801,
0.5046250820159912,
-1.3333532810211182,
-0.4805730581283... |
def _ _ create ( self, room _ type, room _ name ) : if room _ type = = " office " : new _ room = office ( room _ name ) cprint ( f " an office called { room _ name } has been successfully " " created! ", color = " green " ) self. all _ created _ rooms [ new _ room. name ] = new _ room self. names _ of _ all _ created _... | [
-0.6714186072349548,
-0.16040901839733124,
0.7474390268325806,
0.05660530924797058,
0.2181338667869568,
0.9480626583099365,
-0.6027916669845581,
0.11001846939325333,
0.16300006210803986,
0.21258512139320374,
-0.1431315392255783,
-0.3799877166748047,
-0.49291521310806274,
1.2314612865447998... |
def _ _ del _ _ ( self ) : self. _ traffic _ light = none self. remove _ all _ actors ( ) | [
-0.29957395792007446,
-0.9355816841125488,
0.24366547167301178,
-0.8735816478729248,
-0.5761555433273315,
-0.43600499629974365,
0.5943625569343567,
0.5529190897941589,
0.6562289595603943,
-0.5409511923789978,
-0.49424269795417786,
0.061014771461486816,
-0.5549704432487488,
0.87043803930282... |
def durations ( self, bootstrap = false, n _ iter = 200, removetreatment = false ) : self. in _ boot = false def inf _ durations ( x ) : " " " only add minimum _ duration if not treated and set hard burnin " " " cid = x. cohortid. unique ( ) [ 0 ] if self. in _ boot : cid = self. bootstrap _ id _ dates [ cid ] burnout ... | [
-0.14048078656196594,
0.020801708102226257,
0.8362441658973694,
0.05996349826455116,
-0.3748314380645752,
0.17646004259586334,
-0.43710607290267944,
-0.15746797621250153,
0.009230916388332844,
0.4098699390888214,
0.25914517045021057,
0.40735551714897156,
0.17880132794380188,
0.676210463047... |
def solve ( self ) : # the board. spot _ taken = [ [ false for c in range ( self. num _ cols ) ] for r in range ( self. num _ rows ) ] num _ attacks = [ [ 0 for c in range ( self. num _ cols ) ] for r in range ( self. num _ rows ) ] num _ attempts = 0 start _ time = time. time ( ) success, num _ attempts = self. eight ... | [
0.21831198036670685,
0.6658855080604553,
0.44860270619392395,
-0.9748518466949463,
0.7452234625816345,
-0.4120330214500427,
0.9407617449760437,
-0.30551889538764954,
0.24486881494522095,
0.12672655284404755,
0.01429190393537283,
-0.09823305159807205,
0.20037703216075897,
0.2244018614292144... |
def test _ neighbors _ returns _ list _ of _ neighbors ( gr ) : gr. add _ edge ('a ','b') gr. add _ edge ('a ','c') gr. add _ edge ('a ','d') assert gr. neighbors ('a') = = ['b ','c ','d'] | [
-0.3587488532066345,
0.44117271900177,
0.5762982964515686,
0.05857352912425995,
0.9500702619552612,
-0.12847791612148285,
0.0495457760989666,
-0.47213828563690186,
0.060930024832487106,
-0.0124302227050066,
-0.16132773458957672,
0.006765207275748253,
-0.28537046909332275,
0.069072604179382... |
def get _ full _ name ( self ) : return self. full _ name | [
0.46105867624282837,
-1.1964356899261475,
0.42024412751197815,
0.13899067044258118,
-0.7892206907272339,
0.3513798117637634,
-0.666264533996582,
-0.008065106347203255,
0.06076579540967941,
0.06028277426958084,
-0.26148781180381775,
0.13644255697727203,
0.3786494731903076,
0.174238398671150... |
def test _ gen _ next _ while _ still _ waiting _ for _ persistence ( self ) - > none : id _ gen = self. _ create _ id _ generator ( ) async def test _ gen _ next ( ) - > none : ctx1 = id _ gen. get _ next ( ) ctx2 = id _ gen. get _ next ( ) ctx3 = id _ gen. get _ next ( ) # request two new stream ids. self. assertequa... | [
-0.23451754450798035,
0.03587983176112175,
0.8017412424087524,
0.01694105938076973,
0.44916418194770813,
0.548542320728302,
-0.12053394317626953,
-0.6960232257843018,
-0.11316963285207748,
-0.8993324637413025,
-0.7062365412712097,
-0.14145301282405853,
-0.5446751117706299,
0.18807373940944... |
def range _ sum ( self, i : int = 0, j : optional [ int ] = none ) - > _ t : # we'll need inverse here. if j is none : j = len ( self ) - 1 if j < i : raise indexerror ( " j must be > than i. " ) if not self. inverse : msg = " inverse operator required for range _ sum. " raise typeerror ( msg ) return self. inverse ( s... | [
-1.3999767303466797,
0.6627715229988098,
0.2427401840686798,
0.6142507195472717,
0.008408835157752037,
-0.1121511310338974,
0.8282948136329651,
-0.9296875,
-0.48421359062194824,
0.7763432860374451,
-1.6905453205108643,
0.13420294225215912,
-0.9128782749176025,
-1.0455266237258911,
-1.004... |
def rm ( self, path ) : path = self. fix _ path ( path ) if self. node _ exists ( path ) : n = self. get _ node ( path ) if n. entry _ type = = " document " : self. rm _ file ( path ) else : self. rm _ dir ( path ) | [
0.08657337725162506,
0.18988578021526337,
0.5133755803108215,
0.04375110939145088,
-0.18931829929351807,
0.37670332193374634,
0.13281822204589844,
0.13838347792625427,
0.3129746913909912,
0.2530815899372101,
0.5637803077697754,
0.1037973091006279,
-0.18991915881633759,
0.15980134904384613,... |
def create _ initial _ herd ( cb _ settings, genotypes, herd, screen ) : # creates the initial herd and places them randomly in the pasture for cow in range ( cb _ settings. initial _ herd _ size ) : # create each cow cow = cow ( cb _ settings, genotypes, genotypes, screen ) herd. add ( cow ) | [
0.018339401111006737,
0.6140033602714539,
0.45997354388237,
0.362257719039917,
2.0007472038269043,
0.844846248626709,
-0.12581725418567657,
-1.1438102722167969,
0.4144890606403351,
0.1447937935590744,
-0.5299757719039917,
0.5709414482116699,
-0.6641976237297058,
1.3402235507965088,
0.100... |
def mock _ get ( ) : with mock. patch ('requests. get ', return _ value = mockresponse ( ) ) as _ fixture : yield _ fixture | [
-0.469884991645813,
-0.7552269101142883,
0.5937832593917847,
-0.7845393419265747,
0.7683897018432617,
-0.4691724181175232,
0.042802825570106506,
-0.4334653615951538,
0.7109991908073425,
-0.8972650170326233,
-0.18780234456062317,
-0.12959833443164825,
-0.12011130899190903,
-0.88231337070465... |
async def test _ sending _ mqtt _ commands _ rgbww _ tuya ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 5 # 5 channel light ( rgbcw ) config [ " ty " ] = 1 # tuya device mac = config ... | [
-0.05153719708323479,
-0.08703028410673141,
0.466701865196228,
0.21590854227542877,
0.39308908581733704,
0.5184870958328247,
-0.14329545199871063,
-0.42599642276763916,
-0.26819393038749695,
0.08672288060188293,
-0.1222846508026123,
0.11744474619626999,
0.23336665332317352,
0.7465669512748... |
def init _ data ( ) : d = 2 n _ points = d n _ panels = d n _ bodies = d n _ problems = d nbc _ panels = d n _ integration = d n _ theta = d nfs _ points = d nfs _ panels = d i _ sym = d n _ potentials = 5 * n _ points * ( 1 + ( i _ sym = = 1 ) ) + 9 * n _ panels * ( 1 + ( i _ sym = = 1 ) ) data = { " rho " : 0, " g " ... | [
0.3681444823741913,
0.46488168835639954,
0.8152961134910583,
-0.21229107677936554,
0.03393755480647087,
0.2546444237232208,
0.3894187808036804,
-0.5332252383232117,
-0.7008268237113953,
-0.48272544145584106,
-1.4116313457489014,
0.25564995408058167,
-0.02745850756764412,
0.8415173888206482... |
def tags ( self, tags ) : self. _ tags = tags | [
0.15200737118721008,
0.6066516041755676,
-0.13752184808254242,
0.05052322894334793,
0.6438974738121033,
0.8191503882408142,
-0.569044291973114,
0.5402910709381104,
-0.9686616063117981,
-0.3734470009803772,
-1.5888903141021729,
0.025718966498970985,
-0.2404584139585495,
1.1028950214385986,
... |
def save _ recent _ games ( self, id, region, games ) : if not self. recent _ db. table _ exists ('{ } _ { } '. format ( region, id ) ) : self. setup _ recents ( id, region ) self. log. log ('saving recent games for { } _ { } '. format ( region, id ) ) # must deep copy games, else popping things destroys the original g... | [
-0.30677130818367004,
0.314670592546463,
0.6814255714416504,
-0.5914603471755981,
0.7259694933891296,
-0.2828134298324585,
-0.4801502227783203,
-0.9050977230072021,
-0.5038347840309143,
0.7757259011268616,
-0.631661593914032,
-0.7409791350364685,
-0.46922531723976135,
0.30600664019584656,
... |
def cow _ blocked ( self, player, cow _ coords ) : if self. board [ cow _ coords ] = = player : # check level neighbours for l in range ( cow _ coords [ 0 ] - 1, cow _ coords [ 0 ] + 2 ) : if l < 0 or l > = state. board _ size : continue if self. board [ l, cow _ coords [ 1 ], cow _ coords [ 2 ] ] = = state. empty : re... | [
-0.3364090621471405,
0.20643921196460724,
1.0923552513122559,
-0.2102999985218048,
-0.43949878215789795,
0.5035545229911804,
0.525974690914154,
-0.8818949460983276,
-0.7574566006660461,
0.45716866850852966,
-0.7463864684104919,
0.17825883626937866,
-0.42668890953063965,
0.4366982877254486,... |
def _ sphere _ to _ cartesian ( theta, phi, r ) : z = r * np. sin ( phi ) rcos _ phi = r * np. cos ( phi ) x = rcos _ phi * np. cos ( theta ) y = rcos _ phi * np. sin ( theta ) return x, y, z | [
-0.8533737659454346,
-0.8437301516532898,
0.4376530051231384,
-1.080040454864502,
-0.457396000623703,
-0.2141737937927246,
-0.26855671405792236,
0.38989877700805664,
-0.17389608919620514,
0.9228131771087646,
-1.044872522354126,
0.23765751719474792,
-0.21328675746917725,
-0.5739304423332214... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.