text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (i *IClone) TryGet(key string) (interface{}, bool) { i.IContainer.mutex.RLock() v, ok := i.IContainer.data[key] if !ok { // If no key-value association exists, release the read-lock // and return negative i.IContainer.mutex.RUnlock() return nil, false } if v.obj == nil { // if a factory function w...
[ -0.7435328364372253, 0.08529355376958847, 1.0226294994354248, -0.4394729435443878, 0.1519857496023178, -0.7177770733833313, 0.12876395881175995, -0.40536758303642273, -0.3127302825450897, 0.21076269447803497, 0.7522779703140259, 0.05124013498425484, -1.0101702213287354, 0.1593352109193802,...
func (i *IClone) Delete(key string) { i.IContainer.Delete(key) i.mutex.Lock() defer i.mutex.Unlock() delete(i.threadData, key) }
[ -0.20734654366970062, 0.9995470643043518, 0.3200783133506775, 0.13419018685817719, -0.028204407542943954, -0.09634750336408615, 0.5111085772514343, -0.07906664907932281, -0.3035856783390045, 0.8222991824150085, -0.0686701238155365, -0.38965994119644165, -1.6532433032989502, -0.506620287895...
func (i *IClone) Clear() { i.IContainer.Clear() i.mutex.Lock() defer i.mutex.Unlock() i.threadData = make(map[string]interface{}) }
[ -0.45219185948371887, 0.6939741969108582, 0.34915056824684143, -0.1023470014333725, -0.2601477801799774, 0.44047340750694275, 0.2210378348827362, -0.7606915831565857, -0.6748664975166321, 0.16277937591075897, 0.11293429881334305, 0.22394458949565887, -0.6042611598968506, -0.580829501152038...
func (r readOnlyInjections) Get(key string) interface{} { v, _ := r.TryGet(key) return v }
[ -1.2180675268173218, 0.5790143609046936, 0.2775009274482727, -0.5610672235488892, -0.5078540444374084, -1.0967007875442505, -0.4893309473991394, -0.8159683346748352, 0.08162235468626022, 0.38952872157096863, 0.513921320438385, 0.7937210202217102, -0.8806254863739014, -0.771050751209259, ...
func (r readOnlyInjections) TryGet(key string) (interface{}, bool) { v, ok := r.IContainer.data[key] if !ok { return nil, false } if v.obj != nil { return v.obj, true } if r.threadData != nil { if v, ok := r.threadData[key]; ok { return v, true } } return nil, false }
[ -0.9571056365966797, 0.29250603914260864, 0.886969804763794, -0.9216946363449097, 0.18418656289577484, -0.6449692249298096, -0.747709333896637, -1.2088648080825806, -0.22956140339374542, 0.21960119903087616, -0.05739656090736389, 0.22220785915851593, -0.9150857925415039, -0.431626617908477...
func NewPostparrotParrotpayload() *serviceparrot.Parrotpayload { return &serviceparrot.Parrotpayload{} }
[ -0.014800138771533966, -0.4116048216819763, 0.36539071798324585, -0.4192648231983185, -1.6614519357681274, 0.8604806661605835, -0.6500786542892456, -0.9237098097801208, -0.8057541847229004, -0.7626312971115112, -0.9376974701881409, 0.030590558424592018, -1.8361421823501587, -0.397116005420...
func NewListaparrotPayload(body *ListaparrotRequestBody) *serviceparrot.ListaparrotPayload { v := &serviceparrot.ListaparrotPayload{ ID: *body.ID, } return v }
[ -0.339419960975647, -0.3051460087299347, 0.42678114771842957, -0.37574172019958496, -0.5591440796852112, 0.15261338651180267, -1.3928884267807007, -0.3136138319969177, 0.6605687737464905, 0.31015294790267944, -0.6816727519035339, -0.3183981478214264, -0.5646559000015259, 0.7219570279121399...
func ValidateListaparrotRequestBody(body *ListaparrotRequestBody) (err error) { if body.ID == nil { err = goa.MergeErrors(err, goa.MissingFieldError("id", "body")) } if body.ID != nil { if utf8.RuneCountInString(*body.ID) < 1 { err = goa.MergeErrors(err, goa.InvalidLengthError("body.id", *body.ID, utf8.RuneCo...
[ -0.5856380462646484, -0.6837278008460999, 0.5256865620613098, -0.4767080545425415, 0.26892945170402527, 0.8225897550582886, -0.9362471699714661, -0.07220545411109924, 0.5692365765571594, 0.12847979366779327, -0.2861514091491699, 0.05175730958580971, -1.0681003332138062, 1.0180069208145142,...
func ExampleConnect() { errChan := make(chan error) opts := &Options{ Username: "username", Password: "password", } // connect to the server conn, err := Connect("ws://localhost:9191/channel", opts, errChan) if err != nil { log.Printf("connect failed: %s", err) return } // disconnect from the server ...
[ 0.25480034947395325, -0.6182075142860413, 0.5950105786323547, -0.5460763573646545, -0.2070719450712204, -0.25046980381011963, -0.529480516910553, -0.12049830704927444, -0.2885321080684662, 0.35067418217658997, -0.08426881581544876, 1.1223227977752686, 0.2221578061580658, -0.241397231817245...
func ExampleConnection_Reconnect() { // connect to the server conn, err := Connect("ws://localhost:9191/channel", nil, nil) if err != nil { log.Printf("connect failed: %s", err) return } // disconnect from the server when done with the connection defer conn.Disconnect() // disconnect from the server conn....
[ 0.20799654722213745, -0.6581108570098877, 0.6476234197616577, 0.16975030303001404, -0.04053068906068802, -1.256101131439209, -0.21015521883964539, 0.45508331060409546, -0.1959267556667328, 0.10527729243040085, -0.5238485336303711, 0.9362754821777344, 0.27208051085472107, -0.422534763813018...
func ExampleConnection_SubscribeAsync() { errChan := make(chan error) // connect to the server conn, err := Connect("ws://localhost:9191/channel", nil, errChan) if err != nil { log.Printf("connect failed: %s", err) return } // disconnect from the server when done with the connection defer conn.Disconnect()...
[ 0.3816174864768982, -0.32855746150016785, 0.9359841346740723, -0.21069754660129547, -0.23644664883613586, -0.5152856707572937, -0.329473078250885, -0.1120535284280777, -0.41588521003723145, -0.005939148366451263, -0.766571044921875, 0.47591474652290344, -0.0218441653996706, 0.0427651256322...
func count(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { w.WriteHeader(http.StatusMethodNotAllowed) return } w.Header().Set("Access-Control-Allow-Origin", "http://www.malaysia-ikea.com") if n, err := store.CountEntries(); err != nil { w.WriteHeader(http.StatusInternalServerError) } else ...
[ 0.12067665904760361, 0.17727114260196686, 0.6802635788917542, 0.0864248275756836, -0.14503121376037598, 0.27170923352241516, 0.5868578553199768, 0.04684817045927048, -0.4916097819805145, 0.12438956648111343, 0.4398229718208313, -0.2523345947265625, 0.18567754328250885, 0.8783597350120544, ...
func startPageHandler(w http.ResponseWriter, r *http.Request) { err := templates.ExecuteTemplate(w, "start.html", templateData{}) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) } }
[ 0.2044285386800766, -0.344027578830719, 0.6771658062934875, 0.43138495087623596, -0.42145684361457825, 0.9594724774360657, 1.014407753944397, 0.941660463809967, -0.3197079598903656, 0.46638986468315125, 0.7128465175628662, -0.4890776574611664, -0.7682716250419617, 0.260943740606308, -0.0...
func main() { db, err := sql.Open("sqlite3", "connect-sessions.db?cache=share&mode=twc&_foreign_keys=1&_journal_mode=wal") if err != nil { panic(err) } config := goconnect.NewDefaultConfig(goconnect.ClientConfig{ Host: goconnect.StagingHost, ClientID: "telenordigital-conn...
[ -0.19854117929935455, 0.08809224516153336, 0.5893163681030273, 0.41698312759399414, 0.07241825014352798, 0.12980911135673523, 0.03726494312286377, 0.3186950981616974, 0.09888620674610138, 0.5190491080284119, 0.39972183108329773, -0.8949650526046753, 0.14269520342350006, -0.0862388536334037...
func init() { fs := &flag.FlagSet{} klog.InitFlags(fs) kf := strings.Split(os.Getenv("KLOG_FLAGS"), " ") fs.Parse(kf) }
[ 1.281531810760498, -0.20582878589630127, 0.5398492813110352, 0.15350636839866638, -0.20208579301834106, 0.6958437561988831, -0.7524569034576416, 0.5646475553512573, -1.249887466430664, -0.019046736881136894, 0.21912886202335358, 0.9768602848052979, -0.04317641258239746, 0.9446598291397095,...
func (kr *KRun) initUsingKubeConfig() error { // Explicit kube config - use it kc := os.Getenv("KUBECONFIG") if kc == "" { kc = os.Getenv("HOME") + "/.kube/config" } if _, err := os.Stat(kc); err == nil { cf, err := clientcmd.LoadFromFile(kc) //config := clientcmd.NewNonInteractiveClientConfig(cf, cf.Current...
[ 0.32371625304222107, -0.9904568195343018, 0.8112632632255554, -0.2843644917011261, -0.3420020639896393, 0.351123183965683, 0.09587613493204117, -0.13297021389007568, -0.9354930520057678, 0.7690942883491516, 0.22838807106018066, 0.31290093064308167, -0.5684530138969421, 1.0693941116333008, ...
func (kr *KRun) LoadConfig(ctx context.Context) error { err := kr.K8SClient(ctx) if err != nil { return err } // Load additional settings from env. kr.initFromEnv() // It is possible to have only one of the 2 mesh connector services installed if kr.XDSAddr == "" || kr.ProjectNumber == "" || (kr.MeshConnect...
[ 0.7538549900054932, 0.16581538319587708, 0.6781173348426819, 0.28624966740608215, 0.17300507426261902, 0.3228428363800049, -0.3966001868247986, 0.2909805178642273, 0.29731449484825134, 0.24345126748085022, 0.5040848255157471, 0.47831350564956665, -0.45035219192504883, 1.855542778968811, ...
func (kr *KRun) K8SClient(ctx context.Context) error { if kr.Client != nil { return nil } err := kr.initUsingKubeConfig() if err != nil { return err } err = kr.initInCluster() if err != nil { return err } if kr.VendorInit != nil { err = kr.VendorInit(ctx, kr) if err != nil { return err } } ...
[ 0.006094290409237146, -0.865927517414093, 0.3736884891986847, -0.21129253506660461, -0.2723659873008728, -0.40606915950775146, -0.3588693141937256, -0.9233629107475281, 0.1234157383441925, 0.45470619201660156, -0.01697811298072338, 0.849505603313446, -0.023132650181651115, 0.33014345169067...
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
[ 0.0017501392867416143, -0.48795756697654724, 0.11716366559267044, 0.41594451665878296, -0.170012965798378, -0.03253801167011261, -0.6646475195884705, 0.6134193539619446, 0.6766958832740784, -1.769515037536621, -0.099466972053051, -0.8924757242202759, -0.0530250146985054, 0.1281633079051971...
func pkgpath(p *types.Package) string { path := p.Path() name := p.Name() if path == "" || name == "main" { path = p.Name() } return path }
[ 0.021657662466168404, 0.6338546276092529, 0.5866987109184265, -0.09210801869630814, -0.6723655462265015, 0.7247211933135986, 0.31240710616111755, -0.7995815873146057, 0.20950397849082947, 1.170600414276123, 0.7601510882377625, -1.3127297163009644, -0.3949717581272125, 0.8739256858825684, ...
func (o *GetUserDetailsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetUserDetailsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil ...
[ 0.49014779925346375, -0.37750256061553955, 0.947883129119873, 0.6984224915504456, -0.05274394899606705, -0.49273931980133057, 0.11042530089616776, -0.4579782485961914, 0.41425105929374695, -0.1287066787481308, 0.36921459436416626, -0.15251754224300385, -1.180846929550171, -0.03781473636627...
func NewGetUserDetailsOK() *GetUserDetailsOK { return &GetUserDetailsOK{} }
[ 0.724722146987915, 0.20787206292152405, 0.14555113017559052, 1.3462084531784058, -0.45870131254196167, 0.42937928438186646, 1.07557213306427, 1.0355902910232544, -1.143664002418518, -0.29989737272262573, -0.4389808773994446, -0.7787697315216064, 0.8869591355323792, 0.46760037541389465, -...
func NewGetUserDetailsUnauthorized() *GetUserDetailsUnauthorized { return &GetUserDetailsUnauthorized{} }
[ -0.0947817862033844, -0.09107167273759842, 0.3706735074520111, 1.256539225578308, -1.0021212100982666, 0.24701863527297974, -0.0877915471792221, 1.092031717300415, -0.13257519900798798, -1.3674131631851196, -0.48135948181152344, 1.1794283390045166, -0.41192781925201416, -0.6038423776626587...
func NewGetUserDetailsForbidden() *GetUserDetailsForbidden { return &GetUserDetailsForbidden{} }
[ 0.9164254665374756, 0.6006141901016235, 0.21812422573566437, 1.4508979320526123, -0.5467463731765747, 1.1321971416473389, 0.6668522357940674, -0.4146101772785187, -0.5789547562599182, -1.1569910049438477, -0.06320358067750931, 0.9157125949859619, -0.5594716668128967, -0.9369403719902039, ...
func NewGetUserDetailsNotFound() *GetUserDetailsNotFound { return &GetUserDetailsNotFound{} }
[ 0.5972809195518494, -0.5901481509208679, -0.09151563048362732, 0.89504075050354, -0.3418022692203522, 1.182364821434021, 0.8041012287139893, 0.4400392174720764, 0.037629224359989166, -0.7951857447624207, -0.20754456520080566, 0.6349390745162964, -0.3940269649028778, -0.15799663960933685, ...
func NewGetUserDetailsDefault(code int) *GetUserDetailsDefault { return &GetUserDetailsDefault{ _statusCode: code, } }
[ 0.6030247211456299, 0.8496545553207397, 0.07832064479589462, 0.8858340978622437, 1.1446892023086548, 0.3173598349094391, 0.22178298234939575, 0.5023611783981323, 0.023664938285946846, -0.39873963594436646, -0.7695382237434387, -0.13000185787677765, -0.7710781097412109, -0.10265123099088669...
func (o *GetUserDetailsDefault) Code() int { return o._statusCode }
[ 0.7887051105499268, 0.8006541132926941, 0.2626796066761017, 1.211409568786621, 0.6739810109138489, 0.44171202182769775, 0.19993843138217926, 0.8482540845870972, -0.08769582211971283, -0.6787449717521667, 0.056782983243465424, -0.06565289944410324, -0.5792933702468872, 0.4068652391433716, ...
func (client *Client) SearchEvents(request *SearchEventsRequest) (response *SearchEventsResponse, err error) { response = CreateSearchEventsResponse() err = client.DoAction(request, response) return }
[ -0.9476418495178223, 0.477998822927475, 0.21283036470413208, 0.7070333361625671, 0.5232221484184265, -0.6492329239845276, 0.5972670316696167, -0.9031591415405273, 0.8238452076911926, -0.4636469781398773, -0.7268310785293579, 0.749042809009552, -0.9591783285140991, -0.35303419828414917, 0...
func (client *Client) SearchEventsWithChan(request *SearchEventsRequest) (<-chan *SearchEventsResponse, <-chan error) { responseChan := make(chan *SearchEventsResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(errChan) response, err := client.S...
[ -0.7364416718482971, -0.15671861171722412, 0.6723316311836243, -0.19944117963314056, -0.21403902769088745, -0.7701011300086975, 0.33383870124816895, -1.294165015220642, 0.5357609391212463, -0.07008466124534607, -0.18210799992084503, 0.7166109085083008, -0.5744014382362366, 0.16546429693698...
func (client *Client) SearchEventsWithCallback(request *SearchEventsRequest, callback func(response *SearchEventsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *SearchEventsResponse var err error defer close(result) response, err = client.Search...
[ -0.6418110728263855, 0.30447688698768616, 0.8874920010566711, 0.074947789311409, -0.35097527503967285, -1.0246509313583374, 0.5024043917655945, -0.9673779010772705, 1.165973424911499, -0.25603535771369934, 0.06141810491681099, -0.24085986614227295, -0.2583589553833008, 0.14548321068286896,...
func CreateSearchEventsRequest() (request *SearchEventsRequest) { request = &SearchEventsRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("ARMS", "2019-08-08", "SearchEvents", "arms", "openAPI") request.Method = requests.POST return }
[ -0.19380590319633484, -0.3672739267349243, 0.43379583954811096, -0.21376390755176544, 0.6611838340759277, -0.19287653267383575, -0.4280186593532562, -0.7481961846351624, 0.15545843541622162, -0.48071107268333435, -0.2410464584827423, 0.6929975152015686, -0.4162823259830475, 0.3481739461421...
func CreateSearchEventsResponse() (response *SearchEventsResponse) { response = &SearchEventsResponse{ BaseResponse: &responses.BaseResponse{}, } return }
[ -0.26122185587882996, -1.0686923265457153, 0.1334821879863739, 0.018354667350649834, 0.3040378987789154, -0.7596128582954407, 0.47525161504745483, -0.8580282926559448, 1.38053560256958, -0.03660554438829422, -1.0369551181793213, -0.464999258518219, -1.2674524784088135, -0.2764647603034973,...
func (frm entryForm) Validate() (map[string]string, bool) { errs := map[string]string{} g1 := frm.Department != "" if !g1 { errs["department"] = "Missing department" } g2 := frm.CheckThis if !g2 { errs["check_this"] = "You need to comply" } g3 := frm.Items != "" if !g3 { errs["items"] = "No items" } re...
[ -0.6489013433456421, -0.13463303446769714, 0.6790058612823486, -0.562057375907898, 0.32560473680496216, 0.16021989285945892, -0.66132652759552, 0.25470462441444397, -0.8214199542999268, -0.30560892820358276, -0.4941447079181671, -0.716488242149353, -0.005190576892346144, 0.6555845737457275...
func FormH(w http.ResponseWriter, req *http.Request) { w.Header().Add("Content-Type", "text/html") s2f := New() s2f.ShowHeadline = true s2f.FocusFirstError = true s2f.SetOptions("department", []string{"ub", "fm"}, []string{"UB", "FM"}) s2f.SetOptions("items2", []string{"anton", "berta", "caesar", "dora"}, []str...
[ -0.3808186948299408, -0.2501714825630188, 0.8947721123695374, 0.24682140350341797, -0.07691432535648346, 0.22060135006904602, 0.11483816057443619, 0.15706345438957214, -0.8548160791397095, -0.7760488986968994, -0.3466081917285919, 0.28438276052474976, 0.568403422832489, 1.0362598896026611,...
func PeriodGET(w http.ResponseWriter, r *http.Request) { sess := model.Instance(r) lisPeriods, _ := model.Periods() v := view.New(r) v.Name = "periodo/period" v.Vars["token"] = csrfbanana.Token(w, r, sess) v.Vars["LisPeriods"] = lisPeriods // Refill any form fields // view.Repopulate([]string{...
[ -0.3008060157299042, -0.1983315646648407, 0.5269518494606018, -0.16862064599990845, -0.28035449981689453, 0.2435198724269867, -0.24133431911468506, 0.10790879279375076, 0.8136407136917114, -0.7127333879470825, 0.6990345120429993, 0.39694419503211975, 0.01611073687672615, -0.170549452304840...
func PeriodPOST(w http.ResponseWriter, r *http.Request) { var period model.Periodo sess := model.Instance(r) action := r.FormValue("action") if ! (strings.Compare(action,"Cancelar") == 0) { if validate, missingField := view.Validate(r, []string{"inicio"}); !validate { ...
[ -0.12126795947551727, 0.015917308628559113, 0.920734703540802, 1.2482435703277588, 0.11091636121273041, 1.022207260131836, 0.24166294932365417, 0.45362573862075806, 0.7060415744781494, -0.02464103326201439, -0.1690366268157959, -0.48129570484161377, -0.3123883903026581, 0.33802318572998047...
func PeriodUpGET(w http.ResponseWriter, r *http.Request) { sess := model.Instance(r) var period model.Periodo var params httprouter.Params params = context.Get(r, "params").(httprouter.Params) id,_ := atoi32(params.ByName("id")) period.Id = id path := "/period/list" err := (&pe...
[ -0.8495222330093384, -0.40111130475997925, 0.9383576512336731, 0.012295828200876713, 0.09519944339990616, 0.3961653709411621, -0.14748768508434296, 0.3946470022201538, 1.206128716468811, 0.4971560835838318, 0.09561729431152344, 0.4069162905216217, -0.2583754360675812, -0.30146288871765137,...
func PeriodUpPOST(w http.ResponseWriter, r *http.Request) { var err error var per, period model.Periodo sess := model.Instance(r) var params httprouter.Params params = context.Get(r, "params").(httprouter.Params) SId := params.ByName("id") id, _ := atoi32(SId) period.Id ...
[ -0.4734162986278534, -0.7020851969718933, 1.1309658288955688, 0.5916112661361694, -0.04004435986280441, 0.6210628747940063, 0.17685934901237488, 0.06598494201898575, 1.1099739074707031, 0.3864687383174896, 0.21768802404403687, -0.238138809800148, -0.3236703872680664, -0.09271752089262009, ...
func PeriodLisGET(w http.ResponseWriter, r *http.Request) { sess := model.Instance(r) lisPeriods, err := model.Periods() if err != nil { log.Println(err) sess.AddFlash(view.Flash{"Error Listando Periodos.", view.FlashError}) sess.Save(r, w) } v :...
[ 0.018625453114509583, -0.4632105529308319, 0.5790839791297913, 0.07840314507484436, -0.6361609697341919, 0.5469257831573486, -0.7493134140968323, 0.4589385390281677, 0.3269250988960266, -0.4601562023162842, 0.09049040079116821, 0.961257815361023, -0.17558909952640533, -0.04540609195828438,...
func PeriodDeleteGET(w http.ResponseWriter, r *http.Request) { sess := model.Instance(r) var period model.Periodo var params httprouter.Params params = context.Get(r, "params").(httprouter.Params) Id,_ := atoi32(params.ByName("id")) period.Id = Id path ...
[ -0.33478349447250366, -0.12413529306650162, 0.8651560544967651, 0.31392985582351685, 0.05869879946112633, 0.3152466416358948, -0.14023931324481964, 0.6021659970283508, 0.9435900449752808, 0.06935151666402817, 0.332926869392395, 0.6018097400665283, -0.2747749090194702, 0.017769865691661835,...
func PeriodDeletePOST(w http.ResponseWriter, r *http.Request) { var err error sess := model.Instance(r) var period model.Periodo var params httprouter.Params params = context.Get(r, "params").(httprouter.Params) Id,_ := atoi32(params.ByName("id")) period....
[ 0.43601590394973755, -0.14809182286262512, 0.8957047462463379, 1.012464165687561, -0.17854471504688263, 0.5721681118011475, 0.24575163424015045, 0.33151188492774963, 1.142469048500061, 0.3276698887348175, 0.11933516710996628, -0.24991342425346375, -0.32773706316947937, 0.27303454279899597,...
func (p *Parser) parseAInstruction(s string, i int) string { //strip the @ prefix s = s[1:] // Check for a numerical value v, err := toBinary(s) if err == nil { return v } // Check if the symbol is predefined v = lookupSymbol(s) if v != "" { val, _ := toBinary(v) return val } // Check if the symbol ...
[ -0.5509897470474243, 0.04795990139245987, 0.5179481506347656, -0.9138844013214111, -0.6796906590461731, -0.5925149917602539, 0.8264269828796387, 0.36252832412719727, 0.461255818605423, 0.19253236055374146, 0.5760039687156677, -0.0794745683670044, 0.2815185785293579, -0.5306993722915649, ...
func parseCInstruction(s string) string { ins := "111" var dest string var comp string var jump string first := strings.Split(s, "=") if len(first) > 1 { dest = lookupDest(first[0]) ind := strings.Index(s, "=") s = s[ind+1:] } else { dest = lookupDest("null") } second := strings.Split(s, ";") comp =...
[ 0.012130087241530418, -0.3816121816635132, 0.8776501417160034, -0.4085383713245392, -0.683704674243927, -0.9937065839767456, 0.752521276473999, 0.594133734703064, 0.38318392634391785, 0.43181246519088745, 0.0021930148359388113, -0.6555077433586121, -0.05140451714396477, -1.176459789276123,...
func (p *Parser) fillInVar(binary []string) []string { for _, key := range p.extraKeys { indices := p.extra[key] // Check for a label symbol val, ok := p.labels[key] if ok == true { v, _ := toBinary(val) for _, index := range indices { binary[index] = v } continue } // Assign a variable ...
[ -0.22557565569877625, -0.3195165693759918, 0.7728606462478638, -0.9871841669082642, -0.39080044627189636, 0.12515251338481903, -0.2449803501367569, -0.08243224024772644, -0.44903457164764404, 0.2737943232059479, -0.2200007140636444, 0.6956891417503357, -1.100172758102417, 0.600939989089965...
func noCompletions(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return nil, cobra.ShellCompDirectiveNoFileComp }
[ -0.1287427842617035, -0.825345516204834, 0.4088321626186371, -1.185255765914917, -0.23769061267375946, 0.19625195860862732, 1.0293920040130615, 0.11987706273794174, -0.4496460556983948, -0.5817179679870605, -0.16153255105018616, -1.0957082509994507, -0.4429425597190857, 0.7797809839248657,...
func ParseConfig() { flagSet := flag.NewFlagSet("goforward", flag.ExitOnError) flagSet.SetOutput(os.Stdout) srcPortPtr := flagSet.Int("sp", 0,"Source port for incoming connections. Required.") //here I was trying to create a shorter form of source port config option, while having the previous one be longer. the de...
[ 0.3318048417568207, -0.132834792137146, 0.9288946986198425, -0.9672891497612, 0.7856466174125671, 0.49992427229881287, 1.0645487308502197, -0.12816421687602997, -0.7562971711158752, -0.715660572052002, -0.22723905742168427, 0.4614967107772827, 0.21765320003032684, 0.6023853421211243, 0.3...
func (cr *ClonerReconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error) { log := pkglog.FromContext(ctx) // Get the Deployents or DaemonSet from the cache deployment := &appsv1.Deployment{} daemonset := &appsv1.DaemonSet{} kind := "Deployment" err := cr.Client.Get(ctx, req.N...
[ -0.9593499302864075, -0.08878696709871292, 0.6704477667808533, 0.1496177315711975, 0.14586874842643738, -0.969069242477417, -0.8997074961662292, 0.2819727063179016, 0.2385970801115036, 0.4796874225139618, 0.9732921123504639, -0.12020822614431381, -0.39351949095726013, 0.5895498991012573, ...
func Bool() Decoder { return newDecoder(func(b []byte) (interface{}, error) { var bl bool if err := json.Unmarshal(b, &bl); err != nil { return "", err } return bl, nil }) }
[ 0.7048959136009216, -0.5224648118019104, 0.5905320644378662, -0.3727692663669586, -1.1134527921676636, -0.3061688244342804, -0.8989900350570679, 0.888437032699585, -0.18764573335647583, 0.153320774435997, -0.34442099928855896, 0.4276265501976013, 0.2767261862754822, -0.754578709602356, 0...
func connection(conn net.Conn, in chan message, mDelim, fDelim byte) { var d []byte d = append(d, fDelim) r := make(chan []byte, 1024) reader := bufio.NewReader(conn) // write the responses back to the connection go func() { for m := range r { m = append(m, mDelim) _, err := conn.Write(m) if err != n...
[ -0.06283751875162125, -0.049260564148426056, 0.9248859882354736, -0.3522665202617645, -0.007803940214216709, 0.02936394140124321, -0.13662348687648773, 0.18808205425739288, -0.47566384077072144, 0.32196274399757385, 0.17342017590999603, -0.2509300708770752, -0.5714917778968811, -0.19821670...
func (s *fakeString) Stringer() string { return s.content }
[ 0.09746786206960678, -1.1263304948806763, 0.02668292261660099, -0.5731765627861023, -1.1094982624053955, 0.4107576012611389, 0.3620226979255676, -1.0994662046432495, 0.000234915321925655, -0.6231437921524048, -0.06928287446498871, 0.09667909145355225, -0.3104616105556488, 0.514721572399139...
func (m *ExcludedConditionItemID) UnmarshalJSON(raw []byte) error { // AO0 var dataAO0 struct { ID int64 `json:"id,omitempty"` } if err := swag.ReadJSON(raw, &dataAO0); err != nil { return err } m.ID = dataAO0.ID // AO1 var aO1 ExcludedConditionItem if err := swag.ReadJSON(raw, &aO1); err != nil { retu...
[ -0.21880100667476654, 0.006191089283674955, 0.3305186927318573, -0.7758371829986572, -0.8533089756965637, 0.6621365547180176, 0.164239764213562, 0.6523427367210388, 0.47570931911468506, 0.6411505341529846, -0.16730858385562897, -0.04698692634701729, -0.4433733820915222, 0.317319393157959, ...
func (m ExcludedConditionItemID) MarshalJSON() ([]byte, error) { _parts := make([][]byte, 0, 2) var dataAO0 struct { ID int64 `json:"id,omitempty"` } dataAO0.ID = m.ID jsonDataAO0, errAO0 := swag.WriteJSON(dataAO0) if errAO0 != nil { return nil, errAO0 } _parts = append(_parts, jsonDataAO0) aO1, err :=...
[ 0.07864119112491608, -0.47018370032310486, 0.21237964928150177, 0.13996247947216034, -0.3542982041835785, 0.4230940043926239, 0.19939592480659485, 0.5704389810562134, 0.6205087304115295, 0.26133230328559875, -0.18000851571559906, 0.4175625741481781, -0.8015222549438477, 0.7509589791297913,...
func (m *ExcludedConditionItemID) Validate(formats strfmt.Registry) error { var res []error // validation for a type composition with ExcludedConditionItem if err := m.ExcludedConditionItem.Validate(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res.....
[ -0.13127130270004272, -0.15469205379486084, 0.06183608993887901, 0.43774333596229553, -0.10653547197580338, 1.0099396705627441, 0.48623067140579224, 0.2815548777580261, -0.1496838480234146, 0.09027402102947235, 0.5760552287101746, -0.12723958492279053, -1.460729956626892, 0.649869740009307...
func New(h kore.Interface, config Config) (identity.Plugin, error) { // @step: verify the configuration if err := config.IsValid(); err != nil { return nil, err } log.Info("initializing the jwt authentication plugin") return &authImpl{Interface: h, config: config}, nil }
[ -0.249764084815979, -0.21552129089832306, 0.48335936665534973, 0.46736928820610046, -0.6440147161483765, -0.08823486417531967, -0.1723310649394989, 0.14708158373832703, 0.06654094159603119, 0.6520940065383911, -1.1163604259490967, 0.31255027651786804, -0.09021615982055664, 0.30228072404861...
func (o *authImpl) Admit(ctx context.Context, req identity.Requestor) (authentication.Identity, bool) { // @step: verify the authorization token bearer, found := utils.GetBearerToken(req.Headers().Get("Authorization")) if !found { return nil, false } id, err := func() (authentication.Identity, error) { // @s...
[ 0.32755497097969055, 0.28680330514907837, 0.9320134520530701, 0.0498012974858284, -0.7757011651992798, 0.28651729226112366, -0.13966266810894012, -0.7595110535621643, -0.49777886271476746, 0.722013533115387, 0.5061435103416443, 0.3105956017971039, -0.6993926763534546, 0.128594771027565, ...
func (o *authImpl) Name() string { return "jwt" }
[ -0.597046434879303, -0.21782121062278748, 0.6222183108329773, -0.030821697786450386, -1.7201087474822998, 0.2421255111694336, 0.28740251064300537, -0.35303014516830444, 0.48431041836738586, 1.7728544473648071, -1.6157859563827515, 0.11859730631113052, 0.9943179488182068, -0.026665782555937...
func Part1(s []string) int { var sum float64 for _, desc := range s { rp := newRectangularCuboid(desc) sum += rp.SurfaceArea() sum += rp.SmallestFace().Area() } return int(sum) }
[ 0.3320639431476593, 0.174699604511261, 0.44773587584495544, -0.062312476336956024, -0.40987467765808105, 0.0060274796560406685, 0.9292666912078857, 0.013212669640779495, 0.18098333477973938, 0.6439772844314575, -0.5608200430870056, -0.10314315557479858, -0.6212887167930603, 0.5135565996170...
func Part2(s []string) int { var sum float64 for _, desc := range s { rp := newRectangularCuboid(desc) sum += rp.Volume() sum += rp.SmallestFace().Perimeter() } return int(sum) }
[ 0.6337858438491821, -0.6584880352020264, 0.45911046862602234, -0.43685805797576904, -0.6789172887802124, -0.5132895708084106, -0.1682378202676773, -0.47331809997558594, 0.14112086594104767, 0.2994872033596039, -0.6093388199806213, -0.08568812161684036, -0.8841674327850342, 0.07643344253301...
func NewAccountHandler(sh repository.SQLHandler, ph interactor.PasswordHandler) AccountHandler { return &accountHandler{ AccountInteractor: interactor.NewAccountInteractor( repository.NewAccountRepository(sh), ph, ), } }
[ 0.2681327164173126, -0.49296340346336365, 0.08891502022743225, 0.33984845876693726, -0.53630131483078, 0.3570551872253418, 0.10046336054801941, 0.3896123766899109, 0.6067618131637573, 0.5370668768882751, 0.3194383382797241, -0.42429786920547485, -0.08486472815275192, 0.14273414015769958, ...
func NewRoot() *Root { return ExtendRoot(nil) }
[ 1.4884663820266724, 0.40374234318733215, 0.15151682496070862, 1.4708694219589233, -1.175762414932251, -0.29219841957092285, -0.18529550731182098, -0.38099566102027893, 1.118996024131775, -0.7136448621749878, -0.2066933959722519, 1.6017966270446777, -0.5430468320846558, 0.21272315084934235,...
func InternalNewRootAsBaseClass(jsiiID string) *Root { return &Root{ base: jsii.Base{ID: jsiiID}, Construct: InternalNewConstructAsBaseClass(jsiiID), } }
[ -0.9962879419326782, -0.9992453455924988, 0.3116176426410675, -0.0060111447237432, -0.7244263887405396, -0.7561508417129517, 0.023475132882595062, -1.4903379678726196, 0.935729444026947, 0.28742220997810364, -0.3426053822040558, 0.5066853165626526, 0.05203234776854515, 1.1063774824142456, ...
func ExtendRoot(overrides RootIface) *Root { jsiiID, err := jsii.GlobalRuntime.Client().Create( "jsii$cdk$0.0.0.Root", []interface{}{}, nil, ) if err != nil { panic("how are error handled?" + err.Error()) } return &Root{ base: jsii.Base{ID: jsiiID}, Construct: InternalNewConstructAsBaseClass(jsiiI...
[ 0.39810246229171753, 0.49334874749183655, 0.4761147201061249, 1.1035528182983398, -0.6387879252433777, -0.0020660378504544497, 0.1682296246290207, -0.7625507116317749, 1.2153096199035645, -0.4086475670337677, -0.5696285963058472, 0.6199063658714294, -0.5588566660881042, 0.8799158334732056,...
func NewMockUI(ctrl *gomock.Controller) *MockUI { mock := &MockUI{ctrl: ctrl} mock.recorder = &MockUIMockRecorder{mock} return mock }
[ 0.0313328318297863, 0.4507901668548584, 0.440951406955719, 0.5201393961906433, 0.11413092911243439, 0.2409294992685318, -0.05216192454099655, 0.09671230614185333, 0.21394619345664978, -0.2605653703212738, -0.6435355544090271, -0.007760372944176197, -0.993078351020813, 1.0111533403396606, ...
func (m *MockUI) EXPECT() *MockUIMockRecorder { return m.recorder }
[ 0.2174680083990097, 0.42717310786247253, 0.3291066288948059, 0.4913627505302429, -0.0982738509774208, 0.6512437462806702, -0.019732069224119186, 0.35817885398864746, 0.18374355137348175, -0.5868553519248962, 0.7421133518218994, 0.527822732925415, -1.0138205289840698, 0.9684286117553711, ...
func (m *MockUI) Confirm(arg0 string, arg1 bool) (bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Confirm", arg0, arg1) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.5580044388771057, -0.08395012468099594, 0.338991641998291, 0.9397801756858826, 0.9027726054191589, 0.15671123564243317, 0.305437296628952, -0.34290799498558044, -1.3998810052871704, 0.6210590600967407, -1.0003913640975952, -0.07603657990694046, 0.11438070237636566, 1.3400496244430542, ...
func (mr *MockUIMockRecorder) Confirm(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Confirm", reflect.TypeOf((*MockUI)(nil).Confirm), arg0, arg1) }
[ 0.2834526598453522, 0.561635434627533, 0.21425409615039825, 0.6009873151779175, 0.11840134859085083, 0.61376953125, -0.590627133846283, -1.1055318117141724, 0.022249849513173103, 0.5813072323799133, 0.2133180797100067, 0.8634240627288818, -0.5600453615188599, 1.7363805770874023, 0.061096...
func (m *MockUI) Input(arg0, arg1 string) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Input", arg0, arg1) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.6047660708427429, -0.26192861795425415, 0.5566831827163696, 0.3685934245586395, 0.32438504695892334, 0.7742611169815063, 0.948198676109314, -0.23904533684253693, -1.0457803010940552, -0.16108018159866333, -0.47506487369537354, 0.1683165729045868, -0.9206129908561707, 0.8782886266708374,...
func (mr *MockUIMockRecorder) Input(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Input", reflect.TypeOf((*MockUI)(nil).Input), arg0, arg1) }
[ -0.159774050116539, 0.5162588357925415, 0.3980235457420349, 0.3246367871761322, -0.549411416053772, 1.2882503271102905, 0.06972792744636536, -0.7559484839439392, 0.22662746906280518, 0.05182088911533356, 0.6404821276664734, 1.2944673299789429, -0.9713019132614136, 1.4267079830169678, 0.3...
func (m *MockUI) Password(arg0 string) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Password", arg0) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -0.6918021440505981, -0.1941053867340088, 0.5336942076683044, 0.8416603207588196, 0.9948615431785583, 0.2608657777309418, 0.965539276599884, 0.0996735692024231, -0.8896074891090393, -0.2539515197277069, -0.5704134702682495, -0.6050379276275635, -0.7671628594398499, 1.3346525430679321, 1....
func (mr *MockUIMockRecorder) Password(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Password", reflect.TypeOf((*MockUI)(nil).Password), arg0) }
[ -0.06586036086082458, 0.5540421605110168, 0.36288630962371826, 0.6901987195014954, -0.11026547849178314, 0.6114068031311035, -0.03777575120329857, -0.7802854776382446, 0.6943275928497314, 0.26055648922920227, 0.7963714599609375, 0.5196835398674011, -1.0019387006759644, 2.0080292224884033, ...
func (m *MockUI) Select(arg0 string, arg1 []string) (int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Select", arg0, arg1) ret0, _ := ret[0].(int) ret1, _ := ret[1].(error) return ret0, ret1 }
[ -1.099411964416504, -0.3673739731311798, 0.2748538553714752, 0.13862967491149902, 0.7011517286300659, -0.3355797231197357, 0.8363471031188965, -0.8776072263717651, -0.750711977481842, 0.03297257050871849, -0.5739424228668213, -0.27966177463531494, -0.30858975648880005, 0.5775030851364136, ...
func (mr *MockUIMockRecorder) Select(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Select", reflect.TypeOf((*MockUI)(nil).Select), arg0, arg1) }
[ -0.3136286437511444, 0.4577568769454956, 0.18894000351428986, 0.3245769441127777, -0.20601263642311096, -0.051936663687229156, -0.15548670291900635, -1.346716284751892, 0.5205532908439636, 0.4524497985839844, 0.6367716789245605, 0.7635520696640015, -0.7213327884674072, 1.3739160299301147, ...
func PkceVerifier(length int) string { if length > 128 { length = 128 } else if length < 43 { length = 43 } const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~" b := make([]byte, length) for i := range b { b[i] = charset[rand.Intn(len(charset))] } return string(b) }
[ 0.021176015958189964, 0.30003681778907776, 0.6037706732749939, -1.212250828742981, -0.8558419346809387, 0.9293733835220337, -0.5500712990760803, 0.00585697777569294, 0.8141343593597412, 0.005935595836490393, -0.6386706829071045, 0.251958429813385, -0.36786025762557983, 0.2232375293970108, ...
func PkceChallenge(verifier string) string { sum := sha256.Sum256([]byte(verifier)) challenge := base64.URLEncoding.WithPadding(base64.NoPadding).EncodeToString(sum[:]) return challenge }
[ 0.21232736110687256, -0.4894915819168091, 0.19107387959957123, 0.26657333970069885, -0.09678298234939575, 0.09649274498224258, -0.44640910625457764, 0.4257420301437378, 0.6987425684928894, 0.573486864566803, -1.0055203437805176, -0.6341848969459534, -0.603747546672821, 0.39978933334350586,...
func AuthLink(serviceKey string, service Service, authType string) (result string, state *AuthState) { stateKey := PkceVerifier(128) state = &AuthState{Key: stateKey, Service: serviceKey, AuthType: authType} result = service["authorize_endpoint"] result += "?client_id=" + service["client_id"] result += "&response_...
[ -0.5559197664260864, -0.06123163923621178, 0.5155664086341858, -0.029480887576937675, -0.0813935324549675, -0.5474832057952881, 0.0632786974310875, 0.04518328607082367, 1.1718344688415527, -0.1834961473941803, 0.3531634509563446, 0.5692973136901855, -0.22771096229553223, 0.2783978879451751...
func ExchangeToken(state *AuthState, service Service, authToken string, httpOrigin string) (token string, err error) { // state := GetState(stateCode) if state == nil { err = errors.New("State not available") return } token, err = GetToken(service, AUTHORIZE, authToken, state.AuthType, state.PkceVerifier, httpO...
[ -0.35603538155555725, 0.025760896503925323, 0.6503027677536011, 0.06872619688510895, 0.11371822655200958, -0.1852586567401886, -0.10141783952713013, 1.4798725843429565, 0.8417117595672607, 0.14409641921520233, -0.11644072830677032, 1.6258041858673096, 0.4788411557674408, 0.0222294516861438...
func GetToken(service Service, tokenType string, authToken string, authType string, verifier string, httpOrigin string) (token string, err error) { rParams := map[string]string{ "client_id": service["client_id"], "redirect_uri": service["redirect_uri"], } switch tokenType { case AUTHORIZE: rParams["code"] ...
[ -0.24301588535308838, 0.07637020200490952, 1.010703444480896, 0.42158958315849304, 0.11677402257919312, -0.11397731304168701, -0.22763657569885254, -0.08777759969234467, -0.08811621367931366, 0.034958478063344955, -0.02478606440126896, 1.576246738433838, 0.25589677691459656, 0.823807358741...
func (v *VerticaDatasource) GetVerticaDb(pluginContext backend.PluginContext) (*sql.DB, error) { instance, err := v.im.Get(pluginContext) if err != nil { log.DefaultLogger.Error("getVerticaDb: %s", err) return nil, err } if instanceSetting, ok := instance.(*instanceSettings); ok { return instanceSetting.Db, n...
[ 0.015294746495783329, 0.3683103024959564, 0.29324591159820557, 0.5595991611480713, 0.10364172607660294, -0.48318296670913696, 0.6335466504096985, -0.296329528093338, 0.7923826575279236, 0.9744306802749634, -0.03983697295188904, 0.9692820906639099, -1.2190581560134888, -0.1448330581188202, ...
func (config *configArgs) ConnectionURL(password string) string { var tlsmode string if config.TLSMode == "" { tlsmode = "none" } else { tlsmode = config.TLSMode } return fmt.Sprintf("vertica://%s:%s@%s/%s?use_prepared_statements=%d&connection_load_balance=%d&tlsmode=%s&backup_server_node=%s", config.User, pas...
[ 0.32577651739120483, -0.31911298632621765, 0.682212769985199, 0.3725101351737976, -0.007360939867794514, 0.6324721574783325, 0.10766066610813141, 0.6052443981170654, -0.3152084946632385, 1.6842007637023926, 0.2462654411792755, -0.6345393657684326, -0.45995625853538513, 0.2848060131072998, ...
func (v *VerticaDatasource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) { log.DefaultLogger.Debug("Inside datasource.QueryData Function", "Query request: ", req) // create response struct response := backend.NewQueryDataResponse() // Vertica db conntection c...
[ -0.6355131268501282, -0.3318372070789337, 0.5094535946846008, -0.28924286365509033, 0.6340458989143372, -0.14951357245445251, 0.49561554193496704, -0.5902582406997681, 0.14699393510818481, 0.1851457953453064, 0.1275114268064499, -0.1484767347574234, -1.0028038024902344, 0.5403458476066589,...
func (v *VerticaDatasource) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error) { log.DefaultLogger.Debug("Inside datasource.CheckHealth Function", "request", req) var status = backend.HealthStatusOk connDB, err := v.GetVerticaDb(req.PluginContext) if err != nil ...
[ -0.20696094632148743, -0.17822304368019104, 1.067264437675476, 0.2788711190223694, 0.18773727118968964, 0.05625186488032341, 0.11454571783542633, -0.2451755404472351, -0.06906493008136749, 0.5676196813583374, 0.027362380176782608, 0.14028257131576538, -0.9414511919021606, 0.065662667155265...
func Test(t *testing.T) { TestingT(t) }
[ 0.5603705644607544, 0.47240784764289856, 0.14808350801467896, 0.21293595433235168, 0.38073426485061646, 0.712630569934845, 1.494964361190796, -0.18387949466705322, -0.4030367434024811, 0.012481830082833767, -0.6709293127059937, -0.1728723794221878, -0.05282559245824814, 0.4567270874977112,...
func Generate(categoryName string, area geography.Area, originCulture culture.Culture) (Town, error) { var newProducers []profession.Profession var producers []profession.Profession var newResources []resource.Resource town := Town{} if categoryName == "random" { townCategory, err := getRandomWeightedCategory(...
[ -0.937283992767334, -0.012111404910683632, 0.6388550400733948, -0.12644413113594055, -0.5831482410430908, 0.20241951942443848, 0.12083913385868073, -0.5646911859512329, 0.08714559674263, 0.4800634980201721, -0.37100541591644287, 0.1395314335823059, 0.7190172076225281, 0.5781596302986145, ...
func Random() (Town, error) { area, err := geography.Generate() if err != nil { err = fmt.Errorf(randomTownError, err) return Town{}, err } randomCulture, err := culture.Generate(area) if err != nil { err = fmt.Errorf(randomTownError, err) return Town{}, err } town, err := Generate("random", area, rand...
[ -0.45774510502815247, 0.18508578836917877, 0.37977150082588196, 0.3577965795993805, -0.25426095724105835, 0.5986546874046326, 0.75909823179245, -0.31957343220710754, 0.6207250952720642, -0.3185555934906006, 0.1987573206424713, 0.5982295274734497, 0.07805633544921875, 0.6462915539741516, ...
func NewRemoteCompletedActionLogger(queueSize int, client cal_proto.CompletedActionLoggerClient) *RemoteCompletedActionLogger { completedActionLoggerPrometheusMetrics.Do(func() { prometheus.MustRegister(completedActionLoggerCompletedActionsAcknowledged) prometheus.MustRegister(completedActionLoggerCompletedActions...
[ 0.1922733634710312, -1.4500150680541992, 0.39991843700408936, -0.3566529154777527, -1.3117104768753052, 0.3769833445549011, 0.6999732851982117, -0.10291622579097748, 0.10761326551437378, 0.10241926461458206, -1.2387161254882812, 0.851298451423645, -0.3455815017223358, 1.0528823137283325, ...
func (logger *RemoteCompletedActionLogger) LogCompletedAction(completedAction *cal_proto.CompletedAction) { logger.lock.Lock() defer logger.lock.Unlock() if len(logger.sendQueue) < logger.maximumSendQueueSize { logger.sendQueue = append(logger.sendQueue, completedAction) close(logger.sendWakeup) logger.sendWak...
[ -0.006240945775061846, -0.6213545799255371, 0.619483232498169, -0.5872936844825745, -1.1649751663208008, 0.4364498257637024, 1.1214356422424316, -0.0816514641046524, 1.1884793043136597, 0.16914670169353485, -1.1509602069854736, 0.6454659700393677, 0.12100046128034592, 0.8754879832267761, ...
func (logger *RemoteCompletedActionLogger) SendAllCompletedActions() error { eg, ctx := errgroup.WithContext(context.Background()) stream, err := logger.client.LogCompletedActions(ctx) if err != nil { return err } actionsSent := 0 eg.Go(func() error { for { logger.lock.Lock() c := logger.sendWakeup ...
[ -0.12521500885486603, -1.02498459815979, 0.9442492723464966, 0.014082292094826698, -0.3134813606739044, -0.8244223594665527, 0.8801151514053345, -0.9136410355567932, 0.070692278444767, 0.10980375111103058, -0.47559815645217896, 0.6561564207077026, -0.32699739933013916, 0.9424856305122375, ...
func Listen(settings args.NetworkConfig) { fmt.Printf("Server Listening on %s\n", settings.Port) port := ":" + settings.Port server, err := net.Listen("tcp", port) if err != nil { log.Print(err) return } defer server.Close() for { client, err := server.Accept() if err != nil { log.Print(err) re...
[ 0.593557596206665, -0.2713046669960022, 0.5251848101615906, -0.9425612092018127, 0.936129093170166, 1.055597186088562, 0.45633161067962646, -0.20537762343883514, -1.0980792045593262, 0.9030304551124573, -0.0982746109366417, 0.012122495099902153, -0.5902040600776672, 0.6862561106681824, 0...
func NewReceiver(sink Sink) Receiver { return &receiver{ prefix: "", tags: make(map[string]string), scopes: make(map[string]*receiver), sink: sink, } }
[ -0.7819767594337463, -1.0194342136383057, -0.034869130700826645, -0.18513965606689453, -1.000100016593933, -1.3421255350112915, -0.43631091713905334, -0.017488528043031693, 1.2941442728042603, -0.576481282711029, 0.07825901359319687, 0.6136505603790283, 0.34705403447151184, 0.9037307500839...
func NewReplicaDataIterator(e engine.Reader, replicatedOnly bool, ) *ReplicaDataIterator { ri := &ReplicaDataIterator{ iterator: e.NewIterator(), } return ri }
[ -0.702255129814148, -0.5554717183113098, 0.01711883954703808, -0.42959365248680115, -1.6157761812210083, 0.49532395601272583, -0.2696647047996521, 1.3416906595230103, -0.1550571620464325, 0.3749542534351349, -0.5250646471977234, 1.1045535802841187, 0.3277616500854492, 0.014061801135540009,...
func (ri *ReplicaDataIterator) Close() { ri.iterator.Close() }
[ -0.2962705194950104, -0.33508333563804626, -0.09423811733722687, -1.1728745698928833, -1.2880147695541382, 1.1992629766464233, 0.7391723394393921, 0.242386132478714, -0.7040481567382812, 0.08019925653934479, 0.20983777940273285, 1.0849369764328003, -0.8488035202026367, 0.4590601921081543, ...
func (ri *ReplicaDataIterator) Next() { ri.iterator.Next() }
[ 0.013768605887889862, 0.1145256906747818, -0.33383581042289734, -0.7105080485343933, -0.9054490327835083, 0.8608366250991821, 0.2738468050956726, 0.665401041507721, 0.40446043014526367, 0.027741091325879097, -0.11475858092308044, 1.8113137483596802, -0.25221821665763855, -0.051239173859357...
func (ri *ReplicaDataIterator) Rewind() { ri.iterator.Rewind() }
[ 0.07909020036458969, 0.35941365361213684, -0.07518146932125092, -0.9497012495994568, -0.11456913501024246, 0.6164969205856323, 1.2343519926071167, 0.08040038496255875, -0.16422513127326965, -0.18443705141544342, 0.6087119579315186, 1.9559717178344727, 0.3844161629676819, -0.381070047616958...
func (ri *ReplicaDataIterator) Valid() bool { return ri.iterator.Valid() }
[ -0.3132142424583435, -0.7808117270469666, 0.3017957806587219, -0.916645884513855, -1.1421380043029785, 1.0117783546447754, 0.016394905745983124, 0.6373032331466675, -0.4581596255302429, 0.3619861900806427, 0.2121218740940094, 0.8195006847381592, -0.5141873359680176, -0.5350847244262695, ...
func (ri *ReplicaDataIterator) Item() engine.ItemIntf { return ri.iterator.Item() }
[ -0.1621071696281433, -0.1370275765657425, -0.13799700140953064, -0.6283329725265503, -0.7402792572975159, 0.8542062044143677, 0.7665863037109375, 0.452432245016098, -0.06416277587413788, 0.06386569887399673, 0.03038596548140049, 0.8147475123405457, -0.4209052622318268, -1.0754679441452026,...
func (OsFileSystem) Stat(name string) (os.FileInfo, error) { return os.Stat(name) }
[ 0.16524282097816467, -0.7819868326187134, 0.346286416053772, -0.9389446973800659, -0.5902591943740845, -0.055244289338588715, -0.16895067691802979, -1.1116238832473755, -0.3720208406448364, -0.8798155784606934, -0.9394549131393433, -0.4366098642349243, 0.4354785680770874, 0.737086176872253...
func count_X(x, y, z byte) int { count := 0; // 'x' = 120 if ( x == 120) { count = count + 1 } if ( y == 120) { count = count + 1 } if ( z == 120) { count = count + 1 } return count }
[ -0.08835121244192123, 0.40167972445487976, 0.6682530045509338, -0.5136998295783997, 0.009093178436160088, -0.04849877953529358, 0.07234428822994232, -0.07795553654432297, 0.04698392376303673, 0.009495343081653118, -1.3282527923583984, -0.5181147456169128, 0.1569240540266037, -0.44413217902...
func game_of_life_status(current_status int, neighbour int) int { // current status of life (0/1), current status remain same if neighbour=2 life := current_status if neighbour < 2 || neighbour > 3 { // died for suffocation life = 0 } else if neighbour == 3 { // add new born in village life = 1 } //else ...
[ -0.3351290822029114, -0.9264059066772461, 0.6544854640960693, -0.3077479898929596, -0.3034159541130066, 0.8130793571472168, -0.7135540246963501, -0.13483087718486786, 0.04765855520963669, 0.76947420835495, -0.06631217896938324, -0.984574556350708, 0.024952448904514313, -0.01426941342651844...
func (s *Image) LoadFromJSON(data []byte) (bool, error) { err := json.Unmarshal(data, &s) if err != nil { return false, err } return true, nil }
[ -0.6419873237609863, 0.4963778257369995, 0.715327262878418, -1.035861849784851, -1.3308004140853882, 0.09368003904819489, -0.745664656162262, -0.24043764173984528, 0.786980152130127, 0.4966091513633728, -1.2826550006866455, -0.5563371181488037, -0.5210252404212952, 0.5907385945320129, -0...
func (s *Image) ConvertToJSON() (string, error) { data, err := json.Marshal(&s) if err != nil { return "", err } return string(data), nil }
[ -0.5628728270530701, -0.6741786599159241, 0.6116332411766052, -0.8746483325958252, -1.0779783725738525, -0.9537580013275146, 0.047320593148469925, -0.44785699248313904, 0.9693759679794312, 0.9541445374488831, -0.05033302307128906, 0.6949188709259033, 0.04581015184521675, 0.5441669225692749...