text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func TestWithShardings(t *testing.T) {
got := &config{shardings: 0}
expect := &config{shardings: 1024}
WithShardings(1024).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.8936182856559753,
1.0093437433242798,
0.37862592935562134,
-0.10562116652727127,
0.62188321352005,
-0.2948334515094757,
0.36031416058540344,
-0.09771541506052017,
0.8733798861503601,
0.11067746579647064,
-0.7215743660926819,
0.13787482678890228,
0.2483767718076706,
0.25952965021133423,
... |
func TestWithDisableSingleflight(t *testing.T) {
got := &config{singleflight: true}
expect := &config{singleflight: false}
WithDisableSingleflight().applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.24364738166332245,
0.6803414821624756,
0.2758617401123047,
0.7343425750732422,
-0.13357797265052795,
1.1618483066558838,
0.45949479937553406,
1.607182502746582,
0.533875048160553,
-0.2693861722946167,
-0.4588414430618286,
-0.24036577343940735,
-0.9729395508766174,
1.3101410865783691,
0... |
func TestWithGC(t *testing.T) {
got := &config{gcDuration: 0}
expect := &config{gcDuration: 1024}
WithGC(1024).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.6957331299781799,
0.8972488045692444,
0.44976499676704407,
0.25549614429473877,
0.589499831199646,
0.37212106585502625,
0.42992472648620605,
-0.5444290637969971,
-0.1952718049287796,
0.34966814517974854,
-0.3964935839176178,
0.8891941905021667,
-0.20785902440547943,
0.7760193943977356,
... |
func TestWithMaxScans(t *testing.T) {
got := &config{maxScans: 0}
expect := &config{maxScans: 1024}
WithMaxScans(1024).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.4612194895744324,
0.29393965005874634,
0.3156079947948456,
0.5951783657073975,
-0.5496103167533875,
0.3096274733543396,
-0.00520637771114707,
-0.2678019404411316,
1.6754636764526367,
-0.21892492473125458,
-0.49507784843444824,
-0.19097231328487396,
-0.0131264952942729,
0.4624972343444824... |
func TestWithMaxEntries(t *testing.T) {
got := &config{maxEntries: 0}
expect := &config{maxEntries: 1024}
WithMaxEntries(1024).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.7577818632125854,
0.3103203773498535,
0.11341037601232529,
0.27651578187942505,
0.11920463293790817,
-0.007741205394268036,
-0.4000486731529236,
0.7784570455551147,
0.7447527647018433,
-0.03266887366771698,
-0.8998157382011414,
0.2577913701534271,
0.47409436106681824,
1.1732158660888672,... |
func TestWithNow(t *testing.T) {
now := func() int64 {
return 0
}
got := &config{now: nil}
expect := &config{now: now}
WithNow(now).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.08945838361978531,
0.07791006565093994,
0.39350461959838867,
0.2402927279472351,
0.25357845425605774,
-0.24771815538406372,
0.2732473909854889,
0.03153247386217117,
0.14868196845054626,
-0.18499547243118286,
-0.7846104502677917,
0.08390174806118011,
0.25508958101272583,
1.279146671295166... |
func TestWithHash(t *testing.T) {
hash := func(key string) int {
return 0
}
got := &config{hash: nil}
expect := &config{hash: hash}
WithHash(hash).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.6601349115371704,
0.2512897849082947,
0.34607377648353577,
0.08136992156505585,
0.2934737801551819,
-0.40040525794029236,
0.30547603964805603,
0.01225319691002369,
0.4170330762863159,
-0.5033558011054993,
-0.8798105120658875,
0.2739359140396118,
0.20685654878616333,
0.9080877304077148,
... |
func TestWithRecordMissed(t *testing.T) {
got := &config{recordMissed: false}
expect := &config{recordMissed: true}
WithRecordMissed(true).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.5033833384513855,
-0.07290312647819519,
0.37290269136428833,
-0.5509890913963318,
0.9004560112953186,
0.37475448846817017,
0.19123239815235138,
0.18293580412864685,
0.24523279070854187,
0.01735352911055088,
-1.3024790287017822,
0.49911436438560486,
-0.049390897154808044,
1.09539234638214... |
func TestWithRecordHit(t *testing.T) {
got := &config{recordHit: false}
expect := &config{recordHit: true}
WithRecordHit(true).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.5996613502502441,
0.6000242829322815,
0.4138607978820801,
-0.09606274962425232,
0.7539700269699097,
0.6052443981170654,
0.29201462864875793,
0.012990720570087433,
-0.3469047546386719,
0.2741408348083496,
-0.7225001454353333,
0.49873849749565125,
-0.2639310956001282,
0.10205653309822083,
... |
func TestWithRecordGC(t *testing.T) {
got := &config{recordGC: false}
expect := &config{recordGC: true}
WithRecordGC(true).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.6897426843643188,
1.0813007354736328,
0.3837343156337738,
0.012213620357215405,
0.5326150059700012,
0.544638991355896,
0.5611878037452698,
-0.35876256227493286,
-0.3764609396457672,
0.5922186374664307,
-0.3951338827610016,
0.861248254776001,
-0.6732608675956726,
0.7747161984443665,
0.3... |
func TestWithRecordLoad(t *testing.T) {
got := &config{recordLoad: false}
expect := &config{recordLoad: true}
WithRecordLoad(true).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.28276965022087097,
0.6678582429885864,
0.4363205134868622,
-0.5163729190826416,
0.2120932787656784,
0.4579598903656006,
0.1461843103170395,
-0.4096151292324066,
0.2636879086494446,
0.15426471829414368,
-0.9646584987640381,
0.2797780930995941,
-0.2134382724761963,
0.4704073369503021,
0.... |
func TestWithReportMissed(t *testing.T) {
reportMissed := func(reporter *Reporter, key string) {}
got := &config{reportMissed: nil}
expect := &config{reportMissed: reportMissed}
WithReportMissed(reportMissed).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.7084337472915649,
0.03364704176783562,
0.2387983351945877,
-0.34975194931030273,
0.6707008481025696,
0.18411895632743835,
0.04668017476797104,
0.3376154601573944,
0.36845916509628296,
-0.7842376232147217,
-0.7936925292015076,
-0.224984809756279,
0.15908506512641907,
0.8732244968414307,
... |
func TestWithReportHit(t *testing.T) {
reportHit := func(reporter *Reporter, key string, value interface{}) {}
got := &config{reportHit: nil}
expect := &config{reportHit: reportHit}
WithReportHit(reportHit).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.9606242775917053,
0.4396517872810364,
0.3261566758155823,
-0.19412659108638763,
0.7214850187301636,
0.07153267413377762,
0.523496150970459,
-0.14712461829185486,
-0.06303135305643082,
-0.37195101380348206,
-0.249177485704422,
-0.24771718680858612,
-0.2613343298435211,
-0.0311057325452566... |
func TestWithReportGC(t *testing.T) {
reportGC := func(reporter *Reporter, cost time.Duration, cleans int) {}
got := &config{reportGC: nil}
expect := &config{reportGC: reportGC}
WithReportGC(reportGC).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v != expect %+v", got, expect)
}
} | [
0.9653628468513489,
1.220283031463623,
0.40409547090530396,
0.14266404509544373,
0.6673250198364258,
0.08539539575576782,
0.6756969094276428,
-0.3651086091995239,
-0.19917549192905426,
-0.06974135339260101,
-0.26777383685112,
0.10265395045280457,
-0.3303453028202057,
0.710422694683075,
0... |
func TestWithReportLoad(t *testing.T) {
reportLoad := func(reporter *Reporter, key string, value interface{}, ttl time.Duration, err error) {}
got := &config{reportLoad: nil}
expect := &config{reportLoad: reportLoad}
WithReportLoad(reportLoad).applyTo(got)
if !isConfigEquals(got, expect) {
t.Errorf("got %+v !=... | [
0.6481683850288391,
0.6631384491920471,
0.4168820381164551,
-0.44262564182281494,
0.27603933215141296,
-0.05458750203251839,
0.10912769287824631,
-0.4178454875946045,
0.1537511646747589,
-0.3758511245250702,
-0.20238475501537323,
-0.5872295498847961,
-0.01632065139710903,
0.291448414325714... |
func (it *Regex) AllowRefs(v bool) {
it.allowRefs = v
} | [
0.27783533930778503,
0.22081558406352997,
0.561907947063446,
-1.0864686965942383,
-0.598533034324646,
1.1067782640457153,
0.4936588704586029,
-0.22616317868232727,
-0.0075834463350474834,
0.3747997283935547,
1.1068291664123535,
0.7342329025268555,
-0.8790206909179688,
-0.4481329917907715,
... |
func (it *Regex) Type() graph.Type {
return graph.Regex
} | [
-0.1969228982925415,
0.06297110766172409,
0.3270248770713806,
0.3756903409957886,
1.0970022678375244,
0.1108362153172493,
1.347468614578247,
-0.1126089096069336,
0.629783034324646,
-0.3730842173099518,
0.1614273488521576,
1.5352225303649902,
-1.0043781995773315,
-0.9522919654846191,
-0.0... |
func (it *Regex) Optimize() (graph.Iterator, bool) {
newSub, changed := it.subIt.Optimize()
if changed {
it.subIt.Close()
it.subIt = newSub
}
return it, false
} | [
-0.5933425426483154,
0.8579935431480408,
0.6677447557449341,
-0.11966156959533691,
-0.042679913341999054,
-0.5810766220092773,
0.3373193144798279,
-0.41537290811538696,
-0.596847414970398,
0.6322764158248901,
-0.09576952457427979,
0.27601659297943115,
-1.7372498512268066,
-0.49052840471267... |
func (it *Regex) Stats() graph.IteratorStats {
return it.subIt.Stats()
} | [
-0.5006133317947388,
-0.15841805934906006,
0.2560023367404938,
-0.9578381180763245,
0.5580596923828125,
-0.1201305240392685,
0.46782419085502625,
-0.10269106179475784,
0.20763063430786133,
-0.5550984740257263,
0.27686306834220886,
1.0229612588882446,
0.06904266774654388,
-0.696388900279998... |
func (it *Regex) TagResults(dst map[string]graph.Value) {
for _, tag := range it.tags.Tags() {
dst[tag] = it.Result()
}
for tag, value := range it.tags.Fixed() {
dst[tag] = value
}
it.subIt.TagResults(dst)
} | [
-0.5228658318519592,
0.5574809312820435,
0.25161033868789673,
-0.6077176332473755,
0.6345994472503662,
-0.39659345149993896,
-0.1624336987733841,
0.07859189808368683,
-1.3876608610153198,
-0.3213947117328644,
-0.8222179412841797,
-0.30614975094795227,
0.4759366512298584,
0.3859956264495849... |
func CalcMeanVotingBlocks(params *chaincfg.Params) int64 {
logPoolSizeM1 := math.Log(float64(params.TicketPoolSize) - 1)
logPoolSize := math.Log(float64(params.TicketPoolSize))
var v float64
for i := float64(1); i <= float64(params.TicketExpiry); i++ {
v += math.Exp(math.Log(i) + (i-1)*logPoolSizeM1 - i*logPoolSi... | [
-0.04489731043577194,
0.5947077870368958,
0.786225438117981,
0.4266812205314636,
-1.347281575202942,
-0.02643706649541855,
-0.02997444197535515,
0.04070724919438362,
-0.15023575723171234,
0.6172746419906616,
-0.38294097781181335,
0.7552003860473633,
-1.4640852212905884,
0.5677598714828491,... |
func removeDuplicates(nums []int) int {
size := len(nums)
if size == 0 {return 0}
fixedNum := 1
for i:=1; i<size; i++ {
if nums[i] != nums[i-1] {
nums[fixedNum] = nums[i]
fixedNum++
}
}
return fixedNum
} | [
-0.24985630810260773,
0.227999746799469,
0.9540600180625916,
-0.30291748046875,
-0.3665925860404968,
-0.4664083421230316,
1.7062064409255981,
0.8848148584365845,
1.2038637399673462,
0.2531934678554535,
-0.9768369793891907,
0.6899808645248413,
-1.5802357196807861,
0.5875781774520874,
0.43... |
func (mgr *B2ContactManager) Collide() {
// Update awake contacts.
c := mgr.M_contactList
for c != nil {
fixtureA := c.GetFixtureA()
fixtureB := c.GetFixtureB()
indexA := c.GetChildIndexA()
indexB := c.GetChildIndexB()
bodyA := fixtureA.GetBody()
bodyB := fixtureB.GetBody()
// Is this contact flagged... | [
-0.3789852559566498,
-0.8921201825141907,
1.1546655893325806,
0.44026970863342285,
-0.156240776181221,
-0.25387316942214966,
0.83885657787323,
-0.3704809546470642,
0.07521530240774155,
-0.1842123419046402,
0.21124713122844696,
-0.27352580428123474,
-0.6914622783660889,
0.701976478099823,
... |
func GetTags(registry string, github GitHub) ([]string, error) {
repo := dockerRepo(github)
var tags []string
for _, t := range staticTags() {
tags = append(tags, toFullTag(registry, repo, t))
}
if withRef, err := tagWithRef(); err != nil {
return nil, err
} else if withRef {
switch github.Reference.Type {
... | [
0.4010714590549469,
0.42008763551712036,
0.6627424359321594,
0.2981192469596863,
0.9470540881156921,
-0.2600460648536682,
-0.7063922882080078,
-0.3395163416862488,
-0.0009882443118840456,
0.5043855905532837,
-0.019622111693024635,
1.1373838186264038,
0.0824921652674675,
1.5273114442825317,... |
func needEnableNexusOrgGroupRepos(nexusAddr string, org *orgpb.Org) bool {
// disable if no nexus
if len(nexusAddr) == 0 {
return false
}
return org.EnableReleaseCrossCluster || org.PublisherID > 0
} | [
-0.3065017759799957,
0.5885677933692932,
0.4286087453365326,
0.29185226559638977,
-0.17006582021713257,
0.04471395164728165,
-0.571628749370575,
0.6381381154060364,
0.3613215386867523,
0.5234719514846802,
0.3512909412384033,
-0.05240819975733757,
-0.9922683835029602,
0.5208362936973572,
... |
func NewFileProjectUsage() *FileProjectUsage {
this := FileProjectUsage{}
return &this
} | [
0.20773202180862427,
-0.23990513384342194,
0.0411197692155838,
0.7080942988395691,
-1.1197259426116943,
-0.5402052402496338,
0.5040620565414429,
0.10289426147937775,
-0.17371657490730286,
0.3404916524887085,
0.09076328575611115,
-0.4784175455570221,
-0.3861702084541321,
-0.1296641230583191... |
func NewFileProjectUsageWithDefaults() *FileProjectUsage {
this := FileProjectUsage{}
return &this
} | [
0.10186385363340378,
-0.013339793309569359,
0.024986283853650093,
0.5319644808769226,
0.12343252450227737,
-0.31550583243370056,
-0.1278781145811081,
-0.08241528272628784,
-0.13565172255039215,
-0.31388428807258606,
-0.128408282995224,
-1.6514323949813843,
-0.40197861194610596,
0.297422945... |
func (o *FileProjectUsage) GetProject() ViewRelationship {
if o == nil || o.Project == nil {
var ret ViewRelationship
return ret
}
return *o.Project
} | [
0.6016097068786621,
0.8319573402404785,
0.09277720749378204,
1.1449123620986938,
0.05107574909925461,
-0.415173202753067,
0.908794105052948,
-0.4415236711502075,
1.0338469743728638,
-1.3206374645233154,
0.39709922671318054,
-1.2808176279067993,
-0.8605198264122009,
0.026646874845027924,
... |
func (o *FileProjectUsage) GetProjectOk() (*ViewRelationship, bool) {
if o == nil || o.Project == nil {
return nil, false
}
return o.Project, true
} | [
-0.025189008563756943,
0.4153737425804138,
0.1571355164051056,
1.0014898777008057,
-0.031344540417194366,
0.2540450394153595,
0.8074214458465576,
0.6902061104774475,
0.222563698887825,
0.4004382789134979,
-0.33444783091545105,
-0.7780570387840271,
-0.3618743121623993,
0.09268064796924591,
... |
func (o *FileProjectUsage) HasProject() bool {
if o != nil && o.Project != nil {
return true
}
return false
} | [
0.5695204734802246,
0.8173399567604065,
0.09310627728700638,
0.8772686719894409,
0.6098438501358032,
-0.3175162672996521,
-0.33196893334388733,
0.6444311141967773,
-0.014559244737029076,
-1.1121869087219238,
-0.15943196415901184,
-1.2537858486175537,
-0.26288893818855286,
-0.43275353312492... |
func (o *FileProjectUsage) SetProject(v ViewRelationship) {
o.Project = &v
} | [
0.3750850260257721,
0.5047069787979126,
-0.185003861784935,
0.45479217171669006,
-0.34778839349746704,
-0.3469744622707367,
-0.20560379326343536,
-1.1807074546813965,
0.5452269911766052,
-0.6524630188941956,
0.6133346557617188,
0.026194406673312187,
-0.3507518470287323,
-0.8008739352226257... |
func (o *FileProjectUsage) GetProjectId() int32 {
if o == nil || o.ProjectId == nil {
var ret int32
return ret
}
return *o.ProjectId
} | [
1.1149036884307861,
0.5074184536933899,
0.3092149794101715,
0.6551957726478577,
-0.09636200964450836,
0.7798644304275513,
0.6395759582519531,
-0.22254081070423126,
1.0468494892120361,
-0.16895809769630432,
0.29118812084198,
-1.4079041481018066,
-0.7507029175758362,
0.736307680606842,
0.3... |
func (o *FileProjectUsage) GetProjectIdOk() (*int32, bool) {
if o == nil || o.ProjectId == nil {
return nil, false
}
return o.ProjectId, true
} | [
0.1501886397600174,
0.6814135909080505,
0.38506925106048584,
0.7093416452407837,
0.425819993019104,
0.9603768587112427,
0.5921705961227417,
0.7542672753334045,
0.38257795572280884,
0.2430616170167923,
-0.4323199689388275,
-0.9604747891426086,
-0.718489408493042,
0.3715577721595764,
-0.42... |
func (o *FileProjectUsage) HasProjectId() bool {
if o != nil && o.ProjectId != nil {
return true
}
return false
} | [
1.3245855569839478,
0.3888246417045593,
0.27568525075912476,
0.3755156993865967,
0.04850498586893082,
0.3966050148010254,
-0.41954004764556885,
0.5632021427154541,
0.5182464718818665,
0.17322221398353577,
0.09830678999423981,
-1.0711252689361572,
-0.15245817601680756,
0.3008120357990265,
... |
func (o *FileProjectUsage) SetProjectId(v int32) {
o.ProjectId = &v
} | [
1.1272706985473633,
0.34252312779426575,
0.0755351334810257,
-0.1850290298461914,
-0.6769096255302429,
1.3226147890090942,
-0.022172585129737854,
-0.966543972492218,
-0.15224657952785492,
0.812600314617157,
0.25338828563690186,
0.15189653635025024,
-0.014976832084357738,
-0.232327222824096... |
func (o *FileProjectUsage) GetTotal() int32 {
if o == nil || o.Total == nil {
var ret int32
return ret
}
return *o.Total
} | [
0.6140449643135071,
0.4970390498638153,
0.3927168846130371,
0.23424029350280762,
0.8538447618484497,
-0.01422890368849039,
1.4772073030471802,
-0.40171563625335693,
0.5166537165641785,
-0.12269909679889679,
-0.03222395479679108,
-0.6906842589378357,
-0.5895963907241821,
-0.3460746705532074... |
func (o *FileProjectUsage) GetTotalOk() (*int32, bool) {
if o == nil || o.Total == nil {
return nil, false
}
return o.Total, true
} | [
0.0030008640605956316,
0.09506629407405853,
0.6084234714508057,
0.5809909105300903,
0.42513641715049744,
-0.04345221072435379,
1.1446118354797363,
0.9092286229133606,
0.25931328535079956,
0.4952603876590729,
-1.0251291990280151,
-0.8797665238380432,
0.42617183923721313,
-0.0025923240464180... |
func (o *FileProjectUsage) HasTotal() bool {
if o != nil && o.Total != nil {
return true
}
return false
} | [
0.8771544098854065,
-0.029242979362607002,
0.5895299315452576,
-0.31145596504211426,
0.9234902858734131,
-0.6389357447624207,
0.2768917381763458,
0.38774964213371277,
0.05562322586774826,
0.1161738708615303,
-0.7856487035751343,
-1.0508625507354736,
0.14805525541305542,
-0.5741847157478333... |
func (o *FileProjectUsage) SetTotal(v int32) {
o.Total = &v
} | [
0.23954369127750397,
0.5209773182868958,
0.1936926692724228,
-0.6224730610847473,
0.029433902353048325,
0.315620094537735,
0.12249478697776794,
-1.316392183303833,
-0.27845993638038635,
0.8362829685211182,
-0.09531495720148087,
0.6248229742050171,
0.01876055635511875,
-1.2226192951202393,
... |
func (o *FileProjectUsage) GetTotalAsText() string {
if o == nil || o.TotalAsText == nil {
var ret string
return ret
}
return *o.TotalAsText
} | [
0.17649409174919128,
-0.14250899851322174,
0.3431454598903656,
-0.2099897265434265,
-0.8924763798713684,
-0.05022655054926872,
0.5051401257514954,
-0.30817580223083496,
1.1071218252182007,
0.364814817905426,
-0.0846375823020935,
-1.0043814182281494,
-0.1072888895869255,
0.1913263499736786,... |
func (o *FileProjectUsage) GetTotalAsTextOk() (*string, bool) {
if o == nil || o.TotalAsText == nil {
return nil, false
}
return o.TotalAsText, true
} | [
-0.22325998544692993,
0.08341752737760544,
0.8500733971595764,
-0.22440052032470703,
-0.7568132877349854,
-0.5199090242385864,
0.35163381695747375,
0.9036252498626709,
0.4542914032936096,
0.7192071676254272,
-0.9344123005867004,
-1.5879452228546143,
0.2247626930475235,
0.3174590766429901,
... |
func (o *FileProjectUsage) HasTotalAsText() bool {
if o != nil && o.TotalAsText != nil {
return true
}
return false
} | [
0.33914902806282043,
-0.5461879968643188,
0.5018348693847656,
-0.6958392858505249,
-0.63717120885849,
-0.6301323175430298,
0.0029766964726150036,
0.6262536644935608,
0.2322758585214615,
0.5563549399375916,
-0.8029354810714722,
-1.5274866819381714,
0.7290441989898682,
0.4404565095901489,
... |
func (o *FileProjectUsage) SetTotalAsText(v string) {
o.TotalAsText = &v
} | [
0.23687946796417236,
-0.5024176239967346,
0.07281274348497391,
-0.9370131492614746,
-1.4974573850631714,
-0.4266988933086395,
-0.006163816899061203,
-0.693703293800354,
0.2871679663658142,
0.6696900129318237,
-0.11596944183111191,
0.23640324175357819,
0.17407503724098206,
-1.18487882614135... |
func processMessage(ctx context.Context, msg *kafka.Message, c *kafka.Consumer, h ziggurat.Handler, l ziggurat.StructuredLogger, route string) {
event := ziggurat.Event{
Headers: map[string]string{
HeaderPartition: strconv.Itoa(int(msg.TopicPartition.Partition)),
HeaderTopic: *msg.TopicPartition.Topic,
... | [
0.11288097500801086,
-0.15461960434913635,
0.6634929776191711,
-0.5843194127082825,
-0.18292854726314545,
0.021604230627417564,
0.12850026786327362,
0.5834100246429443,
-0.41544783115386963,
0.28637850284576416,
0.34220650792121887,
-0.19793324172496796,
-0.5170456171035767,
0.494558990001... |
func New(privkey crypto.PrivKey) (*Transport, error) {
return noise.New(privkey)
} | [
0.2315599024295807,
-0.1669059842824936,
0.4509598910808563,
-0.2115096151828766,
-0.25592297315597534,
-0.43112003803253174,
-0.66801917552948,
-0.9834572076797485,
-0.2981489300727844,
0.16148044168949127,
-1.5237607955932617,
1.0779551267623901,
0.07103990018367767,
0.14538438618183136,... |
func TestRetrieveDeviceList(t *testing.T) {
c := NewNetboxAt("localhost:8000")
list, err := c.Dcim.DcimDevicesList(nil, nil)
assert.NoError(t, err)
assert.EqualValues(t, 11, *list.Payload.Count)
} | [
0.014293273910880089,
0.7016997933387756,
0.34901493787765503,
-0.2133384793996811,
1.309122085571289,
-0.1468064785003662,
0.2071429342031479,
0.22031615674495697,
1.1776530742645264,
-1.3472602367401123,
-0.9793750047683716,
-0.6079676151275635,
0.048141807317733765,
0.3123442530632019,
... |
func Clone(s string) string {
if len(s) == 0 {
return ""
}
b := make([]byte, len(s))
copy(b, s)
return *(*string)(unsafe.Pointer(&b))
} | [
1.0536150932312012,
-0.268584668636322,
0.6329929828643799,
0.40002453327178955,
-1.288415551185608,
0.045853495597839355,
-0.3416551351547241,
-1.01580810546875,
1.0910168886184692,
0.15315137803554535,
0.3481038212776184,
1.1929303407669067,
-0.7635846138000488,
-1.421694278717041,
0.2... |
func linear(x, x1, x2, y1, y2 float64) float64 {
slope := (y2 - y1) / (x2 - x1)
intercept := y1 - x1 * slope
return x * slope + intercept
} | [
0.5687010288238525,
-0.2615502178668976,
0.5674749612808228,
0.1737217754125595,
-0.50327068567276,
0.45215705037117004,
-0.8328217267990112,
-0.3127623498439789,
-0.8383772373199463,
-0.5368101000785828,
-0.21485956013202667,
0.9343476891517639,
0.7246444821357727,
-1.2501951456069946,
... |
func mandelbrot(c complex128) int {
z := c
var i int
for i = 0; i < 256; i++ {
z = z*z + c
if cmplx.Abs(z) > escapeThresh {
break
}
}
return i
} | [
0.6628686785697937,
0.20873169600963593,
0.5369799137115479,
0.004263817798346281,
-1.4376187324523926,
0.4487859904766083,
0.7260135412216187,
-0.48540109395980835,
-0.22458279132843018,
-0.04373789578676224,
-0.8029819130897522,
-0.717892587184906,
-1.23978853225708,
-0.08656331151723862... |
func (p *Platform) Decrypt(dataEncryptKeyPrefix string) error {
dataEncryptKey := dataEncryptKeyPrefix + dataEncryptKeySuffix
decrypted, err := decrypt(p.Oss.EncryptedData, dataEncryptKey)
ossData := OssData{}
err = json.Unmarshal([]byte(decrypted), &ossData)
if err != nil {
return err
}
p.Oss.Data = ossData
... | [
-0.701259195804596,
1.0835444927215576,
0.5960332155227661,
-0.2581541836261749,
-0.08115240931510925,
0.006397377233952284,
-0.21786391735076904,
-0.011409330181777477,
-0.41936808824539185,
-0.09755373001098633,
-0.6534003019332886,
0.4723009765148163,
-0.41970983147621155,
0.05792781710... |
func GetTransactions(options *GetTransactionsOptions) (response TransactionsResponse, err error) {
url := "https://blocks.flashbots.net/v1/transactions"
if options != nil {
url = url + options.ToUriQuery()
}
resp, err := http.Get(url)
if err != nil {
return response, err
}
err = json.NewDecoder(resp.Body).... | [
0.2156211882829666,
0.8175437450408936,
0.7685446739196777,
0.18470646440982819,
0.7762302756309509,
-1.1695826053619385,
0.20043469965457916,
-0.8223574161529541,
0.24397514760494232,
0.13571679592132568,
-1.0989733934402466,
-0.08362117409706116,
-1.057510495185852,
-0.5633183717727661,
... |
func (c C) GetFileSet(ctx context.Context, dbConfig database.Database) ([]types.FileID, error) {
db, err := dbConfig.Connect(ctx)
if err != nil {
return nil, err
}
defer db.Close(ctx)
return c.getFileSet(db)
} | [
0.24213282763957977,
0.5236688256263733,
0.5135084986686707,
-0.33326414227485657,
0.7566349506378174,
-0.5163598656654358,
0.21667800843715668,
-0.5411462187767029,
-0.7995345592498779,
0.5391910076141357,
0.0865812748670578,
0.5103387236595154,
-1.2398226261138916,
0.4369692802429199,
... |
func (c C) CheckAccess(o types.Owner, dbConnection database.Database, extra ...string) (bool, error) {
switch c.Type {
case OWNER:
oid, err := types.DecodeOwnerIDString(c.ID)
if err != nil {
return false, err
}
O, err := dbConnection.Owner().Get(oid)
if err != nil {
return false, err
}
return O.Ma... | [
-0.18448187410831451,
-0.2789270579814911,
1.0149368047714233,
0.1308603733778,
-0.35798755288124084,
-0.10362447798252106,
0.7928507328033447,
0.10220300406217575,
-0.45909348130226135,
0.3375588655471802,
1.1385295391082764,
0.25253432989120483,
-0.6557255387306213,
0.09802006930112839,
... |
func RegisterRoutesTestService(router wrouter.Router, impl TestService, routerParams ...wrouter.RouteParam) error {
handler := testServiceHandler{impl: impl}
resource := wresource.New("testservice", router)
if err := resource.Get("Echo", "/echo", httpserver.NewJSONHandler(handler.HandleEcho, httpserver.StatusCodeMap... | [
-0.5492892265319824,
-0.036215540021657944,
0.5969035625457764,
-0.06067991256713867,
0.5393055081367493,
0.13833312690258026,
-0.32509565353393555,
-0.745296061038971,
-0.12926092743873596,
-0.04589403048157692,
0.22032664716243744,
0.6706831455230713,
-0.7385662198066711,
0.3033636808395... |
func (m *Model) ListOwnershipsByUserID(userID int) ([]*model.Ownership, error) {
_, err := m.GetUserByID(userID)
if err != nil {
return nil, err
}
rows, err := m.db.Query(qryListOwnershipsByUserID, userID)
if err != nil {
return nil, err
}
defer rows.Close()
var l = []*model.Ownership{}
for rows.Next() {
... | [
-0.1233951672911644,
-0.95125812292099,
0.2671092450618744,
0.037299275398254395,
-0.7126196026802063,
0.10714554786682129,
0.2634730935096741,
-0.9400898218154907,
0.28299424052238464,
0.1354224979877472,
0.5075005292892456,
0.10753149539232254,
-0.2158447653055191,
1.0155805349349976,
... |
func (m *Model) GetOwnership(userID, bookID int) (*model.Ownership, error) {
b, err := m.getBook(qryGetOwnership, userID, bookID)
if err != nil {
return nil, err
}
return &model.Ownership{UserID: int64(userID), BookID: int64(bookID), Book: b}, nil
} | [
-0.21291117370128632,
-0.8109461665153503,
0.49141496419906616,
1.7481681108474731,
0.02184450440108776,
0.08423858880996704,
0.05738120526075363,
-0.7585373520851135,
-0.6308079361915588,
-0.12695249915122986,
0.6129177808761597,
0.0771203339099884,
-0.36666375398635864,
-0.30516198277473... |
func (m *Model) InsertOwnership(userID, bookID int) (*model.Ownership, error) {
_, err := m.db.Exec(qryInsertOwnership, userID, bookID)
if err != nil {
return nil, filterError(err)
}
return &model.Ownership{UserID: int64(userID), BookID: int64(bookID)}, nil
} | [
-0.6282016038894653,
-0.19073058664798737,
0.4972231388092041,
1.1777008771896362,
-0.10782819986343384,
0.4009758532047272,
0.1541426181793213,
-0.41656917333602905,
-0.7964982986450195,
0.4333363175392151,
0.14147168397903442,
-0.9476123452186584,
-1.232866883277893,
-0.11421018838882446... |
func (m *Model) DeleteOwnership(userID, bookID int) error {
return m.exec(qryDeleteOwnership, userID, bookID)
} | [
-0.20410142838954926,
-0.6192820072174072,
0.3041704297065735,
2.4077868461608887,
-0.17661413550376892,
0.31901779770851135,
0.4477470815181732,
-0.4121626019477844,
-0.21491438150405884,
-0.3450379967689514,
0.6753327250480652,
-0.09002755582332611,
-0.09737296402454376,
0.08016648143529... |
func (h *Histlist) AddCmdLine(cmdLine string) {
// lenBefore := len(h.List)
// lookup
idx, found := h.LastIndex[cmdLine]
if found {
// remove duplicate
if cmdLine != h.List[idx] {
h.sugar.DPanicw("Index key is different than actual cmd line in the list",
"indexKeyCmdLine", cmdLine,
"actualCmdLine", h... | [
-0.6033586859703064,
-0.5521001815795898,
0.7983559966087341,
-0.14643774926662445,
1.0089836120605469,
0.045748915523290634,
0.19354136288166046,
0.15911169350147247,
0.7848420143127441,
-0.20646214485168457,
-0.3218039572238922,
0.08252239227294922,
-0.2744486331939697,
1.031485795974731... |
func (h *Histlist) AddHistlist(h2 Histlist) {
for _, cmdLine := range h2.List {
h.AddCmdLine(cmdLine)
}
} | [
-0.5142951011657715,
-0.13202275335788727,
0.4161875247955322,
0.8797191381454468,
0.8298383951187134,
0.5064562559127808,
-1.040999174118042,
0.46563398838043213,
0.013670290820300579,
-0.4369959533214569,
-0.9395847320556641,
-0.061336398124694824,
0.5730440616607666,
1.8681453466415405,... |
func (rest *TestTokenStorageREST) TestRetrieveExternalTokenUnauthorized() {
rest.checkRetrieveExternalTokenUnauthorized("https://github.com/sbose78", "github")
rest.checkRetrieveExternalTokenUnauthorized("github", "github")
rest.checkRetrieveExternalTokenUnauthorized("https://api.starter-us-east-2.openshift.com", "o... | [
-0.05450429394841194,
-0.08332744985818863,
0.5670183300971985,
0.8816783428192139,
-0.1145239844918251,
0.2347203642129898,
-0.6317497491836548,
0.18210189044475555,
-0.32730633020401,
-1.1761890649795532,
-0.6594744324684143,
0.6178309321403503,
-0.4903395175933838,
0.1633158028125763,
... |
func (rest *TestTokenStorageREST) TestRetrieveExternalTokenIdentityNotPresent() {
// using an Identity which does not exist in the database.
identity := account.Identity{
ID: uuid.NewV4(),
Username: "TestDeveloper",
}
service, controller := rest.SecuredControllerWithIdentity(identity)
test.RetrieveToken... | [
-0.11449165642261505,
-0.07300956547260284,
0.5758868455886841,
0.36149799823760986,
1.1445426940917969,
0.6251193284988403,
-0.5968125462532043,
0.06286909431219101,
0.43180182576179504,
-1.3365955352783203,
-1.0152899026870728,
-0.15609508752822876,
-0.36009421944618225,
0.79757118225097... |
func (rest *TestTokenStorageREST) TestRetrieveExternalTokenInvalidOnForcePullInternalError() {
identity, _ := rest.retrieveExternalGitHubTokenFromDBSuccess()
rest.checkRetrieveExternalTokenInvalidOnForcePullInternalError(identity, "https://github.com/a/b", "github")
rest.checkRetrieveExternalTokenInvalidOnForcePullI... | [
0.11721543222665787,
-0.11108921468257904,
0.6407607793807983,
0.27619147300720215,
0.3427293300628662,
0.37300732731819153,
-0.9433277249336243,
-0.028925426304340363,
-0.2675113379955292,
-0.9508331418037415,
-0.586024820804596,
0.011728585697710514,
-0.6154443025588989,
0.03216126561164... |
func (rest *TestTokenStorageREST) TestRetrieveExternalTokenValidOnForcePullInternalError() {
identity, err := testsupport.CreateTestIdentity(rest.DB, uuid.NewV4().String(), "KC")
require.Nil(rest.T(), err)
rest.checkRetrieveExternalTokenValidOnForcePullInternalError(identity, "https://github.com/a/b")
rest.checkRe... | [
0.2584573030471802,
0.14947839081287384,
0.5309440493583679,
0.0833764374256134,
0.3175579607486725,
0.3755336403846741,
-1.0671062469482422,
-0.037019792944192886,
0.09836257994174957,
-0.8443213105201721,
-0.5683242678642273,
-0.15011551976203918,
-0.6523640155792236,
-0.1805563420057296... |
func (rest *TestTokenStorageREST) TestStatusExternalTokenUnauthorized() {
rest.checkStatusExternalTokenUnauthorized("https://github.com/sbose78", "github")
rest.checkStatusExternalTokenUnauthorized("github", "github")
rest.checkStatusExternalTokenUnauthorized("https://api.starter-us-east-2.openshift.com", "openshift... | [
-0.5052012205123901,
-0.4485987424850464,
0.5567920207977295,
0.7678122520446777,
-0.26086199283599854,
0.47301018238067627,
-0.8145533800125122,
0.3964557945728302,
-0.07596354931592941,
-0.8009687662124634,
-0.7700347304344177,
0.7239332795143127,
0.02453586459159851,
0.28376883268356323... |
func (rest *TestTokenStorageREST) TestStatusExternalTokenInvalidOnForcePullInternalError() {
identity := rest.statusExternalGitHubTokenFromDBSuccess()
rest.checkStatusExternalTokenInvalidOnForcePullInternalError(identity, "https://github.com/a/b", "github")
rest.checkStatusExternalTokenInvalidOnForcePullInternalErro... | [
-0.03130807727575302,
-0.1463375687599182,
0.624812126159668,
0.24534745514392853,
0.10723208636045456,
0.7421615719795227,
-1.1807953119277954,
0.15339942276477814,
-0.05512150377035141,
-0.6126115918159485,
-0.6547411680221558,
0.08724376559257507,
-0.14987753331661224,
0.232505872845649... |
func (rest *TestTokenStorageREST) TestStatusExternalTokenValidOnForcePullInternalError() {
identity, err := testsupport.CreateTestIdentity(rest.DB, uuid.NewV4().String(), "KC")
require.Nil(rest.T(), err)
rest.checkStatusExternalTokenValidOnForcePullInternalError(identity, "https://github.com/a/b", "https://github.co... | [
0.010842555202543736,
0.06547775119543076,
0.6019394993782043,
0.16912397742271423,
0.17320317029953003,
0.7482945919036865,
-0.9919411540031433,
0.04028414189815521,
0.14510774612426758,
-0.5521543025970459,
-0.5396034121513367,
0.07084836810827255,
-0.1412363201379776,
0.1722126007080078... |
func ParsePEM(pemBytes []byte) (*JWK, error) {
for len(pemBytes) > 0 {
pemBlock, rest := pem.Decode(pemBytes)
if pemBlock == nil {
return nil, fmt.Errorf("invalid PEM file")
}
pemBytes = rest
pr, ok := blockProcessors[pemBlock.Type]
if !ok {
return nil, fmt.Errorf("unsupported PEM block type: %s", p... | [
0.21374092996120453,
0.30570146441459656,
0.6948939561843872,
0.4668869078159332,
-0.5160686373710632,
-0.28545045852661133,
0.4582262337207794,
-0.18061505258083344,
-0.25500985980033875,
0.4005892276763916,
0.45473507046699524,
-0.3645305335521698,
-0.8992558121681213,
1.1002297401428223... |
func NewMiddleware(opts ...Option) *Middleware {
m := &Middleware{
clock: clock.New(),
suidCookieSettings: &http.Cookie{
Name: "suid",
Secure: false, // allow on HTTP.
HttpOnly: true,
SameSite: http.SameSiteLaxMode,
},
duidCookieSettings: &http.Cookie{
Name: "duid",
MaxAge: 60 * 6... | [
-0.76840740442276,
0.41701528429985046,
0.7464175820350647,
1.124939203262329,
-0.638907253742218,
-0.25489041209220886,
-0.09242593497037888,
-0.003511328948661685,
1.0123062133789062,
0.06037361919879913,
-0.0706353709101677,
0.7308053970336914,
-0.7205328941345215,
0.16084931790828705,
... |
func (m *Middleware) MustNewUID() ksuid.KSUID {
uid, err := ksuid.NewRandomWithTime(m.clock.Now())
if err != nil {
panic(fmt.Errorf("failed to generate KSUID: %w", err))
}
return uid
} | [
-0.7517405152320862,
0.3212403953075409,
0.6608320474624634,
0.4149927794933319,
-0.7705960869789124,
1.225232481956482,
-1.1115049123764038,
0.28675392270088196,
0.3274889886379242,
0.3107640743255615,
-0.013305758126080036,
0.8750239610671997,
-0.41828805208206177,
1.7232868671417236,
... |
func (m *Middleware) Register(s *server.Server) {
s.HTTP.AddMiddleware(m.DeviceUID, m.SessionUID, m.UserSessionUID)
s.InternalHTTP.AddMiddleware(m.DeviceUID, m.SessionUID, m.UserSessionUID)
} | [
-1.169207215309143,
0.09734482318162918,
0.407291054725647,
0.7021222114562988,
0.0036361515522003174,
0.19524924457073212,
-0.17350412905216217,
-0.029075762256979942,
0.43257391452789307,
-0.4596351981163025,
-0.4510782063007355,
0.7724486589431763,
-0.8563361167907715,
0.813367784023284... |
func MeanPerKey(s beam.Scope, pcol PrivatePCollection, params MeanParams) beam.PCollection {
s = s.Scope("pbeam.MeanPerKey")
// Obtain & validate type information from the underlying PCollection<K,V>.
idT, kvT := beam.ValidateKVType(pcol.col)
if kvT.Type() != reflect.TypeOf(kv.Pair{}) {
log.Fatalf("MeanPerKey mus... | [
-0.6712828874588013,
0.3276411294937134,
0.7948893308639526,
-0.01239752396941185,
-0.09004699438810349,
-0.2550708055496216,
0.10746891796588898,
-0.5624982118606567,
-0.30219370126724243,
1.2413910627365112,
0.023937998339533806,
0.706463098526001,
-0.5953415036201477,
1.0686200857162476... |
func newBoundedMeanFn(params MeanParams, noiseKind noise.Kind, publicPartitions bool, testMode TestMode, emptyPartitions bool) (*boundedMeanFn, error) {
fn := &boundedMeanFn{
MaxPartitionsContributed: params.MaxPartitionsContributed,
MaxContributionsPerPartition: params.MaxContributionsPerPartition,
Lower: ... | [
0.40661486983299255,
-0.8853679895401001,
0.7370192408561707,
-0.701397180557251,
0.349685400724411,
-0.028501251712441444,
-0.11128455400466919,
0.05465496703982353,
0.1164739727973938,
-0.4055061340332031,
-0.5244582891464233,
0.2976208031177521,
-0.504817008972168,
0.4334603250026703,
... |
func newBoundedMeanFnTemp(spec PrivacySpec, params MeanParams, noiseKind noise.Kind, publicPartitions bool, emptyPartitions bool) (*boundedMeanFn, error) {
if noiseKind != noise.GaussianNoise && noiseKind != noise.LaplaceNoise {
return nil, fmt.Errorf("unknown noise.Kind (%v) is specified. Please specify a valid noi... | [
0.23855024576187134,
-0.566497266292572,
0.63193678855896,
-0.6429280638694763,
0.22554713487625122,
-0.15291167795658112,
-0.11255034804344177,
-0.01774275116622448,
0.14475412666797638,
-0.194357231259346,
-0.4535362124443054,
0.3502294719219208,
-0.7540985941886902,
0.4435393512248993,
... |
func (*RawTransaction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*RawTransaction_Program)(nil),
(*RawTransaction_WriteSet)(nil),
(*RawTransaction_Script)(nil),
(*RawTransaction_Module)(nil),
}
} | [
-1.4769500494003296,
0.33461010456085205,
0.6402021646499634,
-0.41682571172714233,
0.3904019296169281,
-0.7142412066459656,
0.12036474794149399,
-0.8923540115356445,
1.1304006576538086,
0.5082430243492126,
-0.9922346472740173,
0.28418833017349243,
0.5074397325515747,
0.3083645701408386,
... |
func LookupDbCluster(ctx *pulumi.Context, args *LookupDbClusterArgs, opts ...pulumi.InvokeOption) (*LookupDbClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDbClusterResult
err := ctx.Invoke("aws-native:docdb:getDbCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
ret... | [
-0.05574926361441612,
0.9201094508171082,
0.6720227599143982,
-0.2078150510787964,
0.2252141833305359,
0.6743941307067871,
-0.10199423879384995,
-0.5061911940574646,
0.7103131413459778,
-0.8560590744018555,
0.6222051978111267,
1.7539438009262085,
-0.7077001929283142,
-1.453670859336853,
... |
func NewReturnStatement(expr Expression) *ReturnStatement {
return &ReturnStatement{
expr: expr,
}
} | [
-0.5689904093742371,
-0.8091651201248169,
0.16166749596595764,
-0.449598491191864,
-1.894547462463379,
-1.0290842056274414,
-0.10664190351963043,
0.012256667017936707,
0.5471330881118774,
0.14626844227313995,
0.07688576728105545,
0.5738726854324341,
-0.7879289984703064,
-1.3296281099319458... |
func NewBlockStatement(stmts ...Statement) *BlockStatement {
b := &BlockStatement{}
for _, stmt := range stmts {
b.stmts = append(b.stmts, stmt)
}
return b
} | [
-0.5533374547958374,
0.09412622451782227,
0.454561322927475,
0.45120304822921753,
-0.7069772481918335,
-0.48839324712753296,
-0.46595391631126404,
-1.1703850030899048,
0.4818420708179474,
0.5821661949157715,
0.14364710450172424,
-0.07880938798189163,
-0.6742351055145264,
-0.045107133686542... |
func (c *CaseGroup) Satisfy(ctx *Context, test Value) bool {
for _, esac := range c.cases {
value := esac.Evaluate(ctx)
if _, ok := esac.(Value); ok {
if value == test {
return true
}
}
if value.Truth(ctx) {
return true
}
}
return false
} | [
-0.04541473835706711,
0.18488183617591858,
0.4465430974960327,
-0.2940489649772644,
-0.0013751521473750472,
0.36161530017852783,
-0.5228452682495117,
-0.7047516107559204,
-0.6536612510681152,
0.425875186920166,
-0.3922853469848633,
-0.6383296251296997,
-0.5594967007637024,
0.66027581691741... |
func (c *CaseGroup) Execute(ctx *Context) {
c.block.Execute(ctx)
} | [
0.2718614637851715,
0.2192169576883316,
0.41589146852493286,
0.6155466437339783,
0.8373001217842102,
0.7041778564453125,
-0.08988790959119797,
-1.12637460231781,
-0.8192598223686218,
0.20239068567752838,
-0.057353466749191284,
-0.0725553035736084,
-0.7351757287979126,
0.2036760449409485,
... |
func NewGetServiceInstanceByNameOK() *GetServiceInstanceByNameOK {
return &GetServiceInstanceByNameOK{}
} | [
-0.6377032399177551,
-0.6349267363548279,
0.14350032806396484,
-0.055553138256073,
-1.129736065864563,
0.47745367884635925,
0.16504263877868652,
-0.0017766677774488926,
-0.6858152747154236,
0.23187601566314697,
-0.7956302165985107,
-0.2913880944252014,
-0.8800901174545288,
0.21449917554855... |
func (o *GetServiceInstanceByNameOK) WithPayload(payload *v1.ServiceInstance) *GetServiceInstanceByNameOK {
o.Payload = payload
return o
} | [
-0.18471184372901917,
-0.15697377920150757,
0.1649753451347351,
-0.5852113962173462,
-1.481102705001831,
0.0729336366057396,
0.0070569757372140884,
-0.5668317079544067,
-0.27507245540618896,
0.48740819096565247,
-0.604390561580658,
-0.8286159038543701,
-0.6172366738319397,
-0.0607419349253... |
func (o *GetServiceInstanceByNameOK) SetPayload(payload *v1.ServiceInstance) {
o.Payload = payload
} | [
0.06766065210103989,
0.11646844446659088,
0.0898960530757904,
-0.5077343583106995,
-1.2944738864898682,
0.4757315218448639,
0.03656689077615738,
-0.3894542157649994,
-0.5837320685386658,
0.7355301380157471,
-0.5616706013679504,
-0.4489050805568695,
-0.9647049903869629,
0.34560203552246094,... |
func (o *GetServiceInstanceByNameOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.4188064932823181,
-0.46444544196128845,
0.34441331028938293,
-0.06428441405296326,
-0.14508019387722015,
-0.4004696309566498,
0.38848423957824707,
-0.18466444313526154,
0.07160816341638565,
0.7401947975158691,
-0.12578129768371582,
-0.8408665657043457,
-1.087533712387085,
-0.18920202553... |
func NewGetServiceInstanceByNameBadRequest() *GetServiceInstanceByNameBadRequest {
return &GetServiceInstanceByNameBadRequest{}
} | [
-1.0378477573394775,
-0.8463311195373535,
0.26938965916633606,
0.30786484479904175,
-0.8564699292182922,
0.34411635994911194,
-0.944043755531311,
0.002551092067733407,
-0.6428326368331909,
-0.43924540281295776,
-0.2352330982685089,
-0.07417172193527222,
-1.4717140197753906,
0.5737376809120... |
func (o *GetServiceInstanceByNameBadRequest) WithPayload(payload *v1.Error) *GetServiceInstanceByNameBadRequest {
o.Payload = payload
return o
} | [
-0.8603754639625549,
-0.13028326630592346,
0.39807048439979553,
-0.17282144725322723,
-1.0900787115097046,
0.05767300724983215,
-1.066853404045105,
-0.6020132899284363,
-0.12685082852840424,
-0.22958214581012726,
0.06513676047325134,
-0.23902396857738495,
-0.7833581566810608,
0.25898024439... |
func (o *GetServiceInstanceByNameBadRequest) SetPayload(payload *v1.Error) {
o.Payload = payload
} | [
-0.9050967693328857,
0.17591646313667297,
0.2914140224456787,
-0.17138859629631042,
-0.6050929427146912,
0.35894909501075745,
-1.0309076309204102,
-0.26036980748176575,
-0.5489100813865662,
-0.04179908707737923,
-0.13203851878643036,
0.27071413397789,
-1.2453837394714355,
0.773660004138946... |
func (o *GetServiceInstanceByNameBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(400)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.8077642917633057,
-0.40397676825523376,
0.5417717695236206,
0.22246906161308289,
0.22309422492980957,
-0.33164191246032715,
-0.4148987829685211,
-0.505646824836731,
0.22907693684101105,
0.12717726826667786,
-0.026227697730064392,
-0.3717993497848511,
-1.1347137689590454,
-0.078151598572... |
func NewGetServiceInstanceByNameUnauthorized() *GetServiceInstanceByNameUnauthorized {
return &GetServiceInstanceByNameUnauthorized{}
} | [
-0.7159637212753296,
-0.6395304203033447,
0.2910194396972656,
0.33111459016799927,
-1.212376356124878,
0.43741077184677124,
-0.2243528813123703,
0.801640510559082,
-0.6058530211448669,
-0.8635033965110779,
-0.25156354904174805,
0.5878986120223999,
-1.4776225090026855,
-0.3095134496688843,
... |
func (o *GetServiceInstanceByNameUnauthorized) WithPayload(payload *v1.Error) *GetServiceInstanceByNameUnauthorized {
o.Payload = payload
return o
} | [
-0.5589251518249512,
0.09507289528846741,
0.3553024232387543,
-0.16504870355129242,
-1.4096260070800781,
0.15105299651622772,
-0.3149878978729248,
0.22892092168331146,
0.0007058314513415098,
-0.5278687477111816,
-0.05862444266676903,
0.3866446614265442,
-0.6826556921005249,
-0.402895957231... |
func (o *GetServiceInstanceByNameUnauthorized) SetPayload(payload *v1.Error) {
o.Payload = payload
} | [
-0.460039347410202,
0.3651030957698822,
0.25350478291511536,
-0.027513986453413963,
-1.155324101448059,
0.41706493496894836,
-0.10236527770757675,
0.4844217896461487,
-0.3590455651283264,
-0.28014227747917175,
-0.25331658124923706,
0.8769262433052063,
-1.0450257062911987,
0.020130647346377... |
func (o *GetServiceInstanceByNameUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(401)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.7504561543464661,
-0.031937554478645325,
0.47169438004493713,
0.26603618264198303,
-0.2568102777004242,
-0.1598031371831894,
0.2834120988845825,
0.3246985971927643,
0.34050071239471436,
0.10392248630523682,
0.04930327460169792,
-0.029167594388127327,
-0.9978338479995728,
-0.629213809967... |
func NewGetServiceInstanceByNameForbidden() *GetServiceInstanceByNameForbidden {
return &GetServiceInstanceByNameForbidden{}
} | [
-0.1944013386964798,
-0.0799972414970398,
0.17122331261634827,
0.2819807231426239,
-1.3058439493179321,
0.8717063069343567,
-0.007301780860871077,
-0.5818345546722412,
-0.5165614485740662,
-0.5370817184448242,
-0.28847479820251465,
0.030422113835811615,
-1.6301548480987549,
-0.475562036037... |
func (o *GetServiceInstanceByNameForbidden) WithPayload(payload *v1.Error) *GetServiceInstanceByNameForbidden {
o.Payload = payload
return o
} | [
-0.1562494933605194,
0.4529511034488678,
0.2341991513967514,
-0.09634633362293243,
-1.380244493484497,
0.5307831168174744,
-0.2667529881000519,
-0.9639561772346497,
-0.06776587665081024,
-0.22204037010669708,
-0.018074888736009598,
-0.25348472595214844,
-0.7773266434669495,
-0.372180640697... |
func (o *GetServiceInstanceByNameForbidden) SetPayload(payload *v1.Error) {
o.Payload = payload
} | [
-0.0803811177611351,
0.8118293881416321,
0.285294771194458,
0.057621512562036514,
-1.135886549949646,
0.7734849452972412,
0.06372620910406113,
-0.49645593762397766,
-0.38552433252334595,
0.015988416969776154,
-0.31369033455848694,
0.3965749144554138,
-1.2097958326339722,
-0.016661871224641... |
func (o *GetServiceInstanceByNameForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(403)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-0.26797422766685486,
0.2297666072845459,
0.4975086748600006,
0.12186121940612793,
-0.08541563898324966,
0.024853963404893875,
0.3908025324344635,
-0.7109635472297668,
0.09898578375577927,
0.28332382440567017,
0.16972357034683228,
-0.2636353671550751,
-1.1759270429611206,
-0.57852399349212... |
func NewGetServiceInstanceByNameNotFound() *GetServiceInstanceByNameNotFound {
return &GetServiceInstanceByNameNotFound{}
} | [
-0.7870588898658752,
-1.1513715982437134,
-0.1959400475025177,
-0.29804468154907227,
-0.5449051856994629,
0.7926295399665833,
-0.17477725446224213,
-0.07951774448156357,
-0.3400096595287323,
-0.3508578836917877,
-0.4882667660713196,
-0.14629770815372467,
-1.4021706581115723,
0.207035854458... |
func (o *GetServiceInstanceByNameNotFound) WithPayload(payload *v1.Error) *GetServiceInstanceByNameNotFound {
o.Payload = payload
return o
} | [
-0.7795928120613098,
-0.31855514645576477,
0.11269539594650269,
-0.8566675186157227,
-0.7294020652770996,
0.32832029461860657,
-0.3792153298854828,
-0.44724276661872864,
0.16544371843338013,
-0.1318894475698471,
-0.3742500841617584,
-0.26315975189208984,
-0.6786353588104248,
0.150748044252... |
func (o *GetServiceInstanceByNameNotFound) SetPayload(payload *v1.Error) {
o.Payload = payload
} | [
-0.7239967584609985,
0.01858033612370491,
0.07962898164987564,
-0.5913112759590149,
-0.45782771706581116,
0.6122704744338989,
-0.18220765888690948,
-0.12053752690553665,
-0.26223260164260864,
0.07422683387994766,
-0.4246569573879242,
0.2673603594303131,
-1.1115690469741821,
0.6806321740150... |
func (o *GetServiceInstanceByNameNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(404)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | [
-1.044641375541687,
-0.42246013879776,
0.3288330137729645,
-0.04892551898956299,
0.4895489513874054,
-0.3369430601596832,
0.38350167870521545,
-0.19897310435771942,
0.193561390042305,
0.4387977123260498,
-0.15310463309288025,
-0.4454313814640045,
-0.9949470162391663,
-0.0964055061340332,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.