text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ set _ next _ host _ location ( self, settings, request ) : # pylint : disable = no - self - use if settings ['hosts'] and all ( settings ['hosts']. values ( ) ) : url = urlparse ( request. url ) # if there's more than one possible location, retry to the alternative if settings ['mode'] = = locationmode. primary :... | [
-1.0727944374084473,
0.33165329694747925,
0.38844674825668335,
0.2213200330734253,
0.21325477957725525,
0.025518300011754036,
-0.13833852112293243,
-0.11834625154733658,
-0.6448583006858826,
-0.2240179032087326,
-0.3656459450721741,
0.1573093682527542,
0.6408342123031616,
0.020522454753518... |
def compute _ homography ( src, dst ) : h _ matrix = np. eye ( 3, dtype = np. float64 ) " " " your code starts here " " " # compute normalization matrix centroid _ src = np. mean ( src, axis = 0 ) d _ src = np. linalg. norm ( src - centroid _ src [ none, : ], axis = 1 ) s _ src = sqrt ( 2 ) / np. mean ( d _ src ) t _ n... | [
-0.06829778105020523,
0.25355345010757446,
0.9197009801864624,
0.12946820259094238,
-0.30908817052841187,
-0.284602552652359,
0.8232084512710571,
0.7716866135597229,
0.5473941564559937,
0.8146687746047974,
-0.12462101131677628,
-0.04059334471821785,
0.2727913558483124,
-0.7345358729362488,... |
def draw _ text ( self, display, text, size, x, y, mode ) : font = pygame. font. font ( self. font _ name, size ) text _ surface = font. render ( text, true, ( 0, 0, 0 ) ) text _ rect = text _ surface. get _ rect ( ) if mode = = " left " : text _ rect. topleft = ( x, y ) elif mode = = " center " : text _ rect. center =... | [
0.6406105756759644,
-0.5090764164924622,
0.6821025013923645,
-0.896612286567688,
-0.3981461524963379,
0.7543888688087463,
-0.9281652569770813,
-0.08040328323841095,
0.4209615886211395,
0.7479841709136963,
-0.46054524183273315,
-0.49852705001831055,
-0.3526671826839447,
-0.21766947209835052... |
def link ( self, z ) : return np. exp ( z ) | [
-0.3960818648338318,
-0.740402340888977,
0.1903294324874878,
0.09945651143789291,
0.464144766330719,
0.39728569984436035,
0.9526158571243286,
0.5528258681297302,
1.8239097595214844,
-1.4081491231918335,
0.14841221272945404,
0.9717121124267578,
-1.0601379871368408,
-0.22788895666599274,
-... |
def hamiltonian _ to _ matrix ( h : qml. hamiltonian ) - > np. array : n _ qubits = len ( h. wires ) mat = np. zeros ( ( 2 * * n _ qubits, 2 * * n _ qubits ), np. complex128 ) for coef, op in zip ( * h. terms ) : mat + = coef * qml. utils. expand ( op. matrix, op. wires, n _ qubits ) return mat | [
-0.2498929500579834,
-0.4198610186576843,
0.27324604988098145,
-0.12636254727840424,
0.4132630527019501,
-0.14866401255130768,
0.43421801924705505,
-0.09784691035747528,
0.562952995300293,
-0.14384035766124725,
-0.37907126545906067,
0.021926337853074074,
-0.683473527431488,
0.4688419699668... |
def transfer ( self, msg ) : payment _ id = msg ['payment _ id'] destination = msg ['destination'] transaction _ id = msg ['transaction _ id'] cost = msg ['cost'] if destination not in self. balances : response = {'error':'destination does not exist'} else : self. balances [ destination ] + = cost msg = {'method':'use ... | [
0.4316292107105255,
0.4516158699989319,
0.9745407104492188,
-0.2736034691333771,
0.26755526661872864,
-0.10707765817642212,
0.03564902022480965,
-0.37904831767082214,
0.3203278183937073,
0.5966183543205261,
0.2831136882305145,
0.4940471351146698,
-0.7945914268493652,
0.12779104709625244,
... |
def pol2cart ( rho, theta ) : x = rho * np. cos ( theta ) y = rho * np. sin ( theta ) return x, y | [
-0.5035696625709534,
-1.7859262228012085,
0.4776909053325653,
-1.2584983110427856,
0.5771940350532532,
0.13840508460998535,
-1.0465234518051147,
-0.6732987761497498,
-0.5979784727096558,
0.51913982629776,
-0.5911032557487488,
-0.18161819875240326,
0.3329963684082031,
-0.8755107522010803,
... |
def send _ pyobj ( self, obj ) : pickled = dumps ( obj, protocol = 2 ) return self. send _ string ( pickled ) | [
-0.9190224409103394,
-0.5102540850639343,
0.4445418417453766,
-0.29293516278266907,
-0.31354275345802307,
0.0398997999727726,
-0.4331519603729248,
-1.7964980602264404,
0.7006210088729858,
0.3743264377117157,
-1.7330105304718018,
0.3319074213504791,
0.011109162122011185,
-0.1859710216522216... |
def remove _ job ( self, job : j ) :... | [
-0.49931392073631287,
0.42971980571746826,
0.16184790432453156,
0.7245299220085144,
-1.0927765369415283,
-0.33024927973747253,
0.05368979275226593,
0.8113270998001099,
-0.273010790348053,
-0.16813617944717407,
-1.1284583806991577,
-0.29498299956321716,
-1.2744311094284058,
-0.1655981987714... |
def preprocess _ data ( data, checks, timestamp ) : ret = list ( ) for check in checks : spec = check _ specs. get ( check [ 0 ] ) if not spec : continue try : res = spec. get ('preprocess') ( data ) except exception as e : logger. debug ( " failed to preprocess alerting check'% s': % s ", check [ 0 ], e, ) continue if... | [
0.09234119951725006,
-0.1689794510602951,
0.7258016467094421,
0.04002681002020836,
0.27075543999671936,
-0.21278125047683716,
-1.2051275968551636,
-0.08068002760410309,
-0.07604290544986725,
0.3555513024330139,
0.3949858546257019,
0.0008964627631939948,
0.30795449018478394,
0.4274079203605... |
def run _ all ( download = true, write _ csv = false, write _ uncompressed _ json = false ) : if download is true : mpcorb. download _ latest ( ) df = mpcorb. get _ asteroids _ df ( ) if write _ csv is true : df. to _ csv ( os. path. join ( folder,'asteroids. csv') ) payload = get _ web _ payload ( df ) write _ web _ p... | [
-0.2923007607460022,
-0.000015424144294229336,
0.4793824553489685,
0.8293392658233643,
0.39733245968818665,
0.24703693389892578,
0.2777281105518341,
0.06103663891553879,
-0.2596491575241089,
0.045158933848142624,
0.11577977240085602,
0.5876588225364685,
0.811514139175415,
0.369929641485214... |
def set _ port _ flag ( self, device, flag, level ) : port = self. _ device _ bus _ mapping [ device ]. port port. set _ flag ( flag, level ) | [
0.09947413951158524,
0.029734589159488678,
0.31836333870887756,
0.4661305248737335,
0.015968037769198418,
1.2520450353622437,
0.6906252503395081,
0.36949312686920166,
-1.4060200452804565,
-0.08032867312431335,
-0.47970566153526306,
0.7663519978523254,
-0.6204372048377991,
-0.03890099748969... |
def test _ remove _ one _ line _ comment ( self ) : self. assertisnone ( jsonsimpleconfig. loads ( " # " + jsccommentstestsuite. _ _ example _ jsc ) ) self. assertisnone ( jsonsimpleconfig. loads ( " / / " + jsccommentstestsuite. _ _ example _ jsc ) ) self. assertisnone ( jsonsimpleconfig. loads ( " ; " + jsccommentste... | [
0.2651539444923401,
-0.7575217485427856,
0.7504807710647583,
-0.8103291988372803,
0.29394030570983887,
-0.13635331392288208,
0.7946195006370544,
-0.23363474011421204,
0.5397083759307861,
0.24983833730220795,
-1.206693410873413,
-0.533725380897522,
0.425741046667099,
0.5548847913742065,
0... |
def calculatescore ( rolls ) : runningscore = 0 # incremented by 2 for strikes, one for other rolls ; divide by 2 for actual # frame count framecount = 0 # keep count of knocked pins for scoring spares previousknockedpins = 0 knockedpins = 0 # spares and strikes influence multiplier for subsequent rolls rollmultipliers... | [
-0.49363768100738525,
0.4023607075214386,
0.5899698138237,
-0.5906134247779846,
-0.7631869316101074,
-0.3339627981185913,
0.8311387300491333,
0.3512963354587555,
0.12824295461177826,
0.5262550711631775,
-0.7756038308143616,
0.2851215898990631,
-0.5733047723770142,
0.3823281228542328,
0.6... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, model ) : return false return self. to _ dict ( ) = = other. to _ dict ( ) | [
-1.4920272827148438,
-0.23656344413757324,
0.560532808303833,
-0.19242531061172485,
0.06547360122203827,
0.331889271736145,
-0.30174413323402405,
-0.5983601808547974,
0.4114784300327301,
0.4829773008823395,
-1.4308922290802002,
-0.5293290615081787,
0.01344406045973301,
-0.13754646480083466... |
def testcalcdistdev ( self ) : ac = [ [ - 1. 5846, - 0. 5216, 0. 1338 ], [ - 1. 1512, - 1. 5146, - 0. 0477 ], [ - 1. 7781, - 0. 4440, 1. 2120 ], [ - 2. 5555, - 0. 4907, - 0. 3770 ], [ - 0. 6751, 0. 5855, - 0. 3509 ], [ - 1. 1705, 1. 5633, - 0. 1896 ], [ - 0. 5293, 0. 5028, - 1. 4463 ], [ 0. 6751, 0. 5854, 0. 3509 ], [ ... | [
0.7201130986213684,
0.17145925760269165,
1.2612240314483643,
-0.5423334836959839,
-0.2680554687976837,
0.21813201904296875,
1.401991367340088,
0.1386285275220871,
0.4564005434513092,
-0.592374324798584,
-0.4966426491737366,
-0.20084962248802185,
0.2148260772228241,
0.30824345350265503,
0... |
def test _ load _ many _ conda ( self, build _ image _ for _ jupyterlab ) : lb, username = build _ image _ for _ jupyterlab [ 0 ], build _ image _ for _ jupyterlab [ 5 ] keys = [ " conda3 & cdutil ", " conda3 & python - coveralls ", " conda3 & nltk ", " conda3 & asdfasdffghdfdasfgh " ] loader = packagedataloader ( keys... | [
-0.9808222651481628,
0.47706079483032227,
0.5384172201156616,
0.22208085656166077,
0.3077198565006256,
0.1577300727367401,
-0.9313595294952393,
-0.5300002694129944,
-0.650572657585144,
0.16935046017169952,
-0.615564227104187,
-0.6046192646026611,
0.8082382082939148,
1.0245730876922607,
0... |
def dot ( a, b ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # from scipy import linalg # matrix / matrix multiplication if ( ( a. ndim = = 2 ) and ( b. ndim = = 2 ) ) : if ( a. flags ['c _ contiguous'] and... | [
1.2745429277420044,
-0.34525641798973083,
0.9719156622886658,
-0.35284504294395447,
0.06614656746387482,
0.3393886685371399,
0.5431432723999023,
-0.40072017908096313,
-0.0470578633248806,
0.38996437191963196,
0.9223229885101318,
0.44940000772476196,
0.11746873706579208,
0.14419390261173248... |
def plotdata ( time, data, showdatapoint = true, color ='black ', label ='unknown') : if time is none : if showdatapoint : plt. plot ( data,'o ', color = color ) plt. plot ( data,'- ', color = color, label = label ) else : plt. plot ( data,'- ', color = color, label = label ) else : if showdatapoint : plt. plot ( time,... | [
1.0772864818572998,
0.22928647696971893,
0.7046738266944885,
-0.43825364112854004,
0.11223895102739334,
0.7989049553871155,
-0.8640851378440857,
0.48586180806159973,
0.5636536478996277,
0.2764865458011627,
0.016915973275899887,
1.5609544515609741,
0.6836068034172058,
0.6573621034622192,
... |
def add _ callback ( self, key, cb, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ add _ cb ( us _ key, cb, _ flow ) | [
-0.7462214827537537,
0.19639086723327637,
0.6618637442588806,
0.4380978047847748,
-0.8676543831825256,
0.0966913178563118,
0.08693403005599976,
0.022050898522138596,
0.6577932834625244,
0.4184430241584778,
-0.0850503221154213,
0.015673821792006493,
-0.3550876975059509,
0.041109900921583176... |
def calcantuvwlist ( self, has = [ - 3. 5, - 1. 0 ], dec = + 50. 0, obslatitude = 34. 0 ) : locs = [ ] maxval = 4000. 0 # # cell size : 1 / ( 4000. 0 / ( 3e + 8 / 1e + 9 ) ) * 180. 0 / 3. 14 * 60 * 60 = 15. 47 arcsec for hourangle in np. arange ( has [ 0 ], has [ 1 ] + 0. 1, 0. 25 ) : alocs = self. getantuvws ( hourang... | [
-0.4762628376483917,
-0.0888630598783493,
0.735953688621521,
-0.671103298664093,
-0.36722177267074585,
0.5148309469223022,
-0.33435142040252686,
0.3368586301803589,
0.026627972722053528,
0.4911286234855652,
0.054049793630838394,
-0.40358662605285645,
1.1798728704452515,
0.6747908592224121,... |
def parse _ letter ( self, response, today ) : fighters = response. css ( '. b - statistics _ _ table - row') [ 2 : ] # leave out header and blank row # exclude all fighters who did not participate in specified event ( if not running a full update ). if self. fighter _ list : fighters = [ x for x in fighters if x. css ... | [
-0.20425660908222198,
-0.285108745098114,
0.8846468925476074,
-0.3412471115589142,
0.6787790656089783,
-1.1826300621032715,
-0.08857782185077667,
-0.6437535881996155,
-0.03725121170282364,
-0.4716702401638031,
-0.06462520360946655,
-0.36333996057510376,
1.2529544830322266,
0.16337350010871... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, operation ) : return self. _ name = = other. name or ( self. _ id is not none and other. id is not none and self. _ id = = other. id ) return false | [
-0.5913581848144531,
-0.11967217177152634,
0.8938165903091431,
0.20074637234210968,
-0.35804206132888794,
-0.4848153591156006,
0.47842496633529663,
-0.4669938385486603,
1.2308900356292725,
0.4468909800052643,
-0.8483542203903198,
-1.0146480798721313,
-0.127468079328537,
-0.5442092418670654... |
def gf _ compose ( g, h, p ) : if not g : return [ ] comp = [ g [ 0 ] ] for a in g [ 1 : ] : comp = gf _ mul ( comp, h, p ) comp = gf _ add _ const ( comp, a, p ) return comp | [
-0.2965187132358551,
0.2170940637588501,
0.6464625000953674,
1.0518478155136108,
0.8708903193473816,
0.23978672921657562,
-0.33828985691070557,
0.44099071621894836,
-0.8440800905227661,
0.8431570529937744,
-0.42102015018463135,
-0.6148099303245544,
-0.3740133047103882,
0.44263049960136414,... |
def test _ analyzer ( init1, analyzer1, analyzer2 ) : add _ words = false n _ samples = 70 x _ txt = fetch _ 20newsgroups ( subset ='train') ['data'] [ : n _ samples ] x = np. array ( [ x _ txt, x _ txt ] ). t n _ components = 10 # test first analyzer output : encoder = gapencoder ( n _ components = n _ components, ini... | [
-0.14581076800823212,
-0.22098177671432495,
0.6797713041305542,
0.38703301548957825,
-0.18909431993961334,
0.6622596979141235,
0.3740226924419403,
-0.42807379364967346,
0.4187031090259552,
-0.6204464435577393,
-0.06723924726247787,
0.4983430802822113,
-0.45810699462890625,
0.78797167539596... |
def plot _ riemann ( states, s, riemann _ eval, wave _ types = none, t = 0. 1, ax = none, color ='multi ', layout ='horizontal ', variable _ names = none, t _ pointer = false, extra _ axes = false, fill = ( ), derived _ variables = none ) : num _ vars, num _ states = states. shape if derived _ variables : num _ vars = ... | [
1.2938793897628784,
0.1911849081516266,
0.9572506546974182,
-0.5642480254173279,
-0.7483683228492737,
0.032001543790102005,
0.3699897825717926,
0.28372904658317566,
-0.04512830823659897,
0.24474968016147614,
0.005897580645978451,
0.28197720646858215,
-0.3124358057975769,
0.2223634272813797... |
def n _ unique ( self ) - > dataframe : if self. downsample : return wrap _ df ( self. _ df. downsample ( self. by, self. rule, self. n, " n _ unique " ) ) return wrap _ df ( self. _ df. groupby ( self. by, self. selection, " n _ unique " ) ) | [
-0.6151362061500549,
0.799958348274231,
0.35482197999954224,
-0.1842612326145172,
0.5100228190422058,
-0.7541335225105286,
1.031182050704956,
-0.17624711990356445,
0.49163827300071716,
-0.2119249850511551,
0.3669781982898712,
0.8198961615562439,
0.04366632178425789,
-0.6767739057540894,
... |
def maxsessions ( shooters ) : max = 0 # print'-'* 65 for shooter in shooters : length = len ( shooter ) # print ` shooter ` + " \ n " # print " length : \ t " + ` length ` + " \ n " if max < length : max = length # print " max : \ t " + ` max ` + " \ n " return max - 1 | [
-0.2690562903881073,
-1.0485126972198486,
0.7490456104278564,
0.05599193647503853,
-0.05281013995409012,
0.2091226428747177,
-0.22080199420452118,
-0.4420991837978363,
1.1962237358093262,
0.6023103594779968,
-0.03696316108107567,
0.5159233808517456,
-0.5908666253089905,
0.4971354901790619,... |
def setup ( self ) : self. app = self. layer [ " app " ] self. root _ acl _ users = self. app. acl _ users self. portal = self. layer [ " portal " ] | [
1.3110897541046143,
-0.8678553700447083,
0.07275844365358353,
0.4362071454524994,
0.30913904309272766,
0.7417221069335938,
0.28684762120246887,
-0.6165955066680908,
0.35070303082466125,
0.3647477924823761,
0.48712313175201416,
0.9440500736236572,
0.3206302225589752,
0.11216820776462555,
... |
def dispatch ( self, obj, action, * args, * * kwargs ) : try : method = getattr ( obj, action ) except attributeerror : method = getattr ( obj,'default') return method ( * args, * * kwargs ) | [
0.06642356514930725,
-0.5441306233406067,
0.5272881388664246,
0.5393938422203064,
0.8911706209182739,
-0.5190525054931641,
-0.3221045732498169,
-0.7988147735595703,
0.5702279806137085,
0.6384596824645996,
-0.1791323721408844,
0.3302275538444519,
0.4757034182548523,
-0.012655903585255146,
... |
def generate _ snps ( alphabet, numsnp ) : return [ sample ( alphabet, 2 ) for i in range ( numsnp ) ] | [
-0.8652864098548889,
-0.48340779542922974,
0.4162607789039612,
0.011354949325323105,
0.44473350048065186,
0.2877676486968994,
-0.7630988359451294,
0.1055891290307045,
1.6241064071655273,
0.5663070678710938,
-1.3321934938430786,
0.9508830308914185,
-0.5819908380508423,
-0.5675766468048096,
... |
def _ handle _ azure _ exception ( ) : try : yield except _ azurehttperror as exception : if exception. status _ code in _ error _ codes : raise _ error _ codes [ exception. status _ code ] ( str ( exception ) ) raise | [
0.27092885971069336,
0.16540497541427612,
0.58632493019104,
0.3458467423915863,
-0.3628319203853607,
0.1842251867055893,
-0.8448371291160583,
0.4808868169784546,
-0.03608846291899681,
0.47470369935035706,
0.6813009977340698,
-0.47104647755622864,
0.028638390824198723,
0.30896544456481934,
... |
def _ _ init _ _ ( _ _ self _ _, *, completed _ datapoint _ count : float, incremental _ dataset _ last _ refresh _ time : str, skipped _ datapoint _ count : float, total _ datapoint _ count : float ) : pulumi. set ( _ _ self _ _, " completed _ datapoint _ count ", completed _ datapoint _ count ) pulumi. set ( _ _ self... | [
-0.057618726044893265,
0.6660537719726562,
0.5701315402984619,
-0.40379610657691956,
0.22955554723739624,
0.8562507033348083,
-0.18563593924045563,
0.16049493849277496,
-0.09216058999300003,
0.15724533796310425,
-0.8819642066955566,
0.5225115418434143,
1.1714162826538086,
-0.94710946083068... |
def solve ( self, problem ) : # apply node consistency ( unary constraints ) for c in problem. constraints [ : ] : vars = c. get _ vars ( ) if len ( vars ) = = 1 : c. propagate ( vars [ 0 ] ) problem. constraints. remove ( c ) # setup strategies self. prop. setup ( problem ) self. var _ ordering. setup ( problem ) for ... | [
-0.13119757175445557,
0.5050782561302185,
0.6317289471626282,
0.669317364692688,
0.9017968773841858,
-0.14974327385425568,
0.25396841764450073,
0.09250860661268234,
0.148458331823349,
-0.21530860662460327,
0.41443368792533875,
-0.4967418909072876,
-0.49520206451416016,
-0.11983662098646164... |
async def create _ credential ( self, credential : credential ) - > mythicresponse : url = " { } { } : { } / api / v { } / credentials ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) resp = await self. post _ json ( url, data = await obj _ to _ json ( credential ) ) ... | [
-0.8001346588134766,
-0.6883682012557983,
0.5355234742164612,
0.18778695166110992,
0.6246528625488281,
-0.07222487777471542,
-0.6680970191955566,
0.2753557860851288,
0.44333115220069885,
0.2101459503173828,
-1.4077955484390259,
0.2001935988664627,
-0.5959647297859192,
-0.43614432215690613,... |
def should _ do _ markup ( stream : textio = sys. stdout ) - > bool : py _ colors = none # https : / / xkcd. com / 927 / for env _ var in [ " py _ colors ", " clicolor ", " force _ color ", " ansible _ force _ color " ] : value = os. environ. get ( env _ var, none ) if value is not none : py _ colors = to _ bool ( valu... | [
-0.881805956363678,
0.3065875768661499,
0.8785680532455444,
0.3210029602050781,
-0.2841375768184662,
-0.19172166287899017,
-0.4767891466617584,
-0.2584743797779083,
-0.2649172246456146,
-0.2358599156141281,
0.2486972063779831,
0.35088789463043213,
0.42115363478660583,
0.9536215662956238,
... |
def get _ conv _ bias ( cell ) : weight = initializer. initializer ( initializer. heuniform ( negative _ slope = math. sqrt ( 5 ) ), cell. weight. shape, cell. weight. dtype ). init _ data ( ) fan _ in, _ = calculate _ fan _ in _ and _ fan _ out ( weight. shape ) bound = 1 / math. sqrt ( fan _ in ) return initializer. ... | [
0.7131754755973816,
0.2518216669559479,
0.4378492832183838,
1.1545486450195312,
-0.2870534360408783,
0.03693754971027374,
0.2505926787853241,
0.36851218342781067,
0.09258491545915604,
0.8144010901451111,
-0.6032482385635376,
0.5917283296585083,
-0.17201681435108185,
0.1463664323091507,
0... |
def get _ mjds ( self, high _ precision = false ) : if high _ precision : if hasattr ( self, " toas " ) : return numpy. array ( [ t. mjd for t in self. toas ] ) else : return numpy. array ( [ t for t in self. table ['mjd'] ] ) else : if hasattr ( self, " toas " ) : return numpy. array ( [ t. mjd. value for t in self. t... | [
-0.780019223690033,
-0.37034687399864197,
0.6317439675331116,
-0.1072327196598053,
-0.155317485332489,
-0.06371019780635834,
-0.810070812702179,
-0.057647235691547394,
0.05514824390411377,
-0.31024327874183655,
1.1129711866378784,
0.3233693540096283,
-0.2551652491092682,
1.1463146209716797... |
def handler ( event, context ) : seen = set ( ) region = event ['region'] head = event ['detail'] ['commitid'] before = event ['detail'] ['oldcommitid'] ref = event ['detail'] ['referencefullname'] branch = event ['detail'] ['referencename'] repo = event ['detail'] ['repositoryname'] payload = {'ref': ref,'head': head,... | [
0.844713032245636,
-0.28277623653411865,
0.5642993450164795,
-1.0929402112960815,
0.1460484117269516,
-0.5117638111114502,
-0.10343310236930847,
-0.6158360838890076,
0.010629100725054741,
0.6882103681564331,
0.06742654740810394,
0.7586442232131958,
-0.2701273560523987,
0.22473667562007904,... |
def _ generate _ examples ( self, file _ path ) : with epath. path ( file _ path ). open ( ) as tsvfile : # need to disable quoting - as dataset contains invalid double quotes. reader = csv. dictreader ( tsvfile, dialect = " excel - tab ", quoting = csv. quote _ none ) for i, row in enumerate ( reader ) : yield i, { " ... | [
-0.29081112146377563,
0.03328654542565346,
0.3378364145755768,
-0.8631293177604675,
-0.6184045672416687,
0.4067871570587158,
-0.6051379442214966,
0.9928375482559204,
-0.9376968741416931,
0.5881295204162598,
-0.5474763512611389,
-0.4484705626964569,
1.6903760433197021,
0.03446396440267563,
... |
def start _ local _ etcd _ server ( ) : if is _ local _ etcd _ running ( ) : return global etcd _ process etcd _ process = subprocess. popen ('/ usr / local / bin / etcd ', stdout = subprocess. pipe, stderr = subprocess. pipe ) # wait for etcd process to start while not is _ local _ etcd _ running ( ) : time. sleep ( 1... | [
0.6129867434501648,
-0.9892687201499939,
0.5194379687309265,
-0.631862223148346,
-0.513182520866394,
0.7503892779350281,
-0.27068421244621277,
1.1594294309616089,
0.02786860428750515,
-0.5048856139183044,
0.2851453721523285,
0.999088704586029,
0.4484842121601105,
-0.14562386274337769,
0.... |
def train ( self, x, y, epochs = 1, verbose = 0 ) : h = self. model. fit ( x, y, batch _ size = batch _ size, epochs = epochs, verbose = verbose ) self. loss = h. history ['loss'] [ 0 ] # only 1 epoch | [
-0.515860378742218,
0.385637491941452,
0.4442371129989624,
0.6272835731506348,
0.4060747027397156,
-0.42877641320228577,
-0.9033247232437134,
0.39044666290283203,
-0.492203950881958,
-0.22977758944034576,
-0.5269075036048889,
1.3716753721237183,
1.0170354843139648,
0.07656855136156082,
-... |
def store _ or _ update _ kafka _ offset ( self, topic _ partition : str, offset _ start : str, offset _ until : str ) - > bool : self. sqldata. store _ or _ update _ kafka _ offset ( topic _ partition, offset _ start, offset _ until ) | [
-0.3684060573577881,
-0.9306233525276184,
0.5286592245101929,
-0.29041171073913574,
-1.0971797704696655,
1.0418643951416016,
-1.0481292009353638,
0.33209601044654846,
-0.4201318919658661,
0.17600704729557037,
-0.1412816345691681,
0.12477879971265793,
-1.0608351230621338,
-0.784862697124481... |
def info ( self, vapp ) : assert isinstance ( vapp, libcloud. compute. base. node ) return {'vapp _ name': vapp. name,'state': vapp. state,'private _ ip': vapp. private _ ips,'vdc': vapp. extra ['vdc'],'vm _ state': vapp. extra ['vms'] [ 0 ] ['state'],'size': self. _ find _ node _ size ( vapp. size ) } | [
-0.4269393980503082,
0.3051730990409851,
0.46805235743522644,
-0.8696639537811279,
-0.5641297698020935,
0.16218610107898712,
-0.8818963170051575,
-0.5177233815193176,
0.020107680931687355,
0.7522279024124146,
-0.08279210329055786,
-0.2043609619140625,
0.6465072631835938,
-0.140102997422218... |
def get _ colors ( self, colorspace = " rgb " ) : colors = { " rgb " : self. rgb, " hsv " : self. hsv, " hls " : self. hls } return colors [ colorspace ] | [
-0.4228709936141968,
-0.15079200267791748,
0.19434650242328644,
-0.27828553318977356,
0.22200258076190948,
-0.7046955227851868,
-1.9329015016555786,
-0.7664473056793213,
0.7253527045249939,
-0.665132462978363,
-0.5944071412086487,
0.5238007307052612,
-0.20298001170158386,
0.978437662124633... |
def _ on _ quit _ button ( self ) : try : self. wallpaper _ thread. stop ( ) except attributeerror : pass self. quit ( ) | [
0.956170916557312,
-0.8303450345993042,
0.21422915160655975,
-0.2886354327201843,
0.817767858505249,
0.9721338748931885,
0.4745849072933197,
-1.0172775983810425,
-0.4145444333553314,
0.41298142075538635,
0.10870949178934097,
-0.8850618004798889,
-0.6048251986503601,
0.8232133388519287,
1... |
def testdecryptionfailed ( self ) : key, data = symmetric _ encrypt ( 1 ) self. failunlessraises ( valueerror, symmetric _ decrypt, key,'abcd') self. failunlessraises ( valueerror, symmetric _ decrypt,'abcd ', data ) | [
-0.1154056265950203,
1.7248868942260742,
0.27408960461616516,
-0.08210963010787964,
0.3076615035533905,
-0.5852439999580383,
0.11328765749931335,
-0.5051337480545044,
-0.3552917242050171,
-0.056996095925569534,
-0.7839436531066895,
0.1592300534248352,
-0.1521936058998108,
-0.02375203371047... |
def vpc _ endpoint _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " vpc _ endpoint _ id " ) | [
0.8277162313461304,
-0.45812293887138367,
0.24887000024318695,
0.8813033103942871,
1.235494613647461,
1.5156632661819458,
-0.4531049132347107,
0.27071353793144226,
0.7997124791145325,
0.5982495546340942,
0.051043372601270676,
1.0668021440505981,
-0.969674825668335,
-1.3699456453323364,
0... |
def lift _ embargo ( self, identity, _ id, uow = none ) : # get the record record = self. record _ cls. pid. resolve ( _ id ) # check permissions self. require _ permission ( identity, " lift _ embargo ", record = record ) # modify draft embargo if draft exists and it's the same as the record. draft = none if record. h... | [
-0.042634621262550354,
0.6094152331352234,
0.8510531187057495,
-0.09973741322755814,
0.27379244565963745,
-0.35186702013015747,
0.14436741173267365,
0.6076245307922363,
0.12942521274089813,
0.8045223951339722,
-0.6596282720565796,
0.025337878614664078,
0.03106577880680561,
0.55405640602111... |
def retire ( objs ) : to _ pop = [ ] for ( n, a ) in enumerate ( objs ) : if ( not a. draw _ me ) or off _ screen ( a ) : to _ pop. append ( n ) for n in to _ pop [ : : - 1 ] : objs. pop ( n ) | [
-0.9499368667602539,
0.1398565173149109,
0.6878558993339539,
0.02890660986304283,
0.15864694118499756,
1.0008443593978882,
0.32630860805511475,
-0.11560431122779846,
0.0854828953742981,
0.9633458852767944,
-0.05402151867747307,
-0.2613059878349304,
-0.5519779324531555,
-0.24402742087841034... |
def setseed ( self, seed ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. setseed ( self, seed ) | [
-0.8144856691360474,
-0.7266379594802856,
0.3887101411819458,
-0.014992336742579937,
-0.34643837809562683,
-0.1939559280872345,
-0.1645190268754959,
0.5065743923187256,
0.02936633490025997,
-0.550820529460907,
-1.3244149684906006,
0.9611766934394836,
-1.1482298374176025,
0.401049941778183,... |
def pprop ( labels, propid, cast = float, fillval = np. nan ) : props = [ ] for s in labels : x = re. search ( r '. *'+ propid +': (. +? ) ( \ s | $ ) ', s ) props + = [ cast ( x. group ( 1 ) ) ] if x else [ fillval ] return array ( props ) | [
-1.5485926866531372,
-1.147615909576416,
0.6365140080451965,
-0.21430835127830505,
0.36163389682769775,
0.14362096786499023,
-0.9102678894996643,
-0.29511725902557373,
0.43254348635673523,
1.3720085620880127,
0.5302110314369202,
0.25479021668434143,
-0.6475325226783752,
-0.2771437466144562... |
def check _ lcd _ connection ( ) : try : lcd. is _ backlight _ on ( ) except exception as e : print ( e ) raise lcderror ( " lcd not reachable. " ) | [
0.5239346623420715,
0.1834796816110611,
0.6295512318611145,
0.20747561752796173,
-0.0009756448562256992,
0.2834063172340393,
-0.5110484957695007,
0.7108815908432007,
-0.828376829624176,
0.7115641832351685,
0.9073954820632935,
0.5001999139785767,
-1.0664706230163574,
-0.07244028896093369,
... |
def start ( logger, full _ id, fetch = true, env = none, volumes = none, gpu _ devices = none ) : owner, name, id = unpack _ full _ job _ id ( full _ id ) if isinstance ( sys. stdout, generallogger ) : # we don't want to have stuff written to stdout before in job's log sys. stdout. clear _ buffer ( ) job _ backend = jo... | [
0.6991620063781738,
-0.4407947063446045,
0.6668078899383545,
0.4669228792190552,
-0.05867127329111099,
-0.6499987840652466,
-0.4162127375602722,
0.05891796201467514,
-0.03582349792122841,
-0.39612889289855957,
-0.2354142665863037,
0.5281237959861755,
0.741633415222168,
0.5145246386528015,
... |
def get ( self, tag ) : if tag not in self. _ vocab _ index : if self. _ freeze : return 0 self. _ vocab _ index [ tag ] = len ( self. _ vocab _ index ) return self. _ vocab _ index [ tag ] | [
-0.41096043586730957,
0.2040310800075531,
0.46881261467933655,
-0.7272022366523743,
-0.40189817547798157,
-0.5407581925392151,
0.21791063249111176,
-0.3943687677383423,
0.15920564532279968,
0.2886471152305603,
-0.4927818477153778,
0.18109352886676788,
-0.8416388034820557,
0.654160678386688... |
def closeconnection ( client ) : if not removeclient ( client ) and debug : print ( " the specified client was not in the client list. " ) try : client. shutdown ( socket. shut _ rdwr ) client. close ( ) except exception as e : if debug : print ( " client may have already been disconnected. " ) finally : sys. exit ( 0 ... | [
-0.1740283966064453,
0.0910278782248497,
0.46938639879226685,
0.09650074690580368,
-0.41652169823646545,
0.33999544382095337,
0.25340285897254944,
0.2059532105922699,
0.6036838293075562,
0.3466087281703949,
0.2842290699481964,
-0.5227776169776917,
-1.0655105113983154,
0.6069895625114441,
... |
def test _ identify _ protprotinterface ( protprot _ caprimodule, protprot _ input _ list ) : protprot _ complex = protprot _ input _ list [ 0 ] observed _ interface = protprot _ caprimodule. identify _ interface ( protprot _ complex, cutoff = 5. 0 ) expected _ interface = { " a " : [ 37, 38, 39, 43, 45, 71, 75, 90, 94... | [
-0.8343719244003296,
-0.3446662127971649,
0.3750905394554138,
0.6168320178985596,
0.425029993057251,
1.2992030382156372,
0.9965420961380005,
-0.5371867418289185,
0.29358869791030884,
-0.045278847217559814,
-0.570014476776123,
-0.09159620851278305,
-1.3665847778320312,
-0.12362737953662872,... |
def _ cleanup _ filename _ for _ charm ( name ) : # replacing spaces with " _ " return name. replace ( " ", " _ " ) | [
0.22426818311214447,
-0.6140739917755127,
0.5622339248657227,
-1.9748847484588623,
-0.7467929720878601,
-0.0027653772849589586,
-0.6117326021194458,
0.7127615213394165,
-0.277471125125885,
-0.11490325629711151,
-0.1439972072839737,
-0.03825796768069267,
1.2022954225540161,
1.13577377796173... |
def make _ html _ response ( self, html ) : headers = { } headers ['allow'] ='get, post, put, delete, options'# headers ['access - control - allow - origin'] ='*'headers ['access - control - max - age'] = str ( 1728000 ) headers ['access - control - allow - headers'] ='accept, origin, api _ key, content - type, user - ... | [
-0.7381535768508911,
-0.09915085881948471,
0.5963659882545471,
0.00004169201201875694,
-0.6090558171272278,
-0.30840975046157837,
0.04509563744068146,
0.4457966387271881,
0.01248263567686081,
0.17408981919288635,
-0.15575629472732544,
-0.550018846988678,
0.13027118146419525,
-0.29513907432... |
def change _ email _ complete ( self, user _ id, encoded _ email, token ) : verify = models. user. get _ by _ auth _ token ( int ( user _ id ), token ) email = utils. decode ( encoded _ email ) if verify [ 0 ] is none : message ='the url you tried to use is either incorrect or no longer valid.'self. components. flash _... | [
-0.029311133548617363,
-0.07497161626815796,
0.4576490819454193,
0.40717563033103943,
0.005136311985552311,
-0.3774142861366272,
0.5393496751785278,
0.7050172090530396,
0.10152371972799301,
0.30644309520721436,
-0.881393313407898,
0.44609761238098145,
0.014539752155542374,
-0.2142472863197... |
def _ sampler ( self, n ) : if self. true _ type = ='gaussian': t _ x = self. t _ d. sample ( ( n, ) ) elif self. true _ type = ='cauchy': t _ normal _ x = self. t _ normal _ d. sample ( ( n, ) ) t _ chi2 _ x = self. t _ chi2 _ d. sample ( ( n, ) ) t _ x = t _ normal _ x / ( torch. sqrt ( t _ chi2 _ x. view ( - 1, 1 ) ... | [
-0.4874439537525177,
0.12076963484287262,
0.6724579334259033,
-0.8404671549797058,
-1.0455926656723022,
0.167977973818779,
0.11488528549671173,
-0.3640264868736267,
0.11161595582962036,
0.6915387511253357,
0.1674272119998932,
-0.1203128844499588,
0.8402388691902161,
-0.17328524589538574,
... |
def generate _ real _ attack _ url ( self, dest _ url, description, method, hashing, query _ string, payload, orig _ url ) : user _ attack _ payload = payload ['payload'] if self. options. finalpayload : user _ attack _ payload = self. options. finalpayload elif self. options. finalremote : user _ attack _ payload ='< ... | [
-0.27582448720932007,
-0.05400111526250839,
0.9380692839622498,
0.1046828106045723,
-0.4657909870147705,
-0.16299453377723694,
-0.15932072699069977,
-0.12882103025913239,
-0.11230921000242233,
0.3051516115665436,
0.40535667538642883,
0.06921420991420746,
-0.07907713204622269,
-0.2913108468... |
def get _ received _ message ( conn : sqlite3. connection, received _ timestamp, * args ) : fields = [ * filter ( lambda f : f in received _ message _ fields, args ) ] if fields : with conn : statement = ( f " select { ', '. join ( fields ) } from receivedmessage where received _ timestamp =? " ) values = conn. execute... | [
-0.1646389216184616,
0.8356503844261169,
0.46858444809913635,
-0.5387234091758728,
0.42607271671295166,
-1.2368403673171997,
-0.90379399061203,
-0.24908192455768585,
-0.6349762678146362,
0.10313139855861664,
-0.5260317921638489,
-0.37668880820274353,
0.16938629746437073,
0.1395865678787231... |
def generateindexpage ( ) : db = myfunc. databaseconnection ( ) cur = db. cursor ( ) myquery = " select * from maintable " cur. execute ( myquery ) rows = cur. fetchall ( ) cur. close ( ) db. close ( ) pagehtml = pagestart ( ) + mainnav ( ) pagehtml = pagehtml + " " " < div class = " maincontent " > < table > < tr > < ... | [
-0.022349515929818153,
-0.07326935976743698,
0.7742730379104614,
-0.4118731617927551,
-0.6883213520050049,
0.3807492256164551,
0.391652911901474,
0.2333853542804718,
-0.30537691712379456,
0.30513685941696167,
0.7085015177726746,
-0.4631580710411072,
-0.6877890825271606,
1.1580848693847656,... |
def specific _ time ( self, log _ item ) : xpath _ days = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " days ", self. my _ object ) xpath = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " specifictime ", self. my _ object ) text _ from _ xml, ids, eng _ list = self. util. g... | [
-0.8636614680290222,
-0.14552469551563263,
0.8760943412780762,
-0.32530495524406433,
-0.2940540313720703,
-0.1619291454553604,
0.17739363014698029,
-0.577363133430481,
0.25437405705451965,
0.24278566241264343,
0.15614044666290283,
0.07032893598079681,
-0.25204285979270935,
0.65801101922988... |
def hit ( self, item, * identifiers ) : raise notimplementederror | [
-1.3547651767730713,
-0.2981579601764679,
0.2968727648258209,
0.783020555973053,
0.5448355674743652,
0.9256510734558105,
0.24811901152133942,
0.45226070284843445,
-0.6134317517280579,
0.3227006793022156,
-0.5678216814994812,
-0.1684599220752716,
-0.34481680393218994,
-1.3791966438293457,
... |
def get _ timeline ( self, repo, start _ datetime, end _ datetime, file _ regex, author _ regex ) : timeline = [ ] # reorder chronologically commits = list ( reversed ( list ( repo. iter _ commits ( ) ) ) ) empty _ tree = repo. tree ( magic _ empty _ tree _ hash ) previous _ commit = empty _ tree tqdm _ output = tqdmou... | [
0.33370500802993774,
-0.22736944258213043,
0.7406284213066101,
0.2253483086824417,
0.4299823045730591,
-0.8378340601921082,
-0.5518805980682373,
0.4113985598087311,
-0.8488563895225525,
0.6600236296653748,
-0.40066784620285034,
-0.4314805865287781,
-0.0034170609433203936,
0.219392836093902... |
def _ srs _ enabled ( self ) - > bool : return self. cam. conf. livestream. srs. enabled | [
0.2170577198266983,
-0.018716515973210335,
0.37021076679229736,
0.20887234807014465,
-0.018609149381518364,
0.18379467725753784,
-0.7040141820907593,
-0.5570869445800781,
1.0457584857940674,
0.2708507180213928,
-1.1603658199310303,
0.2490825057029724,
-1.8291305303573608,
0.194965526461601... |
def _ _ init _ _ ( self, drydock _ client = none, drydock _ task _ id = none, node _ filter = none, redeploy _ server = none, svc _ session = none, svc _ token = none, * args, * * kwargs ) : super ( drydockbaseoperator, self ). _ _ init _ _ ( pod _ selector _ pattern = [ {'pod _ pattern':'drydock - api ','container':'d... | [
-0.7878840565681458,
0.6937254667282104,
0.7983524799346924,
0.12646155059337616,
0.23243442177772522,
-0.32710039615631104,
0.8826565146446228,
-0.5403227806091309,
0.04126182943582535,
0.3208440840244293,
-0.00224583619274199,
0.4208765923976898,
0.24984019994735718,
-0.13198111951351166... |
def test _ md006 _ bad _ indentation _ x ( ) : # arrange scanner = markdownscanner ( ) supplied _ arguments = [ " - - enable - rules ", " md006 ", " - - disable - rules ", " md007 ", " scan ", " test / resources / rules / md006 / bad _ indentation. md ", ] expected _ return _ code = 1 expected _ output = ( " test / res... | [
0.36761125922203064,
-0.30777430534362793,
0.5264326930046082,
0.9200301766395569,
-0.1737455129623413,
0.2050059586763382,
-0.26335233449935913,
0.36010825634002686,
-0.04181307554244995,
0.06475565582513809,
-0.3077596426010132,
-0.22492633759975433,
-0.4191819727420807,
0.16019371151924... |
def best _ rank ( df ) : col _ names = ['lp _ account ','lc _ account ','sweep ','best tier ','level'] df _ best _ tier = pd. dataframe ( columns = col _ names ) sweep _ list = df ['sweep']. unique ( ) for sweep in sweep _ list : filter _ sweep = df. loc [ ( df ['sweep'] = = sweep ) ] lc _ list = filter _ sweep ['lc _ ... | [
0.3897835314273834,
0.06478402763605118,
0.8086569309234619,
-0.13355408608913422,
0.3846469521522522,
0.3939341902732849,
0.23463690280914307,
0.954316258430481,
-0.35345613956451416,
0.1140831783413887,
0.9037812948226929,
1.4472061395645142,
0.20950479805469513,
0.16217608749866486,
0... |
def have _ bf16 ( compute _ version ) : major, _ = parse _ compute _ version ( compute _ version ) if major > = 8 : return true return false | [
0.29849639534950256,
0.19744445383548737,
0.7586537599563599,
0.7660796046257019,
0.4839820861816406,
0.34748369455337524,
-0.18944470584392548,
0.4774499535560608,
-0.5881329774856567,
-0.20537978410720825,
-0.4225615859031677,
-0.03193524107336998,
-0.23864425718784332,
0.530351936817169... |
def usage ( progname ) : sys. stderr. write ( " usage : " + progname + " runnumber \ n " ) sys. exit ( 1 ) | [
-0.2754289507865906,
-0.1747172772884369,
0.6796025633811951,
-0.07155811786651611,
-0.194252610206604,
0.5457720160484314,
1.1660913228988647,
0.1757507622241974,
-0.2273097187280655,
0.6754018068313599,
0.37617385387420654,
0.5343135595321655,
-0.23354697227478027,
0.35322585701942444,
... |
def install ( ) : run ( " rscript - e'devtools : : install ( )'" ) | [
0.42651617527008057,
-0.12121812254190445,
0.24763934314250946,
0.715052604675293,
0.6794416308403015,
0.24618561565876007,
0.7779557108879089,
-0.723803699016571,
-0.7529833316802979,
0.2711087465286255,
-1.0463846921920776,
-0.24888241291046143,
-0.30428579449653625,
0.42138004302978516,... |
def switch ( self, an _ input : str ) : # empty command if not an _ input : print ( " " ) return none ( known _ args, other _ args ) = self. econ _ parser. parse _ known _ args ( an _ input. split ( ) ) # help menu again if known _ args. cmd = = "? " : self. print _ help ( ) return none # clear screen if known _ args. ... | [
-0.47808146476745605,
-0.40377557277679443,
0.729720950126648,
0.3315923511981964,
0.3582441806793213,
0.29120776057243347,
-0.2823185324668884,
-0.7065662145614624,
0.49952933192253113,
-0.4798702001571655,
0.36987754702568054,
0.5499434471130371,
-0.10350482910871506,
0.37957409024238586... |
def _ get _ first _ guess _ thresholds ( self, k ) : khalf = k / / 2 midway = self. bins / / 2 firstguesses = [ midway - i for i in range ( khalf, 0, - 1 ) ] + [ midway ] + \ [ midway + i for i in range ( 1, khalf ) ] firstguesses. append ( self. bins - 1 ) return firstguesses [ : k ] | [
-0.03546345978975296,
-0.5801150798797607,
0.7153869867324829,
0.7869113087654114,
0.46622979640960693,
0.3416047692298889,
0.20017246901988983,
-0.3474661111831665,
-0.47214072942733765,
0.2457684725522995,
-0.8977445363998413,
-0.3040722608566284,
-0.8873681426048279,
0.5881782174110413,... |
def views ( self ) : # note : need to do a copy because the list will be modified when iterating through # views for closing them. return self. _ views. copy ( ) | [
-0.7329450249671936,
-0.5887449979782104,
0.4102519154548645,
0.04715246707201004,
-0.40126585960388184,
0.3582119941711426,
0.3184495270252228,
-0.49428242444992065,
1.1516896486282349,
-0.8828153610229492,
-0.1982535421848297,
0.512827455997467,
-0.4416882395744324,
0.3860474228858948,
... |
def detect _ prefix _ or _ suffix ( self, data ) : if len ( data ) > 2 : if self. is _ prefix ( data [ 0 ] ) : data. pop ( 0 ) self. confidence + = 20 if self. is _ suffix ( data [ - 1 ] ) : data. pop ( ) self. confidence + = 20 | [
0.7589055299758911,
-0.5816789269447327,
0.5620442628860474,
0.14018957316875458,
0.7281151413917542,
-0.08760801702737808,
-0.06152009963989258,
0.5968735814094543,
0.8003531694412231,
-0.004044992849230766,
-0.730445384979248,
1.040194034576416,
0.22270894050598145,
1.4376983642578125,
... |
def connack _ string ( connack _ code ) : if connack _ code = = 0 : return " connection accepted. " elif connack _ code = = 1 : return " connection refused : unacceptable protocol version. " elif connack _ code = = 2 : return " connection refused : identifier rejected. " elif connack _ code = = 3 : return " connection ... | [
-0.18872195482254028,
-0.3443249464035034,
0.47838565707206726,
-0.3643808662891388,
-0.3053765892982483,
-0.29337212443351746,
-0.25540944933891296,
-0.6878652572631836,
-0.5999857783317566,
0.4134325385093689,
0.293279230594635,
0.17635521292686462,
0.115386001765728,
-0.2544450759887695... |
def hint _ pose _ y ( self ) : return self. get _ input ( " hint _ pose _ y " ) | [
-0.14425963163375854,
0.6452516317367554,
0.7182514667510986,
1.3182704448699951,
0.005495912861078978,
0.2576211988925934,
0.9174983501434326,
-1.385182499885559,
-0.16012723743915558,
0.06997344642877579,
-0.9069122076034546,
0.2783958315849304,
-1.0691879987716675,
-0.4886472821235657,
... |
def cofe ( self, save = false, texcmd = false ) : p = getelnum. getelnum ('o') cmd0 ='select distinct ( mystars. oid ),'+ \'mystars. o _ abund, mystars. c _ abund, mystars. fe _ abund'+ \'from mystars left join exo on exo. oid = mystars. oid'+ \'where'+ postfit. globcut ('c') +'and'+ postfit. globcut ('o') qtype = [ ('... | [
0.5737213492393494,
-0.23214618861675262,
0.7069509625434875,
-0.09373708814382553,
-0.5321802496910095,
0.4909462630748749,
0.37033602595329285,
0.7293758392333984,
-0.9480805993080139,
-0.16323739290237427,
-0.23336032032966614,
0.9724448919296265,
0.2788565158843994,
0.7261056900024414,... |
def _ _ init _ _ ( self ) : self. loadstopwords ( ) | [
-0.3145544230937958,
-0.41860806941986084,
0.1956806778907776,
-0.5383524298667908,
-0.36455053091049194,
0.634913980960846,
0.19548805058002472,
0.2713690400123596,
-0.2676483392715454,
-0.4458998441696167,
-0.356539249420166,
-0.8297364115715027,
-0.3910669982433319,
1.0515795946121216,
... |
def print _ information ( option, option _ string, value, parser, option _ manager = none ) : if not option _ manager. registered _ plugins : # note ( sigmavirus24 ) : flake8 parses options twice. the first time, we # will not have any registered plugins. we can skip this one and only # take action on the second time w... | [
0.3590826392173767,
-0.55980384349823,
0.3835338056087494,
0.37412959337234497,
0.11205681413412094,
-1.1501621007919312,
0.22387346625328064,
-0.9426206350326538,
-0.3836989104747772,
0.20950089395046234,
-0.025902554392814636,
0.7201287150382996,
-0.3873317241668701,
0.19619183242321014,... |
def _ handle _ body _ frame ( self, method _ frame, header _ frame ) : seen _ so _ far = [ 0 ] body _ fragments = list ( ) def handler ( body _ frame ) : # make sure it's a body frame if not isinstance ( body _ frame, body ) : raise exceptions. unexpectedframeerror ( body _ frame ) # increment our counter so we know wh... | [
0.21847380697727203,
-0.028230823576450348,
0.8977055549621582,
-0.2537102997303009,
-0.49062207341194153,
-0.9497826099395752,
-0.38553857803344727,
-0.9128896594047546,
0.05110592395067215,
-0.2195669561624527,
-0.32292917370796204,
0.10381785780191422,
-0.5201464295387268,
0.83337324857... |
def dropout ( p = 0, per _ channel = false, name = none, deterministic = false, random _ state = none ) : if ia. is _ single _ number ( p ) : p2 = ia. parameters. binomial ( 1 - p ) elif isinstance ( p, ( tuple, list ) ) : do _ assert ( len ( p ) = = 2 ) do _ assert ( p [ 0 ] < p [ 1 ] ) do _ assert ( 0 < = p [ 0 ] < =... | [
-0.7789872288703918,
0.4826362133026123,
0.7695082426071167,
0.3055044114589691,
-0.2699583172798157,
0.4562918543815613,
-0.16948232054710388,
-0.24833841621875763,
0.3832223415374756,
0.49031490087509155,
-0.006249941885471344,
-0.012919017113745213,
-0.31004300713539124,
-0.135450497269... |
def gettables ( self ) : return self. _ _ tables. values ( ) | [
-0.29843637347221375,
0.4012388586997986,
0.4928586781024933,
0.9907239079475403,
-0.2596268057823181,
1.0284614562988281,
0.09122304618358612,
-0.6833200454711914,
-0.17146436870098114,
-1.1057008504867554,
-0.5603253245353699,
0.9740540981292725,
-0.19967371225357056,
0.23026973009109497... |
def _ check _ consistency _ names ( self ) : leaf _ names = [ ] int _ names = [ ] for node in self. tree. traverse ( ) : if node. name = = none : raise keyerror ( " { } node have no name ". format ( node ) ) if node. is _ leaf ( ) : if self. tree _ format = ='phyloxml': nn = self. _ get _ name _ phyloxml ( node, self. ... | [
-0.6569972038269043,
-0.37750938534736633,
0.7366069555282593,
-0.3662043809890747,
0.5245798230171204,
0.1001918613910675,
-0.2753474712371826,
-0.5309731960296631,
-0.4794391095638275,
0.1039208248257637,
0.3118339776992798,
-0.1693963259458542,
0.22489327192306519,
1.1644049882888794,
... |
def gf _ tc ( f ) : if not f : return 0 else : return f [ - 1 ] | [
0.34335970878601074,
0.5630103945732117,
0.3621846139431,
-0.27614739537239075,
1.0332552194595337,
-0.2671891450881958,
0.43357184529304504,
-0.2433004230260849,
-1.482863187789917,
1.1735281944274902,
0.48219946026802063,
-0.7254127860069275,
-0.07813472300767899,
-0.6446096897125244,
... |
def constructtargetbeerurl ( partialurl ) : return " http : / / www. ratebeer. com / " + partialurl | [
-0.6071605682373047,
-1.0987813472747803,
0.47776129841804504,
0.22153759002685547,
0.9486125111579895,
0.2968215048313141,
0.3467745780944824,
0.4656360149383545,
-0.45077967643737793,
-0.2966857850551605,
0.1409795731306076,
0.233353853225708,
-0.7951770424842834,
-0.44083601236343384,
... |
def _ get _ soup ( cls, raw _ data ) - > beautifulsoup : return beautifulsoup ( raw _ data, cls. xml ) | [
-0.07702292501926422,
0.4507919251918793,
0.16995546221733093,
-0.41336172819137573,
-0.5021044611930847,
0.08051205426454544,
-0.3855145275592804,
-0.1676260083913803,
0.6980321407318115,
-0.7466856241226196,
0.4465421736240387,
-0.35275718569755554,
1.7226661443710327,
-1.204042673110962... |
def connect ( self, slot ) : key = ( slot. im _ func, id ( slot. im _ self ) ) self. _ _ slots [ key ] = slot. im _ self | [
-1.3908051252365112,
-0.724470853805542,
0.4065006673336029,
-0.5379157662391663,
-0.7581160068511963,
-0.46283963322639465,
0.7865186333656311,
-0.6189332008361816,
-0.3090226352214813,
0.5889425277709961,
-0.3616889715194702,
-0.026817571371793747,
0.18078520894050598,
0.5471112728118896... |
def _ _ str _ _ ( self ) : class _ string = " collection of { } tasks : \ n ". format ( len ( self. tasks ) ) for task in self. tasks : class _ string + = str ( task ) + " \ n " return class _ string | [
-0.37743204832077026,
-0.6503643989562988,
0.6487909555435181,
-0.5124685168266296,
-0.11520253121852875,
0.8455909490585327,
0.3593845069408417,
-0.7789085507392883,
-0.4274904727935791,
-0.1862802654504776,
0.12200083583593369,
0.12871316075325012,
0.8722892999649048,
0.5201889276504517,... |
async def listen _ for _ all _ tasks ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / tasks / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ function, timeout ) else... | [
0.39088383316993713,
0.27992913126945496,
0.6976457238197327,
0.2604063153266907,
-0.5167297720909119,
-0.6221530437469482,
0.7425692081451416,
0.2928024232387543,
-0.027265094220638275,
-0.020797669887542725,
0.2566429674625397,
0.809186577796936,
-0.357056200504303,
0.6332828998565674,
... |
def random _ point ( ) : lat = random. uniform ( - 90, 90 ) lon = random. uniform ( - 180, 180 ) return lat, lon | [
-0.9445322155952454,
-1.6191657781600952,
0.4142346978187561,
-0.8093263506889343,
0.06738381087779999,
1.38908052444458,
-0.7141410112380981,
0.837220311164856,
0.5783541798591614,
-0.05691630020737648,
-0.3002052903175354,
-0.15619297325611115,
0.5381897687911987,
-0.7999634146690369,
... |
def apply ( module _ path, operator, occurrence ) : apply _ mutation ( path ( module _ path ), cosmic _ ray. plugins. get _ operator ( operator ) ( ), occurrence ) sys. exit ( exitcode. ok ) | [
0.5972549319267273,
-0.8940688371658325,
0.3089231252670288,
0.6473360061645508,
0.37006622552871704,
-0.10459650307893753,
0.922829806804657,
1.7069408893585205,
0.1016765683889389,
0.525618314743042,
-0.14727090299129486,
-0.04814052954316139,
-0.01752994768321514,
-0.10760091990232468,
... |
def set _ shortcuts ( lista ) : for ( shortcut, owner, callback ) in lista : qtgui. qshortcut ( shortcut, owner, callback ). setcontext ( qt. widgetwithchildrenshortcut ) | [
0.4909929037094116,
0.1317453384399414,
0.3220096528530121,
1.3736658096313477,
-0.056534938514232635,
-0.6813032031059265,
0.20769232511520386,
0.229507714509964,
1.0411702394485474,
-0.35491982102394104,
-1.2546292543411255,
0.04039635509252548,
0.7751373052597046,
1.2205919027328491,
... |
def build _ fault ( cls, e, tb, include _ traceback = false ) : if hasattr ( cls,'_ amf _ code') : code = cls. _ amf _ code else : code = cls. _ _ name _ _ details = none if include _ traceback : details = traceback. format _ exception ( cls, e, tb ) return remoting. errorfault ( code = code, description = str ( e ), d... | [
0.6718470454216003,
-0.24725434184074402,
0.4301780164241791,
0.17033256590366364,
0.196304053068161,
0.12558963894844055,
-0.4871315360069275,
0.8653645515441895,
1.0353877544403076,
-0.1520981788635254,
-0.5007638931274414,
0.47041377425193787,
0.012175209820270538,
-0.5696871876716614,
... |
def handler ( request ) : request _ json = request. get _ json ( ) # initialize state for the case when fivetran is starting from scratch. # put initial values for the cursor and tokens in the'secrets'node. # fivetran should automatically keep track of subsequent updates in the #'state'node. if " cursor " not in reques... | [
-0.8331401944160461,
-0.014716028235852718,
0.8244965076446533,
-0.5012248158454895,
-0.2687323987483978,
-1.0114805698394775,
-0.6418851017951965,
-1.1522735357284546,
-0.1783955842256546,
0.1417786031961441,
0.020922450348734856,
-0.14343172311782837,
0.5967350006103516,
0.26739045977592... |
def repeat _ last _ operation ( calc ) : if check _ integrity ( calc ) : # print the most recent entry in history # the 3th entry in the tuple is the result of the operation. if len ( calc ['history'] ) > 0 : return calc ['history'] [ - 1 ] [ 3 ] else : return none | [
0.35617563128471375,
1.4392226934432983,
0.6640689373016357,
-0.0000655062758596614,
0.5064616799354553,
-0.6036673188209534,
0.8730728626251221,
-0.6296394467353821,
0.421860933303833,
0.2654716968536377,
0.7805987000465393,
-0.28785720467567444,
-0.5721610188484192,
-1.4621508121490479,
... |
def down ( self, direction, r = - 1, * args, * * kwargs ) : if direction = = none or direction = = 0 : direction = self. direction if r = = - 1 : r = self. r rot ( direction ) # inner gap go ( 0, - ( self. gap + self. line ) / 2. ) poly ( maketurn ( r - ( self. gap + self. line ) / 2., self. gap, self. mesh, - np. pi /... | [
-0.26987791061401367,
-0.5340471863746643,
0.7814052700996399,
-0.08225368708372116,
0.07206448167562485,
0.9193581938743591,
1.4541130065917969,
-0.1378399133682251,
1.1752957105636597,
-0.9235383868217468,
0.5755490064620972,
0.15848374366760254,
-1.1910291910171509,
-0.24552367627620697... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.