text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ fetchresult ( self ) - > none : ret = _ invokebackend ( " task / gettaskinfo ", { " token " : define. hubtoken, " taskid " : self. taskid } ) result = ret [ " result " ] originurl = result [ " originurl " ] # originsize = result [ " originsize " ] try : if not settings. cloudtaskdonotwritefile : self. originfile,... | [
0.08897015452384949,
-0.4594103991985321,
0.7490828037261963,
0.05218562111258507,
0.03715580329298973,
0.2530229091644287,
0.221533864736557,
-0.3174770772457123,
-0.7466370463371277,
-0.018019458279013634,
-0.0968882218003273,
-0.1831258237361908,
0.3858541250228882,
1.0801151990890503,
... |
def get _ random _ numbers ( min _ number, max _ number ) : if min _ number > max _ number : raise valueerror ('max must be > min') random. seed ( ) count = min _ number numbers = [ ] while count < = max _ number : num = random. randint ( min _ number, max _ number ) if not num in numbers : numbers. append ( num ) coun... | [
-0.5545536875724792,
-0.3707748055458069,
0.3990248441696167,
0.6510560512542725,
1.1334308385849,
0.6316840052604675,
-0.6575353741645813,
0.1146974042057991,
0.05952984467148781,
-0.3307417929172516,
-0.6893817782402039,
1.0178219079971313,
0.010185719467699528,
-0.39572614431381226,
0... |
def _ getexpiredhistograms ( histograms, base _ date, current _ milestone ) : expired _ histograms _ names = [ ] for name, content in histograms. items ( ) : if " obsolete " in content or " expires _ after " not in content : continue expiry _ str = content [ " expires _ after " ] if expiry _ str = = " never " : continu... | [
-0.00038942552055232227,
-0.34035882353782654,
0.517504870891571,
0.31726279854774475,
-0.2390519231557846,
0.043328724801540375,
-1.2025946378707886,
0.07626179605722427,
0.021830495446920395,
1.3413702249526978,
0.0497826412320137,
0.39437729120254517,
-0.2676064372062683,
0.659712076187... |
def randommaxmcgroupcount ( self ) : if self. force _ auto _ sync : self. get ('randommaxmcgroupcount') return self. _ randommaxmcgroupcount | [
-0.427215576171875,
0.67549729347229,
0.3603086769580841,
0.29642120003700256,
-0.7751753330230713,
0.3356935679912567,
0.500964343547821,
0.040274616330862045,
0.06771160662174225,
-0.5256518721580505,
-1.0309998989105225,
0.9338288307189941,
-0.8454656600952148,
0.07940609753131866,
-0... |
def test _ prompt _ consent _ none _ parameter ( self ) : data = {'client _ id': self. client. client _ id,'response _ type': next ( self. client. response _ type _ values ( ) ),'redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state,'prompt':'consent none'} response = self... | [
-0.8913004994392395,
-0.5502170920372009,
0.5865751504898071,
-0.08610748499631882,
0.6954874396324158,
0.6999182105064392,
0.12706662714481354,
-0.4749278426170349,
0.5817429423332214,
-0.20238925516605377,
-0.11461430788040161,
0.38317662477493286,
-0.40358519554138184,
-0.08399771898984... |
def build ( cls ) : for scene in cls. scenes : scene. build ( ) | [
-0.7829408645629883,
-1.3955638408660889,
0.20595712959766388,
0.5575658082962036,
1.1486284732818604,
0.5763145089149475,
0.4291255474090576,
-0.4235402047634125,
-0.1627461463212967,
-0.34143394231796265,
-0.2296069860458374,
0.30997687578201294,
-0.27862438559532166,
0.9574089050292969,... |
def teardown ( self ) : if os. path. isfile ( self. yaml _ devices ) : os. remove ( self. yaml _ devices ) self. hass. stop ( ) | [
0.8824813961982727,
-0.5336267352104187,
0.4112590551376343,
0.14625616371631622,
0.7319967746734619,
0.03274010121822357,
1.3590537309646606,
1.011398196220398,
0.2976403832435608,
-0.34956079721450806,
0.5862361192703247,
-0.4096422493457794,
-0.2268427014350891,
0.7709943056106567,
0.... |
def predict ( self, x _ train _ ) : return np. where ( self. net _ input ( x _ train _ ) > = 0. 0, 1, - 1 ) | [
-0.9181320071220398,
0.1173924133181572,
0.4923628866672516,
1.0977678298950195,
0.31370148062705994,
0.5713468790054321,
-0.398293137550354,
-0.3149070739746094,
-0.5330312848091125,
-0.46153488755226135,
-0.02468019351363182,
-0.02380906045436859,
-0.30987459421157837,
0.0278133284300565... |
def add _ predictions ( self, predictions, positions ) : # verifies the shape of predictions if predictions. ndim! = 4 : # the feature channel has a high probabilty of missing predictions = predictions [ :, numpy. newaxis,... ] for pred, ( j, i ) in zip ( predictions, positions ) : # stores the predictions in output ar... | [
-0.4116540551185608,
-0.25312840938568115,
0.5314342379570007,
-0.010585547424852848,
0.5055047869682312,
0.20384317636489868,
0.2810461223125458,
-0.22759698331356049,
-0.08280525356531143,
-0.0043821269646286964,
-0.04649645835161209,
-0.3759864270687103,
-0.12961742281913757,
0.35247772... |
def _ find _ server _ root ( self, name ) : return server. find _ site _ root ( self, name ) | [
-0.39420634508132935,
-0.09304848313331604,
0.38546788692474365,
-0.1687215119600296,
-0.8575334548950195,
-0.3176756501197815,
0.7033463716506958,
-1.776074767112732,
0.5100148916244507,
0.6990493535995483,
-0.6292642951011658,
1.0222347974777222,
-0.9886803030967712,
1.0093863010406494,
... |
def api _ root ( ) : below = dict ( ) below ['posts'] = post. api ( ) below ['meta'] = {'url': url _ for ('api. meta ', _ external = true ) } return jsonify ( * * below ) | [
-0.06437323987483978,
-0.03148293495178223,
0.5634580850601196,
-0.04629792273044586,
-0.3130819499492645,
0.08420273661613464,
-0.721062183380127,
0.1981716752052307,
-0.3664471507072449,
-0.11162964999675751,
-0.5307770371437073,
0.9900704622268677,
0.37157702445983887,
0.316265136003494... |
def get _ filter _ bandpass ( filtername, * * kwargs ) : return io ( ). get _ filter _ bandpass ( filtername, * * kwargs ) | [
-0.5812295079231262,
-0.9188372492790222,
0.46337324380874634,
1.1054402589797974,
-0.6706784963607788,
-0.5299879312515259,
-0.09506013989448547,
-1.3078891038894653,
-0.8540631532669067,
-0.196945458650589,
-0.2778882384300232,
1.2757155895233154,
-0.1254621148109436,
-0.188104048371315,... |
def to _ time _ bin ( self, t ) : # todo : rename method time _ bin _ feature = feature ( " timebin ", get _ time _ bin _ int ( t ) ) self. context _ feature _ group. add _ feature ( time _ bin _ feature ) | [
-0.7716023325920105,
0.360689640045166,
0.5989102125167847,
0.5166882276535034,
0.8927890658378601,
0.3806787133216858,
0.45657140016555786,
-0.532865583896637,
-0.09793111681938171,
1.0929889678955078,
-1.468247413635254,
0.7274079918861389,
0.19020502269268036,
0.40137171745300293,
-0.... |
def get _ outside _ points ( poly _ in ) : # step1 : build ds that counts occurence of lines ( = 2 - sets ) in triangles from collections import defaultdict d _ line _ count = defaultdict ( int ) wdo _ in = dsa. wrapdataobject ( poly _ in ) a _ connectivity = wdo _ in. celldata ['vertexindices']. _ _ array _ _ ( ) # = ... | [
0.2853908836841583,
-0.3825044333934784,
0.7133355140686035,
0.025021711364388466,
-0.776512622833252,
0.6086676120758057,
1.2822761535644531,
0.09373338520526886,
0.5037959814071655,
0.07527296245098114,
-0.7777765393257141,
0.2984963357448578,
0.31230172514915466,
0.06204038858413696,
... |
def apply _ minibatches _ function ( self, f, x, z ) : data = [ minibatches ( i, self. batch _ size, d ) for i, d in zip ( [ x, z ], self. sample _ dim ) ] total = [ f ( * element ) for element in zip ( data [ 0 ], data [ 1 ] ) ] return sum ( total ) / float ( len ( total ) ) | [
0.6237038969993591,
-0.15385571122169495,
0.4299650490283966,
0.5442324876785278,
-0.9598188996315002,
0.02391376905143261,
0.28352588415145874,
0.6282790899276733,
0.2410898208618164,
0.0036474880762398243,
-0.38764306902885437,
-0.3899456560611725,
-0.7280097007751465,
-0.169572338461875... |
def test _ stop _ start ( self ) : log. info ( " = = = = = = = = = = start qual test stop start = = = = = = = = = = = = = = = " ) # this file has 2 sets of recovered data. # first set has 4 instrument records and second set has 6. # 1 metadata record for each set. self. create _ sample _ data _ set _ dir ('rec _ vel3d ... | [
0.9304794669151306,
-0.48768264055252075,
0.7137283682823181,
-0.8787120580673218,
0.8867530226707458,
-0.10759693384170532,
0.5587208867073059,
0.1738831251859665,
-0.6822598576545715,
-0.13458898663520813,
-0.27058351039886475,
0.3324819803237915,
-0.48267728090286255,
-1.165103554725647... |
def modification _ date ( self, modification _ date ) : self. _ modification _ date = modification _ date | [
0.41787755489349365,
0.3833123445510864,
0.1147330030798912,
0.5784680247306824,
0.04233914986252785,
0.9451696276664734,
-0.5752331018447876,
0.8869025707244873,
-0.18525537848472595,
-0.2144298106431961,
-0.15396648645401,
0.06058555468916893,
-0.059588052332401276,
1.199105143547058,
... |
def create _ weights _ for _ balanced _ classes ( images, nclasses ) : count = [ 0 ] * nclasses # histogram by classes for item in images : count [ item [ 1 ] ] + = 1 # number of examples in dataset n = float ( sum ( count ) ) # calculate weight for each class weight _ per _ class = [ 0. ] * nclasses for i in range ( n... | [
-0.5546610951423645,
-0.16345520317554474,
0.5660098195075989,
0.06116023287177086,
1.062829613685608,
0.02108689397573471,
0.5391300916671753,
0.02944348007440567,
-0.1811845749616623,
0.7900810241699219,
-0.434223473072052,
-0.7364887595176697,
0.5645875930786133,
1.747545838356018,
0.... |
def test _ channel _ presence ( ) : chan _ presence = mob. channel _ presence ( chmap ) assert np. all ( chan _ presence = = np. array ( [ [ 0., 0. 8, 0. 2, 0. ], [ 0., 0. 6, 0. 4, 0. ], [ 0., 0. 4, 0. 6, 0. ], [ 0., 0. 2, 0. 8, 0. ] ] ) ) | [
0.44970303773880005,
-1.3271193504333496,
0.7118767499923706,
-0.3827516436576843,
1.8216893672943115,
0.8624051213264465,
-0.1138046607375145,
-0.32465025782585144,
0.2636699080467224,
-0.20138579607009888,
0.12955771386623383,
-0.018503917381167412,
-0.43253597617149353,
0.54766058921813... |
def set _ val ( self, key, val ) : raise notimplementederror | [
-1.120586633682251,
0.38495126366615295,
0.1760634183883667,
0.3581329882144928,
-0.9265456199645996,
0.3951059579849243,
-0.9340683221817017,
0.014410731382668018,
-0.5598534345626831,
0.3368687629699707,
-0.1391029953956604,
0.5951531529426575,
0.9060932993888855,
0.6021677255630493,
-... |
def pivott ( m, i ) : r, c = maxsubmatrix ( m, i ) m = pivotp ( m, i, r ) return exchangecols ( m, c, i ) | [
0.7917864322662354,
0.2037372589111328,
0.3247050344944,
-0.2844991087913513,
-0.6294167041778564,
0.01047960389405489,
-0.2885507345199585,
-0.4404882788658142,
-0.27843108773231506,
1.1030851602554321,
0.4960053265094757,
-0.946576714515686,
-0.9135110974311829,
-1.8462071418762207,
-0... |
def add _ modules ( self ) : if self. location = = " top " : self. colend1 = factory. create ( module _ type = " col _ cap ", version = " colend " ) self. colend2 = factory. create ( module _ type = " col _ cap ", version = " colend _ p _ cent " ) self. colend3 = factory. create ( module _ type = " col _ cap ", version... | [
-1.043233871459961,
-0.14859941601753235,
0.5584907531738281,
0.23260046541690826,
1.7126107215881348,
0.5538109540939331,
-0.06540093570947647,
-1.1424579620361328,
0.1778986006975174,
0.5385890007019043,
-0.3035344183444977,
-0.04969551041722298,
0.5817727446556091,
0.2462129145860672,
... |
def load ( self, name, * paths ) : self. not _ supported ( ) | [
-0.5452466011047363,
0.5464776754379272,
0.0988616868853569,
0.9791397452354431,
-0.39222797751426697,
0.3872224986553192,
-0.960041880607605,
0.25888511538505554,
-0.1404716670513153,
-0.24784988164901733,
-0.516592800617218,
-1.1534780263900757,
-0.8819720149040222,
-0.2662964463233948,
... |
def find _ ros _ workspace ( self ) : # ros2 ros _ version = self. environment. get ( " ros _ version " ) if ros _ version = = " 2 " : ws = self. _ find _ ros2 _ workspace ( ) if ws : return ws ws = self. environment. get ( " ros _ workspace " ) if ws : return ws paths = self. environment. get ( " cmake _ prefix _ path... | [
-0.02879168465733528,
-0.42642706632614136,
0.7651157379150391,
0.12414000928401947,
-0.19471310079097748,
-0.1222611591219902,
1.1313263177871704,
-0.5153167247772217,
0.2862006425857544,
-0.6413156986236572,
0.3887166976928711,
0.39515799283981323,
-0.06029284745454788,
0.938723623752594... |
def increment _ commissions _ received ( self ) : self. commissions _ received + = 1 | [
-0.24024692177772522,
-0.31351250410079956,
0.5372200608253479,
-1.0798920392990112,
0.4799667000770569,
-0.13816528022289276,
0.45745307207107544,
0.3347322344779968,
-0.005666564218699932,
-0.6479266881942749,
-0.3586028218269348,
0.23697976768016815,
-0.23616719245910645,
0.063339844346... |
def stochastic _ gradient _ descent ( y, tx, initial _ w, max _ iters, gamma ) : n = int ( y. shape [ 0 ] ) w0 = initial _ w for n _ iters in range ( max _ iters - 1 ) : i = np. random. randint ( 0, n ) w0 = least _ squares _ gd ( y [ i : i + 1 ], tx [ i : i + 1 ], w0, 1, gamma, computeloss = false ) i = np. random. ra... | [
0.37982597947120667,
0.02629954367876053,
0.6741766929626465,
-0.32331398129463196,
-1.0198760032653809,
0.2653302550315857,
0.12169431895017624,
-0.2609870731830597,
-0.37660181522369385,
1.4646633863449097,
0.6178181171417236,
0.9792470932006836,
-0.18025879561901093,
1.0683093070983887,... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ tcompound _ swiginit ( self, _ topods. new _ topods _ tcompound ( * args ) ) | [
0.3658921420574188,
0.41626492142677307,
0.5559089779853821,
-0.11863591521978378,
0.2578432857990265,
0.59538334608078,
1.2227703332901,
-0.04613659530878067,
-0.7148442268371582,
1.0394299030303955,
-0.38516876101493835,
-1.4702658653259277,
-0.17477262020111084,
0.4768025577068329,
0.... |
def mousedown ( self, selector, btn = 0 ) : return self. evaluate ( " " " ( function ( ) { { var element = document. queryselector ( { 0 } ) ; var evt = document. createevent ( " mouseevents " ) ; evt. initmouseevent ( " mousedown ", true, true, window, 1, 1, 1, 1, 1, false, false, false, false, { 1 }, element ) ; retu... | [
-0.06189357116818428,
-0.6757153868675232,
0.6690998673439026,
-0.09590865671634674,
0.018810220062732697,
-0.3700505793094635,
-0.23050151765346527,
0.7411545515060425,
0.5194892883300781,
-0.2362733781337738,
-0.39290913939476013,
-0.0012941964669153094,
0.4010043442249298,
-0.1277601718... |
def createblindtask ( self, backend : str, params ) - > none : req = { " token " : define. hubtoken, " service " : backend, " params " : params, " sdkversion " : define. sdkversion, " source " : define. tasksource, } ret = _ invokebackend ( " task / createblind ", req ) self. taskid = ret ['taskid'] self. tasktoken = r... | [
-0.0748480036854744,
0.4119565784931183,
0.5782281160354614,
0.6124956011772156,
1.113989233970642,
0.5934671759605408,
0.08193984627723694,
0.177586629986763,
-0.6177661418914795,
0.6444427967071533,
-1.3269493579864502,
1.6253989934921265,
-0.5384772419929504,
0.4663499891757965,
0.589... |
def add _ images ( ) : client = storage. client. from _ service _ account _ json ( " service _ account. json " ) bucket = client. get _ bucket ( " shopify0 " ) dataset = bucket. list _ blobs ( ) for index, blob in enumerate ( dataset ) : splits = blob. name. split ( " / " ) if len ( splits )! = 4 : continue pokemon _ n... | [
-1.2052223682403564,
0.5382211804389954,
0.4289478063583374,
-0.51613849401474,
1.3704532384872437,
-0.04343816637992859,
-0.493587464094162,
-0.1676287055015564,
-0.5179651379585266,
0.4254714548587799,
-0.9921367764472961,
0.4563080966472626,
-0.0902145579457283,
0.15725748240947723,
0... |
def transmit _ agnocomplete _ context ( self ) : # only if the field has this attribute set. if hasattr ( self, agnocomplete _ user _ attribute ) : user = self. get _ agnocomplete _ context ( ) if user : self. agnocomplete. user = user return user # if not, would implicitly return none. | [
0.38122352957725525,
0.18751493096351624,
0.6626866459846497,
0.05814218521118164,
-0.20247352123260498,
-0.26009172201156616,
1.1589618921279907,
-1.6836172342300415,
0.652360737323761,
0.19248870015144348,
-0.0712657943367958,
-0.16359230875968933,
0.01020513940602541,
-0.470086902379989... |
def load _ autofolio ( fn : str ) : import collections import pickle af = collections. namedtuple ( " af ", " scenario, preprocessing, pre _ solver, selector, config " ) with open ( fn, " br " ) as fp : autofolio _ model = pickle. load ( fp ) autofolio _ model = af ( scenario = autofolio _ model [ 0 ], preprocessing = ... | [
0.2936561405658722,
0.06626827269792557,
0.3509276211261749,
-0.0008589778444729745,
-0.08951675891876221,
-0.3447355329990387,
0.6598986387252808,
-0.09907037764787674,
-0.6909817457199097,
0.1271044909954071,
-1.2529850006103516,
-0.9843339920043945,
0.8496196269989014,
-0.65897589921951... |
def hamming ( seqa, seqb ) : return sum ( ( 1 for a, b in itertools. izip _ longest ( seqa, seqb ) if a! = b ) ) | [
0.12008202075958252,
0.2228369563817978,
0.6881645917892456,
0.3526751697063446,
0.13652925193309784,
-0.20240047574043274,
-0.12623071670532227,
0.7989005446434021,
0.9227259159088135,
1.1925501823425293,
-0.9262765049934387,
0.18666335940361023,
-0.6320966482162476,
-0.20088432729244232,... |
def schedule _ conv2d ( attrs, outs, target ) : groups = attrs. groups layout = attrs. data _ layout if target. device _ name = = " vta " : if is _ packed _ layout ( layout ) : target = tvm. target. create ( target ) assert target. device _ name = = " vta " if groups = = 1 : return topi. generic. schedule _ conv2d _ nc... | [
-0.7422572374343872,
-0.342940092086792,
0.4033408463001251,
0.6126127243041992,
-1.058275580406189,
-0.4502282738685608,
0.21317341923713684,
-0.24220998585224152,
0.031293272972106934,
0.12052971869707108,
1.1090948581695557,
0.622163712978363,
0.668984591960907,
-0.0705631822347641,
-... |
def show ( filepath ) : if os. name = ='mac'or platform = ='darwin': subprocess. call ( ('open ', filepath ) ) elif os. name = ='nt'or platform = ='win32': os. startfile ( filepath ) elif platform. startswith ('linux') : subprocess. call ( ('xdg - open ', filepath ) ) | [
0.450181245803833,
-0.062293101102113724,
0.5273130536079407,
-0.31228408217430115,
-0.5777038335800171,
1.2108770608901978,
0.9810218214988708,
0.5206562280654907,
-0.6254414319992065,
0.11891937255859375,
0.7816281318664551,
0.9504530429840088,
0.17382726073265076,
0.6441629528999329,
... |
def _ init _ torch _ ddp ( self, tcp _ store _ host, tcp _ store _ port, world _ rank, world _ size ) : import torch. distributed as dist client _ store = dist. tcpstore ( tcp _ store _ host, tcp _ store _ port, - 1, false, timeout = dist. constants. default _ pg _ timeout ) dist. init _ process _ group ( backend = " g... | [
0.7132055163383484,
0.9795553684234619,
0.37966388463974,
-0.8952186703681946,
0.5834508538246155,
0.3705751895904541,
0.14427238702774048,
0.008009633980691433,
-0.9514737129211426,
0.5569241046905518,
-0.07688028365373611,
1.0050281286239624,
-0.11361531168222427,
-0.38303107023239136,
... |
def clearstats ( self, clearstats ) : try : self. _ clearstats = clearstats except exception as e : raise e | [
0.7857984900474548,
1.1943254470825195,
0.30625617504119873,
0.15546949207782745,
-0.26054152846336365,
1.1428848505020142,
0.6666385531425476,
-1.024182677268982,
0.39076486229896545,
-0.1563027948141098,
0.07723356783390045,
1.0119497776031494,
0.5789724588394165,
-0.28590255975723267,
... |
def create _ datatable ( self, style = " width : 100 % ", * * kwargs ) : html = " " " < script async type = " text / javascript " > $ ( document ). ready ( function ( ) { { var { 0 } = document. getelementbyid ('csv _ { 0 }'). innertext ; parsecsv _ { 1 } ( { 0 },'# table _ { 0 }') ; { 0 } = null ; } } ) ; < / script >... | [
0.17396792769432068,
0.6999408006668091,
0.559155285358429,
0.21145805716514587,
-0.48916712403297424,
-0.23199068009853363,
-0.13925093412399292,
-0.8304100632667542,
-0.46201080083847046,
0.15149818360805511,
-0.08987496048212051,
0.6881328225135803,
0.43850821256637573,
0.73019278049468... |
def test _ check _ input _ 2dchanmask ( ) : with pytest. raises ( typeerror ) : mob. check _ inputs ( np. ones ( ( 5, ) ), basevalues _ idx = [ 0 ], window _ idx = 1 ) | [
-0.727756679058075,
0.27632907032966614,
0.5372314453125,
1.3979355096817017,
0.7425149083137512,
0.4265593886375427,
1.0516328811645508,
-1.3278765678405762,
0.06403827667236328,
-0.8782393336296082,
-0.31756946444511414,
0.8373062014579773,
-0.5184947848320007,
1.0738917589187622,
0.58... |
async def _ parse _ robots ( self ) - > none : if not self. _ session : return parser = self. _ robot _ parser if parser is none : parser = self. _ robot _ parser = robotfileparser ( _ pastebin _ robots _ url ) async with self. _ session. get ( _ pastebin _ robots _ url ) as resp : resp. raise _ for _ status ( ) robot ... | [
-0.20077772438526154,
0.35341590642929077,
0.4839240312576294,
-0.40537184476852417,
0.04433382675051689,
-0.36996525526046753,
-0.4941556453704834,
-0.3927291929721832,
-0.5146628618240356,
-0.4892527163028717,
-0.22399947047233582,
-0.16742084920406342,
-0.027550263330340385,
0.366233229... |
def name ( self ) - > str : return core. bngetvariablenameordefault ( self. _ function. handle, self. to _ bnvariable ( ) ) | [
-0.01627141609787941,
-0.34204232692718506,
0.6363517642021179,
0.6436616778373718,
0.43949195742607117,
-0.17114651203155518,
0.20180173218250275,
-0.9097887873649597,
-0.4864466190338135,
-0.14384593069553375,
-0.251762330532074,
0.7224496603012085,
0.0826372355222702,
0.038328867405653,... |
def objects _ in _ stack ( self ) : return self. note _ stack. size ( ) | [
-0.7948487401008606,
0.28943338990211487,
0.6128090023994446,
-0.3274039626121521,
0.8577496409416199,
0.5096173286437988,
0.9043857455253601,
-0.639571487903595,
-0.4093019962310791,
0.6461203694343567,
-1.6321804523468018,
0.5402275919914246,
-0.6342260241508484,
-0.2784668207168579,
-... |
def recv ( self, data ) : msg = usbmessagehost ( data ) if msg. type = = 0 : # data self. recv _ usb ( msg. content ) elif msg. type = = 1 : # ack self. recv _ ack ( msg. content ) elif msg. type = = 2 : # management self. recv _ management ( msg. content ) | [
-0.12877818942070007,
0.41704389452934265,
0.7862284183502197,
0.44595515727996826,
0.11951754987239838,
0.5051847100257874,
-0.0441870279610157,
-0.3633872866630554,
-0.6981067061424255,
-0.3981088697910309,
-0.08511689305305481,
0.5276387929916382,
-0.8538910746574402,
0.2334335595369339... |
def get ( cls, id _ ) : with database _ session ( ) as sess : return cls. get _ category ( id _, sess ). serialize ( ) | [
-0.8751936554908752,
0.33278921246528625,
0.18090203404426575,
0.07140300422906876,
-0.26229387521743774,
-0.9654427766799927,
-0.8587609529495239,
-1.0940641164779663,
0.1451932042837143,
-0.40275830030441284,
-0.2180313766002655,
0.4870462119579315,
0.5858960747718811,
0.0951384156942367... |
def setup ( self ) : self. app = create _ app ( config _ name = " testing " ) self. client = self. app. test _ client | [
1.1451116800308228,
-0.5681723356246948,
0.07364847511053085,
0.18018501996994019,
1.002851128578186,
0.8895724415779114,
0.6873120069503784,
-0.22054079174995422,
0.12340379506349564,
0.6134602427482605,
-0.26449763774871826,
0.028305435553193092,
-0.46103957295417786,
0.2954065501689911,... |
def interp _ one ( bbs, state, rand ) : # type : ( program, state, randf ) - > iterable [ state ] if not active ( state ) : # never escape a failed / stalled / finished state yield state return ( ( bb, next _ stmt ), store, status ) = state assert bb in bbs and 0 < = next _ stmt and next _ stmt < = len ( bbs [ bb ]. st... | [
-0.41809606552124023,
-0.035744838416576385,
0.8679138422012329,
-0.36838066577911377,
-0.789756715297699,
0.19184480607509613,
0.0287930965423584,
0.12821976840496063,
0.9155973196029663,
0.41196104884147644,
-0.08167380839586258,
0.005593780893832445,
-0.5647851228713989,
-0.001586835132... |
def plot _ winning _ pattern ( manager, ax = none, separators = false, remove = 0 ) : n _ patterns = manager. nn. minicolumns t _ total = manager. t _ training _ total # get the angles angles = calculate _ angle _ from _ history ( manager ) winning = calculate _ winning _ pattern _ from _ distances ( angles ) + 1 # get... | [
-0.1883336752653122,
0.9617890119552612,
1.1251510381698608,
-0.11818769574165344,
-1.1735024452209473,
-0.3291083872318268,
0.9791320562362671,
0.10333560407161713,
0.5601277351379395,
0.7614017128944397,
-0.4538987874984741,
0.6297339797019958,
0.5224105715751648,
-0.16320496797561646,
... |
def heap _ sort ( list _ of _ pumps ) : length = len ( list _ of _ pumps ) for i in range ( length / / 2 - 1, - 1, - 1 ) : heapify ( list _ of _ pumps, length, i ) for i in range ( length - 1, 0, - 1 ) : algoanalysis. heapsort _ swaps _ count + = 1 list _ of _ pumps [ i ], list _ of _ pumps [ 0 ] = list _ of _ pumps [ ... | [
-1.0041385889053345,
0.14478799700737,
0.7564881443977356,
0.4325772821903229,
0.31155920028686523,
0.06595845520496368,
-0.00031275334185920656,
-0.640624463558197,
0.7497873902320862,
-0.04618195816874504,
-0.6082097887992859,
-0.38225796818733215,
-0.6027761101722717,
0.7350451946258545... |
def product _ is _ non _ expiring ( product ) : return not product ['expiration _ date'] | [
-0.7745150923728943,
-0.3320239186286926,
0.0457553006708622,
0.9033094644546509,
0.09508275985717773,
1.2997231483459473,
-1.2032448053359985,
0.2391994446516037,
0.3101595640182495,
0.8894801139831543,
-0.4442879557609558,
-0.6455015540122986,
-0.44522902369499207,
-0.20702001452445984,
... |
def predicate _ nominal _ heuristic ( doc, features ) : # grab the features produced by reconcile under features. default # if predicatenominal is true, add them to the annotations for key in features : if features [ key ]. get ( " prednom ", 0. 0 ) > 0 : antecedent = doc. nps. getannotbyid ( int ( features [ key ] [ "... | [
0.011745782569050789,
0.0613207146525383,
0.6732580661773682,
0.04605516046285629,
-0.39876872301101685,
0.11035632342100143,
-0.1164228618144989,
0.9837862849235535,
-0.0006976384320296347,
0.4319796860218048,
0.6365352272987366,
-0.18335407972335815,
0.35240334272384644,
0.38301604986190... |
def _ create _ dock _ widget ( widget, name, closable = true, floatable = true ) : dock = dockwidget ( widget = widget ) dock. setobjectname ( name ) dock. setwindowtitle ( name ) # set gui widget options. options = qdockwidget. dockwidgetmovable if closable : options = options | qdockwidget. dockwidgetclosable if floa... | [
0.41493695974349976,
0.46914300322532654,
0.33422034978866577,
-0.07126174867153168,
-0.4902462065219879,
0.3595135509967804,
0.10974761843681335,
0.010727792046964169,
-0.7520048022270203,
-0.15131917595863342,
0.07932334393262863,
-0.31649285554885864,
0.030778467655181885,
0.81835466623... |
def find _ suspicious _ windows _ processes ( self ) : if self. results. has _ key ( " malsysproc " ) : malsysproc = self. results [ " malsysproc " ] [ " data " ] else : malsysproc = self. malsysproc ( ) [ " data " ] sus = [ ] for p in malsysproc : if p ['name'] = = " false " or \ p ['path'] = = " false " or \ p ['ppid... | [
0.33017072081565857,
-0.8780449628829956,
0.5505222082138062,
-0.634728193283081,
-0.3655835688114166,
-0.1715732216835022,
-0.8107221126556396,
0.0024789876770228148,
-0.11019454896450043,
0.6822096109390259,
-0.4833446145057678,
0.16836531460285187,
-0.8229966759681702,
1.496901988983154... |
def forward _ unbatched ( self, desc, q _ enc, c _ enc, c _ boundaries, t _ enc, t _ boundaries ) : return q _ enc. transpose ( 0, 1 ), c _ enc. transpose ( 0, 1 ), t _ enc. transpose ( 0, 1 ), ( none, none ) | [
0.5170083045959473,
-0.006608029827475548,
0.3978345990180969,
-1.2930728197097778,
0.23592761158943176,
0.17069025337696075,
-0.09422090649604797,
0.20962825417518616,
-0.7267670631408691,
-0.33512812852859497,
-1.0878913402557373,
-0.21607688069343567,
0.5284371972084045,
0.0300371032208... |
def stringmatch _ heuristic ( doc ) : nps = doc. nps. getlist ( ) for i in range ( len ( nps ) - 1, 1, - 1 ) : anaphor = nps [ i ] if not anaphor. getattr ( " is _ proper " ) : continue for j in range ( i - 1, 0, - 1 ) : antecedent = nps [ j ] if not antecedent. getattr ( " is _ proper " ) : continue if string _ match.... | [
0.09556756913661957,
0.2100551724433899,
0.6561858057975769,
-0.41600558161735535,
-0.7082046866416931,
0.016063908115029335,
0.020351288840174675,
0.6853471994400024,
0.3160358965396881,
0.4900180399417877,
1.0282491445541382,
0.23029765486717224,
0.36768409609794617,
0.3230750262737274,
... |
def keypress ( self, size, key ) : super ( _ editor, self ). keypress ( size, key ) # walk the line if key = ='ctrl a': # move to beginning of line self. edit _ pos = 0 elif key = ='ctrl e': # move to end of line self. edit _ pos = len ( self. edit _ text ) elif key = ='ctrl b': # move to previous character self. edit ... | [
-0.2737359404563904,
-0.6349091529846191,
1.1294525861740112,
-0.6875632405281067,
-0.43266257643699646,
-0.26302483677864075,
0.5271053314208984,
0.004690156318247318,
-0.2573028802871704,
0.4794335961341858,
-0.1390228271484375,
-0.08465099334716797,
-0.3163139820098877,
0.15447814762592... |
def create _ html ( catg, msid _ list, ytime, udict, ddict, dtype, mtype, ptype ='static') : # # - - - create links to other pages # line ='<! doctype html > \ n < html > \ n < head > \ n \ t < title > envelope trending plots :'line = line + catg. upper ( ) +'< / title > \ n'line = line +'< / head > \ n < body style = ... | [
0.0837387964129448,
0.47932499647140503,
0.8791791200637817,
-0.3541375696659088,
-0.7200667858123779,
0.5382797122001648,
-0.08464028686285019,
-0.3671565651893616,
-0.17229010164737701,
0.1852162778377533,
0.47178447246551514,
0.3285712003707886,
0.2345757633447647,
0.4147142469882965,
... |
def test _ prompt _ login _ none _ parameter ( self ) : data = {'client _ id': self. client. client _ id,'response _ type': next ( self. client. response _ type _ values ( ) ),'redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state,'prompt':'login none'} response = self. _ ... | [
-1.426546573638916,
-0.6657057404518127,
0.5368726253509521,
-0.31807562708854675,
0.5597397685050964,
0.5310891270637512,
-0.12255245447158813,
-0.716926097869873,
0.9345123767852783,
-0.7173431515693665,
-0.3378211259841919,
0.8052825927734375,
-0.44567540287971497,
-0.3562512695789337,
... |
def get _ tenant _ subs ( self, tenant, topics ) : project = tenant. upper ( ) found = dict ( ) subs = self. get _ subs ( project ) if subs is not none and " subscriptions " in subs : subs = subs ['subscriptions'] for sub in subs : name = sub [ " name " ] if name. endswith ('ingest _ sync') : if topics [ " sync _ data ... | [
0.5712112188339233,
-0.05991999804973602,
0.71515953540802,
0.059007756412029266,
0.11686224490404129,
0.04780774563550949,
-0.9165199398994446,
-0.8148213028907776,
-1.0307577848434448,
0.4403942823410034,
0.010954595170915127,
0.345193475484848,
0.40510353446006775,
0.056192874908447266,... |
async def order _ cat _ alphabetically ( self, category _ channel, descending = false ) : sorted _ list = sorted ( category _ channel. channels, key = lambda channel : channel. name, reverse = descending ) for i in range ( len ( sorted _ list ) ) : channel = sorted _ list [ i ] if channel. position = = i : continue awa... | [
-0.02941516414284706,
-0.29731208086013794,
0.8072431683540344,
-0.8214318752288818,
0.7668066620826721,
-0.4061605632305145,
-0.49149057269096375,
-1.163568139076233,
-0.797400176525116,
0.377623051404953,
0.22790449857711792,
0.04691963270306587,
0.058323442935943604,
0.2972352206707001,... |
def callback ( ctx : typer. context, version : optional [ bool ] = typer. option ( none, " - - version ", callback = version _ callback ) ) : if ctx. invoked _ subcommand is none : typer. echo ( " hi, welcome to code opener cli " ) command = typer. style ( " copen - - help ", bg = typer. colors. bright _ white, fg = ty... | [
0.6107475757598877,
-0.23318694531917572,
0.8810297250747681,
0.17056278884410858,
0.04826704040169716,
0.42838096618652344,
0.6672374606132507,
0.3837241530418396,
0.48333626985549927,
-0.13322661817073822,
-0.2491007298231125,
0.8133760094642639,
0.273153692483902,
-0.01676812395453453,
... |
def mle ( self, y, param ) : if param = ='mu': return y. mean ( ) elif param = ='var': return y. var ( ) else : raise valueerror ('param must be either " mu " or " var ".') | [
-0.511301577091217,
-0.039198268204927444,
0.5529760122299194,
0.3496783971786499,
0.2248951643705368,
0.12007167935371399,
-0.29186490178108215,
-0.7171832919120789,
-0.03662636876106262,
0.6658578515052795,
0.6521428227424622,
1.2335792779922485,
-0.37137678265571594,
0.7397064566612244,... |
def follow ( self, user = none ) : if user is not none : self. followers. add ( user ) self. save ( ) | [
0.10129961371421814,
0.5776615738868713,
0.4923112094402313,
1.5044831037521362,
-0.2372741550207138,
1.2564715147018433,
0.2307482808828354,
0.24661824107170105,
0.29714521765708923,
-0.9752540588378906,
-1.4310221672058105,
0.03818211704492569,
-0.6777212023735046,
1.1045128107070923,
... |
def _ load _ cookies ( filename ) : with open ( filename,'rb') as handle : return pickle. load ( handle ) | [
-0.13885492086410522,
-0.1770426332950592,
0.19086843729019165,
-0.9394568204879761,
-0.5907894372940063,
-0.8190926909446716,
0.294941782951355,
0.1386737823486328,
-0.9787407517433167,
0.9939399361610413,
-0.13970030844211578,
-0.4586265981197357,
-0.5874958634376526,
-1.2298119068145752... |
def xyz _ to _ lat _ long ( x, y, z, radians = false, datum = osgb36 ) : p = sqrt ( x * * 2 + y * * 2 ) # # # invert for longitude longitude = arctan2 ( y, x ) # # # first guess at longitude latitude = arctan2 ( z, p * ( 1 - datum. e2 ) ) # # # apply a few iterations of newton rapheson for _ in range ( 6 ) : nu = datum... | [
-0.10507832467556,
-0.404734343290329,
0.6183066368103027,
-0.7884284853935242,
-0.4789198637008667,
-0.30654609203338623,
-0.9220466017723083,
0.07366399466991425,
0.4890231788158417,
0.19664761424064636,
-0.5426229238510132,
0.22564956545829773,
0.05650010704994202,
-0.4273929297924042,
... |
def get ( self, key ) : entry = self. entries. get ( key ) if entry : if entry [ " time " ] + self. timeout > time. time ( ) : return entry [ " value " ] del self. entries [ key ] return none | [
0.39520004391670227,
-0.05995035171508789,
0.42643657326698303,
0.12036596238613129,
-0.6615932583808899,
-0.5502835512161255,
-1.0889006853103638,
-0.4456615447998047,
-0.06910868734121323,
1.0455011129379272,
0.810424268245697,
0.4952145218849182,
-0.4786621630191803,
0.3906719386577606,... |
def load _ wordlist ( filename ) : f = open ( filename ) listtoret = f. read ( ). split ( ) return listtoret | [
-0.4708866775035858,
0.2308894395828247,
0.3985295295715332,
-1.1672909259796143,
-0.3875234127044678,
-0.3590640425682068,
-0.5263180732727051,
1.3775341510772705,
-0.2995952069759369,
1.7264375686645508,
-1.3188413381576538,
-0.18898150324821472,
-0.866054892539978,
0.06610316038131714,
... |
def test _ payments ( ) : if pay. testpaymentsystems ( ) : flash ( " payment system is reachable. " ) else : flash ( " error : one or more payment systems is unreachable, review logs. " ) return redirect ( url _ for ('payments. payments') ) | [
0.035116083920001984,
0.36429736018180847,
0.3716006875038147,
0.3171420693397522,
0.28672370314598083,
0.25427260994911194,
0.25051504373550415,
-0.3788875937461853,
0.590286910533905,
-0.4566187262535095,
0.9249341487884521,
-0.5600203275680542,
0.4807414710521698,
-0.029106387868523598,... |
def fisher _ exact ( x : pd. dataframe, metadata : pd. dataframe, groupby : str, fdr _ alpha : float = 0. 05, fdr _ method : str ='fdr _ bh ', * * kwargs ) : from statsmodels. stats. multitest import multipletests import scipy. stats as stats # present & absent x _ present = x. sum ( 0 ) x _ absent = x. shape [ 0 ] - x... | [
-0.6456720232963562,
0.05208202451467514,
0.621309757232666,
-0.376336008310318,
0.21434266865253448,
-0.20427705347537994,
0.9074772000312805,
-0.049405962228775024,
-0.12992246448993683,
0.8378535509109497,
0.6215571165084839,
0.907796323299408,
-0.028653964400291443,
0.5905362963676453,... |
def orientation ( self ) : return self. _ orientation | [
0.3414571285247803,
-0.056802988052368164,
0.17120946943759918,
0.5065444707870483,
-0.0291935745626688,
0.2690069377422333,
1.5860272645950317,
-0.3449084460735321,
0.19623513519763947,
-0.19320720434188843,
-0.12383530288934708,
-0.26092758774757385,
-0.7698990106582642,
-1.3034355640411... |
def test _ subscription _ api _ with _ no _ payment _ details _ for _ paid _ event ( self ) : data = { " event _ id " : self. event. id, " user _ id " : self. user _ id, " no _ of _ tickets " : 4 } response = self. client. post ( self. end _ point, json. dumps ( data ), http _ authorization = " bearer { } ". format ( s... | [
1.121946096420288,
0.039172906428575516,
0.8579752445220947,
-0.07463958114385605,
0.18789643049240112,
0.6240112781524658,
-0.5714909434318542,
-0.8858422636985779,
0.14807744324207306,
-1.2860556840896606,
-0.10714181512594223,
-0.12183111906051636,
0.019440248608589172,
1.11956954002380... |
def calculate _ hessian ( y, tx, w, pred ) : n = int ( y. shape [ 0 ] ) s = pred * ( 1 - pred ) * np. eye ( n ) print " s " b = tx. t. dot ( s ) print " b " hessian = b. dot ( tx ) print " h " return hessian | [
0.09825340658426285,
-0.09665665775537491,
0.3822233974933624,
-0.07455893605947495,
-1.0683366060256958,
0.6012867093086243,
0.6233532428741455,
0.7482976913452148,
-0.25874245166778564,
0.2767488360404968,
-0.4036914110183716,
0.8030930757522583,
-0.20227956771850586,
0.28439369797706604... |
def create _ dummy _ computation _ call ( ) : fn, fn _ type = create _ dummy _ computation _ tensorflow _ constant ( ) type _ signature = fn _ type. result value = pb. computation ( type = type _ serialization. serialize _ type ( type _ signature ), call = pb. call ( function = fn ) ) return value, type _ signature | [
-0.5138482451438904,
0.17743341624736786,
0.6475554704666138,
-0.0446777269244194,
0.5684566497802734,
-0.20013992488384247,
-0.09560994058847427,
-0.4634765088558197,
-0.45303797721862793,
0.3597941994667053,
-0.5107637047767639,
0.06433144211769104,
-0.21592313051223755,
0.15167835354804... |
def description ( self, description ) : self. _ description = description | [
0.251386821269989,
0.12149041146039963,
-0.12547045946121216,
0.5402094721794128,
0.18012197315692902,
0.9938250184059143,
-0.2290990799665451,
0.7552343010902405,
-0.06971953809261322,
0.01437358744442463,
-0.7683145403862,
0.023817280307412148,
-0.18380391597747803,
0.5569608807563782,
... |
def subprocess ( cls, argv, out, data = none ) : class tempfile _ on _ demand ( object ) : def _ _ repr _ _ ( self ) : if not hasattr ( self,'filename') : fd, self. filename = tempfile. mkstemp ( ) os. close ( fd ) return self. filename @ property def created ( self ) : return hasattr ( self,'filename') # replace input... | [
0.09074930101633072,
-0.5647857189178467,
1.0372614860534668,
-0.21166262030601501,
-0.7318906188011169,
0.6316567659378052,
0.5966832041740417,
-0.13642363250255585,
-0.2669091522693634,
-0.07868317514657974,
0.26529619097709656,
0.5334432721138,
0.2968675494194031,
-0.23067137598991394,
... |
def _ _ init _ _ ( self, parse _ line : parselinefunctiontype = parse _ json _ and _ match _ value ) : super ( ). _ _ init _ _ ( parse _ line ) self. log _ type = " metric " | [
1.1733543872833252,
0.34233155846595764,
0.6565930843353271,
0.8041341304779053,
0.7559669613838196,
-0.17975760996341705,
-0.10287721455097198,
-0.10616817325353622,
-0.6746488213539124,
-0.509286642074585,
0.04024534299969673,
0.08552541583776474,
0.7585353851318359,
0.2410062700510025,
... |
def test _ get _ signature _ list ( image _ config : imageconfig, image _ config _ signed : imageconfig, config _ digest _ canonical : str, signature : str, ) : signatures _ signed = image _ config _ signed. get _ signature _ list ( ) assert len ( signatures _ signed ) = = 1 assert signatures _ signed [ 0 ] [ " digest ... | [
-0.8917933702468872,
0.0647335797548294,
0.3374190926551819,
0.6991526484489441,
0.8599998950958252,
-0.09600643813610077,
-0.1917099505662918,
0.44059351086616516,
0.3650711476802826,
-0.08523555099964142,
-1.2340348958969116,
-1.2097128629684448,
0.531834602355957,
0.9282518625259399,
... |
def python _ zip ( * iterables ) : # zip ('abcd ','xy') - - > ax by sentinel = object ( ) iterators = [ iter ( it ) for it in iterables ] while iterators : result = [ ] for it in iterators : elem = next ( it, sentinel ) if elem is sentinel : return result. append ( elem ) yield tuple ( result ) | [
-0.44041040539741516,
-0.28405290842056274,
0.6872159242630005,
0.795650064945221,
-0.20588235557079315,
0.8388044834136963,
-0.1201397031545639,
-0.617992103099823,
-0.13484232127666473,
0.23353375494480133,
-0.5395060777664185,
-0.6014378666877747,
0.05828740447759628,
-0.286986917257308... |
def draw _ func ( self, context ) : col = self. layout. column ( ) col. operator ( weightgroupmerge. bl _ idname, text = " merge weights " ) | [
-0.24463771283626556,
0.9140090942382812,
0.5292736291885376,
0.08669371157884598,
0.507077693939209,
-0.7432923316955566,
0.7417144775390625,
-0.2736237049102783,
-0.12516485154628754,
-0.11633727699518204,
0.18855401873588562,
-0.10939784348011017,
0.026679087430238724,
-0.34444940090179... |
def set _ key _ modified ( self, key, modification ) : if key is not none and not isinstance ( key, str ) : raise sdkexception ( constants. data _ type _ error,'key : key expected type : str ', none, none ) if modification is not none and not isinstance ( modification, int ) : raise sdkexception ( constants. data _ typ... | [
-1.6856586933135986,
0.19155223667621613,
0.2584837079048157,
-0.6123430728912354,
-0.6783270239830017,
-0.11566293239593506,
-0.883316695690155,
-0.049255792051553726,
0.15168623626232147,
1.188689112663269,
0.026406696066260338,
0.7293704152107239,
-0.35476166009902954,
0.861359596252441... |
def split ( x, y ) : a, b = x c, d = y return array ( ( a * c + b * d, b * c + a * d ) ) | [
-0.3417145311832428,
0.2105981856584549,
0.419840544462204,
-0.9486573338508606,
0.38972076773643494,
0.04315297305583954,
-0.36162787675857544,
-1.2004327774047852,
-0.02576151303946972,
0.30507892370224,
-0.1602131724357605,
0.5611834526062012,
0.019862137734889984,
-1.2316550016403198,
... |
def test _ tail ( ) : html = ( u'< body > hi < span style = " white - space : pre " > 1 3 < / span >'u'versus 1 3') assert get _ text ( html, config ) = = u'hi 1 3 versus 1 3 ' | [
-0.07509410381317139,
0.9303029775619507,
0.4216071367263794,
0.3800961673259735,
0.3849128484725952,
0.4832322597503662,
-0.10396519303321838,
-0.7019138932228088,
0.7824113368988037,
-0.2859807014465332,
-0.8032457828521729,
0.5706347227096558,
-0.41414424777030945,
0.02413470856845379,
... |
def callback _ query _ ignore ( self, bot : bot, update : update ) - > none : bot. answer _ callback _ query ( callback _ query _ id = update. callback _ query. id, ) | [
0.1389247626066208,
-0.33037638664245605,
0.45348605513572693,
0.35150274634361267,
-0.4151035249233246,
0.5820723176002502,
-0.01736697554588318,
-0.40299907326698303,
1.4930757284164429,
-0.09319218248128891,
0.4103311598300934,
-0.11064422130584717,
-1.2693500518798828,
0.13578760623931... |
async def async _ setup _ entry ( hass : homeassistant, config _ entry : configentry ) - > bool : logger. info ( " % s : initializing alarmdotcom from config entry. ", _ _ name _ _ ) if domain not in hass. data : # print startup message logger. info ( startup _ message ) hass. data. setdefault ( domain, { } ) # # initi... | [
0.12783032655715942,
-0.1629510372877121,
0.5108821392059326,
-0.07287704944610596,
0.7655206322669983,
-0.11431346088647842,
0.6832823753356934,
-0.23473303020000458,
1.1856752634048462,
0.40529775619506836,
-0.03181328997015953,
0.6975035667419434,
0.6414867639541626,
0.8921911120414734,... |
def test _ sequence _ query ( ) : result = sequence _ query ( " tu connais openclassrooms? " ) assert result = = [ " tu ", " connais ", " openclassrooms " ] | [
-1.2109805345535278,
-0.15503954887390137,
0.15210479497909546,
0.3627190589904785,
0.3392285108566284,
-0.04263971745967865,
-0.4645315706729889,
0.5085049271583557,
-0.01901935413479805,
0.09513626247644424,
-0.6923268437385559,
-0.4406251609325409,
-0.5230222940444946,
-0.52174282073974... |
def populate _ branches _ table ( sessn, data = none ) : if data is none : data = cadmv. helper. data. prep _ branches _ data ( ) for datum in data : queries. create _ new _ branch ( sessn, datum ) | [
-0.037696145474910736,
1.2234272956848145,
0.40865233540534973,
0.3807331621646881,
0.9649983048439026,
0.5272532105445862,
-0.2926390469074249,
-0.6748508214950562,
-0.02664824388921261,
-0.38916754722595215,
-0.059272315353155136,
-0.5000001192092896,
0.0739125981926918,
0.08569181710481... |
def pipedataintoprogram ( commandline, changetodir, text ) : doccount = 0 # start the perl script which detects protein sequences and return as a subprocess object text = cleantext ( text ) text. replace ( " - ", " " ) text. replace ( " ~ ", " " ) text. replace ( " ( ", " " ) text. replace ( " ) ", " " ) # logging. deb... | [
0.5070992708206177,
-0.5264317989349365,
0.7150017023086548,
-0.45268458127975464,
-0.6959089636802673,
0.4531082808971405,
0.2802622318267822,
0.6853361129760742,
-0.33188167214393616,
0.6104421615600586,
0.21984060108661652,
0.7960862517356873,
-0.5731024146080017,
0.04847216233611107,
... |
def to _ time _ series _ dataset ( dataset, dtype = numpy. float, equal _ size = true ) : if not equal _ size : dataset _ out = [ to _ time _ series ( ts ) for ts in dataset ] else : dataset _ out = _ arraylike _ copy ( dataset ) if dataset _ out. ndim = = 1 : dataset _ out = dataset _ out. reshape ( ( 1, dataset _ out... | [
-0.7420392036437988,
1.4864397048950195,
0.5080231428146362,
-0.30679425597190857,
-0.2603157162666321,
-0.879794180393219,
-0.41296786069869995,
-0.29873695969581604,
0.8679978847503662,
1.0821008682250977,
0.05565597489476204,
0.8253592252731323,
0.1992526352405548,
-0.029532309621572495... |
def test _ sample ( self ) : n _ samples = self. n _ samples tol = ( n _ samples * 10 ) * * ( - 0. 5 ) point = self. beta. random _ point ( n _ samples ) samples = self. beta. sample ( point, n _ samples * 10 ) result = gs. mean ( samples, axis = 1 ) expected = point [ :, 0 ] / gs. sum ( point, axis = 1 ) self. asserta... | [
0.4650535583496094,
0.052396636456251144,
0.3096003532409668,
-0.07546946406364441,
0.7512814998626709,
0.5867597460746765,
0.751578152179718,
-0.5324596762657166,
-0.00398322893306613,
0.019177978858351707,
-0.004768102429807186,
-0.3381985127925873,
-0.4983581602573395,
-0.23010377585887... |
def _ save _ displays ( self ) : pass | [
-0.5603562593460083,
-0.9296375513076782,
0.1397012174129486,
0.1486906260251999,
-0.34032195806503296,
0.8148794174194336,
1.3745996952056885,
-1.0951461791992188,
0.12157844007015228,
-0.5220003128051758,
-0.699647068977356,
-0.6036049723625183,
-0.47107189893722534,
1.350524663925171,
... |
def send ( self, buffer ) : try : self. sock. sendall ( self. codec. encode ( buffer ) ) except exception as e : raise udsexception ( str ( e ) ) | [
-0.6013031005859375,
0.7419447302818298,
0.42800217866897583,
0.34181272983551025,
-0.05891164019703865,
0.7185580730438232,
-0.575006902217865,
-0.8410997986793518,
0.3350180387496948,
-1.0382663011550903,
-0.8482272028923035,
0.9884021282196045,
-0.7583003640174866,
0.411062628030777,
... |
def update _ config ( self ) : self. config = win32api. enumdisplaysettingsex ( self. adapter. devicename, win32con. enum _ current _ settings ) | [
-0.6528627276420593,
-0.15444917976856232,
0.25155553221702576,
-0.32280173897743225,
-1.1654196977615356,
-0.09330973029136658,
0.3382241725921631,
0.08864427357912064,
-0.017285801470279694,
0.945678174495697,
-0.054193854331970215,
0.7463762760162354,
-0.6307660937309265,
0.819848716259... |
def _ post ( self, push _ vs = true ) : secfs. tables. post ( push _ vs ) self. server. unlock ( ) | [
-0.19735950231552124,
0.8800325989723206,
0.25422435998916626,
1.4710626602172852,
0.3328082263469696,
-0.0376441553235054,
-0.11889128386974335,
-0.5639854073524475,
-0.7236804962158203,
0.22452421486377716,
-0.5468434691429138,
0.2718968093395233,
-0.8539206981658936,
0.39748191833496094... |
def find _ edges ( self, * * kwargs ) : found = [ ] for k in kwargs : s = set ( ) r = re. compile ( kwargs [ k ] ) edges = self. redis. smembers ('{ } : i : e : { } '. format ( self. name, k ) ) for e in edges : if r. search ( self. redis. hget ('{ } : e : { } : p '. format ( self. name, e ), k ) ) : s. add ( e ) found... | [
-0.4230443835258484,
0.04916379600763321,
0.6436685919761658,
0.33336836099624634,
0.708876371383667,
0.07626480609178543,
-1.1018397808074951,
0.13283763825893402,
-0.29260581731796265,
0.6235876083374023,
-0.010728537105023861,
-0.5487776398658752,
-1.3287690877914429,
0.3446042835712433... |
def test _ string _ type _ check ( ) : test _ obj = uvtest ( ) test _ obj. string1 = 1 pytest. raises ( valueerror, test _ obj. check ) | [
0.3429900109767914,
0.6240108609199524,
0.17453734576702118,
1.1959071159362793,
0.6066269278526306,
0.49423766136169434,
0.7628130912780762,
-0.18048468232154846,
0.018539711833000183,
0.3608667254447937,
0.3434261381626129,
0.5151433348655701,
-0.8345864415168762,
0.41675302386283875,
... |
def fail _ unknown ( self ) : log. info ( " lost communication with action run % s ", self. id ) self. state = action _ run _ failed self. exit _ status = none self. end _ time = none self. complete _ callback ( ) self. state _ callback ( ) | [
0.006942108739167452,
-1.0861252546310425,
0.3081566393375397,
0.20041242241859436,
0.9014714956283569,
0.2144729048013687,
0.15452857315540314,
-0.7480475306510925,
-0.14527378976345062,
0.021234219893813133,
-0.6647932529449463,
0.5535343885421753,
0.08586014062166214,
0.4274214506149292... |
def add ( self, library ) : self [ library. name ] = library | [
-1.1479203701019287,
-0.6550217270851135,
0.09539149701595306,
-0.5799141526222229,
0.34215444326400757,
1.1588274240493774,
-0.5632659196853638,
-0.2600874900817871,
0.43325743079185486,
-0.33546674251556396,
-0.7895020842552185,
-0.5394061803817749,
-0.8174852132797241,
1.149184823036193... |
def check _ for _ exit ( self ) : for event in pygame. event. get ( ) : if event. type = = pygame. quit : # pylint : disable = no - member self. running = false if event. type = = pygame. keydown : # pylint : disable = no - member if event. key = = pygame. k _ escape : # pylint : disable = no - member self. running = f... | [
0.00007148470467654988,
-0.6481033563613892,
0.5454713106155396,
0.5371648073196411,
-0.03336823731660843,
0.38430896401405334,
-0.2933655083179474,
-0.003983011469244957,
-1.031598448753357,
0.7072662115097046,
-0.3677464723587036,
-0.1682746857404709,
-0.9675436019897461,
1.5758662223815... |
def preset _ mode ( self ) - > str | none : return self. _ preset _ mode | [
-0.4094241261482239,
0.45265597105026245,
0.2125283181667328,
0.0646432414650917,
0.5484288334846497,
1.20146906375885,
0.5443894267082214,
-0.7290163636207581,
0.3277127146720886,
-0.032251209020614624,
0.32820913195610046,
0.16001012921333313,
0.0382346473634243,
-0.3332105576992035,
0... |
def addforce ( self, force _ type, force _ subtype, conditions ) : if len ( self. _ forces ) > = self. _ max _ forces : print ( " already at max forces. no force added. " ) return else : new _ force = createfitnessforce ( force _ type, force _ subtype, conditions ) if new _ force : self. _ forces. append ( new _ force ... | [
-0.3562719523906708,
0.1977253556251526,
0.6354383826255798,
0.8615648746490479,
1.4366446733474731,
0.47121086716651917,
-0.4757497310638428,
-0.5151702165603638,
-0.4083743095397949,
-1.6766585111618042,
-0.07149195671081543,
0.09630580991506577,
-0.9856809973716736,
0.6472339034080505,
... |
def jsonify ( value ) : return json. dumps ( jsonable ( value ) ) | [
-0.7901830077171326,
-0.5579524636268616,
0.3473357856273651,
-0.22724021971225739,
-0.9929206371307373,
-0.9154824614524841,
-0.15708856284618378,
-1.1018946170806885,
-0.21813206374645233,
-0.35242149233818054,
-1.245025396347046,
0.31631478667259216,
0.028461677953600883,
-0.07379205524... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.