text
stringlengths
11
6.3k
embedding
listlengths
768
768
func testAssert(t *testing.T, b bool, objs ...interface{}) { if !b { t.Fatal(objs...) } }
[ 0.13204462826251984, -0.18815284967422485, 0.5194211006164551, 0.9055111408233643, 0.40695685148239136, 0.6338547468185425, 0.20205029845237732, 0.1291828155517578, 0.3428466022014618, 0.09014515578746796, -0.08768223971128464, 0.17060720920562744, -1.3395934104919434, 0.5968294143676758, ...
func IMAGE_PostUploadForm(res http.ResponseWriter, req *http.Request, params httprouter.Params) { if validPerm, permErr := HasPermission(res, req, image_Make_Permission); !validPerm { // User Must be at least Writer. fmt.Fprint(res, `{"result":"failure","reason":"Invalid Authorization: `+permErr.Error()+`","code":...
[ -0.7687318325042725, 0.06207410991191864, 0.6145780086517334, -0.17692215740680695, -1.1042828559875488, -0.8821761608123779, 0.7679321765899658, -0.13376696407794952, -0.45330241322517395, -0.018354151397943497, 0.1585971713066101, -0.6299653053283691, -0.2722044885158539, 0.0057846275158...
func IMAGE_BrowserForm(res http.ResponseWriter, req *http.Request, params httprouter.Params) { ctx := appengine.NewContext(req) // ACTION: Give the user an internal permissions key? prefixQuery := storage.Query{} if req.FormValue("oid") == "" { prefixQuery.Prefix = "global" } else { prefixQuery.Prefix = req....
[ -0.620054304599762, 0.044306714087724686, 0.47089043259620667, -0.01545889861881733, -0.34635868668556213, -0.6790579557418823, 0.35421329736709595, 0.06319895386695862, 0.0247100330889225, 0.061453405767679214, 0.1118362620472908, -0.5003848075866699, 0.28172123432159424, 0.49565559625625...
func IMAGE_API_CKEDITOR_PlaceImageIntoCS(res http.ResponseWriter, req *http.Request, params httprouter.Params) { if validPerm, permErr := HasPermission(res, req, image_Make_Permission); !validPerm { // User Must be at least Writer. fmt.Fprint(res, `<!DOCTYPE html><html><body><script type="text/javascript">window.p...
[ -0.5940058827400208, 0.5661458373069763, 0.7290904521942139, -0.249567449092865, -0.21792609989643097, -0.38706469535827637, 1.091636061668396, -0.37070852518081665, -0.6426166296005249, 0.6798557043075562, 0.6447904109954834, 0.08835083991289139, -0.09342605620622635, 1.0524752140045166, ...
func IMAGE_API_PlaceImageIntoCS(res http.ResponseWriter, req *http.Request, params httprouter.Params) { if validPerm, _ := HasPermission(res, req, image_Make_Permission); !validPerm { // User Must be at least Writer. http.Redirect(res, req, "/image/uploader?status=failure&message=invalid_login", http.StatusSeeOthe...
[ -0.9941316843032837, 0.28100037574768066, 0.7214884161949158, -0.15867283940315247, 0.21973201632499695, -0.0005327966064214706, 0.926954984664917, -0.46747395396232605, -0.5764933824539185, 0.46072229743003845, 0.49371543526649475, -0.6296257972717285, 0.2433270812034607, 0.28579857945442...
func IMAGE_API_GetImageFromCS(res http.ResponseWriter, req *http.Request, params httprouter.Params) { id := req.FormValue("id") // this is an id request only. if id == "" { // if no id, exit with failure. fmt.Fprint(res, `{"result":"failure","reason":"missing image id","code":400}`) return } ctx :=...
[ -0.24984429776668549, -0.35882502794265747, 0.45883235335350037, 0.00537877855822444, 0.13286921381950378, 0.002497640438377857, -0.5674639940261841, -0.9290863871574402, -0.11897877603769302, 0.08348064869642258, -0.13992342352867126, 0.4496060311794281, 0.4997554421424866, 0.177913397550...
func IMAGE_API_SendToCloudStorage(req *http.Request, mpf multipart.File, hdr *multipart.FileHeader, prefix string) (string, error) { ext, extErr := filterExtension(req, hdr) // ensure that file's extension is an image if extErr != nil { // if it is not, exit, returning error return "", extErr ...
[ -0.5914213061332703, 0.06673138588666916, 0.7114503383636475, -0.22160114347934723, 0.022101420909166336, -0.4413134455680847, -0.27503472566604614, -0.399976521730423, -0.28374379873275757, 0.7398388385772705, 0.1879672110080719, -0.1732061803340912, 0.23514872789382935, 0.433204561471939...
func makeSHA(src multipart.File) string { h := sha1.New() io.Copy(h, src) return fmt.Sprintf("%x", h.Sum(nil)) }
[ 0.18012234568595886, 0.0930313989520073, 0.7423149943351746, 0.1917620301246643, -1.2320127487182617, 1.0600879192352295, 0.061774175614118576, 0.5477204918861389, 0.1386609673500061, 0.21492773294448853, 0.2613464593887329, 0.1339128315448761, 0.4445647597312927, -0.5350006222724915, 0....
func (f *FileStateFolder) ApplyRule(input interface{}) (returnKey string, returnVal interface{}) { return "file_state_folder", util.GetFileStateFolder() }
[ -0.33221346139907837, 0.1290496587753296, 0.476783812046051, -0.3961973786354065, 0.23684874176979065, 0.5001392364501953, 0.8365445733070374, 1.5274403095245361, -0.42464426159858704, -1.7379260063171387, 0.8055592179298401, -0.4859142005443573, -0.3499603867530823, 2.092733860015869, 0...
func NewClient(url string) *Client { return &Client{url: url} }
[ -0.11523513495922089, -0.45454347133636475, -0.19860312342643738, -0.08910899609327316, -1.0635733604431152, 0.01787649095058441, 0.4805762767791748, 0.5450906753540039, 0.07033950090408325, -0.4979066848754883, -0.8002703189849854, 0.784430980682373, -0.06107861548662186, -0.8771800994873...
func (c Client) Get(team string) ([]ActionItem, error) { resp, err := http.Get(c.url + "/retros/" + team) if err != nil { return nil, err } defer resp.Body.Close() if resp.StatusCode >= 400 { return nil, fmt.Errorf("unexpected HTTP status: %d", resp.StatusCode) } return readResponse(resp.Body) }
[ -1.1022404432296753, 0.38303646445274353, 0.8757175207138062, 0.17337580025196075, 0.6773083209991455, -0.4872492253780365, -1.3388125896453857, -0.29682090878486633, 0.12544919550418854, 0.4680235683917999, -0.4973926246166229, 0.6865409016609192, -0.32549145817756653, -0.2796156108379364...
func Execute() { if err := rootCmd.Execute(); err != nil { // fmt.Println(err) os.Exit(1) } }
[ 0.5903456807136536, -0.8369052410125732, 0.8264191150665283, 1.4418044090270996, 0.28483861684799194, 0.8954663872718811, 0.02121698297560215, 0.07534589618444443, -0.5742432475090027, -0.5141516923904419, 0.692224383354187, 0.10052358359098434, -0.4786967933177948, 0.8764310479164124, 0...
func initConfig() { if cfgFile != "" { // Use config file from the flag. viper.SetConfigFile(cfgFile) } else { // Find home directory. home, err := homedir.Dir() if err != nil { fmt.Println(err) os.Exit(1) } // Search config in home directory with name ".se" (without extension). viper.AddConfig...
[ 0.18595117330551147, -0.09372528642416, 0.6133415699005127, 1.1034480333328247, 0.9725249409675598, -0.11256188899278641, 0.9489044547080994, 0.8782340288162231, -0.9930279850959778, 0.9774161577224731, 0.008680756203830242, -0.09925712645053864, 0.28171196579933167, 1.6092138290405273, ...
func (a *API) ReadActivities() (*Activities, error) { dst := new(Activities) url := BuildURL(a.url, "/activities") err := a.Get(url, dst) return dst, err }
[ -0.8858315348625183, 0.08428117632865906, 0.254128634929657, 0.5853899717330933, 0.2509470582008362, -0.7332441210746765, 0.47804656624794006, -0.35037562251091003, 0.399169921875, -0.7819746732711792, 0.521491527557373, 0.8984396457672119, -1.1835836172103882, -0.6583772301673889, 0.259...
func (a *API) GetActivityByName(name string) (Activity, error) { activites, err := a.ReadActivities() if err != nil { return Activity{}, err } for _, a := range activites.Activities { if a.Name == name { return a, nil } } return Activity{}, nil }
[ 0.15034759044647217, -0.8827685117721558, 0.07441632449626923, 0.36917272210121155, -0.1594991385936737, -1.1990740299224854, 0.6576769948005676, -1.5104167461395264, 0.30296292901039124, 0.4721373915672302, 0.06137310713529587, 0.6791950464248657, -1.1682441234588623, -0.3204253017902374,...
func (a *API) GetActivityByID(id string) (Activity, error) { activites, err := a.ReadActivities() if err != nil { return Activity{}, err } for _, a := range activites.Activities { if a.ID == id { return a, nil } } return Activity{}, nil }
[ 0.3340657949447632, -0.8812442421913147, -0.006019940599799156, 0.4159075617790222, 0.10412608832120895, -0.8883489370346069, 0.6163095235824585, -1.4604157209396362, 0.8345946669578552, 0.21236678957939148, 0.2898334860801697, 0.8221797943115234, -1.0607659816741943, -0.1369698941707611, ...
func (m HMSketch) global() hist.Histogram { hMux.Lock() location := hash("__global__", "__global__") val := m.Registers[m.Index[location]] hMux.Unlock() return val }
[ 0.33114370703697205, 1.3484753370285034, 0.4658377468585968, 0.09568316489458084, 0.027100110426545143, 0.27568569779396057, 0.8340303301811218, 0.7065262794494629, -0.595285177230835, 0.09764949232339859, -0.04991982877254486, 1.6786696910858154, -0.6618025302886963, 0.4921287000179291, ...
func hash(key, value string) int64 { hash := siphash.New(sipConst) hash.Write([]byte(key + ":::" + value)) return int64(hash.Sum64()) }
[ 0.20449312031269073, 0.3036581575870514, 0.5778794288635254, 0.6451603174209595, -0.8551251292228699, 0.7159398794174194, -0.6382379531860352, 1.1095860004425049, -0.1862625777721405, 0.058042511343955994, -0.3095106780529022, 0.3218534588813782, -0.10413593798875809, -0.4752300977706909, ...
func New(resolution int) HMSketch { var x HMSketch x.Resolution = resolution x.Registers = make([]hist.Histogram, 0) x.Index = make(map[int64]int) x = x.insert(map[string]string{"__global__": "__global__"}, 0, 0) return x }
[ 0.5333686470985413, 0.8848938345909119, 0.5022619962692261, -0.13536809384822845, -0.10297536104917526, 0.48099827766418457, 0.4676356613636017, 0.5363383889198303, -0.5179660320281982, -0.7480282187461853, -0.9726716876029968, 0.14733323454856873, 0.16167694330215454, 0.8982264995574951, ...
func (m HMSketch) Insert(kvs map[string]string, value, count float64) HMSketch { m = m.insert(map[string]string{"__global__": "__global__"}, value, count) m = m.insert(kvs, value, count) return m }
[ -0.14349140226840973, 1.0966757535934448, 0.44335639476776123, -0.11593055725097656, -0.04063354432582855, 0.6126197576522827, 0.08823078870773315, 0.021189749240875244, -1.2874113321304321, -0.20415998995304108, -0.2114100456237793, -0.6640436053276062, -0.3563065826892853, 0.508814334869...
func (m HMSketch) insert(kvs map[string]string, value, count float64) HMSketch { hMux.Lock() for key, val := range kvs { location := hash(key, val) if _, ok := m.Index[location]; !ok { m.Index[location] = m.Max m.Max++ m.Registers = append(m.Registers, hist.New(m.Resolution)) } m.Registers[m.Index[lo...
[ -0.0953061580657959, 1.2737482786178589, 0.47227320075035095, -0.1232554018497467, 0.29291829466819763, 0.26784712076187134, 0.06516628712415695, 0.6095603704452515, -0.9475676417350769, -0.4137544333934784, -0.10509438812732697, -1.1665306091308594, -0.7421679496765137, -0.141645714640617...
func (m HMSketch) Combine(o HMSketch) HMSketch { out := New(m.Resolution) hMux.Lock() allkvps := make(map[int64]bool) for x := range m.Index { allkvps[x] = true } for x := range o.Index { allkvps[x] = true } for x := range allkvps { m1, okm := m.Index[x] o1, oko := o.Index[x] out.Index[x] = out.Max ...
[ 0.163567915558815, 0.6982046961784363, 0.8536644577980042, 1.065617561340332, 0.06465703248977661, -0.45567944645881653, 0.34079188108444214, -0.3034064769744873, 0.24294346570968628, 0.20802024006843567, 0.061633992940187454, -0.1559186428785324, -0.2780153155326843, -0.19199082255363464,...
func (m HMSketch) Cancel(o HMSketch) HMSketch { out := New(m.Resolution) hMux.Lock() allkvps := make(map[int64]bool) for x := range m.Index { allkvps[x] = true } for x := range o.Index { allkvps[x] = true } for x := range allkvps { m1, okm := m.Index[x] o1, oko := o.Index[x] out.Index[x] = out.Max o...
[ 0.9107210636138916, 0.28812241554260254, 0.7941546440124512, 0.8361062407493591, -0.8672919869422913, 0.0969909131526947, 0.4158875346183777, 0.5723837614059448, -0.04372961074113846, 0.3427477777004242, 0.017458520829677582, 0.20205144584178925, 0.05506541207432747, -0.37380585074424744, ...
func (m HMSketch) Sketch(kvs map[string]string) hist.Histogram { output := m.global() hMux.Lock() for key, val := range kvs { location := hash(key, val) if _, ok := m.Index[location]; !ok { hMux.Unlock() return hist.New(m.Resolution) } output = output.Min(m.Registers[m.Index[location]]) } hMux.Unlock...
[ -0.31067222356796265, 0.735235869884491, 0.34627988934516907, 0.13952605426311493, -0.4587010443210602, -0.09653899073600769, 0.06821169704198837, 0.10585934668779373, 0.5504423975944519, -1.1271737813949585, 0.455996572971344, 0.020345574244856834, -0.5034250617027283, 0.14459897577762604...
func (h HMSketch) Count(kvs map[string]string) float64 { hist := h.Sketch(kvs) return hist.Total() }
[ 0.33384448289871216, 0.5122853517532349, 0.44784241914749146, -0.1320265382528305, -0.30688372254371643, 0.06906624138355255, -0.4157962501049042, -0.035808440297842026, -0.5802743434906006, -0.12125053256750107, -0.17713165283203125, -0.5116714835166931, 0.8724411129951477, 0.855476081371...
func (h HMSketch) TotalCount() float64 { return h.global().Total() }
[ 1.5049841403961182, 0.5450612306594849, 0.45044267177581787, 0.41015228629112244, 0.8013589978218079, 0.3683932423591614, 1.0246374607086182, 0.4978589713573456, -0.3195338547229767, -0.18203626573085785, -0.07900691777467728, 0.20064093172550201, -0.18225105106830597, 0.48606598377227783,...
func (h HMSketch) Serialize() ([]byte, error) { var outbytes bytes.Buffer enc := gob.NewEncoder(&outbytes) err := enc.Encode(h) if err != nil { return nil, err } return outbytes.Bytes(), nil }
[ 0.26579025387763977, 1.0088200569152832, 0.7855058908462524, 0.4212944209575653, 0.7592028379440308, -0.44277721643447876, -0.4733344614505768, -0.31389448046684265, -0.4269939064979553, -0.04337400943040848, -0.7223386168479919, 0.8288457989692688, -1.066323161125183, 0.9171960353851318, ...
func Deserialize(input []byte) (HMSketch, error) { var inbytes bytes.Buffer var h HMSketch inbytes.Write(input) dec := gob.NewDecoder(&inbytes) err := dec.Decode(&h) return h, err }
[ 0.5981271862983704, 0.8551181554794312, 0.7131973505020142, 0.31250691413879395, 0.30648353695869446, 0.10941838473081589, -0.40511706471443176, 0.49175161123275757, -0.4133455157279968, -0.7163048386573792, -0.7722100615501404, -0.04697943106293678, -1.1896607875823975, 0.1044258028268814...
func (pq *bvhPriorityQueue) update(item *Item, value *boundingVolumeHierarchyNode, priority float64) { item.value = value item.t = priority heap.Fix(pq, item.index) }
[ 0.08101888746023178, -1.2510191202163696, 0.4776228070259094, 0.1497139036655426, 0.644042432308197, 0.4889175295829773, -1.2226877212524414, 0.3292669355869293, 0.11608005315065384, 0.5722755789756775, -0.40204286575317383, 0.05035093054175377, -0.5429837107658386, 0.3472919464111328, 0...
func NewCreateDeploymentOptions(ioStreams genericiooptions.IOStreams) *CreateDeploymentOptions { return &CreateDeploymentOptions{ Port: -1, Replicas: 1, PrintFlags: genericclioptions.NewPrintFlags("created").WithTypeSetter(scheme.Scheme), IOStreams: ioStreams, } }
[ -0.5041930675506592, -0.38078153133392334, 0.14128607511520386, 0.025363225489854813, 0.08249571174383163, 0.3437259793281555, 0.2453358918428421, -0.6823956370353699, -0.03626563400030136, 0.3849838376045227, -0.6349785327911377, 0.8410727977752686, -0.05266182869672775, 0.910892188549041...
func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command { o := NewCreateDeploymentOptions(ioStreams) cmd := &cobra.Command{ Use: "deployment NAME --image=image -- [COMMAND] [args...]", DisableFlagsInUseLine: true, Aliases: []string{"dep...
[ -0.1330384761095047, -0.4269513189792633, 0.7868474125862122, -0.20876818895339966, -0.1859988570213318, -0.14946182072162628, 0.10976780951023102, -0.5316228270530701, -0.2140188366174698, 0.3680528402328491, -0.16037847101688385, -0.16964945197105408, 0.2222631275653839, 0.29709395766258...
func (o *CreateDeploymentOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { name, err := NameFromCommandArgs(cmd, args) if err != nil { return err } o.Name = name if len(args) > 1 { o.Command = args[1:] } clientConfig, err := f.ToRESTConfig() if err != nil { return err } o....
[ -0.08796000480651855, -0.34924519062042236, 0.8910466432571411, -0.24342131614685059, 0.17178577184677124, 0.48778024315834045, 0.46175411343574524, -0.3332425057888031, -0.176828071475029, 0.78902268409729, -0.12518607079982758, 0.7843267321586609, 0.5260426998138428, 0.825346827507019, ...
func (o *CreateDeploymentOptions) Validate() error { if len(o.Images) > 1 && len(o.Command) > 0 { return fmt.Errorf("cannot specify multiple --image options and command") } return nil }
[ -0.22540651261806488, 0.5138967037200928, 0.45260167121887207, -0.03476833924651146, 1.230642318725586, 0.7337043881416321, -0.029406750574707985, -0.41920068860054016, -0.3163752853870392, 0.11392538249492645, 0.30204179883003235, 0.13363829255104065, 0.12105710059404373, 1.51960003376007...
func (o *CreateDeploymentOptions) Run() error { deploy := o.createDeployment() if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, deploy, scheme.DefaultJSONEncoder()); err != nil { return err } if o.DryRunStrategy != cmdutil.DryRunClient { createOptions := metav1.CreateOptions{} if o.FieldManager !...
[ -0.8049220442771912, -0.18665774166584015, 0.8442544937133789, -0.544727623462677, 0.23812998831272125, 0.6916314959526062, 0.6341012716293335, -0.5880939364433289, -0.06036729738116264, 0.7576107978820801, -0.2670643925666809, 0.6121640801429749, -0.2569182217121124, 0.660984218120575, ...
func (o *CreateDeploymentOptions) buildPodSpec() corev1.PodSpec { podSpec := corev1.PodSpec{Containers: []corev1.Container{}} for _, imageString := range o.Images { // Retain just the image name imageSplit := strings.Split(imageString, "/") name := imageSplit[len(imageSplit)-1] // Remove any tag or hash if ...
[ -0.5700181722640991, -0.9468657374382019, 0.6209701895713806, -0.6384742856025696, -0.04526221379637718, -0.026988225057721138, -0.34852179884910583, 0.019803699105978012, -0.07754772901535034, 0.6552847027778625, 0.12451417744159698, 0.35556870698928833, 0.4098576307296753, -0.55950862169...
func sanitizeAndUniquify(name string) string { if strings.ContainsAny(name, "_.") { name = strings.Replace(name, "_", "-", -1) name = strings.Replace(name, ".", "-", -1) name = fmt.Sprintf("%s-%s", name, utilrand.String(5)) } return name }
[ -0.8130022883415222, -0.6974525451660156, 0.6982877850532532, -1.1712896823883057, -0.521607518196106, -0.18230310082435608, -0.2888205349445343, -0.6367322206497192, 0.5972076654434204, 0.6981431245803833, -0.6502608060836792, -0.16171029210090637, 0.24721083045005798, 0.5482379794120789,...
func (controller *LotteryController) GetSelectedNumbers(echo echo.Context) error{ // 0. log ip logger.Trace("From %s call to %s", echo.RealIP(), util.FuncName()) // 1. get param userId := echo.Param("userId") // 2. Defines context ctx := echo.Request().Context() if ctx == nil { ctx = context.Background() } ...
[ -0.7202693223953247, 0.170791894197464, 0.6755590438842773, 0.45109766721725464, -0.2851963937282562, 0.03092673420906067, 0.5658301711082458, -0.5034249424934387, 0.46934860944747925, -0.7033144235610962, -0.7166044116020203, 1.1940604448318481, -0.6192245483398438, 1.1920377016067505, ...
func (controller *LotteryController) CreateLotteryNumber(echo echo.Context) error{ // 0. log ip logger.Trace("From %s call to %s", echo.RealIP(), util.FuncName()) // 1. get param lotteryPlayer := dto.LotteryPlayer{} err := echo.Bind(&lotteryPlayer) if err != nil { message, errorRes := response.NewErrorResponse...
[ -0.7094507813453674, -0.7340627908706665, 1.2346423864364624, -0.23803727328777313, -0.4243413805961609, 0.8475753664970398, 0.6880043148994446, -0.8497263193130493, 0.408745676279068, -0.33626821637153625, -0.7730562686920166, 0.3450537323951721, -0.0707562044262886, 0.31598955392837524, ...
func (m VarnishPlugin) FetchMetrics() (map[string]interface{}, error) { var out []byte var err error if m.VarnishName == "" { out, err = exec.Command(m.VarnishStatPath, "-1").CombinedOutput() } else { out, err = exec.Command(m.VarnishStatPath, "-1", "-n", m.VarnishName).CombinedOutput() } if err != nil { r...
[ 0.49601832032203674, -0.27685901522636414, 0.6876085996627808, -0.2400129735469818, -0.5768792033195496, -0.3431174159049988, 0.20327012240886688, -0.3327280879020691, -0.6509642004966736, 0.39900049567222595, -0.2031887024641037, 0.31525424122810364, -0.1423768699169159, 0.786905586719512...
func (m VarnishPlugin) GraphDefinition() map[string]mp.Graphs { return graphdef }
[ 0.6131352186203003, -0.5495530366897583, 0.06509001553058624, 0.16667169332504272, 0.33479925990104675, -0.24031783640384674, 0.017336634919047356, 0.3602394759654999, 0.924168586730957, 0.36313629150390625, -1.2256829738616943, 0.9600609540939331, -0.4892422556877136, 0.4493619203567505, ...
func BuildTimeParameters(params url.Values, expiry time.Duration) { now := time.Now() params.Set(QueryIssued, fmt.Sprint(now.UnixMilli())) params.Set(QueryExpiry, fmt.Sprint(now.Add(expiry).UnixMilli())) }
[ -0.8465062379837036, -0.29900655150413513, 0.5002424120903015, -0.8442094922065735, 0.5550433397293091, 0.2765812575817108, -1.0181519985198975, 0.7323948740959167, 0.07298725098371506, 0.8051011562347412, 0.041840922087430954, -0.17580299079418182, -0.2733766436576843, 0.9229183197021484,...
func ValidateTimeParameters(params url.Values) error { now := time.Now() issuedMS, err := strconv.ParseInt(params.Get(QueryIssued), 10, 64) if err != nil { return fmt.Errorf("invalid issued timestamp: %w", err) } issued := time.UnixMilli(issuedMS) if now.Add(DefaultLeeway).Before(issued) { return ErrIssuedI...
[ -0.2858309745788574, 0.1313932240009308, 0.6928648352622986, -0.24923603236675262, 0.015294850803911686, 0.026415223255753517, -0.8357394337654114, -0.6630240082740784, 0.07036270946264267, 0.6158376932144165, 0.24548867344856262, -0.37762129306793213, -0.41218847036361694, 0.9484609365463...
func CSVFileInfo(f0 string) (size int64, nRec int64) { fd0, err := os.Open(f0) defer fd0.Close() if err != nil { log.Fatal(err) } fi0, err := fd0.Stat() if err != nil { log.Fatal(err) } buf0 := bufio.NewReader(fd0) l0, _, err := buf0.ReadLine() if err != nil { log.Fatal(err) } size = fi0.Size() nRec ...
[ 0.9620055556297302, -0.6812191605567932, 0.6447398066520691, -1.2364068031311035, -0.4875456392765045, -0.0017436621710658073, 0.04310215264558792, 0.40042242407798767, -0.9229956865310669, 0.030268989503383636, -0.5712684988975525, -0.5939805507659912, 0.27007582783699036, 1.0484799146652...
func fnvHash64(data []byte) uint64 { hash := offset64 for _, c := range data { hash *= prime64 hash ^= uint64(c) } return hash }
[ -0.7528170347213745, 0.1327374428510666, 0.40310919284820557, 1.1127815246582031, -0.7715004682540894, 0.05066164955496788, -0.6851724982261658, 0.4385623335838318, 0.05983635410666466, 0.18337129056453705, 0.4539576470851898, -1.0224277973175049, -0.40500396490097046, -0.10288458317518234...
func ParseID(value string) (ID, error) { id, err := strconv.ParseInt(value, 10, 64) return ID(id), err }
[ 0.4161404073238373, -0.6390460133552551, 0.42362532019615173, -0.01242827344685793, -0.8447540402412415, 0.6766521334648132, -0.4482693374156952, 0.16922080516815186, 0.7725269198417664, -0.0024931749794632196, -0.14701028168201447, 0.10075990855693817, -0.4586253762245178, -0.202476054430...
func MustParseID(value string) ID { id, err := ParseID(value) if err != nil { panic(err) } return id }
[ 0.4688085913658142, -0.9857651591300964, 0.29658278822898865, 0.11206762492656708, -0.8279891014099121, 1.5145998001098633, -1.5420598983764648, -0.2423863261938095, 0.4515720307826996, 0.350481241941452, -0.06588789075613022, 0.08915112167596817, -0.8248729109764099, 1.0539331436157227, ...
func (id ID) Increment() ID { return ID(int64(id) + 1) }
[ -1.0011560916900635, -0.4307871162891388, 0.16829615831375122, 0.055237703025341034, -0.4488614499568939, 0.0334991030395031, -0.10054231435060501, 0.2261693924665451, 0.9632124900817871, -1.0750386714935303, -0.33796218037605286, 0.5142406225204468, -0.00929846242070198, -0.46744605898857...
func MazeSizeFromFile(config *pb.MazeConfig) (c, r int, err error) { filename := path.Join(*SavedMazePath, config.GetFromFile()) file, _ := os.Open(filename) fileScanner := bufio.NewScanner(file) lineCount := 0 colCount := 0 for fileScanner.Scan() { if lineCount == 0 { // grab row length colCount = len(...
[ 0.37259599566459656, -0.6770002841949463, 0.7287253141403198, -0.1519704908132553, -0.16731639206409454, 0.03715731203556061, 1.5006083250045776, 1.1150867938995361, -0.7775968909263611, 0.26898056268692017, -0.9158613681793213, -1.1360994577407837, -0.20327554643154144, 1.0637470483779907...
func (a *Fromfile) Apply(m *maze.Maze, delay time.Duration, generating *abool.AtomicBool) error { defer genalgos.TimeTrack(m, time.Now()) filename := path.Join(*SavedMazePath, m.Config().FromFile) data, err := ioutil.ReadFile(filename) if err != nil { return err } if err := m.Decode(string(data)); err != nil...
[ 0.7848166823387146, -0.06104988232254982, 0.6252166032791138, 0.18425950407981873, -0.29141736030578613, 0.794196605682373, 0.6741608381271362, 1.310236930847168, -1.0964679718017578, 0.09097091108560562, -0.12419486045837402, -0.3780692219734192, -0.24008125066757202, 0.14731450378894806,...
func NewAdmin(addrs []string, options *AdminOptions, log logr.Logger) IAdmin { a := &Admin{ hashMaxSlots: DefaultHashMaxSlots, log: log.WithName("redis_util"), } // perform initial connections a.cnx = NewAdminConnections(addrs, options, log) return a }
[ -0.18940244615077972, 0.7499206066131592, 0.28197231888771057, 0.4088011682033539, -0.2502564489841461, -0.6029631495475769, -0.7649479508399963, -1.0618468523025513, 1.1639906167984009, 0.2658882141113281, 0.2562428116798401, 0.5167571902275085, 0.24094067513942719, 0.29910722374916077, ...
func (a *Admin) Connections() IAdminConnections { return a.cnx }
[ -0.35190534591674805, 0.08953949809074402, 0.3312464952468872, -0.057690929621458054, 0.08075957000255585, -0.03215417265892029, -0.23132817447185516, -1.1558574438095093, 0.9781572222709656, -0.3788391947746277, 0.05397353693842888, -0.07021518796682358, -0.9738773107528687, 0.15674147009...
func (a *Admin) Close() { a.Connections().Reset() }
[ -0.22821590304374695, 0.27929121255874634, 0.20779035985469818, -0.09845609217882156, 0.5776436924934387, 0.7356581687927246, 0.018145430833101273, -1.4897059202194214, -0.2636564075946808, 0.22204110026359558, 0.9886028170585632, 1.4118906259536743, -1.2993006706237793, 1.0073962211608887...
func (a *Admin) GetClusterInfos() (*ClusterInfos, error) { infos := NewClusterInfos() clusterErr := NewClusterInfosError() for addr, c := range a.Connections().GetAll() { nodeinfos, err := a.getInfos(c, addr) if err != nil { a.log.WithValues("err", err).Info("get redis info failed") infos.Status = Cluster...
[ -0.49466651678085327, 0.24445752799510956, 0.5591405630111694, -0.27720627188682556, 0.38111740350723267, -0.12926244735717773, -0.15890096127986908, -0.9057019352912903, -0.030279017984867096, 0.1568393111228943, 0.4063747227191925, 0.8834589123725891, -0.6311687231063843, 0.1926723569631...
func (a *Admin) ClusterManagerNodeIsEmpty() (bool, error) { for addr, c := range a.Connections().GetAll() { knowNodes, err := a.clusterKnowNodes(c, addr) if err != nil { return false, err } if knowNodes != 1 { return false, nil } } return true, nil }
[ -1.2153396606445312, 0.26521989703178406, 0.7453880906105042, -0.6268534064292908, 1.2561111450195312, 0.1028011366724968, 0.2380606085062027, 0.05125052481889725, -0.9236646294593811, 1.549564242362976, -0.13698554039001465, 0.7291033864021301, -0.30353471636772156, 0.28143855929374695, ...
func (a *Admin) AttachSlaveToMaster(slave *Node, masterID string) error { c, err := a.Connections().Get(slave.IPPort()) if err != nil { return err } resp := c.Cmd("CLUSTER", "REPLICATE", masterID) if err := a.Connections().ValidateResp(resp, slave.IPPort(), "unable to run command REPLICATE"); err != nil { ret...
[ -0.4596432149410248, -0.05515727028250694, 0.7174522876739502, -1.0010074377059937, -0.3327096700668335, 0.8176395893096924, -0.7918437719345093, 0.6722918152809143, 0.5128481388092041, 0.819889485836029, 0.20170989632606506, 1.740449070930481, -0.30989834666252136, 0.7890660762786865, 1...
func (a *Admin) AddSlots(addr string, slots []Slot) error { if len(slots) == 0 { return nil } c, err := a.Connections().Get(addr) if err != nil { return err } resp := c.Cmd("CLUSTER", "ADDSLOTS", slots) return a.Connections().ValidateResp(resp, addr, "unable to run CLUSTER ADDSLOTS") }
[ -0.20852386951446533, 1.1986422538757324, 0.5339413285255432, -0.05006932094693184, -0.5772273540496826, 0.6938469409942627, -0.2404371201992035, 0.01806304231286049, 0.5328729748725891, 0.10499359667301178, 0.7978643774986267, 1.0241645574569702, -1.0181398391723633, 0.46216750144958496, ...
func (a *Admin) SetSlots(addr, action string, slots []Slot, nodeID string) error { if len(slots) == 0 { return nil } c, err := a.Connections().Get(addr) if err != nil { return err } for _, slot := range slots { if nodeID == "" { c.PipeAppend("CLUSTER", "SETSLOT", slot, action) } else { c.PipeAppend(...
[ -0.3482956886291504, 0.6106728315353394, 0.24595072865486145, -0.2900662422180176, -0.09595319628715515, -0.1357656717300415, -0.09065377712249756, 0.08350441604852676, -0.12556228041648865, 0.6290881633758545, 0.7268320918083191, 1.5984996557235718, -0.045158568769693375, 0.70353293418884...
func (a *Admin) SetSlot(addr, action string, slot Slot, nodeID string) error { c, err := a.Connections().Get(addr) if err != nil { return err } if nodeID == "" { c.PipeAppend("CLUSTER", "SETSLOT", slot, action) } else { c.PipeAppend("CLUSTER", "SETSLOT", slot, action, nodeID) } if !a.Connections().Validate...
[ -0.32824698090553284, 0.4325803816318512, 0.19423489272594452, -0.49424031376838684, -0.030448295176029205, -0.29043275117874146, 0.31111282110214233, -0.03154602274298668, -0.38299286365509033, 0.668381929397583, 0.7921541929244995, 1.788154125213623, 0.04517284035682678, 0.17884573340415...
func (a *Admin) AttachNodeToCluster(addr string) error { ip, port, err := net.SplitHostPort(addr) if err != nil { return err } all := a.Connections().GetAll() if len(all) == 0 { return fmt.Errorf("no connection for other redis-node found") } for cAddr, c := range a.Connections().GetAll() { if cAddr == add...
[ -0.38994482159614563, 0.22828826308250427, 0.683367133140564, -0.810300350189209, 0.27696099877357483, 0.7217637300491333, 0.06087246164679527, -0.3927343487739563, -0.0644187405705452, 0.8045675158500671, 0.6227660179138184, 1.3120113611221313, -0.005296314600855112, 0.7442294359207153, ...
func (a *Admin) GetAllConfig(c IClient, addr string) (map[string]string, error) { resp := c.Cmd("CONFIG", "GET", "*") if err := a.Connections().ValidateResp(resp, addr, "unable to retrieve config"); err != nil { return nil, err } var raw map[string]string var err error raw, err = resp.Map() if err != nil { ...
[ -0.3410813510417938, 0.40335899591445923, 1.0717631578445435, 0.4402253329753876, -0.9068239331245422, -0.08181172609329224, -1.4551362991333008, -0.11141309142112732, -0.09265463054180145, 0.4614942967891693, -0.6370245218276978, 1.1112643480300903, -0.27617934346199036, 0.990111649036407...
func (a *Admin) SetConfigIfNeed(newConfig map[string]string) error { for addr, c := range a.Connections().GetAll() { oldConfig, err := a.GetAllConfig(c, addr) if err != nil { return err } for key, value := range newConfig { var err error if _, ok := parseConfigMap[key]; ok { value, err = utils.Pa...
[ -0.9134586453437805, -0.28495460748672485, 0.696381151676178, 0.11113710701465607, 0.13701066374778748, 0.056834399700164795, -0.8065284490585327, -0.4462018609046936, -0.9237765669822693, 0.9137081503868103, -0.060972556471824646, 0.3140438497066498, -0.5234732031822205, 1.721855878829956...
func (a *Admin) GetHashMaxSlot() Slot { return a.hashMaxSlots }
[ 1.214530110359192, 0.48154786229133606, 0.16329078376293182, 0.28229495882987976, -1.1200975179672241, 0.4303993284702301, -0.5717741250991821, 0.27638429403305054, -0.007435560692101717, -0.2662290632724762, 0.4170594811439514, 0.6237280368804932, -0.14883239567279816, 0.48449811339378357...
func (a *Admin) MigrateKeys(addr string, dest *Node, slots []Slot, batch int, timeout int, replace bool) (int, error) { if len(slots) == 0 { return 0, nil } keyCount := 0 c, err := a.Connections().Get(addr) if err != nil { return keyCount, err } timeoutStr := strconv.Itoa(timeout) batchStr := strconv.Itoa(b...
[ -0.9949280023574829, 1.181106448173523, 1.0378031730651855, -0.19808223843574524, -0.6220555901527405, -0.4724830985069275, -0.430486261844635, 0.2588872015476227, -0.7259123921394348, 1.160683035850525, 0.031192487105727196, 0.5464889407157898, -0.5768619775772095, 0.5911197662353516, -...
func (a *Admin) MigrateKeysInSlot(addr string, dest *Node, slot Slot, batch int, timeout int, replace bool) (int, error) { keyCount := 0 c, err := a.Connections().Get(addr) if err != nil { return keyCount, err } timeoutStr := strconv.Itoa(timeout) batchStr := strconv.Itoa(batch) for { resp := c.Cmd("CLUSTER...
[ -0.9541777968406677, 0.7160151600837708, 0.9813013672828674, -0.5064989328384399, -0.5888127684593201, -0.585412323474884, -0.42381036281585693, 0.11621615290641785, -0.907281756401062, 1.212916374206543, -0.021330056712031364, 0.44707828760147095, -0.405805766582489, 0.4073020815849304, ...
func (a *Admin) ForgetNode(id string) error { infos, _ := a.GetClusterInfos() for nodeAddr, nodeinfos := range infos.Infos { if nodeinfos.Node.ID == id { continue } if IsSlave(nodeinfos.Node) && nodeinfos.Node.MasterReferent == id { if err := a.DetachSlave(nodeinfos.Node); err != nil { a.log.Error(er...
[ 0.09134168177843094, 0.23484250903129578, 0.8206497430801392, -0.875080943107605, 0.44259220361709595, -0.16687624156475067, -0.183718740940094, 0.020268358290195465, -0.10221385955810547, 1.1077121496200562, 0.11301590502262115, 1.641244888305664, -0.42283689975738525, 0.5985214710235596,...
func (a *Admin) DetachSlave(slave *Node) error { c, err := a.Connections().Get(slave.IPPort()) if err != nil { a.log.Error(err, fmt.Sprintf("unable to get the connection for slave ID:%s, addr:%s", slave.ID, slave.IPPort())) return err } resp := c.Cmd("CLUSTER", "RESET", "SOFT") if err = a.Connections().Valida...
[ 0.07140177488327026, 0.7987691164016724, 0.7042240500450134, -0.768826425075531, -0.26700958609580994, 0.010686356574296951, 0.2618558704853058, -0.16717272996902466, -0.057035841047763824, 0.709462583065033, 0.061174176633358, 1.4654332399368286, -0.6946493983268738, 0.49101290106773376, ...
func (a *Admin) FlushAndReset(addr string, mode string) error { c, err := a.Connections().Get(addr) if err != nil { return err } c.PipeAppend("FLUSHALL") c.PipeAppend("CLUSTER", "RESET", mode) if !a.Connections().ValidatePipeResp(c, addr, "Cannot reset node") { return fmt.Errorf("Cannot reset node %s", addr)...
[ -0.7914234399795532, 0.3258447051048279, 0.4767679274082184, -0.5088132619857788, 0.1740865260362625, 0.039974842220544815, 0.3333125710487366, -0.521375298500061, 0.17758400738239288, 0.9881402850151062, 0.44234758615493774, 1.4055989980697632, 0.10725794732570648, -0.3306734263896942, ...
func (a *Admin) ResetPassword(newPassword string) error { all := a.Connections().GetAll() if len(all) == 0 { return fmt.Errorf("no connection for other redis-node found") } for addr, c := range a.Connections().GetAll() { a.log.Info("reset password", "addr", addr) setMasterauth := c.Cmd("CONFIG", "SET", "maste...
[ -0.47494930028915405, 0.36874333024024963, 0.8804725408554077, 0.541998028755188, 0.7962485551834106, 0.3397446870803833, 0.19110648334026337, 0.3440307080745697, -0.1936848759651184, 1.0458548069000244, -0.14555047452449799, 1.162010669708252, -0.6617144346237183, 1.3234450817108154, 0....
func (s *Subscription) Subscribe(channels ...string) { if len(channels) < 1 { return } s.broker.dataChan <- &envData{false, &envSubscription{true, s, channels}, nil} }
[ 0.558229386806488, 0.5791448354721069, 0.22281216084957123, 0.11310041695833206, 0.5959889888763428, 0.11160771548748016, -0.9586399793624878, -0.35895273089408875, -0.959420382976532, -0.2951566278934479, -0.7015613913536072, 0.24082444608211517, -0.4538906216621399, 0.35413768887519836, ...
func (s *Subscription) Unsubscribe(channels ...string) { s.broker.dataChan <- &envData{false, &envSubscription{false, s, channels}, nil} }
[ 0.8196980357170105, 0.3025703430175781, 0.10635464638471603, -0.47230514883995056, 0.2823680341243744, -0.04182954505085945, -0.7941980361938477, -0.06373295933008194, -1.3772361278533936, -0.08983395993709564, -0.5623565316200256, 0.10081790387630463, -0.6017351746559143, 0.05093795433640...
func internalPageHandler(response http.ResponseWriter, request *http.Request) { userName := getUserName(request) //if username is nil redirect temp to the main index handler if userName != "" { fmt.Fprintf(response, internalPage, userName) } else { http.Redirect(response, request, ...
[ -0.8209087252616882, -0.4183104634284973, 0.5868016481399536, -0.12764015793800354, -0.962884783744812, 0.23870834708213806, 1.1267681121826172, 0.7228076457977295, 0.3087438642978668, -0.28458553552627563, 0.9261283874511719, -0.19447128474712372, -1.1302365064620972, 0.004066344350576401...
func setSession(userName string, response http.ResponseWriter) { value := map[string]string{ "name": userName, } if encoded, err := cookieHandler.Encode("session", value); err == nil { cookie := &http.Cookie{ Name: "session", Value: encoded, ...
[ -0.7465699315071106, -0.662186324596405, 0.29745590686798096, 0.7586804032325745, -0.3973585367202759, 0.08124814182519913, 1.0821092128753662, 0.1334371566772461, 0.5509209036827087, 0.5348372459411621, -1.2521724700927734, 0.6725326180458069, -0.19080442190170288, 0.2618369460105896, 0...
func clearSession(response http.ResponseWriter) { cookie := &http.Cookie{ Name: "session", Value: "", Path: "/", MaxAge: -1, } http.SetCookie(response, cookie) }
[ -0.3928181231021881, -0.6404447555541992, 0.338428258895874, 0.3614824116230011, 0.28001677989959717, 0.346364289522171, 0.2520763576030731, -0.4383397698402405, 0.5380388498306274, 0.882419228553772, -0.1562933623790741, 0.8697365522384644, 0.30074793100357056, -0.4245033860206604, -0.1...
func NewNetworkSimPolicy(ctx *pulumi.Context, name string, args *NetworkSimPolicyArgs, opts ...pulumi.ResourceOption) (*NetworkSimPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DefaultSliceId == nil { return nil, errors.New("invalid value for requir...
[ 0.5171666145324707, 0.8681475520133972, 0.29870015382766724, -0.3430328667163849, 0.353299617767334, 0.5188249349594116, -0.3797382414340973, -0.46000245213508606, 0.35167956352233887, 0.13512945175170898, -0.7723531126976013, -0.7597585916519165, -0.2593429684638977, 0.08810657262802124, ...
func GetNetworkSimPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkSimPolicyState, opts ...pulumi.ResourceOption) (*NetworkSimPolicy, error) { var resource NetworkSimPolicy err := ctx.ReadResource("azure:mobile/networkSimPolicy:NetworkSimPolicy", name, id, state, &resource, opts...) if err ...
[ 0.6549348831176758, 0.8691807985305786, 0.21305623650550842, -0.6155261993408203, -0.05651858448982239, 0.34048324823379517, -0.7461897134780884, -0.5490471124649048, 1.4272654056549072, -0.3368544578552246, -0.6316202282905579, -0.07014047354459763, -0.024296805262565613, -1.1721072196960...
func (o NetworkSimPolicyOutput) DefaultSliceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.StringOutput { return v.DefaultSliceId }).(pulumi.StringOutput) }
[ 1.0596932172775269, 0.33530092239379883, 0.1859193593263626, 0.08964566886425018, 1.3116055727005005, 1.1876376867294312, -0.6728292107582092, -0.022500457242131233, 1.0736236572265625, 0.41536030173301697, -0.016247406601905823, 0.24546152353286743, -0.4636434018611908, -0.023745199665427...
func (o NetworkSimPolicyOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) }
[ 0.6764246821403503, -0.40249645709991455, 0.32684043049812317, -0.7813323736190796, 0.47493621706962585, 1.4379688501358032, -0.09888406097888947, 0.5687180161476135, 1.2486741542816162, -0.03734654560685158, -0.22570694983005524, -0.06195975840091705, 0.5531508922576904, -1.67941451072692...
func (o NetworkSimPolicyOutput) MobileNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.StringOutput { return v.MobileNetworkId }).(pulumi.StringOutput) }
[ 0.719907820224762, -0.45496711134910583, 0.409628301858902, 0.46829116344451904, -0.20084837079048157, 1.184187412261963, -0.3496429920196533, 0.33938780426979065, 1.8295949697494507, -0.5674505233764648, -0.5113927125930786, 0.010008808225393295, 0.1439211070537567, -0.8468964695930481, ...
func (o NetworkSimPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) }
[ 0.634473443031311, -0.16035863757133484, 0.28469207882881165, -0.9345532655715942, 0.11216860264539719, 1.3458532094955444, -0.5723715424537659, 0.057477183640003204, 0.7261093258857727, 0.6584416627883911, -0.7959754467010498, -0.171892449259758, 0.622416079044342, -1.0165071487426758, ...
func (o NetworkSimPolicyOutput) RatFrequencySelectionPriorityIndex() pulumi.IntPtrOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.IntPtrOutput { return v.RatFrequencySelectionPriorityIndex }).(pulumi.IntPtrOutput) }
[ 0.030987782403826714, -0.05022324621677399, 0.19400480389595032, -1.0944392681121826, 1.0131523609161377, 0.2247946560382843, 0.1544027477502823, -0.7399247884750366, 1.15314519405365, -0.6044686436653137, 0.6282063722610474, 0.5971524715423584, -0.3809572160243988, -1.177709937095642, 0...
func (o NetworkSimPolicyOutput) RegistrationTimerInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.IntPtrOutput { return v.RegistrationTimerInSeconds }).(pulumi.IntPtrOutput) }
[ 0.1738855093717575, 0.7854916453361511, 0.3896773159503937, -0.12876081466674805, 0.8037055730819702, 0.7505607604980469, -0.12913160026073456, 0.4475209712982178, 1.0359158515930176, 0.11170396953821182, -0.888573944568634, 0.3601440191268921, -0.39398065209388733, -0.48359808325767517, ...
func (o NetworkSimPolicyOutput) Slices() NetworkSimPolicySliceArrayOutput { return o.ApplyT(func(v *NetworkSimPolicy) NetworkSimPolicySliceArrayOutput { return v.Slices }).(NetworkSimPolicySliceArrayOutput) }
[ 0.19566887617111206, -0.03560397028923035, 0.35505345463752747, -0.23875829577445984, 0.4780312180519104, 0.9044709205627441, 0.09979817271232605, -0.25480931997299194, 1.3224031925201416, 0.04980095848441124, -0.6547849178314209, -0.09559624642133713, 0.1519516408443451, -0.20939423143863...
func (o NetworkSimPolicyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkSimPolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) }
[ 0.7353495359420776, 0.550682783126831, 0.321148544549942, -0.7358587384223938, 0.8744905591011047, 0.8325486183166504, -0.7613523602485657, 0.43371179699897766, 0.5963495969772339, 0.062470510601997375, -1.4184030294418335, -0.37741947174072266, 0.13852018117904663, -0.3741312026977539, ...
func (o NetworkSimPolicyOutput) UserEquipmentAggregateMaximumBitRate() NetworkSimPolicyUserEquipmentAggregateMaximumBitRateOutput { return o.ApplyT(func(v *NetworkSimPolicy) NetworkSimPolicyUserEquipmentAggregateMaximumBitRateOutput { return v.UserEquipmentAggregateMaximumBitRate }).(NetworkSimPolicyUserEquipmentAg...
[ 0.19489136338233948, 0.1928466111421585, 0.4623813033103943, 0.3697117269039154, -0.25357940793037415, 0.9048521518707275, 0.1418018490076065, -0.3011883795261383, 0.7603787779808044, -0.12698043882846832, 0.5691348314285278, -0.1124928668141365, 0.08501557260751724, -0.12412980943918228, ...
func NewTable() *Table { return &Table{} }
[ 1.286911129951477, 0.005083858966827393, 0.005781019106507301, 0.8754094839096069, -0.7898966670036316, 0.24083657562732697, 0.020969467237591743, -0.8527570962905884, -0.5271215438842773, -1.5898624658584595, 0.3137821853160858, 0.7790846824645996, -0.19890742003917694, -0.479268789291381...
func (t *Table) SetData(i interface{}) *Table { t.data = i return t }
[ -0.4348829686641693, 1.0385302305221558, 0.2325858324766159, 1.1105530261993408, -0.13108491897583008, 1.416479229927063, 1.0998765230178833, 0.33344361186027527, -0.07671242952346802, -1.0474225282669067, -0.85920649766922, 0.1413881927728653, 0.5116179585456848, 0.6881120800971985, -0....
func (t Table) PrintTo(w io.Writer) (err error) { var header, footer []string var body [][]string if t.data == nil { return errors.New("no data") } header, err = t.getHeader() if err != nil { return err } body, err = t.getBody() if err != nil { return err } footer, err = t.getFooter() if err != nil { ...
[ -0.5964617729187012, 0.5436359643936157, 0.8722627758979797, -0.4517841637134552, 0.6261381506919861, -0.18319036066532135, -0.16739118099212646, -0.8731544017791748, -1.2722829580307007, -0.22820302844047546, -0.08697579801082611, 0.34890255331993103, 0.14623601734638214, 0.35328820347785...
func (t *Table) Recurse(r []reflect.Type) *Table { t.typesToRecurse = r return t }
[ -0.3839968144893646, 0.9277780652046204, 0.1840423196554184, 0.1442173272371292, 0.20684446394443512, 0.7807785272598267, 1.0502419471740723, -0.7870874404907227, 0.22102506458759308, 0.44609615206718445, -0.27487993240356445, 1.3681252002716064, -0.24532286822795868, 0.9723802208900452, ...
func (t *Table) Specialize(s []ToSpecialize) *Table { t.typesToSpecialize = s return t }
[ -0.5476996302604675, 1.3192071914672852, 0.38284996151924133, 0.6484804749488831, 0.8525293469429016, -0.2520503103733063, 0.18071401119232178, 0.7268913388252258, -0.03356216102838516, -0.10405144095420837, -0.974437952041626, 0.9425071477890015, 0.3470374345779419, 0.4081885516643524, ...
func main() { docs.SwaggerInfo.Schemes = []string{"http", "https"} appRegistry := registry.NewAppRegistry() appRegistry.StartServer() }
[ 0.7728060483932495, 0.07217048108577728, 0.5372454524040222, 0.6694121360778809, 0.9327026605606079, 0.5922180414199829, 0.4564228653907776, 0.849890410900116, 0.06709285825490952, -0.11393855512142181, -0.2644818127155304, 0.9069865345954895, -0.02897895686328411, 0.06088881939649582, -...
func makeString(bits []string) string { chars := make([]byte, len(bits)) for i, bit := range bits { n, _ := strconv.Atoi(bit) chars[i] = byte(n) } return cleanString(chars) }
[ -0.6760899424552917, 0.24857616424560547, 0.26527583599090576, -0.13263936340808868, -0.8396053314208984, 0.8323204517364502, 0.12722976505756378, -1.604983925819397, -0.23291082680225372, 0.28638315200805664, -0.44638141989707947, 0.17887069284915924, 0.15112318098545074, -0.3835706412792...
func Octets(in string) []int { bits := strings.Split(in, ".") words := make([]int, 0, len(bits)) for _, b := range bits { i, _ := strconv.Atoi(b) words = append(words, i) } return words }
[ -0.30438199639320374, -0.17508865892887115, 0.6522051692008972, -0.6653037071228027, -0.17602989077568054, -0.5062410235404968, 0.9871362447738647, -0.6689904928207397, 0.24106177687644958, 0.33748364448547363, -0.2454836666584015, 0.2505679130554199, -0.8417338728904724, -0.73305183649063...
func oidStrings(in string) []string { words := []string{} bits := strings.Split(in, ".") for i := 0; i < len(bits); i++ { cnt, _ := strconv.Atoi(bits[i]) end := i + cnt + 1 if i > len(bits) || i >= end { break } if end > len(bits) { end = len(bits) } words = append(words, makeString(bits[i+1:end]...
[ -0.3882792592048645, -0.3212422728538513, 0.835174024105072, -0.5923914313316345, -0.04041312634944916, -0.3885408341884613, 0.21736928820610046, -0.9443358182907104, 0.7668843865394592, 0.943248450756073, 0.13751502335071564, 0.3508385717868805, -1.0320950746536255, -0.7308838963508606, ...
func cleanString(in []byte) string { r := bytes.Runes(in) acc := make([]rune, 0, len(r)) for _, c := range r { if strconv.IsPrint(c) { acc = append(acc, c) } } return string(acc) }
[ 0.2784057855606079, -0.7090956568717957, 0.36765721440315247, -0.44338205456733704, -0.4726020395755768, 0.4673141837120056, 0.32437029480934143, -0.026587599888443947, -0.016813067719340324, 0.8503618836402893, 0.4276164174079895, 0.7327869534492493, -0.7696659564971924, -0.21727702021598...
func dateTime(pdu gosnmp.SnmpPDU) (interface{}, error) { d := pdu.Value.([]byte) offset := 0 switch len(d) { case 8: case 11: offset = (int(d[9]) * 3600) + (int(d[10]) * 60) if string(d[8]) == "-" { offset = -offset } default: return time.Time{}, errors.Errorf("invalid octet length:%d", len(d)) } yea...
[ 0.3225553631782532, 0.0071376315318048, 0.6922595500946045, -0.49286386370658875, -0.7669127583503723, 0.12155229598283768, -1.018667459487915, -0.3597877323627472, 0.6261345148086548, 0.1306995004415512, -0.6103473901748657, -0.6762986779212952, -0.5615144968032837, -0.7031826376914978, ...
func pduType(pdu gosnmp.SnmpPDU) (interface{}, error) { switch pdu.Type { case gosnmp.Integer, gosnmp.Gauge32, gosnmp.TimeTicks, gosnmp.Uinteger32: case gosnmp.IPAddress, gosnmp.ObjectIdentifier: // ensuring counters are correctly cast allows for processing on type // e.g., if it's a uint64 it's a counter so calcu...
[ -0.3573363125324249, 0.11720965802669525, 0.9023717045783997, -0.556201159954071, 0.041265424340963364, -0.44104039669036865, -0.0017930571921169758, -0.9339410066604614, 0.6661737561225891, -0.5318412780761719, 0.39084216952323914, 0.1950875073671341, -0.8079313635826111, 0.45412287116050...
func getOID(oid string) (string, error) { if strings.HasPrefix(oid, ".") { return oid, nil } mu.Lock() defer mu.Unlock() fixed, ok := lookupOID[oid] if !ok { return oid, errors.Errorf("no OID found for %s", oid) } return fixed, nil }
[ 0.531258225440979, -0.17209646105766296, 0.5662423372268677, 0.2693299651145935, -0.4116574227809906, -0.1936560869216919, 0.575026273727417, -0.5264588594436646, 1.035333514213562, 0.1447543501853943, 0.1034608781337738, 0.5116384625434875, 0.24740539491176605, -0.7695362567901611, 0.11...
func regexpFilter(regexps []string, keep bool) (func(string) bool, error) { if len(regexps) == 0 { return func(name string) bool { return false }, nil } filterNames := []*regexp.Regexp{} for _, n := range regexps { re, err := regexp.Compile(n) if err != nil { return nil, errors.Wrapf(err, "filter patt...
[ -0.3028489351272583, -0.3268415927886963, 0.9249261617660522, 0.31460291147232056, -0.6861392855644226, -0.0860663428902626, -0.30845484137535095, -0.2183159738779068, 0.35971155762672424, 0.7545227408409119, -0.2970810532569885, -1.047736644744873, -0.9375045299530029, 0.00917750131338834...
func (joint B2WheelJoint) GetLocalAnchorA() B2Vec2 { return joint.M_localAnchorA }
[ 1.079803705215454, -1.8812528848648071, 0.2776203453540802, -0.1730603724718094, -0.24723929166793823, 0.10413670539855957, 1.0297672748565674, 0.011951887980103493, 0.031624309718608856, -0.12296576052904129, 0.528076171875, 1.0122909545898438, -0.04209952428936958, 0.3713812530040741, ...
func (joint B2WheelJoint) GetLocalAnchorB() B2Vec2 { return joint.M_localAnchorB }
[ 1.5569679737091064, -1.4971145391464233, 0.38139379024505615, 0.2261161208152771, 0.3804907500743866, 0.22097468376159668, 0.8445237278938293, 0.048279378563165665, -0.3072394132614136, -0.19768036901950836, -0.06616322696208954, 0.423115998506546, 0.018961401656270027, -0.1696292310953140...