text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func NewPublicRemoveTrustedDeviceV4ParamsWithHTTPClient(client *http.Client) *PublicRemoveTrustedDeviceV4Params {
var ()
return &PublicRemoveTrustedDeviceV4Params{
HTTPClient: client,
}
} | [
-0.1383519023656845,
-0.14036796987056732,
0.29755154252052307,
0.022147435694932938,
0.11922230571508408,
0.0816132128238678,
0.2844352722167969,
0.39312079548835754,
-1.1004811525344849,
-0.5454322099685669,
-0.6453462839126587,
-0.8611131906509399,
-0.8113967776298523,
0.348235577344894... |
func (o *PublicRemoveTrustedDeviceV4Params) WithTimeout(timeout time.Duration) *PublicRemoveTrustedDeviceV4Params {
o.SetTimeout(timeout)
return o
} | [
0.44158935546875,
0.14416925609111786,
0.13484512269496918,
-0.3158908188343048,
-0.24147500097751617,
-0.2511492371559143,
0.0961892232298851,
0.5993833541870117,
0.10501804202795029,
0.3700006306171417,
-0.058647554367780685,
-0.2870308756828308,
-0.36887359619140625,
0.6438689827919006,... |
func (o *PublicRemoveTrustedDeviceV4Params) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
-0.0761229619383812,
0.258262038230896,
0.1874726414680481,
-0.358472615480423,
0.2486404925584793,
0.20553351938724518,
0.08513382077217102,
0.8712180256843567,
-0.34610557556152344,
0.441135436296463,
-0.10447090119123459,
-0.06816338002681732,
-1.0761486291885376,
0.7012768387794495,
... |
func (o *PublicRemoveTrustedDeviceV4Params) WithContext(ctx context.Context) *PublicRemoveTrustedDeviceV4Params {
o.SetContext(ctx)
return o
} | [
-0.3138631582260132,
-0.08364081382751465,
0.366544634103775,
-0.5742195248603821,
-0.3026612102985382,
-0.558255136013031,
-0.16529907286167145,
-0.15338702499866486,
0.392830491065979,
0.022370977327227592,
-0.42414045333862305,
-0.687983512878418,
-1.0682636499404907,
-0.006060715764760... |
func (o *PublicRemoveTrustedDeviceV4Params) SetContext(ctx context.Context) {
o.Context = ctx
} | [
-0.6251859068870544,
0.24540357291698456,
0.32829076051712036,
-0.436712384223938,
0.41499242186546326,
-0.12323606759309769,
-0.09533224999904633,
0.10706937313079834,
0.5366799831390381,
0.035988856106996536,
-0.4852884113788605,
-0.29968103766441345,
-1.473185658454895,
0.17472110688686... |
func (o *PublicRemoveTrustedDeviceV4Params) SetAuthInfoWriter(authInfoWriter runtime.ClientAuthInfoWriter) {
o.AuthInfoWriter = authInfoWriter
} | [
-0.40290018916130066,
-1.1399786472320557,
0.12005431950092316,
-0.1240151971578598,
0.13172762095928192,
-0.48860904574394226,
1.2173413038253784,
0.3762679994106293,
-0.06935577839612961,
-0.07053776830434799,
-0.772107720375061,
-0.5815830826759338,
-0.5374853014945984,
0.32166025042533... |
func (o *PublicRemoveTrustedDeviceV4Params) WithHTTPClient(client *http.Client) *PublicRemoveTrustedDeviceV4Params {
o.SetHTTPClient(client)
return o
} | [
-0.24238179624080658,
-0.5662887692451477,
0.35286471247673035,
-0.568838357925415,
-0.22037211060523987,
-0.39187657833099365,
0.4953418970108032,
-0.052329517900943756,
-0.3737512230873108,
-0.33580097556114197,
-0.3525441884994507,
-0.6829839944839478,
-0.4307105541229248,
0.03311640396... |
func (o *PublicRemoveTrustedDeviceV4Params) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
0.06987947970628738,
-0.44179365038871765,
0.3179962933063507,
-0.9719455242156982,
-0.1958543360233307,
-0.4603229761123657,
0.5862532258033752,
0.16348321735858917,
-0.762161374092102,
-0.08461298793554306,
-0.39219340682029724,
-0.15669254958629608,
-1.093660593032837,
-0.17287322878837... |
func (o *PublicRemoveTrustedDeviceV4Params) SetHTTPClientTransport(roundTripper http.RoundTripper) {
if o.HTTPClient != nil {
o.HTTPClient.Transport = roundTripper
} else {
o.HTTPClient = &http.Client{Transport: roundTripper}
}
} | [
0.2594909369945526,
-0.5556683540344238,
0.35769104957580566,
-0.9686724543571472,
-0.27135831117630005,
0.0966932475566864,
0.3791954517364502,
-0.1118820458650589,
-0.621856689453125,
-0.30207154154777527,
-0.6018579006195068,
0.03285260125994682,
-0.7858771681785583,
-0.2159533947706222... |
func (o *PublicRemoveTrustedDeviceV4Params) WithCookie(cookie *string) *PublicRemoveTrustedDeviceV4Params {
o.SetCookie(cookie)
return o
} | [
-0.07130294293165207,
0.33289381861686707,
0.24915403127670288,
-0.015771940350532532,
0.051115792244672775,
-0.7321042418479919,
0.6179358959197998,
-0.18833020329475403,
-0.5761069655418396,
0.04988514631986618,
0.11490847170352936,
-1.279875636100769,
-0.8078435063362122,
0.460551202297... |
func (o *PublicRemoveTrustedDeviceV4Params) SetCookie(cookie *string) {
o.Cookie = cookie
} | [
-0.5944250822067261,
0.282210111618042,
0.2339950054883957,
0.09925632178783417,
0.28753384947776794,
-0.45444878935813904,
0.7119099497795105,
0.054092563688755035,
-0.7689728736877441,
0.3530654311180115,
0.012583693489432335,
-0.5714050531387329,
-1.5873703956604004,
0.7799639701843262,... |
func (o *PublicRemoveTrustedDeviceV4Params) WithNamespace(namespace string) *PublicRemoveTrustedDeviceV4Params {
o.SetNamespace(namespace)
return o
} | [
-0.5458585023880005,
-0.13837945461273193,
0.12527716159820557,
-0.5192691087722778,
0.04695470258593559,
-0.9166051149368286,
-0.12889370322227478,
-0.4580708146095276,
1.0324413776397705,
-0.31292399764060974,
-0.2802025079727173,
-1.1404602527618408,
-0.8015758991241455,
0.5431313514709... |
func (o *PublicRemoveTrustedDeviceV4Params) SetNamespace(namespace string) {
o.Namespace = namespace
} | [
-0.7995654940605164,
0.012159661389887333,
0.18001729249954224,
-0.3705168068408966,
0.3073345422744751,
-0.4932861328125,
-0.17872141301631927,
-0.10097582638263702,
0.7760353088378906,
-0.14813993871212006,
-0.3354529142379761,
-0.5414705872535706,
-1.1757713556289673,
0.8682407736778259... |
func (o *PublicRemoveTrustedDeviceV4Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.Cookie != nil {
// header param Cookie
if err := r.SetHeaderParam("Cookie", *o.Cookie); err != nil {
return e... | [
-0.9540112018585205,
-0.09461363404989243,
0.8330454230308533,
-0.668216347694397,
0.7976503372192383,
-0.5723968148231506,
0.6939108967781067,
0.02689162641763687,
-0.40937167406082153,
0.3955002725124359,
0.09661795943975449,
-0.04299895092844963,
-0.8455843925476074,
0.42597252130508423... |
func NewObjectsClassPutOK() *ObjectsClassPutOK {
return &ObjectsClassPutOK{}
} | [
-1.7507113218307495,
-1.1295660734176636,
0.4813852608203888,
-0.48713627457618713,
-1.0587513446807861,
0.43600326776504517,
0.4919981062412262,
-0.8295760750770569,
-0.25937631726264954,
0.5781766176223755,
-1.6245828866958618,
-1.1338763236999512,
1.2504748106002808,
-0.4025573134422302... |
func (o *ObjectsClassPutOK) WithPayload(payload *models.Object) *ObjectsClassPutOK {
o.Payload = payload
return o
} | [
-1.091573715209961,
-0.7004732489585876,
0.11410652101039886,
-0.567872166633606,
-1.2523918151855469,
0.4016869366168976,
0.7621520161628723,
-0.7193229794502258,
0.22987787425518036,
0.6424686908721924,
-0.9540771842002869,
-1.63576340675354,
1.2515606880187988,
-0.5039036870002747,
-0... |
func (o *ObjectsClassPutOK) SetPayload(payload *models.Object) {
o.Payload = payload
} | [
-1.2824381589889526,
-0.2514275312423706,
0.24765995144844055,
-0.27811071276664734,
-0.7984747886657715,
0.8556028008460999,
0.712990939617157,
-0.454590767621994,
0.12172459065914154,
0.7299982309341431,
-1.218885898590088,
-1.353427767753601,
0.4261264204978943,
0.09026138484477997,
-... |
func (o *ObjectsClassPutOK) 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
}
}
} | [
-1.2514944076538086,
-0.620761513710022,
0.37821197509765625,
0.11043009161949158,
0.47400566935539246,
-0.11275964230298996,
0.7331370711326599,
-0.420911967754364,
0.5392380356788635,
0.9727460741996765,
-0.17918749153614044,
-1.0438425540924072,
0.08943945169448853,
-0.33228418231010437... |
func NewObjectsClassPutUnauthorized() *ObjectsClassPutUnauthorized {
return &ObjectsClassPutUnauthorized{}
} | [
-1.748154640197754,
-0.9397150278091431,
0.6935839653015137,
-0.18607845902442932,
-1.2140147686004639,
0.49577146768569946,
0.06865794956684113,
0.0014847449492663145,
0.09136295318603516,
-0.6256391406059265,
-0.9815355539321899,
-0.07203059643507004,
1.2838661670684814,
-0.4895712733268... |
func (o *ObjectsClassPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
} | [
-1.460445761680603,
-0.9174507856369019,
0.41232362389564514,
0.2582370936870575,
0.2633703947067261,
-0.050836797803640366,
0.8317930698394775,
-0.026713723316788673,
0.4624757170677185,
0.20918579399585724,
-0.2602577805519104,
-0.1310979723930359,
-0.33782097697257996,
-0.52589482069015... |
func NewObjectsClassPutForbidden() *ObjectsClassPutForbidden {
return &ObjectsClassPutForbidden{}
} | [
-1.0097951889038086,
-0.342488169670105,
0.620965838432312,
-0.13166865706443787,
-1.0277929306030273,
0.8860119581222534,
0.6126618385314941,
-1.2687616348266602,
-0.23703154921531677,
-0.1023983582854271,
-1.0057599544525146,
-0.24940775334835052,
0.7949650883674622,
-0.7105209827423096,... |
func (o *ObjectsClassPutForbidden) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutForbidden {
o.Payload = payload
return o
} | [
-0.7447429895401001,
-0.09166818112134933,
0.30898088216781616,
-0.14121921360492706,
-0.9649772644042969,
0.9167177081108093,
0.9267938137054443,
-1.3672244548797607,
0.4988250732421875,
0.21981194615364075,
-0.44812536239624023,
-0.28265678882598877,
0.6497784852981567,
-0.80917763710021... |
func (o *ObjectsClassPutForbidden) SetPayload(payload *models.ErrorResponse) {
o.Payload = payload
} | [
-1.078628420829773,
0.33159059286117554,
0.33280542492866516,
0.032916028052568436,
-0.590319812297821,
0.9490774869918823,
0.8050011992454529,
-1.0342942476272583,
0.4845965802669525,
0.09034786373376846,
-0.8557219505310059,
0.05923071876168251,
-0.13472136855125427,
-0.5198701024055481,... |
func (o *ObjectsClassPutForbidden) 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.9470887184143066,
0.027294499799609184,
0.48148074746131897,
0.11690104007720947,
0.43609073758125305,
0.2525292634963989,
0.8697882890701294,
-1.0520895719528198,
0.5578790307044983,
0.6429848670959473,
0.0811295211315155,
-0.4115881025791168,
-0.2584836184978485,
-0.7289401888847351,
... |
func NewObjectsClassPutNotFound() *ObjectsClassPutNotFound {
return &ObjectsClassPutNotFound{}
} | [
-1.444929599761963,
-1.7680742740631104,
0.22596418857574463,
-0.9333194494247437,
-0.6909455060958862,
0.7022689580917358,
0.8150371313095093,
-0.8437487483024597,
0.2002498209476471,
0.04181715101003647,
-0.9427081346511841,
-0.8322644829750061,
0.8513323664665222,
-0.07182867079973221,
... |
func (o *ObjectsClassPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(404)
} | [
-1.5491200685501099,
-1.444730520248413,
0.17755679786205292,
-0.1556527465581894,
1.048802375793457,
-0.03582970052957535,
1.2052127122879028,
-0.5771844983100891,
0.1705993264913559,
0.6852002739906311,
-0.23950010538101196,
-0.46452566981315613,
-0.39164891839027405,
0.02003098465502262... |
func NewObjectsClassPutUnprocessableEntity() *ObjectsClassPutUnprocessableEntity {
return &ObjectsClassPutUnprocessableEntity{}
} | [
-1.4933041334152222,
-0.62042635679245,
0.6721062660217285,
-1.1039119958877563,
-0.8455808162689209,
0.504009485244751,
0.2324684113264084,
0.6232088208198547,
-0.5858320593833923,
0.3102906048297882,
-0.8075613379478455,
-0.5631771087646484,
0.756327211856842,
-0.7469958662986755,
0.04... |
func (o *ObjectsClassPutUnprocessableEntity) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutUnprocessableEntity {
o.Payload = payload
return o
} | [
-1.4155242443084717,
-0.5929449796676636,
0.4149587154388428,
-1.2121776342391968,
-0.5953056216239929,
0.5146802067756653,
0.21320840716362,
-0.02490857057273388,
0.22736474871635437,
0.268839567899704,
-0.37356045842170715,
-0.8648099303245544,
0.8019203543663025,
-0.7214710116386414,
... |
func (o *ObjectsClassPutUnprocessableEntity) SetPayload(payload *models.ErrorResponse) {
o.Payload = payload
} | [
-1.6606992483139038,
-0.30882737040519714,
0.38357463479042053,
-0.9100494384765625,
-0.18765012919902802,
0.5089451670646667,
0.10002048313617706,
0.18044382333755493,
0.15728367865085602,
0.1877867877483368,
-0.4731347858905792,
-0.6726738214492798,
0.10588101297616959,
-0.19282680749893... |
func (o *ObjectsClassPutUnprocessableEntity) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(422)
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.4309719800949097,
-0.4570908844470978,
0.614364743232727,
-0.11770464479923248,
0.5099117755889893,
-0.19328607618808746,
0.3957565426826477,
0.07085320353507996,
0.2889133095741272,
0.3385777771472931,
-0.2713308334350586,
-0.6343767642974854,
-0.03441843390464783,
-0.39337703585624695... |
func (o *ObjectsClassPutInternalServerError) WithPayload(payload *models.ErrorResponse) *ObjectsClassPutInternalServerError {
o.Payload = payload
return o
} | [
-1.8011614084243774,
-0.680850088596344,
0.2708551585674286,
-1.0742026567459106,
-1.08064603805542,
0.7698467969894409,
0.8928713798522949,
-0.552588939666748,
0.4675883948802948,
-0.06015642359852791,
-0.2827826142311096,
-0.4066861867904663,
-0.05848139151930809,
-0.21733041107654572,
... |
func (o *ObjectsClassPutInternalServerError) SetPayload(payload *models.ErrorResponse) {
o.Payload = payload
} | [
-1.9600034952163696,
-0.48251283168792725,
0.222638338804245,
-0.8501566648483276,
-0.6610724925994873,
0.6718679070472717,
0.7499333620071411,
-0.21607057750225067,
0.2905779480934143,
0.03221124783158302,
-0.6962668895721436,
-0.18790122866630554,
-0.6542162299156189,
0.2850942015647888,... |
func (o *ObjectsClassPutInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(500)
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.7651324272155762,
-0.3970605731010437,
0.3707939684391022,
0.030891934409737587,
0.31538599729537964,
0.07724592834711075,
0.8299066424369812,
-0.33145105838775635,
0.5718278884887695,
0.586558997631073,
0.1103324145078659,
-0.3919784724712372,
-0.43316587805747986,
-0.11654316633939743... |
func (d database) list(w http.ResponseWriter, r *http.Request) {
for item, price := range d {
fmt.Fprintf(w, "item: %s, price: %s\n", item, price)
}
} | [
-1.039955496788025,
-0.552706778049469,
0.3370682895183563,
-0.2528887391090393,
0.8734361529350281,
-0.37571981549263,
-0.46307921409606934,
0.30410972237586975,
-0.33406758308410645,
0.46503743529319763,
-0.5441932082176208,
0.018386682495474815,
1.0223376750946045,
0.42021432518959045,
... |
func NewFileWriter(workDir string) FileWriter {
return &writerImpl{
workDir: workDir,
}
} | [
-0.5533071756362915,
-0.6660134792327881,
-0.2497996836900711,
0.12467705458402634,
-0.8466735482215881,
-1.0150026082992554,
0.463115930557251,
0.847703218460083,
-0.011692477390170097,
-0.08508551120758057,
-0.37391698360443115,
-0.5225891470909119,
0.3771893084049225,
1.1270025968551636... |
func (w *writerImpl) WriteYAML(filenamePrefix string, contents ...string) ([]string, error) {
out := make([]string, 0, len(contents))
content := JoinString(contents...)
files, err := splitContentsToFiles(w.workDir, content, filenamePrefix)
if err != nil {
return nil, err
}
if len(files) == 0 {
f, err := writ... | [
-0.7354718446731567,
-0.8960040807723999,
0.738982081413269,
0.4043786823749542,
0.7013872265815735,
-0.22182002663612366,
0.789459228515625,
0.7960866689682007,
0.0712430402636528,
-0.0960426777601242,
0.03801122307777405,
-0.7182350158691406,
0.05125834792852402,
0.4138367772102356,
-0... |
func (w *writerImpl) WriteYAMLOrFail(t test.Failer, filenamePrefix string, contents ...string) []string {
t.Helper()
out, err := w.WriteYAML(filenamePrefix, contents...)
if err != nil {
t.Fatal(err)
}
return out
} | [
-0.6882795095443726,
-1.0357633829116821,
0.6338356137275696,
0.023795992136001587,
0.5417086482048035,
-0.6283906698226929,
-0.09180915355682373,
-0.32637396454811096,
-0.007671451196074486,
0.03796331584453583,
-0.435763418674469,
-0.6922995448112488,
0.2168874889612198,
0.57285404205322... |
func thermometer(sw, sh int) (img draw.Image, err error) {
// dynamic SVG
wt, ht := 120, 120
img = image.NewRGBA(image.Rect(0, 0, sw, sh))
var iconMem = new(bytes.Buffer)
var canvas = svg.New(iconMem)
canvas.Start(wt, ht)
bfs := svg.Filterspec{In: `SourceGraphic`}
canvas.Def()
canvas.Filter(`blur_f`, `fil... | [
0.468797892332077,
0.23045936226844788,
1.1826893091201782,
-0.4762551486492157,
-0.4226672053337097,
0.39581215381622314,
0.9270995259284973,
-0.324782133102417,
-0.0003820344863925129,
0.4773980975151062,
-0.2768181562423706,
0.25532668828964233,
0.7847015261650085,
0.35604438185691833,
... |
func NewYFastBilateralAuto(m hdr.Image) *YFastBilateral {
f := NewYFastBilateral(m, 16, 0.1)
f.auto = true
return f
} | [
1.3934316635131836,
-0.7021617889404297,
0.31125324964523315,
1.0430630445480347,
-0.7016056180000305,
-0.2343374490737915,
0.36164185404777527,
0.4452148973941803,
-0.797016978263855,
-1.3346121311187744,
-0.9152311086654663,
0.3864361345767975,
0.20576870441436768,
0.32263240218162537,
... |
func NewYFastBilateral(m hdr.Image, sigmaSpace, sigmaRange float64) *YFastBilateral {
f := &YFastBilateral{
HDRImage: m,
SigmaRange: sigmaRange,
SigmaSpace: sigmaSpace,
min: math.Inf(1),
max: math.Inf(-1),
size: make([]int, yDimension),
}
switch m.ColorModel() {
case hdrcolor.XYZM... | [
0.6406846642494202,
-0.7659435868263245,
0.5100457072257996,
0.2547607719898224,
-0.7383987903594971,
0.0696900486946106,
-0.18303467333316803,
-0.4723551869392395,
-0.5443137884140015,
-0.704404890537262,
-0.4017311930656433,
0.9818185567855835,
0.08937933295965195,
0.8812041282653809,
... |
func (f *YFastBilateral) Perform() {
f.minmaxOnce.Do(f.minmax)
f.downsampling()
f.convolution()
f.normalize()
} | [
0.0015020616119727492,
0.3919939696788788,
0.4729003608226776,
0.4523133337497711,
0.5659185647964478,
-1.1895064115524292,
0.3655238151550293,
-0.09411171823740005,
0.39351439476013184,
-1.1502174139022827,
0.41194647550582886,
0.023289790377020836,
0.31749457120895386,
0.8727930188179016... |
func (f *YFastBilateral) ColorModel() color.Model {
return f.HDRImage.ColorModel()
} | [
0.3998039960861206,
-0.8081003427505493,
0.40946757793426514,
0.6282728910446167,
0.5472580790519714,
0.7374069094657898,
0.12899629771709442,
0.013266881927847862,
0.24587738513946533,
-0.8406696915626526,
0.4107324182987213,
0.21955664455890656,
0.6761381030082703,
0.6800658702850342,
... |
func (f *YFastBilateral) Bounds() image.Rectangle {
return f.HDRImage.Bounds()
} | [
0.168209969997406,
-1.1387144327163696,
0.3916760981082916,
0.620499312877655,
0.20079682767391205,
-0.10125124454498291,
-0.3832533061504364,
-0.3189776837825775,
0.4653249680995941,
-1.5368930101394653,
0.6780450344085693,
0.3824377655982971,
0.5409336090087891,
1.372582197189331,
0.38... |
func (f *YFastBilateral) HDRAt(x, y int) hdrcolor.Color {
X, Y, Z, _ := f.HDRImage.HDRAt(x, y).HDRXYZA()
// Grid coords
gw := float64(x)/f.SigmaSpace + paddingS // Grid width
gh := float64(y)/f.SigmaSpace + paddingS // Grid height
gc := (Y-f.min)/f.SigmaRange + paddingR // Grid Y
Y2 := f.trilinearInterpolation(... | [
0.7909753918647766,
-0.16708146035671234,
0.5899659991264343,
-1.0868479013442993,
0.014790051616728306,
0.0857573077082634,
-0.4367774426937103,
-0.8558392524719238,
-0.32717689871788025,
-0.8062599301338196,
1.282702922821045,
-0.011022957973182201,
0.5245089530944824,
-0.023789241909980... |
func (f *YFastBilateral) At(x, y int) color.Color {
r, g, b, _ := f.HDRAt(x, y).HDRRGBA()
return color.RGBA{
R: uint8(xmath.Clamp(0, 255, int(r*255))),
G: uint8(xmath.Clamp(0, 255, int(g*255))),
B: uint8(xmath.Clamp(0, 255, int(b*255))),
A: 255,
}
} | [
-0.09779863804578781,
-0.3048737049102783,
0.5878400802612305,
-1.619152545928955,
-0.01766469143331051,
-0.31035348773002625,
-0.6714836955070496,
-1.3596357107162476,
-0.22392819821834564,
-0.43328261375427246,
0.8581892251968384,
1.2421618700027466,
1.1138232946395874,
0.122094765305519... |
func (f *YFastBilateral) HDRResultImage() hdr.Image {
d := f.HDRImage.Bounds()
dst := hdr.NewRGB(d)
for x := 0; x < d.Dx(); x++ {
for y := 0; y < d.Dy(); y++ {
dst.Set(x, y, f.HDRAt(x, y))
}
}
return dst
} | [
-0.3853060007095337,
0.11110635101795197,
0.5717085599899292,
0.12237902730703354,
0.271923303604126,
-0.33043843507766724,
-0.3455260694026947,
-0.9798266887664795,
-0.8249114751815796,
-0.596330463886261,
1.1178895235061646,
-0.0028971589636057615,
0.022612465545535088,
-0.07851574569940... |
func (f *YFastBilateral) ResultImage() hdr.Image {
d := f.HDRImage.Bounds()
dst := hdr.NewRGB(d)
for x := 0; x < d.Dx(); x++ {
for y := 0; y < d.Dy(); y++ {
dst.Set(x, y, f.HDRAt(x, y))
}
}
return dst
} | [
-0.4285446107387543,
0.08565638214349747,
0.540855884552002,
0.25685927271842957,
0.6382889151573181,
-0.08535091578960419,
0.20621047914028168,
-0.6506527066230774,
-0.7749538421630859,
-0.9242700338363647,
0.9495199918746948,
-0.17288599908351898,
-0.024189086630940437,
0.086257249116897... |
func (f *YFastBilateral) offset(size ...int) (n int) {
n = size[0] // x
for i, v := range size[1:] {
n += v * xmath.Mul(f.size[0:i+1]...) // y, z
}
return
} | [
-0.13524781167507172,
-0.06791646778583527,
0.411382257938385,
0.5427776575088501,
-0.5247770547866821,
0.6295186877250671,
1.3003166913986206,
0.5344963073730469,
0.26592254638671875,
-0.27157846093177795,
-0.7822341322898865,
-0.2606847882270813,
-0.0885610580444336,
0.11058931797742844,... |
func Index(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "%v", "Hello world")
} | [
0.31610342860221863,
-0.41958847641944885,
0.3939254581928253,
-0.12291378527879715,
-0.2506162226200104,
1.1273925304412842,
0.5993151664733887,
-0.2085423469543457,
-0.4788198471069336,
0.5037013292312622,
0.5405815839767456,
0.7964481115341187,
-0.18801727890968323,
-0.3082570433616638,... |
func getCommittedOffset(topic string, partitions []int32, groupID string) (map[int32]int64, error) {
if _, ok := groups[groupID]; !ok {
coordinatorResponse, err := brokers.FindCoordinator(*clientID, groupID)
if err != nil {
return nil, err
}
coordinator, err := brokers.GetBroker(coordinatorResponse.Coordina... | [
0.09621374309062958,
-0.868121325969696,
0.7576487064361572,
-1.1287415027618408,
-0.5877445936203003,
0.428555965423584,
0.35503897070884705,
-0.2332690805196762,
-0.6685745120048523,
0.7529242634773254,
0.35037773847579956,
-0.1701715588569641,
-0.7680898308753967,
0.07559013366699219,
... |
func getSubscriptionsInGroup(groupID string) (map[string]map[int32]string, error) {
if _, ok := groups[groupID]; !ok {
coordinatorResponse, err := brokers.FindCoordinator(*clientID, groupID)
if err != nil {
glog.Fatalf("could not find coordinator: %s", err)
}
coordinator, err := brokers.GetBroker(coordinato... | [
0.24363933503627777,
-0.3766805827617645,
0.6666077375411987,
-0.7691603899002075,
-0.5739798545837402,
-0.8126022219657898,
-0.1179012656211853,
-0.8697324991226196,
-0.6686155200004578,
0.6559382677078247,
0.2933836281299591,
0.31983497738838196,
-0.5915496945381165,
0.9952827095985413,
... |
func main() {
o := order{
ordId: 456,
customerId: 56,
}
createQuery(o)
} | [
1.1052405834197998,
-0.5780780911445618,
0.33575665950775146,
1.2316333055496216,
0.4198751151561737,
0.12061086297035217,
0.2719329297542572,
-0.3642982840538025,
-0.5850210785865784,
-0.3659161329269409,
0.12670499086380005,
0.40925657749176025,
0.6967058777809143,
0.28743109107017517,
... |
func (c *Client) AuthorizeCacheSecurityGroupIngress(ctx context.Context, params *AuthorizeCacheSecurityGroupIngressInput, optFns ...func(*Options)) (*AuthorizeCacheSecurityGroupIngressOutput, error) {
if params == nil {
params = &AuthorizeCacheSecurityGroupIngressInput{}
}
result, metadata, err := c.invokeOperati... | [
-0.9440873265266418,
0.8377220034599304,
0.8316978812217712,
1.1306169033050537,
-0.5069193840026855,
0.09909648448228836,
0.4446106255054474,
-0.28894779086112976,
0.1618170142173767,
0.2712251543998718,
-0.0625908374786377,
1.5452545881271362,
-1.520660400390625,
-0.6931096911430359,
0... |
func (cmd ConfigCmd) Name() string {
return "config"
} | [
-0.6138445734977722,
-0.40892377495765686,
0.45677465200424194,
0.7665496468544006,
-0.84162437915802,
0.2023083120584488,
0.24669216573238373,
0.31942474842071533,
-0.585018515586853,
1.4182052612304688,
-0.7711455821990967,
-0.34138569235801697,
0.3425573408603668,
1.2684694528579712,
... |
func (cmd ConfigCmd) Description() string {
return "Dolt configuration."
} | [
-0.1952327936887741,
-0.009486683644354343,
0.25558510422706604,
0.23082149028778076,
0.40731021761894226,
0.631533682346344,
-0.038183655589818954,
0.011747969314455986,
-0.05018973350524902,
0.8845009207725525,
0.09884013235569,
0.3143848478794098,
-0.03410603851079941,
1.107191324234008... |
func (cmd ConfigCmd) RequiresRepo() bool {
return false
} | [
-0.8143630623817444,
0.23752567172050476,
0.40959468483924866,
0.44795745611190796,
-0.21107453107833862,
0.32844409346580505,
0.059708163142204285,
0.6763212084770203,
0.18905457854270935,
-0.7439937591552734,
-0.3655426800251007,
-1.0650073289871216,
-0.314073383808136,
1.094450235366821... |
func (cmd ConfigCmd) Exec(ctx context.Context, commandStr string, args []string, dEnv *env.DoltEnv, cliCtx cli.CliContext) int {
ap := cmd.ArgParser()
help, usage := cli.HelpAndUsagePrinters(cli.CommandDocsForCommandString(commandStr, cfgDocs, ap))
apr := cli.ParseArgsOrDie(ap, args, help)
cfgTypes := apr.FlagsEqu... | [
-0.39818069338798523,
0.865099310874939,
0.8073453903198242,
0.3745100200176239,
0.1315927356481552,
-0.2731465995311737,
0.14978930354118347,
0.3316851258277893,
-0.8407430648803711,
0.5450376272201538,
0.5902365446090698,
0.14846745133399963,
-0.5549200177192688,
0.876412034034729,
0.9... |
func getOperation(dEnv *env.DoltEnv, setCfgTypes *set.StrSet, args []string, printFn func(string, *string)) int {
if len(args) != 1 {
// matches git behavior... kinda dumb
return 1
}
var cfg config.ReadableConfig
switch setCfgTypes.Size() {
case 0:
cfg = dEnv.Config
case 1:
configElement := newCfgElement... | [
-1.4323241710662842,
1.1019278764724731,
0.8572384119033813,
0.33339449763298035,
0.27459222078323364,
-1.1250513792037964,
0.7580265402793884,
-0.3022419512271881,
-0.6221165657043457,
0.8962507843971252,
0.6449041366577148,
-0.10798072069883347,
-0.5119773745536804,
0.2522483170032501,
... |
func (r *FileRenderer) RenderToBytes(path string) ([]byte, error) {
var yamlBytes []byte
splits := strings.Split(path, ".")
if len(splits) > 0 && splits[len(splits)-1] == "gotmpl" {
yamlBuf, err := r.RenderTemplateFileToBuffer(path)
if err != nil {
return nil, fmt.Errorf("failed to render [%s], because of %v"... | [
-0.0361689068377018,
0.5786313414573669,
0.8490908145904541,
-0.7564999461174011,
-0.3431912958621979,
-1.0444903373718262,
0.17663198709487915,
0.10966525226831436,
0.40487536787986755,
0.3185713291168213,
-0.26373058557510376,
-0.20709940791130066,
-0.6386486887931824,
0.5885533690452576... |
func (o *LookUpSchemaUnderSubjectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 404:
result := NewLookUpSchemaUnderSubjectNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
... | [
-0.1839388757944107,
-1.0718469619750977,
0.5581530928611755,
0.1284390240907669,
-0.25325238704681396,
-0.6698693037033081,
-0.12139628827571869,
0.13997957110404968,
0.5610818862915039,
0.0514700785279274,
0.6339332461357117,
-0.12009907513856888,
-0.9901121854782104,
-0.5634855031967163... |
func NewLookUpSchemaUnderSubjectNotFound() *LookUpSchemaUnderSubjectNotFound {
return &LookUpSchemaUnderSubjectNotFound{}
} | [
0.02399252913892269,
-0.8584738373756409,
0.16034497320652008,
-0.47141146659851074,
-0.8827020525932312,
0.7607032060623169,
-0.7012642621994019,
0.6663567423820496,
0.14687012135982513,
-1.022153615951538,
0.004108058288693428,
0.2135603427886963,
-0.0011578151024878025,
-0.4023713767528... |
func Solve(input string) (string, string) {
inputArr := c.SplitByNewline(input)
return c.ToString(solveA(inputArr)), c.ToString(solveB(inputArr, "northpole object storage"))
} | [
0.18963296711444855,
-0.309103786945343,
0.5286597013473511,
0.3162781894207001,
0.1650737226009369,
-0.3275303244590759,
-0.37786489725112915,
-0.9501029253005981,
-0.27091869711875916,
0.3736995756626129,
-0.5253493785858154,
-1.290406346321106,
-0.4967826008796692,
0.4338812232017517,
... |
func decode(str string, sid int) (result string) {
const numChars = 'z' - 'a' + 1
for _, char := range str {
newChar := ((int(char) - 'a' + sid) % numChars) + 'a'
result += string(newChar)
}
return
} | [
0.3299507200717926,
-0.39917734265327454,
0.37367329001426697,
-0.10514956712722778,
-0.5839771628379822,
-1.1085774898529053,
-0.6239628195762634,
-0.06087185814976692,
0.9189611077308655,
-0.23149052262306213,
-0.05107533559203148,
0.47940677404403687,
-0.3198156952857971,
-1.00743472576... |
func countsAndChecksum(line string) (*charCounts, string, int) {
counts := new(charCounts)
checksum := ""
sectorId := 0
split := strings.Split(line, "-")
for i, code := range split {
if i == len(split)-1 {
cs := strings.FieldsFunc(code, func(r rune) bool { return r == '[' || r == ']' })
sectorId = c.ToInt... | [
0.8725982308387756,
-0.8975119590759277,
0.6598764657974243,
-0.18229486048221588,
0.5595431327819824,
-0.36937659978866577,
-0.19572040438652039,
0.09250566363334656,
0.1722586303949356,
-0.38955989480018616,
-0.7840341329574585,
0.06731366366147995,
0.5792098045349121,
0.3630742430686950... |
func (cc *charCounts) Add(c rune) {
for _, count := range cc.counts {
if count.char == c {
count.count++
return
}
}
newItem := new(charCount)
newItem.char, newItem.count = c, 1
cc.counts = append(cc.counts, newItem)
} | [
-0.18052609264850616,
-0.42821499705314636,
0.5923661589622498,
-0.3580757975578308,
0.18398098647594452,
0.08587107807397842,
-0.11915317177772522,
0.31490758061408997,
-0.3555207848548889,
-0.7995821237564087,
-0.26702675223350525,
0.8281329274177551,
0.31580913066864014,
0.5882104635238... |
func (cc *charCounts) Len() int {
return len(cc.counts)
} | [
1.2419700622558594,
-0.029931290075182915,
0.08974048495292664,
-0.5914883613586426,
0.2744758725166321,
-0.30179670453071594,
0.8799216151237488,
0.5857597589492798,
-0.4466104507446289,
-1.2788608074188232,
-0.6743634343147278,
0.7161681056022644,
0.5562011003494263,
-0.3650776743888855,... |
func (cc *charCounts) Less(i, j int) bool {
a, b := cc.counts[i], cc.counts[j]
if a.count == b.count {
return a.char < b.char
}
return a.count > b.count
} | [
0.6035031676292419,
-0.5067020654678345,
0.38865119218826294,
-0.8851425647735596,
-0.48809897899627686,
-0.11380088329315186,
-0.16158568859100342,
-1.5977303981781006,
-0.8777269721031189,
-0.9322658181190491,
-0.1774289757013321,
0.20146486163139343,
-0.408054918050766,
0.08117610961198... |
func (cc *charCounts) Swap(i, j int) {
cc.counts[i], cc.counts[j] = cc.counts[j], cc.counts[i]
} | [
-0.5944520235061646,
-0.5497807264328003,
0.33324775099754333,
-0.7571545839309692,
0.04435685649514198,
0.43471136689186096,
-0.066115602850914,
0.14883489906787872,
-0.9150390625,
-0.7837454676628113,
-0.273120641708374,
1.1959359645843506,
0.2646244168281555,
-0.9809902310371399,
1.02... |
func (decoder Decoder) ParseCriteriaFromYAML(r io.Reader, c *Criteria) error {
decoder.Logger.Printf("parsing criteria from reader\n")
err := yaml.NewDecoder(r).Decode(c)
if err != nil {
decoder.Logger.Printf("error decoding criteria from reader: %v\n", err)
return err
}
for i := range c.Routes {
if c.Routes... | [
0.40174341201782227,
-1.302676796913147,
0.8252509832382202,
0.0036286076065152884,
0.13839948177337646,
-0.7792388796806335,
0.2936077117919922,
0.9565748572349548,
0.13883276283740997,
-0.013200480490922928,
0.025302955880761147,
0.015871761366724968,
0.029021495953202248,
0.780166506767... |
func NewCriteriaDecoder(logger *log.Logger) Decoder {
return Decoder{
Logger: logger,
}
} | [
0.27558955550193787,
-1.0829483270645142,
0.2343038022518158,
-0.4236157536506653,
-1.4137331247329712,
-0.3355799913406372,
-1.2289904356002808,
0.6419347524642944,
0.265277236700058,
-0.3493482172489166,
0.47365307807922363,
0.980605959892273,
-0.27284881472587585,
0.6238537430763245,
... |
func MatchesHTTPMethod(text string) bool {
return len(MatchHTTPMethod(text)) > 0
} | [
-0.3541100323200226,
0.0876409262418747,
0.262965589761734,
0.393911212682724,
-0.7382552623748779,
-0.09600625187158585,
-0.5747318267822266,
-0.2808135747909546,
-0.7710223197937012,
0.03754069656133652,
-0.045650266110897064,
-0.6386093497276306,
-0.9686560034751892,
0.6566441059112549,... |
func MatchHTTPMethod(text string) string {
httpMethodName := strings.ToUpper(text)
for i := range httpMethods {
m := httpMethods[i]
if strings.Contains(httpMethodName, m) {
return m
}
}
return ""
} | [
0.15995678305625916,
-0.5965436100959778,
0.7118632793426514,
0.17580214142799377,
-1.024747610092163,
0.149565190076828,
-0.22192971408367157,
-0.8536476492881775,
-0.5426042079925537,
0.5146868824958801,
0.6876211762428284,
0.05591190978884697,
-1.1957221031188965,
0.6101043224334717,
... |
func Convert(number int) string {
var raindropSpeak bytes.Buffer
if (number % 3) == 0 {
raindropSpeak.WriteString("Pling")
}
if (number % 5) == 0 {
raindropSpeak.WriteString("Plang")
}
if (number % 7) == 0 {
raindropSpeak.WriteString("Plong")
}
if len(raindropSpeak.String()) == 0 {
raindropSpeak.WriteSt... | [
-0.9004420638084412,
0.16363711655139923,
0.9543450474739075,
-0.6787870526313782,
-0.3223043382167816,
0.8992931246757507,
-0.10595269501209259,
-0.7477298378944397,
0.994907557964325,
0.4602160155773163,
-0.2158113420009613,
-0.14550283551216125,
-0.13935454189777374,
-0.0901362150907516... |
func setupParticleAdaptorMockApi(m *Manager, b base) (*mockParticleApi, *particleAdapter) {
mockApi := newMockParticleApi()
// This must be kept in sync with newParticleAdapter, especially the URL used.
watch, e := b.status.WatchForUpdate(b.adapterUrl + "/core/*/*")
if e != nil {
panic(e)
}
// Create an star... | [
-0.4684171676635742,
-1.5907963514328003,
0.4094408452510834,
0.08297645300626755,
-0.396287202835083,
-0.14981909096240997,
0.589465320110321,
0.24531033635139465,
0.6910821795463562,
0.5064308643341064,
-0.08967743813991547,
0.040514759719371796,
-0.5209296941757202,
0.38592758774757385,... |
func NewRootResource(api API) *RootResource {
return &RootResource{Resource: "api", Name: api.Name}
} | [
0.07969667762517929,
-1.2437975406646729,
0.025034477934241295,
-0.09354237467050552,
-1.5054959058761597,
-0.44779717922210693,
-0.9253668785095215,
-0.15068568289279938,
1.023890733718872,
0.42240744829177856,
-0.2212654948234558,
0.3323247730731964,
-0.9301248788833618,
0.73191863298416... |
func NewEndpointResource(e Endpointer) EndpointResource {
return EndpointResource{
Resource: "endpoint",
Name: e.GetName(),
Path: e.GetPath(),
MethodsList: GetMethodsList(e),
Methods: GetMethods(e),
MediaTypesList: GetContentTypesList(hAPI, e),
MediaTypes: GetConte... | [
-0.44809189438819885,
-0.6981923580169678,
0.26872438192367554,
0.42367324233055115,
-1.0332785844802856,
-0.13168427348136902,
-0.5277603268623352,
0.8451433777809143,
0.24292469024658203,
0.7905986905097961,
0.044822946190834045,
-1.0241894721984863,
-0.672205924987793,
0.745644152164459... |
func NewEndpointResourceParam(p parsedParam) EndpointResourceParam {
return EndpointResourceParam{
Name: p.Name,
Desc: p.Desc,
Allowed: p.Allowed,
AllowedList: p.AllowedList(),
Required: p.Required,
RequiredList: p.RequiredList(),
}
} | [
-0.2615763247013092,
-0.8677319288253784,
0.31924447417259216,
-0.4997026324272156,
-0.4720483124256134,
0.9778352975845337,
-0.2610660195350647,
0.7567117810249329,
-0.013407392427325249,
0.5679411888122559,
0.14987468719482422,
-0.3696800172328949,
-0.9643808603286743,
0.0853967517614364... |
func (root *RootResource) AddEndpoint(e Endpointer) {
root.Endpoints = append(root.Endpoints, NewEndpointResource(e))
} | [
-0.15000225603580475,
-0.7768354415893555,
0.4950103759765625,
1.2329895496368408,
0.00230506737716496,
0.8916362524032593,
-0.586530327796936,
0.7241359949111938,
0.611066997051239,
-0.4311475455760956,
0.3454466164112091,
-0.5768025517463684,
-0.3788037896156311,
1.345434546470642,
-0.... |
func (root *RootResource) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
Respond(rw, r, 200, root)
} | [
0.4494728147983551,
-1.0230084657669067,
0.3235032260417938,
0.4089946746826172,
-0.7431597113609314,
0.6479268074035645,
0.25352293252944946,
-0.15361706912517548,
-0.11757729202508926,
0.5902412533760071,
0.250118225812912,
0.04319128394126892,
-0.4825810492038727,
0.9179825186729431,
... |
func (s *Server) DumpUptime() string {
return time.Since(s.startTime).String()
} | [
-0.8594481348991394,
-0.365547239780426,
0.7681789398193359,
-0.37780308723449707,
-0.5540282726287842,
0.28016605973243713,
-0.5704312324523926,
0.3996920883655548,
0.1240324005484581,
0.6577956676483154,
-0.5397474765777588,
0.021866559982299805,
-0.7416754364967346,
0.37946200370788574,... |
func (s *Server) getNodes() (nodeMap, error) {
scopedLog := log
if s.CiliumURI != "" {
scopedLog = log.WithField("URI", s.CiliumURI)
}
scopedLog.Debug("Sending request for /healthz ...")
resp, err := s.Daemon.GetHealthz(nil)
if err != nil {
return nil, fmt.Errorf("unable to get agent health: %s", err)
}
lo... | [
-0.6641300320625305,
-0.6718950271606445,
0.7040885090827942,
-0.487378865480423,
0.7519387006759644,
-0.9585901498794556,
-0.10494817793369293,
0.1643955111503601,
0.21570013463497162,
0.2956065535545349,
-0.2071773260831833,
0.6878687739372253,
-0.33746257424354553,
0.3913848400115967,
... |
func (s *Server) updateCluster(report *healthReport) {
s.Lock()
defer s.Unlock()
if s.connectivity.startTime.Before(report.startTime) {
s.connectivity = report
}
} | [
0.18412773311138153,
-0.32948747277259827,
0.2368442416191101,
-0.07945398986339569,
0.317813903093338,
0.39331284165382385,
0.2627871632575989,
0.3407020568847656,
0.051253557205200195,
-0.26846182346343994,
0.6516517400741577,
0.7449710369110107,
-1.1830365657806396,
0.5723336338996887,
... |
func (s *Server) GetStatusResponse() *healthModels.HealthStatusResponse {
s.RLock()
defer s.RUnlock()
var name string
// Check if localStatus is populated already. If not, the name is empty
if s.localStatus != nil {
name = s.localStatus.Name
}
return &healthModels.HealthStatusResponse{
Local: &healthModels... | [
-0.07869081199169159,
-1.0786114931106567,
0.3899369537830353,
-0.10778884589672089,
0.2103835642337799,
-0.44491931796073914,
-0.5628976821899414,
0.12859892845153809,
0.9557735323905945,
0.1570332795381546,
-1.1764209270477295,
-0.022328490391373634,
-0.5706034302711487,
0.32893046736717... |
func (s *Server) FetchStatusResponse() (*healthModels.HealthStatusResponse, error) {
nodes, err := s.getNodes()
if err != nil {
return nil, err
}
prober := newProber(s, nodes)
if err := prober.Run(); err != nil {
log.WithError(err).Info("Failed to run ping")
return nil, err
}
log.Debug("Run complete")
s.... | [
-0.15021049976348877,
-0.4280834197998047,
0.46696218848228455,
0.42497166991233826,
0.08218592405319214,
-0.04413042590022087,
0.3152017295360565,
-0.31650683283805847,
0.9305471777915955,
0.747808039188385,
-0.726627767086029,
-0.20180606842041016,
-0.647392213344574,
0.4201386868953705,... |
func (s *Server) runActiveServices() error {
// Run it once at the start so we get some initial status
s.FetchStatusResponse()
nodes, _ := s.getNodes()
prober := newProber(s, nodes)
prober.MaxRTT = s.ProbeInterval
prober.OnIdle = func() {
// Fetch results and update set of nodes to probe every
// ProbeInterv... | [
-0.6467829346656799,
-0.740290641784668,
0.5314956903457642,
-0.2503816783428192,
-0.20753270387649536,
-0.017618142068386078,
0.4632662236690521,
-0.654575765132904,
0.17709477245807648,
0.008831946179270744,
0.4359937012195587,
-0.6245805025100708,
-1.2299612760543823,
0.0001978926593437... |
func (s *Server) Serve() (err error) {
errors := make(chan error)
for i := range s.tcpServers {
srv := s.tcpServers[i]
go func() {
errors <- srv.Serve()
}()
}
if !s.Config.Passive {
go func() {
errors <- s.runActiveServices()
}()
}
// Block for the first error, then return.
err = <-errors
ret... | [
-0.6379315257072449,
-0.12637808918952942,
0.4446529448032379,
-0.04347619041800499,
0.5801905989646912,
0.36682718992233276,
0.4026539921760559,
-0.6164973378181458,
-0.49173444509506226,
0.04314190149307251,
-0.38800033926963806,
-0.5283206105232239,
-0.19327408075332642,
0.6275533437728... |
func (s *Server) Shutdown() {
for i := range s.tcpServers {
s.tcpServers[i].Shutdown()
}
if !s.Config.Passive {
s.Server.Shutdown()
}
} | [
-0.9578393697738647,
-0.1795373409986496,
0.4413314461708069,
0.09220325946807861,
0.7890807390213013,
1.1337414979934692,
0.28897824883461,
0.27493640780448914,
0.5894446969032288,
0.4216756522655487,
-0.3728974759578705,
-0.17804311215877533,
-0.6809884309768677,
0.6058317422866821,
0.... |
func (s *Server) newServer(spec *loads.Document, tcpPort int) *healthApi.Server {
api := restapi.NewCiliumHealthAPI(spec)
api.Logger = log.Printf
// /hello
api.GetHelloHandler = NewGetHelloHandler(s)
if enableAPI(s.Config.Admin, tcpPort) {
api.GetHealthzHandler = NewGetHealthzHandler(s)
api.ConnectivityGetSt... | [
-0.3133813738822937,
-1.0961568355560303,
0.6919105648994446,
-0.3268061578273773,
0.3653261363506317,
0.6027442812919617,
0.07616809755563736,
0.571135401725769,
0.5192444920539856,
-0.34578466415405273,
-0.2596805691719055,
0.3612230718135834,
-0.6868248581886292,
0.9745838046073914,
0... |
func NewServer(config Config) (*Server, error) {
server := &Server{
startTime: time.Now(),
Config: config,
tcpServers: []*healthApi.Server{},
connectivity: &healthReport{},
}
swaggerSpec, err := loads.Analyzed(healthApi.SwaggerJSON, "")
if err != nil {
return nil, err
}
if !config.Passive {... | [
-0.046195510774850845,
-0.7415714263916016,
0.5973072648048401,
-0.15849804878234863,
0.6247957348823547,
0.3970804512500763,
0.3440747559070587,
0.684493362903595,
0.32911089062690735,
-0.12135657668113708,
-0.03312090039253235,
-0.07979725301265717,
-0.3028399646282196,
0.374344944953918... |
func Bootstrap(in *ContextIn) *ContextOut {
// transform middleware slice
middlewares := make([]mux.MiddlewareFunc, len(in.MiddlewaresToRegister))
for i, middleware := range in.MiddlewaresToRegister {
middlewares[i] = middleware
}
out := &ContextOut{}
out.Server = &server{
port: in.Port,
routes: ... | [
0.13829317688941956,
0.5340612530708313,
0.4059666097164154,
0.0031742644496262074,
-0.4234485626220703,
-0.8002044558525085,
0.1004779115319252,
0.7827600240707397,
0.6737465262413025,
0.5637558698654175,
-0.20161129534244537,
0.8917908668518066,
-0.7599871158599854,
-0.04747190326452255,... |
func Transformers(arr ...[]Transformer) []Transformer {
var out []Transformer
for _, a := range arr {
out = append(out, a...)
}
return out
} | [
-0.9165149331092834,
-0.6273036003112793,
0.29758769273757935,
0.34867265820503235,
0.08000783622264862,
-0.16206802427768707,
-0.5874950289726257,
0.00794325303286314,
0.04593382030725479,
-0.7768357396125793,
-0.9016619324684143,
0.04342840239405632,
0.0672798678278923,
0.609607458114624... |
func (f TransformFunc) Do(n nodes.Node) (nodes.Node, error) {
var last error
nn, ok := nodes.Apply(n, func(n nodes.Node) (nodes.Node, bool) {
nn, ok, err := f(n)
if err != nil {
last = err
return n, false
} else if !ok {
return n, false
}
return nn, ok
})
if ok {
return nn, last
}
return n, l... | [
-0.2675141990184784,
0.9449020028114319,
0.7294602394104004,
-0.8978244066238403,
0.910582959651947,
-0.36363962292671204,
-0.04834567382931709,
-0.10061287134885788,
-0.7748412489891052,
0.3132757246494293,
-0.7730138301849365,
0.5649020671844482,
0.45710715651512146,
-0.03173850476741791... |
func (f TransformObjFunc) Func() TransformFunc {
return TransformFunc(func(n nodes.Node) (nodes.Node, bool, error) {
obj, ok := n.(nodes.Object)
if !ok {
return n, false, nil
}
nn, ok, err := f(obj)
if err != nil {
return n, false, err
} else if !ok {
return n, false, nil
}
return nn, ok, nil
... | [
0.2686322331428528,
-0.36321333050727844,
0.5795044302940369,
-0.41540151834487915,
0.4221995174884796,
-0.2619379460811615,
1.2782199382781982,
0.1974131166934967,
-0.027413712814450264,
-0.06178972125053406,
-0.2578171491622925,
0.7192136645317078,
1.4678900241851807,
-0.8731504082679749... |
func (f TransformObjFunc) Do(n nodes.Node) (nodes.Node, error) {
return f.Func().Do(n)
} | [
-0.1265096664428711,
0.166804701089859,
0.356604665517807,
-0.3939446210861206,
0.5566859841346741,
-0.320305198431015,
0.4334274232387543,
-0.636946439743042,
-0.5730057954788208,
-0.09478547424077988,
-0.7611044645309448,
0.9116074442863464,
1.4857902526855469,
-0.3753439784049988,
-0.... |
func Map(src, dst Op) Mapping {
return mapping{src: src, dst: dst}
} | [
-1.3809640407562256,
0.3689984381198883,
0.4340462386608124,
-0.11767350882291794,
-1.7024272680282593,
0.5596215724945068,
0.0810595229268074,
0.5615730881690979,
0.9303191304206848,
0.6169593930244446,
0.11460534483194351,
-0.26016607880592346,
1.6028634309768677,
-1.1229040622711182,
... |
func Reverse(m Mapping) Mapping {
src, dst := m.Mapping()
return Map(dst, src)
} | [
-1.4598346948623657,
0.8866713047027588,
0.7201817035675049,
0.2118026614189148,
-1.2714835405349731,
-0.3342197835445404,
-0.0719297006726265,
1.3526875972747803,
-0.608606219291687,
-0.5163869261741638,
0.07013950496912003,
-0.22567588090896606,
0.38811424374580383,
-0.5318381190299988,
... |
func Mappings(maps ...Mapping) Transformer {
if len(maps) == 0 {
return mappings{}
}
mp := mappings{
all: maps,
}
if optimizeCheck {
mp.byKind = make(map[nodes.Kind][]Mapping)
mp.index()
}
return mp
} | [
-1.2044943571090698,
0.5721636414527893,
0.45757168531417847,
0.5292437076568604,
-0.3306223154067993,
-0.45102575421333313,
-0.40858930349349976,
0.5202605128288269,
-0.04884374141693115,
-0.3733063042163849,
0.2648717761039734,
-0.24013890326023102,
-0.10546219348907471,
-0.2628450691699... |
func NewState() *State {
return &State{}
} | [
0.6202861070632935,
-0.4907008111476898,
0.08833454549312592,
0.3856929838657379,
-1.0968505144119263,
-0.34687963128089905,
0.05056295543909073,
-0.3370825946331024,
0.5919800400733948,
-1.0808740854263306,
0.030696846544742584,
0.4462401270866394,
-0.6137378215789795,
-0.0844940319657325... |
func (st *State) Reset() {
st.vars = nil
st.unused = nil
st.states = nil
} | [
-0.6232394576072693,
0.08633001148700714,
-0.16034160554409027,
-0.874000072479248,
0.04303722083568573,
-0.6875656843185425,
0.7042187452316284,
-0.7434730529785156,
-0.0440564900636673,
-0.035297941416502,
-0.8532043695449829,
0.27323246002197266,
0.3489839434623718,
-0.23077429831027985... |
func (st *State) Validate() error {
if len(st.unused) == 0 {
return nil
}
names := make([]string, 0, len(st.unused))
for name := range st.unused {
names = append(names, name)
}
sort.Strings(names)
return ErrVariableUnused.New(names)
} | [
-0.5209553837776184,
0.26686206459999084,
0.556794285774231,
-1.0744401216506958,
0.11865710467100143,
-0.6228285431861877,
-0.18115316331386566,
-1.0541024208068848,
-0.027060264721512794,
0.31032073497772217,
0.29290685057640076,
0.09183947741985321,
-0.008870813064277172,
0.491788089275... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.