text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (t *BPTree) insertIntoParent(left *Node, key []byte, right *Node) error { // Check if the parent of the leaf node is nil or not // if nil means the leaf is root node. if left.parent == nil { return t.insertIntoNewRoot(left, key, right) } // Get the left index. leftIndex := 0 for leftIndex <= left.parent....
[ -0.32334810495376587, 0.5104434490203857, 1.0435113906860352, -0.5446335673332214, -0.5234456658363342, -0.13366097211837769, -0.5571188926696777, -0.356235146522522, -1.503522515296936, 0.9039555191993713, -0.5158106088638306, -0.7692142128944397, -2.075791358947754, 0.5138909220695496, ...
func (t *BPTree) splitParent(node *Node, leftIndex int, key []byte, right *Node) error { tmpKeys := make([][]byte, order) tmpPointers := make([]interface{}, order+1) // In addition to the index location of leftIndex filtered out // the other key of the node is stored in tmpKeys. var i, j int for i = 0; i < node....
[ -0.9495135545730591, 0.20773860812187195, 1.1441495418548584, -1.0774734020233154, -0.565833568572998, -0.7296619415283203, 0.5931528806686401, -0.1695462465286255, -0.5518367290496826, 1.3976774215698242, -0.5252631902694702, 0.6370055079460144, -1.5303294658660889, -0.3533141016960144, ...
func insertIntoLeaf(leaf *Node, key []byte, pointer *Record) { i := 0 for i < leaf.KeysNum { if compare(key, leaf.Keys[i]) > 0 { i++ } else { break } } for j := leaf.KeysNum; j > i; j-- { leaf.Keys[j] = leaf.Keys[j-1] leaf.pointers[j] = leaf.pointers[j-1] } leaf.Keys[i] = key leaf.pointers[i] =...
[ -0.08815030753612518, -0.1594611555337906, 0.6522181630134583, -0.529881477355957, -0.13303714990615845, 0.08842314034700394, -0.15495645999908447, 0.3273696303367615, -0.8784112334251404, 0.6144693493843079, 0.04781024530529976, 0.34951087832450867, -1.7384679317474365, 0.0927777364850044...
func FindNumberofDifferences(adapters []int) (onejolts, threejolts int) { sort.Ints(adapters) for i, rating := range adapters { var diff int if i == 0 { diff = rating - 0 } else { diff = rating - adapters[i-1] } if diff == 1 { onejolts++ } else if diff == 3 { threejolts++ } } threejolts++ ...
[ -0.8299718499183655, 0.46360841393470764, 0.6298170685768127, -0.3340432643890381, 0.20860417187213898, -0.10834457725286484, 0.4068026840686798, -0.14726129174232483, 0.42298343777656555, -0.3884453773498535, -0.060199517756700516, -0.4702182710170746, -0.46948739886283875, 0.014158799313...
func FindArrangements(adapters []int) int { sort.Ints(adapters) dp := make([]int, adapters[len(adapters)-1]+1) dp[0] = 1 diffs := []int{1, 2, 3} currentIt := 0 for joltage, ways := range dp { if ways == 0 { continue } for _, diff := range diffs { if joltage+diff < len(dp) && findAdapter(joltage+diff, ...
[ -0.8020398020744324, 0.6356911659240723, 0.7263538837432861, 0.2583222985267639, -0.4672303795814514, -0.46806421875953674, 1.7567121982574463, -0.9032120108604431, 0.6353052854537964, 0.193775936961174, 0.7290776968002319, -0.645923912525177, -0.7242380976676941, 0.5938363671302795, 0.0...
func (heap *MinHeap) Get(index int) int { return heap.Heap[index] }
[ -0.5622603893280029, -0.297348290681839, 0.4497763514518738, -0.536298394203186, -0.07917812466621399, -0.18797171115875244, -0.6916192770004272, -0.8661157488822937, 0.4020645320415497, -0.8211960792541504, -0.5457112789154053, 1.0204811096191406, -0.70354163646698, -0.46401533484458923, ...
func (heap *MinHeap) Peek() int { return heap.Heap[0] }
[ 0.10118144750595093, -0.1441415697336197, 0.7431814074516296, -0.1797042191028595, -0.6372777223587036, -0.29808852076530457, -0.09562687575817108, -0.3121856153011322, 0.03982949256896973, -0.759294331073761, -0.0031730018090456724, 0.8594855070114136, -0.22978059947490692, 0.224594190716...
func (heap *MinHeap) Add(value int) *MinHeap { heap.checkSize() heap.Heap[heap.Count] = value heap.Count++ return heap }
[ -0.6223614811897278, -0.784234881401062, 0.5087769031524658, -0.4233810603618622, -0.8375776410102844, 0.7011380791664124, -0.3420554995536804, -0.8411572575569153, 1.1738488674163818, -1.110909342765808, -0.21294499933719635, 0.12959031760692596, -1.0870766639709473, 0.566719651222229, ...
func (heap *MinHeap) Pop() int { value := heap.Heap[0] heap.Heap[0] = heap.Count - 1 heap.Heap[heap.Count-1] = 0 heap.Count-- heap.heapifyDown() return value }
[ -0.007013951428234577, 0.0044087572023272514, 0.6709643006324768, -0.11484000831842422, -0.2859795391559601, -0.07417265325784683, 0.5420255064964294, 0.40782374143600464, -0.3675232231616974, -0.2753738760948181, -0.24597717821598053, -0.25013601779937744, -0.9686557054519653, 0.306151062...
func (h *RpcHandler) RegisterNode(nodeInfo *core.NodeInfo, reply *packet.RpcReply) error { logTitle := "RpcServer.RegisterNode[" + nodeInfo.EndPoint() + "] " if !h.getNode().IsLeader() { logger.Rpc().Warn(logTitle + "can not register to not leader node") *reply = packet.FailedReply(-1001, "can not register to not...
[ -0.7948543429374695, 0.3170257806777954, 1.0416736602783203, -0.4209304451942444, 1.109597086906433, 0.15409141778945923, -0.5878467559814453, -0.24395188689231873, 0.08906445652246475, 0.15455304086208344, -0.2751710116863251, 0.6877005696296692, -1.3275237083435059, 0.713840663433075, ...
func (h *RpcHandler) QueryNodes(pageInfo *core.PageInfo, reply *packet.RpcReply) error { logTitle := "RpcServer.QueryNodes " if !h.getNode().IsLeader() { logger.Rpc().Warn(logTitle + "can not query nodes from not leader node") *reply = packet.FailedReply(-1001, "can not query nodes from not leader node") return...
[ -0.499185711145401, 0.4468984305858612, 0.4845517575740814, -0.6838283538818359, 0.4076927602291107, 0.008536423556506634, -0.4418131411075592, -0.273260235786438, 0.5125924348831177, 0.5988557934761047, 0.3041791319847107, 0.6183747053146362, -1.7697335481643677, 0.17797572910785675, -0...
func (h *RpcHandler) QueryClusterExecutors(taskId string, reply *packet.RpcReply) error { logTitle := "RpcServer.QueryClusterExecutors [" + taskId + "] " if !h.getNode().IsLeader() { logger.Rpc().Warn(logTitle + "can not query executor info from not leader node") *reply = packet.FailedReply(-1001, "can not query ...
[ -0.4550037682056427, 0.2830235958099365, 0.6561040878295898, -0.3546881079673767, 0.18484742939472198, 0.0049737608060240746, -0.11418703198432922, -0.08661679923534393, 0.170389324426651, 0.5872275829315186, -0.34311047196388245, 0.2539979815483093, -0.7123794555664062, 0.8498262166976929...
func (h *RpcHandler) SubmitExecutor(execInfo *core.ExecutorInfo, reply *packet.RpcReply) error { logTitle := "RpcServer.SubmitExecutor: " if !h.getNode().IsLeader() { logger.Rpc().Warn("can not submit to not leader node") *reply = packet.FailedReply(-1001, "can not submit to not leader node") return nil } //...
[ -1.0048035383224487, 0.012185226194560528, 0.8107751607894897, -0.3630160391330719, -0.07544316351413727, 0.2284151166677475, -0.28244391083717346, -0.319410115480423, -0.014178427867591381, 0.42142343521118164, -0.6996135711669922, 0.9491150379180908, -0.7558737993240356, 0.92374467849731...
func Replace(search interface{}, replace interface{}, subject interface{}, count int) (interface{}, error) { switch search.(type) { case string: switch replace.(type) { case string: switch subject.(type) { case string: return strings.Replace(subject.(string), search.(string), replace.(string), count), ...
[ 0.24434633553028107, -0.3270632326602936, 0.9625636339187622, -0.12670564651489258, -0.30716925859451294, -0.7257019877433777, -0.2425479143857956, 0.39317604899406433, -0.1506272405385971, 0.5336194038391113, 0.07250947505235672, 0.9435766339302063, -0.7663788795471191, 0.4348188936710357...
func (c TfClient) ImportEscalationPolicy(id, name string) error { return c.importRes( c.pdToken, c.TerraformBin, EscalationPolicyPrefix, name, id, ) }
[ 0.950822651386261, -0.2136303186416626, 0.026082897558808327, -0.1900547444820404, 0.08977233618497849, 0.29533377289772034, -0.35492703318595886, -0.8087372779846191, 0.12788984179496765, 0.9551035165786743, -1.226258635520935, 0.011503256857395172, 0.24851147830486298, -0.63519287109375,...
func (c TfClient) ImportService(id, name string) error { return c.importRes( c.pdToken, c.TerraformBin, ServicePrefix, name, id, ) }
[ 0.4251788258552551, 0.0722493901848793, 0.12362580746412277, 0.009301108308136463, 0.5014270544052124, 0.06447304785251617, -0.6058024168014526, -0.8743224740028381, -0.38431358337402344, 0.36796778440475464, -0.5683825016021729, -0.2904084622859955, -0.7272868156433105, -0.473081111907959...
func NewTf(pdToken string) *TfClient { return &TfClient{ pdToken: pdToken, importRes: importResource, TerraformBin: "terraform", } }
[ 0.96232670545578, -0.2187434285879135, 0.0034717570524662733, -1.1828975677490234, -0.030129265040159225, -0.2350129634141922, 0.3133254051208496, -0.8613156080245972, -1.1465736627578735, -1.2249075174331665, 0.1145862564444542, 0.34826788306236267, -0.02327568270266056, -1.05704164505004...
func SDPParse(in []byte) (*sdp.Message, error) { s, err := sdp.DecodeSession(in, nil) if err != nil { return nil, err } m := &sdp.Message{} d := sdp.NewDecoder(s) err = d.Decode(m) if err != nil { // allow empty Origins if err.Error() != "failed to decode message: DecodeError in section s: origin address ...
[ -0.22991877794265747, -0.24661855399608612, 0.9377844929695129, -0.45072394609451294, -0.7177768349647522, 0.5769878625869751, -1.088091492652893, -0.4512522518634796, 0.5119367837905884, -0.2519625425338745, 0.91255784034729, -0.21328507363796234, -1.2868839502334595, -0.17601342499256134...
func SDPFilter(msgIn *sdp.Message, byteIn []byte) (*sdp.Message, []byte) { msgOut := &sdp.Message{} msgOut.Name = "Stream" msgOut.Origin = sdp.Origin{ Username: "-", NetworkType: "IN", AddressType: "IP4", Address: "127.0.0.1", } for i, m := range msgIn.Medias { var attributes []sdp.Attribute f...
[ 0.07423468679189682, -0.42259305715560913, 0.7359057068824768, -0.36172717809677124, -0.6144019961357117, -0.22146043181419373, -0.25114262104034424, -0.1682828664779663, 0.29492199420928955, 0.5038578510284424, 0.4124128818511963, 0.23321187496185303, -0.5317267179489136, 0.45152601599693...
func overlayPEMOptions(opts ...pemOptions) pemOptions { if len(opts) == 0 { return pemOptions{} } base := opts[0] for _, opt := range opts[1:] { if opt.cn != "" { base.cn = opt.cn } if opt.org != "" { base.org = opt.org } if opt.ipAddresses != nil { base.ipAddresses = opt.ipAddresses } if o...
[ -0.49898359179496765, 0.17485372722148895, 0.6813691258430481, -0.5130816102027893, -0.11028970032930374, 0.22235193848609924, -0.4565950632095337, -0.05807741731405258, 0.9219225645065308, -0.02380766160786152, -0.13583439588546753, -0.3427710235118866, -0.9017859697341919, -0.33272773027...
func (p *PermanentError) Unwrap() error { return p.Err }
[ -0.3299933075904846, -0.4115736782550812, 0.04974417760968208, -0.013484625145792961, -0.7918238639831543, 0.5295226573944092, -0.22093909978866577, 0.37074318528175354, 0.027990417554974556, -0.5747212767601013, 1.270209550857544, 1.0099130868911743, 0.06754423677921295, -0.77547544240951...
func Email(str string) error { if !strings.Contains(str, "@") { return errors.New("email should contains @") } return nil }
[ 0.47155407071113586, 0.09178195148706436, 0.31125226616859436, 0.23755310475826263, -0.9102404117584229, 1.0764762163162231, -0.2548665702342987, -0.46087923645973206, -0.808290421962738, 0.07093588262796402, 0.19837890565395355, 0.44697728753089905, -0.1353728175163269, -0.105381786823272...
func (s *Subscription) SetCells(cids []int64) { cells := s2.CellUnion{} for _, id := range cids { cells = append(cells, s2.CellID(id)) } s.Cells = cells }
[ -0.32677412033081055, 0.43472352623939514, 0.10710670799016953, 0.9102162718772888, 0.30795472860336304, -0.40432387590408325, -0.8573744893074036, -0.06931287795305252, 0.2670942544937134, -0.6187956929206848, -0.24594968557357788, 0.14545103907585144, -0.39650875329971313, 0.501849710941...
func (s *Subscription) SetExtents(extents *dssmodels.Volume4D) error { var err error if extents == nil { return nil } s.StartTime = extents.StartTime s.EndTime = extents.EndTime s.AltitudeHi = extents.SpatialVolume.AltitudeHi s.AltitudeLo = extents.SpatialVolume.AltitudeLo s.Cells, err = extents.SpatialVolume...
[ 0.4403986632823944, 0.10247802734375, 0.532871663570404, 0.5955470204353333, -0.5514515042304993, -0.05391639843583107, -0.7777115106582642, -0.24216312170028687, 0.22393445670604706, -0.35562071204185486, -0.1768384426832199, 0.3046804964542389, 0.15590280294418335, 1.1166341304779053, ...
func (s *Subscription) AdjustTimeRange(now time.Time, old *Subscription) error { if s.StartTime == nil { // If StartTime was omitted, default to Now() for new subscriptions or re- // use the existing time of existing subscriptions. if old == nil { s.StartTime = &now } else { s.StartTime = old.StartTime ...
[ -0.26966968178749084, 0.21841296553611755, 0.6863695979118347, 0.5680814981460571, -0.20204715430736542, -0.6075891256332397, -0.7383612394332886, 0.12388070672750473, -0.3875465989112854, 0.36531057953834534, 0.39144065976142883, 0.6879517436027527, -0.252344012260437, 1.4403384923934937,...
func (n *Node) String() string { return n.recString(0) }
[ -0.047730859369039536, 0.00967099517583847, 0.022256294265389442, -1.0888395309448242, 0.3311816453933716, 0.15911278128623962, 0.4274179935455322, -1.1865650415420532, -0.2637387812137604, -0.4088898301124573, -0.023210160434246063, 1.0314213037490845, -0.0032934872433543205, -0.219001665...
func (n* Node) recString(depth int) string { switch n.Type { case HASH: return "#" + strconv.Itoa(n.Val) case NUMBER: return strconv.Itoa(n.Val) case REG: return "/" + strings.Replace(n.Reg, "/", "\\/", -1) + "/" case DOLLAR: return "$" case DOT: return "." case ADRMARK: return "'" case PLUS: if d...
[ -0.579135000705719, 0.02221626602113247, 0.9669393301010132, -1.5435612201690674, -1.4564387798309326, 0.3153088092803955, 0.183693066239357, -0.9556007981300354, -0.18178291618824005, 0.3037325441837311, 0.21582062542438507, 0.33969008922576904, 0.12341505289077759, -0.08508168160915375, ...
func Parse(b *bufio.Reader) (*Node, error) { // TODO: Change from bytes.Bufer to something nicer... Best is an interface.. //Check for start, is it the start of an adr tl := newLexer(b) tl.consume(unicode.IsSpace) r, _, e := b.ReadRune() if e != nil { return nil, nil } b.UnreadRune() if !(unicode.IsDigit(r) ...
[ 0.5481746196746826, -0.08604986220598221, 0.8659003973007202, -0.11383962631225586, -0.8939165472984314, -0.6132597327232361, -0.06579528748989105, 0.4897976517677307, 0.3598601818084717, -0.11976184695959091, 0.3329186737537384, 0.06035058945417404, -0.712182343006134, 0.02490159124135971...
func initConsumer() sarama.Consumer { sarama.Logger = log.New(os.Stdout, "", log.Ltime) config := sarama.NewConfig() config.ClientID = CLIENTID config.Consumer.Return.Errors = true brokers := []string{BROKERS} master, err := sarama.NewConsumer(brokers, config) if err != nil { fmt.Println("error create maste...
[ 0.77672278881073, -0.485930472612381, 0.6557214856147766, 0.6272170543670654, -0.3423531651496887, -0.11270911246538162, 0.2941892743110657, 0.6525525450706482, -0.4632185101509094, 0.9325968623161316, -0.7112841010093689, 0.5458846092224121, -1.0948965549468994, 1.1175135374069214, 0.99...
func consume(topics []string, master sarama.Consumer) (chan *sarama.ConsumerMessage, chan *sarama.ConsumerError) { consumers := make(chan *sarama.ConsumerMessage) errors := make(chan *sarama.ConsumerError) for _, t := range topics { if strings.Contains(t, "__consumer_offsets") { continue } partitions, err...
[ 0.05108596011996269, -0.8020161986351013, 0.7125153541564941, 0.18211372196674347, -0.04762459546327591, -0.2904539704322815, -0.12004385143518448, -0.3845187723636627, -0.4911324977874756, 1.0806413888931274, 0.9437865018844604, 0.026580486446619034, -0.06033869832754135, 0.73693907260894...
func processMsg(msg *sarama.ConsumerMessage) { var str interface{} if err := json.Unmarshal(msg.Value, &str); err != nil { } s, _ := json.MarshalIndent(str, "", " ") fmt.Printf("Offset: %d Key: %s\n", msg.Offset, msg.Key) fmt.Printf("%s\n", s) fmt.Printf("-----\n") }
[ 0.06995869427919388, -0.296037495136261, 0.9916089773178101, -1.2770447731018066, -0.7419384717941284, -0.11138102412223816, 0.34970158338546753, 0.22393803298473358, -0.5493849515914917, 0.8034572005271912, 0.8403279781341553, 0.96392822265625, -0.2600555419921875, 1.0822572708129883, 1...
func tokenFromWeb(config *oauth2.Config) *oauth2.Token { authURL := config.AuthCodeURL("state-token", oauth2.AccessTypeOffline) log.Printf("Go to the following link in your browser then type the authorization code: \n%v\n", authURL) var code string if _, err := fmt.Scan(&code); err != nil { log.Fatalf("Unable to...
[ -0.1345262974500656, -0.7181684374809265, 0.37309086322784424, 0.6602065563201904, -0.5114425420761108, -0.3886112868785858, 0.7030020356178284, 0.6116998195648193, 0.8542323708534241, -0.4680362045764923, -0.02432071976363659, 0.4474899172782898, 0.3687833547592163, 0.1910175085067749, ...
func loadToken(file string) (*oauth2.Token, error) { f, err := os.Open(file) if err != nil { return nil, err } defer f.Close() t := &oauth2.Token{} err = json.NewDecoder(f).Decode(t) return t, err }
[ -0.43016600608825684, -0.9948113560676575, 0.6186520457267761, -0.4149472713470459, -0.8734683394432068, -0.30573707818984985, -0.5123793482780457, 0.9321297407150269, -0.7173693180084229, -0.43496885895729065, -1.0102694034576416, 1.3235396146774292, -0.0035069610457867384, -0.37522363662...
func saveToken(file string, token *oauth2.Token) { log.Printf("Saving credential file to: %s\n", file) f, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) if err != nil { log.Fatalf("Unable to cache oauth token: %v", err) } defer f.Close() json.NewEncoder(f).Encode(token) }
[ -0.22221100330352783, -0.8970348834991455, 0.2505896985530853, -0.5219699144363403, 0.45682844519615173, 0.8175978660583496, -0.5020048022270203, 1.1160941123962402, -1.0011169910430908, 0.3480879068374634, -1.8129724264144897, 1.0543028116226196, 0.31875720620155334, 0.18441107869148254, ...
func getClient() *calendar.Service { home := homeDir() basename := filepath.Base(os.Args[0]) cs, err := ioutil.ReadFile(filepath.Join(filepath.Dir(os.Args[0]), "client_secret.json")) if err != nil { cs, err = ioutil.ReadFile(filepath.Join(home, ".credentials", "client_secret.json")) } if err != nil { log.Fa...
[ 0.1997198909521103, -0.32488662004470825, 0.6847506761550903, -0.5494873523712158, -0.5453169345855713, 0.36981508135795593, 0.2658282518386841, -0.7495931386947632, -0.5075165629386902, -0.2439773976802826, -0.2901618182659149, 1.0882447957992554, -0.24258176982402802, -0.2814666032791137...
func SingleSymbolProcessor(commentSymbol string, line *types.DialectLine) { if strings.HasPrefix(line.Contents, commentSymbol) { line.IsComment = true } else { line.IsCode = true } }
[ 0.22023390233516693, -0.13257834315299988, 0.39851993322372437, -0.5149141550064087, 0.21750302612781525, -0.33762580156326294, 0.7294684052467346, 0.6443691849708557, 0.6654877066612244, 0.04311586543917656, -0.13905106484889984, 0.16112808883190155, -0.3319864273071289, 0.840535759925842...
func MultiSymbolProcessor(commentSymbols []string, line *types.DialectLine) { var found bool for _, commentSymbol := range commentSymbols { if strings.HasPrefix(line.Contents, commentSymbol) { found = true break } } if found { line.IsComment = true } else { line.IsCode = true } }
[ -0.0015705851837992668, -0.6787593960762024, 0.7086195945739746, -0.18459734320640564, -0.280080109834671, -0.6604341864585876, -0.08425556868314743, -0.04779012128710747, 0.5221835970878601, 0.7487489581108093, -0.5210084915161133, -0.20657700300216675, -0.47350749373435974, 1.24183905124...
func FileExists(filename ...string) bool { fn := path.Join(filename...) if _, err := os.Stat(fn); os.IsNotExist(err) { return false } return true }
[ -0.2518501579761505, -0.14303408563137054, 0.6497578024864197, 0.6437276601791382, 1.7503937482833862, 1.3113268613815308, -0.657102108001709, 0.6149469614028931, -1.7299779653549194, -0.38926073908805847, 0.25203973054885864, -1.2875062227249146, 0.10588433593511581, 0.473360538482666, ...
func (ct *Cointop) layout(g *gocui.Gui) error { maxX, maxY := ct.size() chartHeight := 10 topOffset := 0 if v, err := g.SetView(ct.marketbarviewname, 0, topOffset, maxX, 2); err != nil { if err != gocui.ErrUnknownView { return err } ct.marketbarview = v ct.marketbarview.Frame = false ct.marketbarview....
[ -0.8291930556297302, 0.17083574831485748, 0.8399574756622314, -0.689312219619751, -0.5228636860847473, 0.12950006127357483, 1.2765852212905884, -0.704422652721405, -0.002325675217434764, -0.5215993523597717, 0.13754363358020782, -0.2972830533981323, -0.22364917397499084, -0.234942719340324...
func WithDHCPServer(subnet *net.IPNet) Option { return func(d *dnsmasq) { d.subnet = subnet } }
[ -0.5357322692871094, 0.0146693279966712, 0.4503476023674011, 0.31271985173225403, 0.053018033504486084, 0.1408533751964569, -0.4368952214717865, -0.324922651052475, 0.4978578984737396, -0.5562235713005066, -0.9144365191459656, -0.8268393874168396, 0.8411355018615723, 0.642985999584198, -...
func WithDHCPNameServers(dns []string) Option { return func(d *dnsmasq) { d.dns = dns } }
[ -0.46795374155044556, 0.2613016963005066, 0.47978436946868896, -0.21825145184993744, -0.41064900159835815, 0.1420522928237915, -0.48845380544662476, -1.5457525253295898, 1.4793237447738647, -0.08524653315544128, -1.2653840780258179, -0.47297629714012146, 0.35905420780181885, 0.244666904211...
func WithDHCPClasslessStaticRoutes(routes []Route) Option { return func(d *dnsmasq) { d.classlessStaticRoutes = routes } }
[ -0.9200705289840698, -0.30719202756881714, 0.5283165574073792, 0.6654277443885803, 1.1083678007125854, 0.5926723480224609, -0.5422778725624084, -0.6389910578727722, 0.5192798972129822, -0.5220559239387512, -0.6298148036003113, -0.6435710787773132, 0.25932422280311584, 0.6182551383972168, ...
func WithDHCPWPAD(wpad string) Option { return func(d *dnsmasq) { d.wpad = wpad } }
[ -0.16260695457458496, 0.13026024401187897, 0.4530014991760254, -0.24559980630874634, -0.25362488627433777, 0.5228631496429443, 0.32297471165657043, -0.7530933022499084, 0.5139570832252502, -0.08204270899295807, -0.33744484186172485, -0.5051177740097046, 0.4483312964439392, 0.78486222028732...
func WithInterface(ifname string) Option { return func(d *dnsmasq) { d.ifname = ifname } }
[ -0.10172834992408752, 0.09094539284706116, 0.33076372742652893, -0.2728908360004425, -1.257985234260559, 0.5761513113975525, 0.37354499101638794, -0.828204333782196, 0.15895071625709534, -0.35082870721817017, -0.33216002583503723, -0.3037240207195282, -1.0188831090927124, 0.347235977649688...
func WithResolveHost(host string, ip net.IP) Option { return func(d *dnsmasq) { d.enableDNS = true d.resolvedHost = host d.resolveHostToIP = ip } }
[ 0.48813411593437195, 0.4867989122867584, 0.5364435315132141, 0.6730257868766785, -0.21406309306621552, -0.7845959067344666, -0.5347036719322205, 0.12531326711177826, 0.37219467759132385, -0.43515869975090027, -0.5773770213127136, -1.1776247024536133, 0.8403580188751221, -0.4896745383739471...
func New(opts ...Option) *dnsmasq { d := &dnsmasq{} for _, opt := range opts { opt(d) } return d }
[ -1.2764288187026978, -0.06112130731344223, 0.41519975662231445, 0.4943992793560028, -0.7868039608001709, -0.4865460693836212, -0.4838334918022156, -0.6677271127700806, -0.11352638155221939, -0.3330630958080292, -0.5927442312240601, 0.32774388790130615, 0.8260506987571716, 0.075506463646888...
func (d *dnsmasq) Start(ctx context.Context, env *env.Env) error { d.env = env if d.ifname == "" { d.ifname = d.env.VethInName } // Prepare config file. confVals := map[string]string{ "ifname": d.ifname, "port": "0", // disable DNS } var gateway net.IP if d.subnet != nil { ip := d.subnet.IP.To4() ...
[ -0.6458072066307068, -0.06133776158094406, 0.7247098088264465, -0.1263514906167984, 0.47646716237068176, -0.4627242088317871, 0.42125260829925537, -0.37941938638687134, -0.21548187732696533, 0.29039132595062256, -0.34135618805885315, 0.672989010810852, 0.9724349975585938, 0.732187271118164...
func (d *dnsmasq) Stop(ctx context.Context) error { if d.cmd == nil || d.cmd.Process == nil { return nil } if err := d.cmd.Kill(); err != nil { return errors.Wrap(err, "failed to kill dnsmasq processs") } d.cmd.Wait() d.cmd = nil return nil }
[ -0.3914664387702942, -0.21112242341041565, 0.4408171474933624, -0.12187851965427399, 0.2212367057800293, -0.06681732088327408, -0.29956766963005066, -0.5529751181602478, 0.16293200850486755, -0.3269188702106476, -0.06462154537439346, 0.4465084373950958, 0.27891188859939575, 0.0202912781387...
func (d *dnsmasq) WriteLogs(ctx context.Context, f *os.File) error { return d.env.ReadAndWriteLogIfExists(d.env.ChrootPath(logPath), f) }
[ -0.22127526998519897, -0.06248139962553978, 0.42798247933387756, 0.10494469851255417, 0.3705047369003296, 0.29537802934646606, 0.02037845179438591, -0.5724357962608337, -0.3641562759876251, -0.10073571652173996, 0.13310840725898743, 0.37829267978668213, 0.5289341807365417, 0.44375431537628...
func (d *dnsmasq) GetLeases(ctx context.Context) ([]lease, error) { s, err := os.ReadFile(d.env.ChrootPath(leaseFilePath)) if err != nil { return nil, errors.Wrap(err, "failed to read leases file") } var leases []lease lines := strings.Split(string(s), "\n") for _, l := range lines { if len(l) == 0 { cont...
[ 0.5056702494621277, -0.23528559505939484, 0.5695109367370605, -0.04143466427922249, 0.10323543846607208, 0.3037757873535156, -0.30571413040161133, 0.23236273229122162, 0.05648556724190712, -0.3488292992115021, 0.047167062759399414, 0.19221405684947968, -1.0296887159347534, 0.38144606351852...
func NewSink(tap TapInterface) SinkInterface { s := &Sink{ tap: tap, } return s }
[ -0.18655820190906525, 0.1918674260377884, 0.024403290823101997, 0.6965003609657288, -0.9632676839828491, -0.15632185339927673, 0.8474473357200623, -1.2462891340255737, 1.0843554735183716, -0.729502260684967, 0.4033990502357483, -0.26897749304771423, 0.3561096489429474, 0.023158149793744087...
func NewLxdAudit(filters []string, plChan chan m2.LxdAuditResults, completedChan chan bool, fi []utils.FilesInfo, evaluator CmdEvaluator) *LxdAudit { return &LxdAudit{ PredicateChain: buildPredicateChain(filters), PredicateParams: buildPredicateChainParams(filters), ResultProcessor: GetResultProcessingFunction(...
[ 0.5037243962287903, -0.5942919850349426, 0.5198675990104675, -1.3165638446807861, -1.457706332206726, 0.3024657368659973, -0.25216144323349, 0.25254467129707336, -0.2825929522514343, -0.6468649506568909, 0.5319898128509521, 0.9192531704902649, -0.24826708436012268, 0.38562092185020447, -...
func (ldx LxdAudit) Help() string { return startup.GetHelpSynopsis() }
[ 0.9092222452163696, -0.02450866624712944, 0.4921835958957672, 0.03878944739699364, -0.49928784370422363, 1.0550178289413452, -0.18436959385871887, 0.33595186471939087, 0.6231235265731812, -0.1191488653421402, 0.29642999172210693, 1.3009802103042603, 0.8990172147750854, -0.564732551574707, ...
func (ldx *LxdAudit) Run(args []string) int { // load audit tests fro benchmark folder auditTests := ldx.FileLoader.LoadAuditTests(ldx.FilesInfo) // filter tests by cmd criteria ft := filteredAuditBenchTests(auditTests, ldx.PredicateChain, ldx.PredicateParams) //execute audit tests and show it in progress bar com...
[ 0.12212210893630981, 0.08195355534553528, 0.7425159215927124, -0.8976104259490967, 0.3030894100666046, 0.4321620762348175, 0.8940628170967102, 0.06562059372663498, -0.2707560658454895, -0.45245081186294556, 0.22038641571998596, 0.649750292301178, -0.40708664059638977, 0.219948872923851, ...
func (ldx *LxdAudit) runAuditTest(at *models.AuditBench) []*models.AuditBench { auditRes := make([]*models.AuditBench, 0) if at.NonApplicable { auditRes = append(auditRes, at) return auditRes } // execute audit test command cmdEvalResult := ldx.Evaluator.EvalCommand(at.AuditCommand, at.EvalExpr) // continue w...
[ -0.7591474056243896, -0.206712007522583, 0.3952150344848633, -0.5459668040275574, -0.005141471978276968, 0.09022056311368942, -0.023062938824295998, -0.6751813292503357, 0.27470770478248596, -0.21258996427059174, 0.07143191248178482, 0.746639609336853, -0.36473575234413147, -0.054238907992...
func orchestrate(done chan<- bool) { var wg sync.WaitGroup for i := 1; i <= 25; i++ { wg.Add(1) go work(i, &wg) } wg.Wait() done <- true }
[ -0.5036347508430481, 1.7422547340393066, 0.5620188117027283, -0.013630317524075508, -0.008293107151985168, 0.0847826823592186, 0.802503228187561, -1.0044752359390259, -1.6176209449768066, 0.14703524112701416, -0.4752070903778076, 0.4978155493736267, -0.946403443813324, 0.40066319704055786,...
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { return &Client{transport: transport, formats: formats} }
[ -0.053929269313812256, -1.4649492502212524, -0.09012952446937561, -0.8262796401977539, -0.550800621509552, 0.6438911557197571, 0.3526709973812103, -0.1351967602968216, -0.9943568110466003, -0.7430494427680969, -0.3152836263179779, 0.610390305519104, 0.2375689148902893, 0.0706297904253006, ...
func (a *Client) PostReturnAddressesByReturnAddressIDDelete(params *PostReturnAddressesByReturnAddressIDDeleteParams, authInfo runtime.ClientAuthInfoWriter) (*PostReturnAddressesByReturnAddressIDDeleteOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostReturnAddressesByReturn...
[ -0.10204596817493439, -1.1391162872314453, 0.5127021670341492, -0.4273790717124939, -0.24906864762306213, -0.3866507112979889, 0.9795363545417786, -0.28464314341545105, 0.9718273282051086, 0.19964304566383362, -0.26928219199180603, 0.43681538105010986, -1.942503571510315, -0.64235901832580...
func (a *Client) PostReturnAddressesByReturnAddressIDGet(params *PostReturnAddressesByReturnAddressIDGetParams, authInfo runtime.ClientAuthInfoWriter) (*PostReturnAddressesByReturnAddressIDGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostReturnAddressesByReturnAddressID...
[ -0.8058066368103027, -0.6243253350257874, 0.5629144906997681, -0.8769041299819946, -0.19933821260929108, -0.401892751455307, 0.8530846238136292, -0.6253668665885925, 0.3005834221839905, -0.07672102749347687, -0.6362828016281128, 0.3060835003852844, -1.1648420095443726, -0.3157082796096802,...
func (a *Client) PostReturnAddressesByReturnAddressIDPut(params *PostReturnAddressesByReturnAddressIDPutParams, authInfo runtime.ClientAuthInfoWriter) (*PostReturnAddressesByReturnAddressIDPutOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostReturnAddressesByReturnAddressID...
[ -0.9144943952560425, -0.5165346264839172, 0.6569017767906189, -0.8371614813804626, -0.8243302702903748, -0.2711372375488281, 1.5201191902160645, -0.6913689970970154, 0.6825010180473328, -0.4666769802570343, -0.633506178855896, 0.08852419257164001, -1.519424319267273, -1.106429100036621, ...
func (a *Client) PostReturnAddressesGet(params *PostReturnAddressesGetParams, authInfo runtime.ClientAuthInfoWriter) (*PostReturnAddressesGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostReturnAddressesGetParams() } result, err := a.transport.Submit(&runtime.ClientOp...
[ -1.0831108093261719, 0.14713509380817413, 0.8722261190414429, -0.5179315209388733, -0.3735463321208954, -0.959740400314331, 0.5969445705413818, -0.2840030789375305, -0.5720004439353943, 0.24328404664993286, -0.3782496750354767, 0.4201955497264862, -1.9148292541503906, -0.5811342000961304, ...
func (a *Client) PostReturnAddressesPost(params *PostReturnAddressesPostParams, authInfo runtime.ClientAuthInfoWriter) (*PostReturnAddressesPostOK, error) { // TODO: Validate the params before sending if params == nil { params = NewPostReturnAddressesPostParams() } result, err := a.transport.Submit(&runtime.Clie...
[ -0.3225424289703369, -0.28006720542907715, 0.656276524066925, -0.40550270676612854, -0.7918787598609924, -0.4863622486591339, 0.7165207266807556, -0.18155734241008759, 0.3156619071960449, 0.17346006631851196, -0.7156802415847778, -0.22541528940200806, -1.9801687002182007, -0.72560310363769...
func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport }
[ 0.43289124965667725, -0.16396044194698334, 0.06502870470285416, 0.17467869818210602, -0.022012455388903618, 0.3327627182006836, 1.1535402536392212, -0.7375835180282593, 0.32833772897720337, -1.0833802223205566, -1.4707483053207397, 0.4919946491718292, -0.44076064229011536, 0.62663459777832...
func Dial(network, address string) (*Client, error) { conn, err := net.Dial(network, address) if err != nil { return nil, err } return NewClient(conn) }
[ 0.7851290106773376, -0.26012879610061646, 0.2939892113208771, -0.2100769281387329, -0.29168248176574707, 0.570086658000946, -0.6652812361717224, -0.15830150246620178, 0.3923291265964508, 0.03572779521346092, 0.23761773109436035, 0.8189800381660461, 0.008491255342960358, -0.7298250198364258...
func DialURI(uri *URI, cfg *DialConfig) (*Client, error) { var conn Connection var err error nw := cfg.Net if nw == nil { nw, err = stdnet.NewNet() if err != nil { return nil, fmt.Errorf("failed to create net: %w", err) } } addr := net.JoinHostPort(uri.Host, strconv.Itoa(uri.Port)) switch { case uri...
[ -0.5405455827713013, 0.1965288370847702, 0.9096028208732605, 0.07065249234437943, -0.2354872226715088, 0.08786952495574951, 0.1061183288693428, -0.5318454504013062, 0.10950362682342529, -0.13738252222537994, 0.45816484093666077, 0.6155188083648682, -0.6158543229103088, -0.275153249502182, ...
func WithHandler(h Handler) ClientOption { return func(c *Client) { c.handler = h } }
[ 0.670164167881012, 0.19236990809440613, 0.15755489468574524, -0.3084699809551239, -0.5005277395248413, 0.7005273103713989, 0.8047902584075928, -0.32497429847717285, -0.03892742469906807, -1.085484504699707, -0.3093591332435608, -0.25188055634498596, 0.4160287082195282, 0.3467412292957306, ...
func WithRTO(rto time.Duration) ClientOption { return func(c *Client) { c.rto = int64(rto) } }
[ 0.7605046033859253, 0.11957723647356033, 0.5586165189743042, -0.6704374551773071, -0.15580691397190094, 0.062263865023851395, 0.33916133642196655, -1.2024731636047363, -0.2677602171897888, 0.12178630381822586, -0.7033783197402954, 0.27225062251091003, 0.759297251701355, -0.4491263926029205...
func WithClock(clock Clock) ClientOption { return func(c *Client) { c.clock = clock } }
[ 0.7311726808547974, 0.1770400106906891, 0.3761029541492462, -0.6887028217315674, -0.3255424201488495, 0.47092175483703613, 1.2314999103546143, -0.8092195987701416, 0.6639156341552734, -0.37835949659347534, -0.23940546810626984, 0.6519169211387634, 0.01980118453502655, -0.2366153448820114, ...
func WithTimeoutRate(d time.Duration) ClientOption { return func(c *Client) { c.rtoRate = d } }
[ 0.16915671527385712, 0.273203045129776, 0.21898609399795532, -0.5650584101676941, -0.6670985817909241, -0.48886898159980774, -0.18619509041309357, -0.9097821116447449, 0.17419792711734772, 0.18053127825260162, 0.43566155433654785, -1.2278541326522827, -0.07550782710313797, 0.18020834028720...
func WithAgent(a ClientAgent) ClientOption { return func(c *Client) { c.a = a } }
[ 0.18440406024456024, -0.5851070880889893, 0.2614514231681824, -1.092308759689331, -0.34116053581237793, -0.06974615901708603, 1.219907283782959, -0.637511134147644, 1.3588629961013794, -0.566456139087677, -0.42106834053993225, 0.32013073563575745, 0.5060248374938965, 0.04693419486284256, ...
func WithCollector(coll Collector) ClientOption { return func(c *Client) { c.collector = coll } }
[ 0.7216693162918091, -0.905475914478302, 0.33786702156066895, -0.6995000839233398, -0.6486538052558899, 0.3151736259460449, 0.40999090671539307, -1.1154451370239258, 0.20461618900299072, -0.36635124683380127, -0.2748146653175354, -0.822892427444458, 0.9205818176269531, 0.30845075845718384, ...
func WithNoConnClose() ClientOption { return func(c *Client) { c.closeConn = false } }
[ 0.5118152499198914, -0.1904386729001999, 0.2257937490940094, -0.7790771722793579, -0.676660418510437, -0.4339779019355774, 0.01671435870230198, -0.6179299354553223, -0.624948263168335, -0.8917123079299927, 0.2510511875152588, -1.2075648307800293, -1.041867733001709, 0.41486379504203796, ...
func WithNoRetransmit(c *Client) { c.maxAttempts = 0 if c.rto == 0 { c.rto = defaultMaxAttempts * int64(defaultRTO) } }
[ 0.3783498704433441, -0.06412958353757858, 0.13275323808193207, -1.3710253238677979, 0.08908378332853317, -0.6135841012001038, 0.526962161064148, -0.30595704913139343, -0.09531597048044205, -0.17220169305801392, -0.766868531703949, -0.5907621383666992, -0.90788733959198, 0.07161220163106918...
func NewClient(conn Connection, options ...ClientOption) (*Client, error) { c := &Client{ close: make(chan struct{}), c: conn, clock: systemClock(), rto: int64(defaultRTO), rtoRate: defaultTimeoutRate, t: make(map[transactionID]*clientTransaction, 100), maxAtte...
[ 0.5094946026802063, -0.23842166364192963, 0.6367350220680237, 0.29196664690971375, 0.03757459297776222, -0.3444385230541229, 0.7830653190612793, -1.0641472339630127, -0.34532296657562256, 0.06799837946891785, 0.33411943912506104, -0.814879834651947, -0.42431122064590454, -0.150598347187042...
func (c *Client) start(t *clientTransaction) error { c.mux.Lock() defer c.mux.Unlock() if c.closed { return ErrClientClosed } _, exists := c.t[t.id] if exists { return ErrTransactionExists } c.t[t.id] = t return nil }
[ 0.3685753345489502, -0.4972262382507324, 0.22821079194545746, -0.7750699520111084, -0.3246239423751831, -0.3684028089046478, 0.06992258131504059, -0.7568110227584839, -0.716316819190979, 0.7233592867851257, -1.0384107828140259, 0.6237125396728516, 0.06961861252784729, -1.0008238554000854, ...
func (c *Client) SetRTO(rto time.Duration) { atomic.StoreInt64(&c.rto, int64(rto)) }
[ 0.4567980170249939, 0.8280954360961914, 0.362527459859848, -0.30838650465011597, 0.20658938586711884, 0.06332617998123169, 0.05981351062655449, -0.8951131701469421, -1.1342130899429321, 0.43221789598464966, -1.6433669328689575, 0.854736328125, -0.5001908540725708, 0.1227605864405632, 0.0...
func (c *Client) Close() error { if err := c.checkInit(); err != nil { return err } c.mux.Lock() if c.closed { c.mux.Unlock() return ErrClientClosed } c.closed = true c.mux.Unlock() if closeErr := c.collector.Close(); closeErr != nil { return closeErr } var connErr error agentErr := c.a.Close() if c...
[ 0.5068942308425903, -0.6738864779472351, 0.7818553447723389, -0.3248439133167267, -0.5905110239982605, 0.07238476723432541, 0.31291136145591736, -0.8519830107688904, -0.2721900939941406, -0.6144409775733948, 0.7900424599647522, -0.479580819606781, -1.0705301761627197, 0.49447503685951233, ...
func (c *Client) Indicate(m *Message) error { return c.Start(m, nil) }
[ -0.46264684200286865, 0.8001980781555176, 0.26446768641471863, -0.4105699360370636, 0.3266700208187103, 0.18076704442501068, 0.564117968082428, -0.15247590839862823, -0.27131327986717224, 0.1752976030111313, 0.3912784159183502, 1.3146666288375854, -0.7459891438484192, 1.4928139448165894, ...
func (c *Client) Do(m *Message, f func(Event)) error { if err := c.checkInit(); err != nil { return err } if f == nil { return c.Indicate(m) } h := callbackWaitHandlerPool.Get().(*callbackWaitHandler) //nolint:forcetypeassert h.setCallback(f) defer func() { callbackWaitHandlerPool.Put(h) }() if err := c....
[ 0.4401422441005707, 0.6191883087158203, 0.8599869608879089, 0.33139002323150635, 0.3411645293235779, 0.5156570076942444, 0.41902822256088257, -0.17027893662452698, -0.7504374980926514, 0.14803628623485565, -0.12120041251182556, 0.9147006273269653, -0.16120688617229462, 0.9447764754295349, ...
func (c *Client) Start(m *Message, h Handler) error { if err := c.checkInit(); err != nil { return err } c.mux.RLock() closed := c.closed c.mux.RUnlock() if closed { return ErrClientClosed } if h != nil { // Starting transaction only if h is set. Useful for indications. t := acquireClientTransaction() ...
[ 0.5498089790344238, -0.1329561322927475, 0.48956412076950073, -0.36349451541900635, -0.06737829744815826, -0.19234205782413483, 0.7931884527206421, 0.1441790610551834, -1.1309014558792114, 0.4065864384174347, 0.053170956671237946, 0.7921479344367981, -0.3279009163379669, 0.2302562296390533...
func (err *DominosError) init(jsonData []byte) error { err.fullErr = map[string]interface{}{} if e := json.Unmarshal(jsonData, &err.fullErr); e != nil { return e } return mapstructure.Decode(err.fullErr, err) }
[ -0.7079671025276184, -0.7004519701004028, 0.5806506276130676, -1.0413340330123901, -1.269417643547058, -0.6703070998191833, -0.3176078200340271, 0.4829433858394623, 0.1778821349143982, -0.32965388894081116, -0.2449042946100235, 0.4258303940296173, 0.06702158600091934, -0.35290321707725525,...
func IsFailure(err error) bool { e, ok := isDominosErr(err) if !ok { return false } return e.Status == FailureStatus }
[ -1.066312551498413, 0.24237790703773499, 0.26742231845855713, 1.4103962182998657, -0.8847952485084534, -0.4584220051765442, -0.4084847569465637, 0.005984915886074305, 0.9109717607498169, -0.13433298468589783, -0.3669545650482178, -0.003767607035115361, -0.6322711110115051, 0.91833972930908...
func IsWarning(err error) bool { e, ok := isDominosErr(err) if !ok { return false } return e.Status == WarningStatus }
[ -0.7239562273025513, 0.4918539822101593, 0.37138429284095764, 1.772282361984253, -1.116899847984314, -0.36129748821258545, -0.6065232753753662, -0.2522808015346527, 0.9990755915641785, 0.3272087275981903, -0.16903288662433624, 0.6486808657646179, -0.07156427204608917, 0.18639211356639862, ...
func IsOk(err error) bool { if err == nil { return true } e, ok := isDominosErr(err) if !ok { return false } return e.Status == OkStatus }
[ -0.6462914347648621, 0.09873273968696594, 0.4818458557128906, 1.0554622411727905, -1.060387134552002, -0.19271433353424072, 0.4244408905506134, 0.4878944754600525, 0.5411300659179688, 0.46192893385887146, -0.3096098303794861, 0.32882797718048096, 0.16834276914596558, 0.11833866685628891, ...
func errpair(first, second error) error { if first == nil || second == nil { if first != nil { // should check the first error first return first } return second } return &errorpair{first, second} }
[ -0.7132598161697388, -0.008130419068038464, 0.6966789364814758, 0.1251794993877411, -0.5582751035690308, -0.08763597905635834, -1.2913179397583008, -0.6500688195228577, -0.36046913266181946, -0.21751472353935242, 0.6457479596138, 0.37064653635025024, -0.6243730783462524, 1.6821588277816772...
func AvailableDevices(budgetDataPath string) DeviceList { devicePaths, _ := filepath.Glob( filepath.Join(budgetDataPath, "devices", "*.ydevice"), ) devices := make(DeviceList, 0) for _, path := range devicePaths { device := Device{} file, _ := os.Open(path) jsonDecoder := json.NewDecoder(file) jsonDecoder...
[ -0.8940778970718384, -0.3664959669113159, 0.6386561989784241, 0.08956166356801987, 0.056781210005283356, 0.09982731193304062, 0.6401020288467407, 0.08200305700302124, 0.5160725712776184, 0.7720279693603516, -0.16424770653247833, 0.05425628274679184, 0.5707908272743225, 0.6922658085823059, ...
func (client *Client) DescribeExecutionPlan(request *DescribeExecutionPlanRequest) (response *DescribeExecutionPlanResponse, err error) { response = CreateDescribeExecutionPlanResponse() err = client.DoAction(request, response) return }
[ -0.9225395917892456, 1.1268500089645386, 0.5088942646980286, 0.25510597229003906, 0.2560259699821472, -0.18896912038326263, 0.5039027333259583, -0.8902799487113953, 0.5592420697212219, -0.5694667100906372, -0.41388002038002014, 1.9628937244415283, -0.42857205867767334, 0.4629424810409546, ...
func (client *Client) DescribeExecutionPlanWithChan(request *DescribeExecutionPlanRequest) (<-chan *DescribeExecutionPlanResponse, <-chan error) { responseChan := make(chan *DescribeExecutionPlanResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) defer close(...
[ -0.4626896381378174, 0.43366220593452454, 0.5427576303482056, -0.47907203435897827, -0.08272992074489594, 0.1543719321489334, 0.07028555870056152, -1.413514256477356, 0.7219992876052856, -0.3588699400424957, 0.02787829376757145, 1.5467017889022827, -0.25760042667388916, 0.3733094334602356,...
func (client *Client) DescribeExecutionPlanWithCallback(request *DescribeExecutionPlanRequest, callback func(response *DescribeExecutionPlanResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *DescribeExecutionPlanResponse var err error defer close(res...
[ -0.38139989972114563, 0.8836150169372559, 0.6262361407279968, -0.13204970955848694, -0.11832161992788315, -0.31141892075538635, 0.5203480124473572, -1.1413732767105103, 1.084175944328308, -0.29044273495674133, 0.16860149800777435, 0.8748446106910706, 0.02690937928855419, 0.7448372840881348...
func CreateDescribeExecutionPlanRequest() (request *DescribeExecutionPlanRequest) { request = &DescribeExecutionPlanRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Emr", "2016-04-08", "DescribeExecutionPlan", "emr", "openAPI") request.Method = requests.POST return }
[ -0.008384885266423225, 0.40725719928741455, 0.5583332180976868, -0.062428634613752365, 0.5775871276855469, 0.48872390389442444, -0.339299738407135, -0.5229871869087219, 0.32420650124549866, -0.5857041478157043, 0.21245023608207703, 1.8181649446487427, 0.15580302476882935, 0.967881023883819...
func CreateDescribeExecutionPlanResponse() (response *DescribeExecutionPlanResponse) { response = &DescribeExecutionPlanResponse{ BaseResponse: &responses.BaseResponse{}, } return }
[ -0.019494593143463135, -0.03544335067272186, 0.4052302837371826, -0.0921945869922638, 0.652046799659729, 0.15133526921272278, 0.554203987121582, -1.1933817863464355, 1.0263843536376953, -0.6598515510559082, -0.44953954219818115, 0.8323676586151123, -0.31805017590522766, 0.6228230595588684,...
func (o *GetSnapshotPlansConnectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetSnapshotPlansConnectionOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err ...
[ -0.0954553559422493, -1.0088435411453247, 0.6288102865219116, 0.33358049392700195, -0.40613484382629395, -0.5120790600776672, 0.21181242167949677, -0.40393364429473877, 0.8371490240097046, 0.15757998824119568, 0.2971368432044983, -0.7614646553993225, -0.32769379019737244, -0.49978566169738...
func NewGetSnapshotPlansConnectionOK() *GetSnapshotPlansConnectionOK { return &GetSnapshotPlansConnectionOK{} }
[ -0.15844430029392242, -0.22254252433776855, -0.168269082903862, 1.0188069343566895, -1.2330819368362427, 0.8413074612617493, 0.9380344748497009, 0.6124006509780884, 0.7899255752563477, 0.38289397954940796, -0.6080960035324097, -1.6628268957138062, 1.4792556762695312, -0.235838383436203, ...
func NewGetSnapshotPlansConnectionBadRequest() *GetSnapshotPlansConnectionBadRequest { return &GetSnapshotPlansConnectionBadRequest{} }
[ -0.2588741183280945, -0.00561398733407259, 0.564862072467804, 0.9163844585418701, -0.38303717970848083, 0.3326985538005829, -0.7808108329772949, 0.17747589945793152, -0.10715395212173462, -1.248273491859436, -0.15226605534553528, -0.032635290175676346, 0.45818156003952026, -0.1801629662513...
func NewGetSnapshotPlansConnectionNotFound() *GetSnapshotPlansConnectionNotFound { return &GetSnapshotPlansConnectionNotFound{} }
[ -0.10378948599100113, -0.669672429561615, 0.14532634615898132, 0.2378876507282257, -0.5971537232398987, 0.6420338749885559, -0.05341095104813576, 0.44001904129981995, 0.31894320249557495, -1.1252437829971313, -0.5344592928886414, -0.43368226289749146, 0.7357538938522339, -0.509841740131378...
func StringToInt(s string) int { intValue, _ := strconv.Atoi(s) return intValue }
[ 0.5035417079925537, -1.4435628652572632, 0.06357799470424652, -1.0865744352340698, -0.6323434114456177, -0.3024789094924927, 0.30968356132507324, -0.5647947788238525, -0.7151075601577759, 0.4952176511287689, -1.2121646404266357, 0.5187354683876038, -0.05392489209771156, -1.223521113395691,...
func Int64ToString(i int64) string { return strconv.FormatInt(i, 10) }
[ -1.4455504417419434, -0.22527465224266052, 0.2591949701309204, -0.3850741982460022, 0.6134271621704102, 0.3022957444190979, -0.2703509032726288, -0.5455797910690308, 0.14639779925346375, 0.5613448619842529, 0.20652920007705688, -0.7120944857597351, 0.03262260928750038, 0.20141837000846863,...
func GenerateRandomResourceID() string { rand.Seed(int64(time.Now().Nanosecond())) return strconv.Itoa(rand.Int()) }
[ 0.1524915248155594, -0.7766129374504089, 0.2845238745212555, -1.3880802392959595, -0.5329169631004333, 0.44871124625205994, -0.2675172686576843, 0.36287161707878113, 1.3495031595230103, 0.5692982077598572, 0.20026707649230957, -0.7457079887390137, -0.05334701016545296, 0.8596965670585632, ...
func ParseCompositeID(id string) (p1 string, p2 string, err error) { parts := strings.Split(id, ":") if len(parts) == 2 { p1 = parts[0] p2 = parts[1] } else { err = fmt.Errorf("error: Import composite ID requires two parts separated by colon, eg x:y") } return }
[ -0.4169270694255829, -1.1266827583312988, 0.5912177562713623, -0.17454899847507477, -0.16389799118041992, 0.7357752323150635, -0.049425482749938965, 0.793773889541626, -0.09217821806669235, 1.677187204360962, -0.8003884553909302, -0.4085107743740082, -0.5359964966773987, -0.356826186180114...
func Contains(s []string, e string) bool { for _, a := range s { if a == e { return true } } return false }
[ 0.12265298515558243, -0.8990474343299866, 0.3618043065071106, -0.3013761341571808, -0.025014497339725494, -0.18190830945968628, -1.0508437156677246, 0.42858242988586426, -0.2297419011592865, 0.39793553948402405, 0.0864914208650589, 0.8927218914031982, 0.46838659048080444, -0.04878043755888...