query
stringlengths
7
3.85k
document
stringlengths
11
430k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Remove all timeout Entries
func (c *TimeoutCache) autoEvict() { c.lock.Lock() defer c.lock.Unlock() time := time.Now().Unix() for e := c.evictList.Back(); e != nil; e = e.Prev() { kv := e.Value.(*entry) if time > kv.evict { c.removeElement(e) } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *PruneTask) ClearTimeout() {}", "func (m *LocalExecutorManager) purgeExpiredEntries() {\n\tfor {\n\t\tfunc() {\n\t\t\tm.Lock()\n\t\t\tcutoverLimit := time.Now().Add(-24 * time.Hour)\n\t\t\tfor id, executorStatus := range m.id2ExecutorStatus {\n\t\t\t\tif executorStatus.LastAccessTime.Before(cutoverLimit)...
[ "0.69287455", "0.6554908", "0.6453934", "0.6440446", "0.64257973", "0.63104635", "0.6260074", "0.62492746", "0.61692584", "0.6131255", "0.6068482", "0.604764", "0.5971219", "0.59709215", "0.5851706", "0.58517045", "0.57964075", "0.5794167", "0.57497156", "0.57259923", "0.5690...
0.55146873
37
Add adds a value to the cache.
func (c *TimeoutCache) Add(key, value interface{}) { c.lock.Lock() defer c.lock.Unlock() // Check for existing item if ent, ok := c.items[key]; ok && ent != nil { c.items[key] = value return } // Add new item ent := &entry{key, value, time.Now().Add(time.Duration(c.evictAfter * int64(time.Second))).Unix()}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cache) Add(key lru.Key, value interface{}) {\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\n\tc.cache.Add(key, value)\n}", "func (c *Cache) Add(key string, value []byte, ttl int64) error {\n\tif err := c.exists(key); err == nil {\n\t\treturn errors.NewAlreadyExistingKey(key)\n\t}\n\n\treturn c.Set(key, value,...
[ "0.81868863", "0.79647106", "0.79207206", "0.78305393", "0.78196764", "0.7802301", "0.77938324", "0.77886504", "0.77825737", "0.7774307", "0.7767963", "0.76871604", "0.768334", "0.7654828", "0.75728226", "0.7562211", "0.7535825", "0.75247765", "0.75128514", "0.7450597", "0.74...
0.7510035
19
removeElement is used to remove a given list element from the cache
func (c *TimeoutCache) removeElement(e *list.Element) { c.evictList.Remove(e) kv := e.Value.(*entry) delete(c.items, kv.key) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cache) removeElement(e *list.Element) {\n\tc.evictList.Remove(e)\n}", "func (c *LruCache) removeElement(e *list.Element) {\n\tc.evictList.Remove(e)\n\tkv := e.Value.(*entry)\n\tdelete(c.cache, kv.key)\n\tif c.onEvict != nil {\n\t\tc.onEvict(kv.key, kv.value)\n\t}\n}", "func (c *Cache) removeElement(e ...
[ "0.8320907", "0.81145364", "0.7983885", "0.7678603", "0.76477677", "0.7279263", "0.66169834", "0.66034144", "0.6571837", "0.6543601", "0.65129757", "0.6481357", "0.6479635", "0.63942623", "0.63942623", "0.6362943", "0.6305739", "0.6297719", "0.62013304", "0.6185396", "0.61736...
0.787609
3
Search for an element with a key
func (c *TimeoutCache) searchElement(key interface{}) *list.Element { for e := c.evictList.Back(); e != nil; e = e.Prev() { kv := e.Value.(*entry) if kv.key == key { return e } } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l *LinkedList) SearchKey(v rtype.String) rtype.ListElement {\n\tfor e := l.Front(); e != nil; e = e.Next() {\n\t\tif rstring.EqualStringObjects(e.Value(), v) {\n\t\t\treturn e\n\t\t}\n\t}\n\treturn nil\n}", "func (t *openAddressing) Search(key string) interface{} {\n\tround := 0\n\tfor round != len(t.value...
[ "0.6915992", "0.682426", "0.67780536", "0.6669392", "0.65178764", "0.6517613", "0.64264435", "0.6406645", "0.6319205", "0.63091713", "0.62814724", "0.62469506", "0.6210012", "0.61996335", "0.6088753", "0.60856813", "0.60808617", "0.6080386", "0.6076286", "0.60488224", "0.6042...
0.67521054
3
Remove removes the provided key from the cache.
func (c *TimeoutCache) Remove(key interface{}) { c.lock.Lock() defer c.lock.Unlock() if ele := c.searchElement(key); ele != nil { c.removeElement(ele) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cache) Remove(key string) {\n\tc.Lock()\n\tdelete(c.data, key)\n\tc.Unlock()\n}", "func (c *Cache) Remove(ctx context.Context, key string) error {\n\treturn c.rdb.Do(ctx, \"del\", key).Err()\n}", "func (c *Cache) Remove(key string) {\n\tc.mu.Lock()\n\tdelete(c.backend, key)\n\tc.mu.Unlock()\n}", "fu...
[ "0.822", "0.8102971", "0.801383", "0.7985025", "0.79449236", "0.7943648", "0.7913574", "0.77698255", "0.77670026", "0.77565044", "0.77431804", "0.77037156", "0.76926464", "0.76572436", "0.7602669", "0.75644475", "0.7478781", "0.74458176", "0.74336135", "0.74051994", "0.738075...
0.76683784
13
Len returns the number of items in the cache.
func (c *TimeoutCache) Len() int { c.lock.RLock() defer c.lock.RUnlock() return c.evictList.Len() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cache) Len() int {\n\tc.mutex.RLock()\n\tdefer c.mutex.RUnlock()\n\n\treturn len(c.items)\n}", "func (c *Cache) Len() int {\n\tif c == nil {\n\t\treturn 0\n\t}\n\tc.mu.Lock()\n\tdefer c.mu.Unlock()\n\treturn c.lru.Len() + c.mfa.Len()\n}", "func (c *Cache) Len() int {\n\treturn len(c.entries)\n}", "f...
[ "0.8649642", "0.8636436", "0.85773957", "0.8575803", "0.8565341", "0.8560323", "0.85048", "0.84949386", "0.84835863", "0.84353757", "0.84268105", "0.8358988", "0.83543485", "0.82246524", "0.82083863", "0.8183323", "0.8019507", "0.7983756", "0.7982027", "0.7956781", "0.7907790...
0.78357387
23
NewEnvironment creates new type environment with current analysis pass.
func NewEnvironment(pass *analysis.Pass) *Environment { return &Environment{ //TODO make it private and reject object named __val ExplicitRefinementMap: map[types.Object]types.Type{}, ImplicitRefinementMap: map[types.Object]types.Type{}, funArgRefinementMap: map[string]types.Type{}, Scope: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEnvironment(name string, parent *Environment) *Environment {\n\treturn &Environment{\n\t\tname: name,\n\t\tparent: parent,\n\t\tdict: make(map[string]*Symbol),\n\t}\n}", "func NewEnvironment() *Environment {\n\ts := make(map[string]Object)\n\treturn &Environment{store: s, outer: nil}\n}", "func New...
[ "0.6802027", "0.6662787", "0.6633159", "0.6615684", "0.6584132", "0.657267", "0.6483676", "0.6449514", "0.6449514", "0.6340193", "0.62803227", "0.6262485", "0.6236817", "0.6187867", "0.61719394", "0.61681217", "0.61587524", "0.61014456", "0.60950303", "0.6028156", "0.6007955"...
0.727
0
EmailExists check if a given email is found
func (pr *PsqlDonorRepository) EmailExists(email string) bool { var name string err := pr.conn.QueryRow("SELECT firstname FROM donor WHERE email=$1", email).Scan(&name) if err != nil { return false } return true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func EmailExists(e string) bool {\n\tsqlStmt := `SELECT \n\t\t\t\t\tfldEmail \n\t\t\t\tFROM tblUsers \n\t\t\t\tWHERE fldEmail = ?;`\n\n\tstmt, err := globals.Db.Prepare(sqlStmt)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer stmt.Close()\n\n\tvar email string\n\terr = stmt.QueryRow(e).Scan(&email)\n\tif err ...
[ "0.830488", "0.8195364", "0.81667626", "0.81086147", "0.80071926", "0.7953825", "0.7936496", "0.78109884", "0.7755118", "0.7736038", "0.7681008", "0.7576873", "0.7245693", "0.72339445", "0.7222948", "0.71316254", "0.7029018", "0.69840485", "0.69827086", "0.69254166", "0.68928...
0.8110711
3
ToQuery converts the Request to URL Query.
func (r AnnounceRequest) ToQuery() (vs url.Values) { vs = make(url.Values, 9) vs.Set("info_hash", r.InfoHash.BytesString()) vs.Set("peer_id", r.PeerID.BytesString()) vs.Set("uploaded", strconv.FormatInt(r.Uploaded, 10)) vs.Set("downloaded", strconv.FormatInt(r.Downloaded, 10)) vs.Set("left", strconv.FormatInt(r.L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *Filter) ToQuery() string {\n\treturn fmt.Sprintf(\"last_knowledge_of_server=%d\", f.LastKnowledgeOfServer)\n}", "func (p SearchParameters) ToQuery() string {\n\treturn paramsToQuery(p)\n}", "func (p SpaceParameters) ToQuery() string {\n\treturn paramsToQuery(p)\n}", "func (p ExpandParameters) ToQuer...
[ "0.6419699", "0.6291177", "0.6282017", "0.61848676", "0.6141613", "0.6093184", "0.60806036", "0.6045012", "0.60266846", "0.6002443", "0.59969157", "0.59797895", "0.59552836", "0.5908155", "0.5877254", "0.5868933", "0.58650696", "0.58616143", "0.5818987", "0.5784606", "0.57737...
0.6414736
1
FromQuery converts URL Query to itself.
func (r *AnnounceRequest) FromQuery(vs url.Values) (err error) { if err = r.InfoHash.FromString(vs.Get("info_hash")); err != nil { return } if err = r.PeerID.FromString(vs.Get("peer_id")); err != nil { return } v, err := strconv.ParseInt(vs.Get("uploaded"), 10, 64) if err != nil { return } r.Uploaded = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FromQuery(key string) TokenExtractor {\n\treturn func(r *http.Request) (string, error) {\n\t\treturn r.URL.Query().Get(key), nil\n\t}\n}", "func NewFromURL(url *url.URL) *QueryString {\n\treturn NewFromRawQuery(url.RawQuery)\n}", "func NewFromRawQuery(rawQuery string) *QueryString {\n\tqs := new(QueryStri...
[ "0.71520704", "0.64354426", "0.6182071", "0.6001235", "0.59581524", "0.58681786", "0.58105767", "0.5795819", "0.57879084", "0.57442814", "0.5689765", "0.56753343", "0.56536025", "0.5652858", "0.5604047", "0.5601572", "0.5599599", "0.55983126", "0.55980057", "0.55894464", "0.5...
0.639297
2
DecodeFrom reads the []byte data from r and decodes them to sr by bencode. r may be the body of the request from the http client.
func (sr *ScrapeResponse) DecodeFrom(r io.Reader) (err error) { return bencode.NewDecoder(r).Decode(sr) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b ByteArray) Decode(r io.Reader) (interface{}, error) {\n\tl, err := util.ReadVarInt(r)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbuf := make([]byte, int(l))\n\t_, err = io.ReadFull(r, buf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn buf, nil\n}", "func decodeRequest(_ context.Context,...
[ "0.59442586", "0.59435", "0.5875654", "0.57637095", "0.5762973", "0.57587105", "0.57179385", "0.5701968", "0.56631243", "0.5660476", "0.56205285", "0.56205285", "0.5595051", "0.5578567", "0.5553057", "0.55511975", "0.55382675", "0.5473444", "0.5471069", "0.54231274", "0.54012...
0.66547966
0
EncodeTo encodes the response to []byte by bencode and write the result into w. w may be http.ResponseWriter.
func (sr ScrapeResponse) EncodeTo(w io.Writer) (err error) { return bencode.NewEncoder(w).Encode(sr) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (resp *Response) WriteTo(w http.ResponseWriter) {\n\tif resp.buf != nil {\n\t\tresp.Body = resp.buf.Bytes()\n\t\tresp.buf = nil\n\t}\n\n\tif w != nil {\n\t\t// Write the headers\n\t\tfor k, vs := range resp.Header {\n\t\t\t// Reset existing values\n\t\t\tw.Header().Del(k)\n\t\t\tif len(vs) == 1 {\n\t\t\t\tw.H...
[ "0.5900893", "0.5624768", "0.55791545", "0.55571955", "0.5534204", "0.5395386", "0.5389386", "0.53571355", "0.5337786", "0.5306685", "0.53040093", "0.53040093", "0.5280645", "0.5271151", "0.52391887", "0.52389556", "0.52290684", "0.5228518", "0.5228017", "0.5222941", "0.52040...
0.7092946
0
NewClient returns a new HTTPClient. scrapeURL may be empty, which will replace the "announce" in announceURL with "scrape" to generate the scrapeURL.
func NewClient(announceURL, scrapeURL string) *Client { if scrapeURL == "" { scrapeURL = strings.Replace(announceURL, "announce", "scrape", -1) } id := metainfo.NewRandomHash() return &Client{AnnounceURL: announceURL, ScrapeURL: scrapeURL, ID: id} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func New(url string) *Client {\n\treturn &Client{&http.Client{}, url, func(r *http.Request) *http.Request { return r }}\n}", "func New(url string) *Client {\n\treturn &Client{url: url, httpC: http.DefaultClient}\n}", "func New() (crawl *Crawl) {\n\tc := &http.Client{\n\t\tTransport: http.DefaultTransport,\n\t}...
[ "0.6308598", "0.6222202", "0.6097972", "0.6060751", "0.6043418", "0.604116", "0.5992147", "0.5986665", "0.5968273", "0.59570366", "0.5919546", "0.59144855", "0.59128547", "0.5904674", "0.5874914", "0.58727384", "0.58473456", "0.5841087", "0.58391356", "0.5830302", "0.5823845"...
0.76326865
0
Close closes the client, which does nothing at present.
func (t *Client) Close() error { return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Close() {\n\t_ = client.Close()\n}", "func (c *Client) Close() {}", "func (c *Client) Close() {}", "func (c *client) Close() error { return c.c.Close() }", "func (c *Client) Close() error {\n\treturn nil\n}", "func (c *Client) Close() {\n}", "func (c *Client) Close() {\n}", "func (c *Client) Clo...
[ "0.82270104", "0.8103801", "0.8103801", "0.8057519", "0.77404964", "0.7740057", "0.7740057", "0.7638049", "0.75866705", "0.7498036", "0.7448545", "0.74184066", "0.7416859", "0.74093086", "0.7403107", "0.7399654", "0.7392202", "0.7379306", "0.73588985", "0.7358413", "0.7346338...
0.7930484
4
Announce sends a Announce request to the tracker.
func (t *Client) Announce(c context.Context, req AnnounceRequest) ( resp AnnounceResponse, err error) { if req.PeerID.IsZero() { if t.ID.IsZero() { req.PeerID = metainfo.NewRandomHash() } else { req.PeerID = t.ID } } err = t.send(c, t.AnnounceURL, req.ToQuery(), &resp) return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b *Builder) Announce() (err error) {\n\targs := &rpc.AnnounceArgs{\n\t\tGOOS: b.b.GOOS(),\n\t\tGOARCH: b.b.GOARCH(),\n\t\tType: \"Builder\",\n\t\tURL: b.base,\n\t}\n\treply := new(rpc.AnnounceReply)\n\tif err = b.tcl.Call(\"Tracker.Announce\", args, reply); err != nil {\n\t\treturn\n\t}\n\tb.key = rep...
[ "0.7591315", "0.7542612", "0.7309203", "0.73045576", "0.70813364", "0.69591624", "0.6934339", "0.6784179", "0.6711855", "0.6598236", "0.62005067", "0.62001413", "0.6174527", "0.61571336", "0.60925037", "0.6053757", "0.59826213", "0.58398366", "0.58314586", "0.5807263", "0.576...
0.7839598
0
Scrape sends a Scrape request to the tracker.
func (t *Client) Scrape(c context.Context, infohashes []metainfo.Hash) ( resp ScrapeResponse, err error) { hs := make([]string, len(infohashes)) for i, h := range infohashes { hs[i] = h.BytesString() } err = t.send(c, t.ScrapeURL, url.Values{"info_hash": hs}, &resp) return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Client) Scrape() {\n\tfor range time.Tick(c.interval) {\n\n\t\tallstats := c.getStatistics()\n\t\t//Set the metrics\n\t\tc.setMetrics(allstats.status, allstats.stats, allstats.logStats)\n\n\t\tlog.Printf(\"New tick of statistics: %s\", allstats.stats.ToString())\n\t}\n}", "func (n *NewsPaper) Scrape() {...
[ "0.6658562", "0.6417914", "0.61811036", "0.6163045", "0.6151265", "0.6086038", "0.6052761", "0.5954972", "0.59331214", "0.5889761", "0.57729805", "0.5772844", "0.57702506", "0.57451177", "0.57327914", "0.5702998", "0.56800026", "0.5679486", "0.56670076", "0.5659346", "0.56425...
0.64453244
1
build state function that will check if a job responsible for building function image succeeded or failed; if a job is not running start one
func buildStateFnCheckImageJob(expectedJob batchv1.Job) stateFn { return func(ctx context.Context, r *reconciler, s *systemState) (stateFn, error) { labels := s.internalFunctionLabels() err := r.client.ListByLabel(ctx, s.instance.GetNamespace(), labels, &s.jobs) if err != nil { return nil, errors.Wrap(err, "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (st *buildStatus) start() {\n\tsetStatus(st.BuilderRev, st)\n\tgo func() {\n\t\terr := st.build()\n\t\tif err == errSkipBuildDueToDeps {\n\t\t\tst.setDone(true)\n\t\t} else {\n\t\t\tif err != nil {\n\t\t\t\tfmt.Fprintf(st, \"\\n\\nError: %v\\n\", err)\n\t\t\t\tlog.Println(st.BuilderRev, \"failed:\", err)\n\t\...
[ "0.5804885", "0.576292", "0.57217044", "0.56923383", "0.5667544", "0.5643866", "0.56260103", "0.5621047", "0.55758095", "0.5512292", "0.5495707", "0.54381084", "0.5428398", "0.5407359", "0.5348316", "0.5330184", "0.53044367", "0.5302426", "0.5284066", "0.52470475", "0.5225209...
0.7990586
0
Save changes the configuration of the hostonly network.
func (n *hostOnlyNetwork) Save(vbox VBoxManager) error { if err := n.SaveIPv4(vbox); err != nil { return err } if n.DHCP { vbox.vbm("hostonlyif", "ipconfig", n.Name, "--dhcp") // not implemented as of VirtualBox 4.3 } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ctx *BoltDbContext) SaveHost(host Host) error {\n\treturn ctx.db.Update(func(tx *bolt.Tx) error {\n\t\tb := tx.Bucket([]byte(hostsBucketName))\n\t\terr := b.Put([]byte(host.Address), host.GobEncode())\n\t\treturn err\n\t})\n}", "func (hc *Hailconfig) Save() error {\n\terr := hc.f.Reset()\n\tif err != nil {...
[ "0.57114166", "0.5705443", "0.55867183", "0.55641735", "0.5545801", "0.5540158", "0.55362916", "0.5509479", "0.5506129", "0.5503006", "0.5464419", "0.5461447", "0.5456357", "0.54298675", "0.5423216", "0.5402514", "0.5287204", "0.5237437", "0.5235597", "0.52300316", "0.522529"...
0.76610893
0
SaveIPv4 changes the ipv4 configuration of the hostonly network.
func (n *hostOnlyNetwork) SaveIPv4(vbox VBoxManager) error { if n.IPv4.IP != nil && n.IPv4.Mask != nil { if err := vbox.vbm("hostonlyif", "ipconfig", n.Name, "--ip", n.IPv4.IP.String(), "--netmask", net.IP(n.IPv4.Mask).String()); err != nil { return err } } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *FSEIDFields) SetIPv4Flag() {\n\tf.Flags |= 0x02\n}", "func (internet Internet) IPv4(v reflect.Value) (interface{}, error) {\n\treturn internet.ipv4(), nil\n}", "func IPv4(a, b, c, d uint8) IP {\n\treturn IP{\n\t\tlo: 0xffff00000000 | uint64(a)<<24 | uint64(b)<<16 | uint64(c)<<8 | uint64(d),\n\t\tz: z...
[ "0.6443081", "0.6388994", "0.63776445", "0.6346549", "0.6192383", "0.61467063", "0.6119341", "0.59505796", "0.58408594", "0.5829703", "0.5822138", "0.5800136", "0.574169", "0.5729033", "0.57041806", "0.5692545", "0.5672946", "0.56706774", "0.5669973", "0.5656812", "0.56447315...
0.8872807
0
createHostonlyAdapter creates a new hostonly network.
func createHostonlyAdapter(vbox VBoxManager) (*hostOnlyNetwork, error) { out, err := vbox.vbmOut("hostonlyif", "create") if err != nil { return nil, err } res := reHostOnlyAdapterCreated.FindStringSubmatch(string(out)) if res == nil { return nil, errors.New("Failed to create host-only adapter") } return &h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func createHostWithIp(nodeId int, ip string, port int) (core.Host, error) {\n\t// Producing private key using nodeId\n\tr := mrand.New(mrand.NewSource(int64(nodeId)))\n\n\tprvKey, _ := ecdsa.GenerateKey(btcec.S256(), r)\n\tsk := (*crypto.Secp256k1PrivateKey)(prvKey)\n\n\t// Starting a peer with default configs\n\t...
[ "0.5605203", "0.5528005", "0.5470935", "0.54345465", "0.5420929", "0.53596747", "0.53540576", "0.5293824", "0.52900076", "0.52677083", "0.52036476", "0.52007806", "0.5181415", "0.5149478", "0.5139053", "0.511084", "0.5104876", "0.5074306", "0.50325537", "0.5014431", "0.499159...
0.84993964
0
listHostOnlyAdapters gets all hostonly adapters in a map keyed by NetworkName.
func listHostOnlyAdapters(vbox VBoxManager) (map[string]*hostOnlyNetwork, error) { out, err := vbox.vbmOut("list", "hostonlyifs") if err != nil { return nil, err } byName := map[string]*hostOnlyNetwork{} byIP := map[string]*hostOnlyNetwork{} n := &hostOnlyNetwork{} err = parseKeyValues(out, reColonLine, func...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func listDHCPServers(vbox VBoxManager) (map[string]*dhcpServer, error) {\n\tout, err := vbox.vbmOut(\"list\", \"dhcpservers\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tm := map[string]*dhcpServer{}\n\tdhcp := &dhcpServer{}\n\n\terr = parseKeyValues(out, reColonLine, func(key, val string) error {\n\t\tswit...
[ "0.4922467", "0.49170256", "0.48662174", "0.46048605", "0.45793784", "0.4545906", "0.4537662", "0.45205545", "0.45185655", "0.44573838", "0.44563538", "0.4444831", "0.44146225", "0.4406497", "0.43984336", "0.43956515", "0.43870476", "0.4317521", "0.42667553", "0.4260609", "0....
0.7816921
0
removeOrphanDHCPServers removed the DHCP servers linked to no hostonly adapter
func removeOrphanDHCPServers(vbox VBoxManager) error { dhcps, err := listDHCPServers(vbox) if err != nil { return err } if len(dhcps) == 0 { return nil } nets, err := listHostOnlyAdapters(vbox) if err != nil { return err } for name := range dhcps { if strings.HasPrefix(name, dhcpPrefix) { if _, p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DHCPsDelete() error {\n\tdhcps, err := DHCPsGet()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, d := range dhcps {\n\t\tif isUnmanaged(UnmanagedID(d.Ifname), LINKTYPE) {\n\t\t\tlogger.Log.Info(fmt.Sprintf(\"Skipping Unmanaged Link %v DHCP configuration\", d.Ifname))\n\t\t\tcontinue\n\t\t}\n\t\terr = DHCPD...
[ "0.6231171", "0.5975118", "0.592964", "0.5638924", "0.5413972", "0.51644886", "0.5150004", "0.5145574", "0.51422113", "0.50841993", "0.5060565", "0.5032385", "0.50233114", "0.50209886", "0.5001533", "0.49985364", "0.49904168", "0.4957759", "0.49550113", "0.49398196", "0.49369...
0.80990946
0
addHostOnlyDHCPServer adds a DHCP server to a hostonly network.
func addHostOnlyDHCPServer(ifname string, d dhcpServer, vbox VBoxManager) error { name := dhcpPrefix + ifname dhcps, err := listDHCPServers(vbox) if err != nil { return err } // On some platforms (OSX), creating a host-only adapter adds a default dhcpserver, // while on others (Windows?) it does not. command...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func WithDHCPServer(subnet *net.IPNet) Option {\n\treturn func(d *dnsmasq) {\n\t\td.subnet = subnet\n\t}\n}", "func (p *PerHost) AddHost(host string) {\n\tif strings.HasSuffix(host, \".\") {\n\t\thost = host[:len(host)-1]\n\t}\n\tp.bypassHosts = append(p.bypassHosts, host)\n}", "func (lv *Libvirt) AddTransient...
[ "0.63686794", "0.57897925", "0.57406795", "0.56142825", "0.55573124", "0.5441052", "0.5403369", "0.5396786", "0.534772", "0.524854", "0.5180699", "0.5176822", "0.5176461", "0.5159396", "0.5083173", "0.50322163", "0.49743834", "0.49698305", "0.496737", "0.49510124", "0.4906773...
0.8681207
0
listDHCPServers lists all DHCP server settings in a map keyed by DHCP.NetworkName.
func listDHCPServers(vbox VBoxManager) (map[string]*dhcpServer, error) { out, err := vbox.vbmOut("list", "dhcpservers") if err != nil { return nil, err } m := map[string]*dhcpServer{} dhcp := &dhcpServer{} err = parseKeyValues(out, reColonLine, func(key, val string) error { switch key { case "NetworkName"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *VirtualizationVmwareVirtualMachineAllOf) GetDnsServerList() []string {\n\tif o == nil {\n\t\tvar ret []string\n\t\treturn ret\n\t}\n\treturn o.DnsServerList\n}", "func WithDHCPNameServers(dns []string) Option {\n\treturn func(d *dnsmasq) {\n\t\td.dns = dns\n\t}\n}", "func (client WorkloadNetworksClien...
[ "0.5871556", "0.57992846", "0.5637868", "0.5621159", "0.561796", "0.55982745", "0.5547308", "0.5486327", "0.5452146", "0.5445553", "0.5430095", "0.5428605", "0.5427161", "0.53797334", "0.5372634", "0.53152144", "0.5299417", "0.52930343", "0.5261868", "0.5255848", "0.52518666"...
0.8791519
0
parseIPv4Mask parses IPv4 netmask written in IP form (e.g. 255.255.255.0). This function should really belong to the net package.
func parseIPv4Mask(s string) net.IPMask { mask := net.ParseIP(s) if mask == nil { return nil } return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15]) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func parseMask4(s string) (mask Prefix, i int) {\n\ti = len(s)\n\tif i == 0 {\n\t\treturn 0, 0\n\t}\n\tif !isD(s[0]) {\n\t\treturn 0, 0\n\t}\n\tmask = Prefix(s[0] - '0')\n\tif i == 1 || !isD(s[1]) {\n\t\treturn mask, 1\n\t}\n\tmask = mask*10 + Prefix(s[1]-'0')\n\tif mask > 32 {\n\t\treturn 0, 0\n\t}\n\tif i == 2 |...
[ "0.6910413", "0.65817773", "0.64788103", "0.64404845", "0.61875916", "0.61496323", "0.6074284", "0.60079217", "0.59941304", "0.59614414", "0.58839774", "0.58533674", "0.582732", "0.5775293", "0.57644033", "0.57606894", "0.5736692", "0.573576", "0.570588", "0.5696371", "0.5683...
0.86540896
0
NewBlock creates new block
func NewBlock(transactions []*Transaction, prevBlockHash []byte, height int) *Block { block := &Block{time.Now().Unix(), transactions, prevBlockHash, []byte{}, 0, height} block.POW() return block }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func generateNewBlock(oldBlock Block, dataPayload string) (Block, error) {\n\n\tvar newBlock Block\n\ttimeNow := time.Now()\n\n\tnewBlock.Index = oldBlock.Index + 1\n\tnewBlock.Timestamp = timeNow.String()\n\n\tnewEvent, err := dataPayloadtoServiceEvent(dataPayload)\n\n\tif err != nil {\n\t\tlog.Println(\"ERROR: U...
[ "0.75757486", "0.75706005", "0.72429085", "0.7192294", "0.70964277", "0.7095982", "0.70929307", "0.70588", "0.70484954", "0.7039668", "0.6990194", "0.6981644", "0.69665647", "0.69518673", "0.68588614", "0.6853967", "0.6762825", "0.67510724", "0.6685897", "0.66617703", "0.6659...
0.6270857
68
HashTransactions makes hash of all transaction ids
func (block *Block) HashTransactions() []byte { var hashes [][]byte for _, transaction := range block.Transactions { hashes = append(hashes, transaction.Serialize()) } if len(hashes) == 0 { return []byte{} } mtree := NewMerkleTree(hashes) return mtree.Root.Data }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (block *Block) HashTransactions() []byte {\n\tvar txHashes [][]byte\n\tvar txHash [32]byte\n\n\tfor _, tx := range block.Transactions {\n\t\ttxHashes = append(txHashes, tx.ID)\n\t}\n\n\ttxHash = sha256.Sum256(bytes.Join(txHashes, []byte{}))\n\n\treturn txHash[:]\n}", "func (b *Block) HashTransactions() []by...
[ "0.75380266", "0.74975175", "0.7465126", "0.74426436", "0.73201126", "0.7020707", "0.6872097", "0.67827904", "0.67827904", "0.67827904", "0.6652028", "0.6523222", "0.6502628", "0.6484236", "0.63336706", "0.6326585", "0.63102835", "0.6273257", "0.6252849", "0.62448186", "0.616...
0.6858078
7
Serialize serializes block using encoder
func (block *Block) Serialize() []byte { var result bytes.Buffer encoder := gob.NewEncoder(&result) err := encoder.Encode(block) if err != nil { panic(err) } return result.Bytes() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b *block) Serialize() []byte {\n\tvar res bytes.Buffer\n\tencoder := gob.NewEncoder(&res) // address\n\terr := encoder.Encode(b) // here b is the source\n\tif err != nil {\n\t\tlog.Panic(err)\n\t}\n\treturn res.Bytes()\n}", "func (b *MicroBlock) Serialize(w io.Writer) error {\n return writeBlockH...
[ "0.7462726", "0.72769517", "0.72016114", "0.71894073", "0.7182576", "0.7182576", "0.7104357", "0.70748967", "0.70703816", "0.7004063", "0.69893056", "0.6981453", "0.68361217", "0.6798621", "0.6779572", "0.66548055", "0.66274667", "0.65355444", "0.65316427", "0.65251213", "0.6...
0.7117319
6
Deserialize deserializes bytes to block
func Deserialize(data []byte) *Block { var block Block decoder := gob.NewDecoder(bytes.NewReader(data)) err := decoder.Decode(&block) if err != nil { panic(err) } return &block }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Deserialize(buffer []byte) *block {\n\tvar b block\n\tdecoder := gob.NewDecoder(bytes.NewReader(buffer)) // convert []byte to io.Reader\n\terr := decoder.Decode(&b) // here b is the dest\n\tif err != nil {\n\t\tlog.Panic(err)\n\t}\n\treturn &b\n}", "func Deserialize(data []byte) *Bl...
[ "0.7719862", "0.73738414", "0.73401064", "0.73401064", "0.72333825", "0.71995974", "0.70526373", "0.7010707", "0.6952458", "0.6866853", "0.6866474", "0.6858835", "0.68524516", "0.68484986", "0.6825386", "0.6787646", "0.6787646", "0.67310977", "0.6635826", "0.6546314", "0.6464...
0.72823566
4
Log prints block info
func (block *Block) Log() { template := "BLOCK >>>> \nHeight: %d \nPrevious hash: %x \nData: %x " + "\nTimestamp: %d [%s] \nNonce: %d \nTransactions:\n" fmt.Printf(template, block.Height, block.PrevBlockHash, block.Hash, block.Timestamp, time.Unix(block.Timestamp, 0), block.Nonce) for _, t := range block.Transac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (bc *Blockchain) PrintBlockInfo(index int) {\n block := bc.Chain[index]\n fmt.Println(\"Index of the block is \" + strconv.Itoa(block.Index))\n fmt.Println(\"Timestamp of the block is \" + time.Unix(block.Timestamp, 0).Format(time.UnixDate))\n fmt.Println(\"Proof of the block is \" + strconv.Itoa(...
[ "0.7314222", "0.6935649", "0.678305", "0.6357967", "0.6300318", "0.61575276", "0.6108993", "0.6061079", "0.6044", "0.59945685", "0.5978331", "0.5937402", "0.5936929", "0.59180486", "0.59160495", "0.5888289", "0.58667827", "0.57686156", "0.57345873", "0.56689864", "0.5664615",...
0.6910912
2
NewFlagSet returns a new FlagSet for usage in Config objects.
func NewFlagSet(name string) *FlagSet { return &FlagSet{ FlagSet: pflag.NewFlagSet(name, pflag.ContinueOnError), Name: name, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewFlagSet(flags ...string) FlagSet {\n\tfs := make(FlagSet, len(flags))\n\tfor _, v := range flags {\n\t\tfs[v] = true\n\t}\n\treturn fs\n}", "func NewFlagSet(name string, args []string, flags []Flag) (*FlagSet, error) {\n\tset := flag.NewFlagSet(name, flag.ContinueOnError)\n\tflagSet := &FlagSet{set}\n\n\...
[ "0.70940214", "0.68933076", "0.680488", "0.66169435", "0.6524972", "0.6482576", "0.62197244", "0.5822131", "0.5776519", "0.57721347", "0.5768234", "0.5692028", "0.56861347", "0.56835216", "0.56695974", "0.566484", "0.5659758", "0.56593263", "0.5658331", "0.5636956", "0.562199...
0.66196287
3
NewPreRunner takes a name and a standalone pre runner compatible function and turns them into a Group compatible PreRunner, ready for registration.
func NewPreRunner(name string, fn func() error) PreRunner { return preRunner{name: name, fn: fn} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func preRun(c *cobra.Command, args []string) error {\n\tif len(args) < 1 {\n\t\treturn errors.New(\"Missing name argument\")\n\t}\n\n\tname = args[0]\n\treturn nil\n}", "func newRunnerGroup(scope RunnerGroupScope, name string) RunnerGroup {\n\tif name == \"\" {\n\t\treturn RunnerGroup{\n\t\t\tScope: scope,\n\t\t...
[ "0.574454", "0.5559259", "0.5491292", "0.54819775", "0.54751414", "0.54033977", "0.53813756", "0.5324207", "0.5233656", "0.5183823", "0.51202166", "0.511692", "0.50739557", "0.5055979", "0.50478184", "0.50427", "0.49869433", "0.49579746", "0.49525964", "0.4946813", "0.4937391...
0.82757413
0
NewGroup return a Group with input name.
func NewGroup(name string) Group { return Group{ name: name, readyCh: make(chan struct{}), } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewGroup(owner, name string) Group {\n\tnow := time.Now()\n\treturn Group{\n\t\tOwner: owner,\n\t\tName: name,\n\t\tDescription: name,\n\t\tAccess: \"private\",\n\t\tBirthtime: now,\n\t\tMTime: now,\n\t}\n}", "func NewGroup(name string, members ...string) *Group {\n\treturn &Group{...
[ "0.7774005", "0.7614487", "0.7580504", "0.7580504", "0.75550216", "0.7460315", "0.7294258", "0.72896034", "0.7261106", "0.7210766", "0.7202386", "0.71659905", "0.7141491", "0.70930296", "0.6947957", "0.6907739", "0.6901332", "0.6881721", "0.6866693", "0.68410695", "0.68170804...
0.79604924
0
Name shows the name of the group.
func (g Group) Name() string { return g.name }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (g *Group) Name() string {\n\treturn g.name\n}", "func (g *Group) Name() string {\n\treturn g.name\n}", "func (o ServerGroupOutput) Name() pulumi.StringOutput {\n\treturn o.ApplyT(func(v *ServerGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)\n}", "func (o InstanceGroupOutput) Name() ...
[ "0.80168146", "0.80168146", "0.75941217", "0.75454223", "0.74364364", "0.7433477", "0.7422203", "0.73819286", "0.7380036", "0.73613214", "0.7249155", "0.72418725", "0.7185711", "0.7158183", "0.7133307", "0.7036169", "0.7024919", "0.7012739", "0.6959442", "0.6914941", "0.68954...
0.8108221
0
Register will inspect the provided objects implementing the Unit interface to see if it needs to register the objects for any of the Group bootstrap phases. If a Unit doesn't satisfy any of the bootstrap phases it is ignored by Group. The returned array of booleans is of the same size as the amount of provided Units, s...
func (g *Group) Register(units ...Unit) []bool { g.log = logger.GetLogger(g.name) hasRegistered := make([]bool, len(units)) for idx := range units { if !g.configured { // if RunConfig has been called we can no longer register Config // phases of Units if c, ok := units[idx].(Config); ok { g.c = append...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *MemoryArrayAllOf) HasUnits() bool {\n\tif o != nil && o.Units != nil {\n\t\treturn true\n\t}\n\n\treturn false\n}", "func Register(pcs ...components.Pluggable) int {\n\tregisteredComponents := 0\n\tfor _, pc := range pcs {\n\t\tregister, ok := registries[pc.Type]\n\t\tif !ok {\n\t\t\tlog.Warnf(\"%s is n...
[ "0.5419398", "0.5418993", "0.531174", "0.5119865", "0.50986594", "0.49601153", "0.4939661", "0.4924268", "0.49226665", "0.48969033", "0.48539323", "0.47764537", "0.4633344", "0.46204185", "0.45852447", "0.45746577", "0.45736307", "0.45174125", "0.44895804", "0.44889534", "0.4...
0.7825831
0
RegisterFlags returns FlagSet contains Flags in all modules.
func (g *Group) RegisterFlags() *FlagSet { // run configuration stage g.f = NewFlagSet(g.name) g.f.SortFlags = false // keep order of flag registration g.f.Usage = func() { fmt.Printf("Flags:\n") g.f.PrintDefaults() } gFS := NewFlagSet("Common Service options") gFS.SortFlags = false gFS.StringVarP(&g.name,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func RegisterFlags() {\n\tregisterFlags()\n}", "func (*bzlLibraryLang) RegisterFlags(fs *flag.FlagSet, cmd string, c *config.Config) {}", "func (a *BootstrapCommand) RegisterFlags(r codegen.FlagRegistry) {\n\tfor _, c := range BootstrapCommands {\n\t\tif c != a {\n\t\t\tc.RegisterFlags(r)\n\t\t}\n\t}\n}", "f...
[ "0.7010139", "0.6359649", "0.62703633", "0.62660193", "0.60479647", "0.60416174", "0.6022744", "0.60207623", "0.6005792", "0.5976918", "0.59758586", "0.59306777", "0.58929294", "0.5855352", "0.5824367", "0.58160895", "0.57945955", "0.5786991", "0.57704777", "0.5751199", "0.57...
0.675552
1
RunConfig runs the Config phase of all registered Config aware Units. Only use this function if needing to add additional wiring between config and (pre)run phases and a separate PreRunner phase is not an option. In most cases it is best to use the Run method directly as it will run the Config phase prior to executing ...
func (g *Group) RunConfig() (interrupted bool, err error) { g.log = logger.GetLogger(g.name) g.configured = true if g.name == "" { // use the binary name if custom name has not been provided g.name = path.Base(os.Args[0]) } defer func() { if err != nil { g.log.Error().Err(err).Msg("unexpected exit") }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ConfigRun(ctx *cli.Context) error {\n\topt, err := InitOption(ctx)\n\tif err != nil {\n\t\treturn xerrors.Errorf(\"option error: %w\", err)\n\t}\n\n\t// Disable OS and language analyzers\n\topt.DisabledAnalyzers = append(analyzer.TypeOSes, analyzer.TypeLanguages...)\n\n\t// Scan only config files\n\topt.VulnT...
[ "0.71010476", "0.64792436", "0.6213528", "0.62125707", "0.61918336", "0.60716456", "0.60399765", "0.60297084", "0.6020371", "0.60044134", "0.5958", "0.59382945", "0.58830523", "0.58809024", "0.5818161", "0.5803526", "0.5797414", "0.5793293", "0.5785053", "0.57504505", "0.5725...
0.7411264
0
Run will execute all phases of all registered Units and block until an error occurs. If RunConfig has been called prior to Run, the Group's Config phase will be skipped and Run continues with the PreRunner and Service phases. The following phases are executed in the following sequence: Config phase (serially, in order ...
func (g *Group) Run() (err error) { // run config registration and flag parsing stages if interrupted, errRun := g.RunConfig(); interrupted || errRun != nil { return errRun } defer func() { if err != nil { g.log.Fatal().Err(err).Stack().Msg("unexpected exit") } }() // execute pre run stage and exit on e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cfg) Run(args ...string) {\n\tif args == nil {\n\t\targs = os.Args[1:]\n\t}\n\tc, cmd, args, err := c.Parse(args)\n\tif err == nil {\n\t\tif err = cmd.Main(args); err == nil {\n\t\t\tExit(0)\n\t\t\treturn\n\t\t}\n\t}\n\tif err == ErrHelp {\n\t\tw := newWriter(c)\n\t\tdefer w.done(os.Stderr, 0)\n\t\tw.help...
[ "0.67258763", "0.66956735", "0.66749555", "0.6631407", "0.6609172", "0.6555715", "0.6465029", "0.64125794", "0.64101774", "0.64062446", "0.6338222", "0.6321938", "0.63210386", "0.63161224", "0.63157916", "0.6259968", "0.6221255", "0.62152505", "0.61776745", "0.6164499", "0.61...
0.7633714
0
ListUnits returns a list of all Group phases and the Units registered to each of them.
func (g Group) ListUnits() string { var ( s string t = "cli" ) if len(g.c) > 0 { s += "\n- config: " for _, u := range g.c { if u != nil { s += u.Name() + " " } } } if len(g.p) > 0 { s += "\n- prerun: " for _, u := range g.p { if u != nil { s += u.Name() + " " } } } if len(g....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ListUnits(w http.ResponseWriter) error {\n\tconn, err := sd.NewSystemdConnection()\n\tif err != nil {\n\t\tlog.Errorf(\"Failed to get systemd bus connection: %s\", err)\n\t\treturn err\n\t}\n\tdefer conn.Close()\n\n\tunits, err := conn.ListUnits()\n\tif err != nil {\n\t\tlog.Errorf(\"Failed ListUnits: %v\", e...
[ "0.72441345", "0.7032067", "0.6085787", "0.6073443", "0.595272", "0.5778228", "0.5681488", "0.5550705", "0.5550341", "0.5543723", "0.553827", "0.55062217", "0.5478257", "0.5455158", "0.54498625", "0.5443609", "0.53967434", "0.5386662", "0.53394026", "0.5324254", "0.5321294", ...
0.75670975
0
WaitTillReady blocks the goroutine till all modules are ready.
func (g *Group) WaitTillReady() { <-g.readyCh }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (envManager *TestEnvManager) WaitUntilReady() (bool, error) {\n\tlog.Println(\"Start checking components' status\")\n\tretry := u.Retrier{\n\t\tBaseDelay: 1 * time.Second,\n\t\tMaxDelay: 10 * time.Second,\n\t\tRetries: 8,\n\t}\n\n\tready := false\n\tretryFn := func(_ context.Context, i int) error {\n\t\tfo...
[ "0.71673805", "0.7037186", "0.6973799", "0.69529676", "0.6943009", "0.67180645", "0.6540523", "0.65389913", "0.6448208", "0.64068717", "0.63826364", "0.6358909", "0.63548183", "0.6340962", "0.6263704", "0.6206062", "0.61352175", "0.6132525", "0.61261886", "0.60737973", "0.603...
0.7307017
0
Validate adds an error if the Field is a path that does not exist.
func (v *StringIsPath) Validate(e *validator.Errors) { if Exists(v.Field) { return } e.Add(v.Name, StringIsPathError(v)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b *Builder) Validate() error {\n\tif b.path == \"\" {\n\t\treturn errors.New(\"failed to validate: missing host path\")\n\t}\n\n\tb = b.WithCheckf(isValidPath(), \"invalid path %v\", b.path)\n\n\tfailedValidations := []string{}\n\tfor check, msg := range b.checks {\n\t\tif !(*check)(b.path) {\n\t\t\tfailedVa...
[ "0.61732626", "0.616282", "0.61580884", "0.61464876", "0.6046862", "0.597934", "0.5973007", "0.59136385", "0.5814603", "0.57751167", "0.5684489", "0.5603558", "0.5591774", "0.55728245", "0.550294", "0.54576457", "0.54488456", "0.54190725", "0.54136354", "0.54079545", "0.54070...
0.69477284
0
SetField sets validator field.
func (v *StringIsPath) SetField(s string) { v.Field = s }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (self *Bgmchain) SetValidator(validator bgmcommon.Address) {\n\tself.lock.Lock()\n\tself.validator = validator\n\tself.lock.Unlock()\n}", "func (bc *BlockChain) SetValidator(validator Validator) {\n\tbc.procmu.Lock()\n\tdefer bc.procmu.Unlock()\n\tbc.validator = validator\n}", "func (p *PCache) SetValidat...
[ "0.6745325", "0.6549376", "0.6272245", "0.59254694", "0.58315104", "0.5823037", "0.5804896", "0.5743061", "0.57349515", "0.5696178", "0.5676906", "0.5657407", "0.5617112", "0.56097883", "0.55886614", "0.5579758", "0.556051", "0.5544205", "0.55363196", "0.55320895", "0.5531661...
0.0
-1
SetNameIndex sets index of slice element on Name.
func (v *StringIsPath) SetNameIndex(i int) { v.Name = fmt.Sprintf("%s[%d]", RxSetNameIndex.ReplaceAllString(v.Name, ""), i) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *StringHasSuffixAny) SetNameIndex(i int) {\n\tv.Name = fmt.Sprintf(\"%s[%d]\", RxSetNameIndex.ReplaceAllString(v.Name, \"\"), i)\n}", "func (v *StringIsUserGroupOrWhitelisted) SetNameIndex(i int) {\n\tv.Name = fmt.Sprintf(\"%s[%d]\", RxSetNameIndex.ReplaceAllString(v.Name, \"\"), i)\n}", "func (v *Stri...
[ "0.748726", "0.7431408", "0.6964414", "0.6346891", "0.6253622", "0.6180723", "0.6141942", "0.60409635", "0.59939164", "0.5878266", "0.5856989", "0.5851746", "0.57178617", "0.5685566", "0.5639303", "0.56303644", "0.55680585", "0.5561141", "0.5557104", "0.5499101", "0.548195", ...
0.77226394
0
Exists returns true if path exists
func Exists(path string) bool { if _, err := os.Stat(path); !os.IsNotExist(err) { return true } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func PathExists(path string) bool {\n _, err := os.Stat(path)\n if err == nil {\n return true\n }\n return false\n}", "func PathExists(p string) bool {\n\tif st, err := os.Stat(p); err == nil && st != nil {\n\t\treturn true\n\t}\n\treturn false\n}", "func pathExists(path string) (exists bool) {\n\texist...
[ "0.82518166", "0.814709", "0.8141594", "0.807197", "0.80642235", "0.8063287", "0.8056969", "0.8056969", "0.8033987", "0.80294985", "0.8026755", "0.8016769", "0.8013383", "0.79878515", "0.7980666", "0.79802924", "0.7979126", "0.79775023", "0.7969888", "0.7967049", "0.7967049",...
0.7855411
52
a function to initialise the command line arguments
func init() { kmerSize = indexCmd.Flags().IntP("kmerSize", "k", 31, "size of k-mer") sketchSize = indexCmd.Flags().IntP("sketchSize", "s", 21, "size of MinHash sketch") windowSize = indexCmd.Flags().IntP("windowSize", "w", 100, "size of window to sketch graph traversals with") numPart = indexCmd.Flags().IntP("numPa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func argsInit() {\n\tArgs = make([]string, 0, 0)\n\tArgs = append(Args, os.Args...)\n\tExecFile = options.GetExecFileByPid(os.Getpid())\n\t// default opt Parser\n\t// do not include ExecFile\n\topts = options.NewOptParser(Args[1:])\n\tArgLine = options.ArgsToSpLine(Args)\n\tArgFullLine = options.CleanArgLine(os.Ar...
[ "0.7419382", "0.74053735", "0.6910425", "0.67321837", "0.67054397", "0.6680921", "0.66162205", "0.6614232", "0.6585571", "0.6536786", "0.6528025", "0.648461", "0.6451435", "0.6429187", "0.63542014", "0.63480437", "0.6340536", "0.63089436", "0.6298183", "0.62748134", "0.627185...
0.61650586
29
runIndex is the main function for the index subcommand
func runIndex() { // check index flag is set (global flag but don't require it for all sub commands) if *indexDir == "" { fmt.Println("please specify a directory for the index files (--indexDir)") os.Exit(1) } // set up profiling if *profiling == true { defer profile.Start(profile.MemProfile, profile.Profi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func index(w http.ResponseWriter, req *http.Request, ctx httputil.Context) (e *httputil.Error) {\n\tif req.URL.Path != \"/\" {\n\t\tnotFound(w, req)\n\t\treturn\n\t}\n\tm := newManager(ctx)\n\n\tres, err := m.Index()\n\tif err != nil {\n\t\te = httputil.Errorf(err, \"couldn't query for test results\")\n\t\treturn\...
[ "0.72352827", "0.7231066", "0.6974629", "0.6947217", "0.6895008", "0.68026304", "0.66526365", "0.65366894", "0.65255636", "0.6510996", "0.6510996", "0.64903265", "0.6484665", "0.648378", "0.64530957", "0.64055777", "0.6405252", "0.6393524", "0.63744456", "0.63676375", "0.6320...
0.7970374
0
indexParamCheck is a function to check user supplied parameters
func indexParamCheck() error { // check the supplied directory is accessible etc. log.Printf("\tdirectory containing MSA files: %v", *msaDir) misc.ErrorCheck(misc.CheckDir(*msaDir)) // check there are some files with the msa extension msas, err := filepath.Glob(*msaDir + "/cluster*.msa") if err != nil { retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (af *filtBase) checkIntParam(p, low, high int, name string) (int, error) {\n\tif low <= p && p <= high {\n\t\treturn p, nil\n\t} else {\n\t\terr := fmt.Errorf(\"parameter %v is not in range <%v, %v>\", name, low, high)\n\t\treturn 0, err\n\t}\n}", "func CheckArgs(argsLength, argIndex int) error {\n\tif args...
[ "0.64062905", "0.6219524", "0.5964376", "0.5929825", "0.5826433", "0.58000696", "0.57833385", "0.5755149", "0.57122403", "0.5704308", "0.5693902", "0.56724966", "0.5590904", "0.5540803", "0.5513222", "0.5499996", "0.5456984", "0.5451518", "0.5449487", "0.5449487", "0.5449487"...
0.6897079
0
NewApplication initializes and returns Application.
func NewApplication() *Application { tview.Styles = tview.Theme{ PrimitiveBackgroundColor: tcell.ColorDefault, ContrastBackgroundColor: tcell.ColorBlue, PrimaryTextColor: tcell.ColorDefault, SecondaryTextColor: tcell.ColorDefault, } table := NewTable() table.SetInputCapture(func(t todo.Todo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewApplication() Application {\n\treturn app\n}", "func New() *Application {\n\tapp := &Application{}\n\treturn app\n}", "func NewApplication() application.Application {\n\treturn &app{}\n}", "func NewApplication() *Application {\n\treturn &Application{}\n}", "func New(name string) *Application {\n\ti...
[ "0.8507224", "0.8236647", "0.8201647", "0.8193408", "0.7851466", "0.77492255", "0.7746956", "0.7736586", "0.76904875", "0.76795036", "0.76363564", "0.75912136", "0.7583377", "0.7583377", "0.7543192", "0.7496061", "0.74459046", "0.74452597", "0.7433334", "0.741236", "0.7368086...
0.0
-1
Run starts TUI application.
func (app *Application) Run() error { go func() { for { todos := <-app.subscriber app.Update(todos) } }() return app.Application.Run() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (tui *TUI) Run() error {\n\treturn tui.app.SetRoot(tui.window, true).Run()\n}", "func (app *App) Run() error {\n\tgo func() {\n\t\t<-app.Quit\n\t\tapp.app.Stop()\n\t}()\n\n\tui.SetConsoleTitle(\"RazTracer\")\n\n\treturn app.app.SetFocus(app).Run()\n}", "func runTUI() error {\n\n\t// Set function to manage...
[ "0.8116523", "0.72560894", "0.7200513", "0.70855904", "0.69775754", "0.692683", "0.687408", "0.686363", "0.6770994", "0.6596238", "0.658861", "0.657219", "0.6472527", "0.6390534", "0.63787776", "0.6367142", "0.63598305", "0.63289285", "0.6238836", "0.6215028", "0.6201569", ...
0.0
-1
Subscribe subscribes to the update of todos.
func (app *Application) Subscribe(store *todo.Store) { store.Register(app.subscriber) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (n *notifier) Subscribe(ch chan<- []Update) {\n\tn.mu.Lock()\n\tdefer n.mu.Unlock()\n\tn.subs = append(n.subs, ch)\n}", "func (u *Updater) Subscribe(s *Server) {\n\tu.mux.Lock()\n\tu.listeners = append(u.listeners, s)\n\tu.mux.Unlock()\n}", "func (d *Demo) Subscribe(recv backend.Receiver) {\n\td.Lock()\n\...
[ "0.66930926", "0.6341041", "0.61283416", "0.6050386", "0.5937323", "0.57322043", "0.56926197", "0.5690928", "0.56162053", "0.5593847", "0.55849826", "0.557723", "0.55625504", "0.5504636", "0.55015826", "0.54984856", "0.5491044", "0.54770607", "0.5442515", "0.5441608", "0.5441...
0.66747826
1
Update updates views along with given todos.
func (app *Application) Update(todos []todo.Todo) { app.table.Update(todos) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func UpdateTodo(writer http.ResponseWriter, request *http.Request) {\n\tparams := mux.Vars(request)\n\tid, err := strconv.Atoi(params[\"id\"])\n\n\tif err != nil {\n\t\tresponseWithJson(writer, http.StatusBadRequest, map[string]string{\"message\": \"Invalid todo id\"})\n\t\treturn\n\t}\n\n\tvar updateTodo tdo.Todo...
[ "0.61347115", "0.60770625", "0.6028172", "0.5963277", "0.59206903", "0.5800302", "0.5769452", "0.57317597", "0.5701334", "0.5638788", "0.5621505", "0.5592594", "0.55199575", "0.5502505", "0.550189", "0.54874307", "0.54446393", "0.5402243", "0.5352037", "0.52726525", "0.527171...
0.56051385
11
/ Returns an elliptic.CurveWrapper around this group. The elliptic.CurveParams returned by the .Params() method the Curve should not be used for doing ScalarMult, etc.!
func (m *ModulusGroup) AsCurve() elliptic.Curve { return &asCurve{m} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s Keygen) Curve() elliptic.Curve {\n\treturn s.group\n}", "func getCurve() elliptic.Curve {\n return elliptic.P256()\n}", "func CurveParamsParams(curve *elliptic.CurveParams,) *elliptic.CurveParams", "func NewCurve(xyz XYZer) Curve {\n\tc := Curve{}\n\tc.points.minXYZ.X, c.points.minXYZ.Y, c.points....
[ "0.6798301", "0.6065067", "0.5757176", "0.56906825", "0.56289303", "0.54817134", "0.5463004", "0.5415355", "0.539792", "0.53937465", "0.5361424", "0.5323893", "0.5249899", "0.51688224", "0.50669473", "0.5043877", "0.50011253", "0.49452612", "0.49054405", "0.48807684", "0.4798...
0.7203198
0
root mustn't be null return maximum sum, maximum sum from root
func helper(root *TreeNode) (int, int) { maxFromRoot, max, maxThroughRoot := root.Val, root.Val, root.Val if root.Left != nil { leftMax, leftMaxFromRoot := helper(root.Left) if leftMaxFromRoot+root.Val > maxFromRoot { maxFromRoot = leftMaxFromRoot + root.Val } if leftMaxFromRoot > 0 { maxThroughRoot += ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func maxPathSum(root *TreeNode) int {\n\treturn max(mps(root))\n}", "func (tree *Tree) MaxSum() int {\n\tleftSum := tree.sumLeft(tree.root.left)\n\trightSum := tree.sumRight(tree.root.right)\n\tfmt.Printf(\"L/R and max: %d %d %d\\n\", leftSum, rightSum, max(leftSum, rightSum) + tree.root.data)\n\treturn max(left...
[ "0.6921572", "0.6881113", "0.65898454", "0.64856327", "0.6413233", "0.64065135", "0.62849116", "0.6170783", "0.6122969", "0.6112235", "0.6084347", "0.5971642", "0.59470457", "0.59462214", "0.59316504", "0.59189284", "0.5914049", "0.5894993", "0.5746111", "0.5735989", "0.56569...
0.64266676
4
MaxItemID retrieves the current largest item id is at You can walk backward from here to discover all items.
func MaxItemID() int { var maxItemID int err := getJSON(MaxItemIDURL, &maxItemID) if err != nil { log.Panicln(err.Error()) } return maxItemID }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func getMaxID() uint8 {\n\tmaxID++\n\treturn maxID\n}", "func getMaxID() int {\n\n\tif len(cdb.classMap) != 0 {\n\t\tkeys := make([]int, 0, len(cdb.classMap))\n\t\tfor k := range cdb.classMap {\n\t\t\tkeys = append(keys, k)\n\t\t}\n\t\tsort.Ints(keys)\n\t\treturn keys[len(keys)-1]\n\t}\n\n\treturn -1\n\n}", "f...
[ "0.6239351", "0.62393034", "0.6184761", "0.6177771", "0.61411256", "0.5951838", "0.59276485", "0.5924461", "0.5894317", "0.5864182", "0.58507824", "0.5841664", "0.5819029", "0.57879007", "0.5785859", "0.5710718", "0.5693274", "0.5676167", "0.56462955", "0.56358624", "0.559829...
0.86796016
0
Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) { return file_helloworld_helloworld_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ProtoFromMessageDescriptor(d protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto {\n\ttype canProto interface {\n\t\tMessageDescriptorProto() *descriptorpb.DescriptorProto\n\t}\n\tif res, ok := d.(canProto); ok {\n\t\treturn res.MessageDescriptorProto()\n\t}\n\tif res, ok := d.(DescriptorProtoWrappe...
[ "0.73437", "0.7334874", "0.72949165", "0.7105766", "0.705134", "0.6988509", "0.6962971", "0.6912535", "0.68644553", "0.6860742", "0.6847173", "0.68470645", "0.6837926", "0.6823334", "0.6817079", "0.68159", "0.681522", "0.6815156", "0.68004847", "0.6800211", "0.6799987", "0....
0.6785783
26
Deprecated: Use CodeRequest.ProtoReflect.Descriptor instead.
func (*CodeRequest) Descriptor() ([]byte, []int) { return file_helloworld_helloworld_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*CodeLensRequest) Descriptor() ([]byte, []int) {\n\treturn file_protocol_rpc_rpc_proto_rawDescGZIP(), []int{163}\n}", "func (*PatchCollectorsRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_clarifai_api_service_proto_rawDescGZIP(), []int{161}\n}", "func (*ModifyRequest) Descriptor() ([]byte, ...
[ "0.72352815", "0.71125454", "0.7089678", "0.7086867", "0.7050585", "0.7002672", "0.69934523", "0.6932713", "0.69018894", "0.68992066", "0.6889897", "0.68843466", "0.68616295", "0.6860479", "0.68583477", "0.68542755", "0.68515146", "0.6844837", "0.68435585", "0.6838578", "0.68...
0.72652876
0
Deprecated: Use PaqueteRequest.ProtoReflect.Descriptor instead.
func (*PaqueteRequest) Descriptor() ([]byte, []int) { return file_helloworld_helloworld_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ModifyRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_engine_proto_rawDescGZIP(), []int{10}\n}", "func (*PatchCollectorsRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_clarifai_api_service_proto_rawDescGZIP(), []int{161}\n}", "func (*AddPeerRequest) Descriptor() ([]byte, []int)...
[ "0.72573286", "0.7218847", "0.71748", "0.7132119", "0.7117333", "0.71093345", "0.70960057", "0.70482236", "0.7047904", "0.7028092", "0.70185226", "0.7012674", "0.70116967", "0.70067143", "0.70019865", "0.69961846", "0.6985266", "0.6979804", "0.6976487", "0.6974723", "0.697410...
0.7264457
0
NewGetPlatformsParams creates a new GetPlatformsParams object with the default values initialized.
func NewGetPlatformsParams() *GetPlatformsParams { var () return &GetPlatformsParams{ timeout: cr.DefaultTimeout, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: timeout,\n\t}\n}", "func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\t\tHTTPClient: client,\n\t...
[ "0.7555398", "0.7425465", "0.66280895", "0.6524783", "0.6367459", "0.623201", "0.6032082", "0.5907493", "0.58632076", "0.570186", "0.56994843", "0.5553735", "0.55019903", "0.547514", "0.5458275", "0.5445687", "0.5440679", "0.5381146", "0.5365345", "0.5304436", "0.5302954", ...
0.88731694
0
NewGetPlatformsParamsWithTimeout creates a new GetPlatformsParams object with the default values initialized, and the ability to set a timeout on a request
func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams { var () return &GetPlatformsParams{ timeout: timeout, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) WithTimeout(timeout time.Duration) *GetPlatformsParams {\n\to.SetTimeout(timeout)\n\treturn o\n}", "func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}", "func (o *GetPlatformsParams) SetTimeout(time...
[ "0.8099803", "0.7864803", "0.68469137", "0.6831266", "0.6502288", "0.6194031", "0.6076022", "0.59323996", "0.58478737", "0.5819925", "0.5788982", "0.57653457", "0.5737436", "0.57203186", "0.56848276", "0.5684553", "0.56770486", "0.5665245", "0.56478405", "0.5646077", "0.56403...
0.8511127
0
NewGetPlatformsParamsWithContext creates a new GetPlatformsParams object with the default values initialized, and the ability to set a context for a request
func NewGetPlatformsParamsWithContext(ctx context.Context) *GetPlatformsParams { var () return &GetPlatformsParams{ Context: ctx, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}", "func (o *GetPlatformsParams) WithContext(ctx context.Context) *GetPlatformsParams {\n\to.SetContext(ctx)\n\treturn o\n}", "func NewGetPlatformsParamsWithHTTPClient(client *h...
[ "0.79062843", "0.75749254", "0.717758", "0.6895261", "0.6486832", "0.64502275", "0.60652006", "0.5622456", "0.5587018", "0.5517432", "0.5431089", "0.5329733", "0.5258846", "0.52431345", "0.49316105", "0.49075675", "0.48815322", "0.48812634", "0.4881164", "0.485486", "0.483336...
0.8426746
0
NewGetPlatformsParamsWithHTTPClient creates a new GetPlatformsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams { var () return &GetPlatformsParams{ HTTPClient: client, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) WithHTTPClient(client *http.Client) *GetPlatformsParams {\n\to.SetHTTPClient(client)\n\treturn o\n}", "func NewGetPlatformsParams() *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}", "func (o *GetPlatformsParams) SetHTTPClien...
[ "0.82473236", "0.72261274", "0.6987023", "0.6613042", "0.66055197", "0.61128336", "0.60561305", "0.59734505", "0.5956229", "0.5941421", "0.59126693", "0.58695054", "0.5867843", "0.58573145", "0.58371466", "0.5729112", "0.5689428", "0.5687673", "0.5664992", "0.563189", "0.5624...
0.85485095
0
WithTimeout adds the timeout to the get platforms params
func (o *GetPlatformsParams) WithTimeout(timeout time.Duration) *GetPlatformsParams { o.SetTimeout(timeout) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func NewGetPlatformsParamsWithTimeout(timeout time.Duration) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\n\t\ttimeout: timeout,\n\t}\n}", "func WithTimeout(t time.Duration) apiOption {\n\treturn f...
[ "0.70924264", "0.70087135", "0.63422763", "0.60646397", "0.598531", "0.59620464", "0.5948087", "0.58235776", "0.5817179", "0.5794681", "0.57502705", "0.57502705", "0.5739896", "0.572764", "0.57164013", "0.57161456", "0.57042384", "0.56877244", "0.56648874", "0.56480193", "0.5...
0.7747894
0
SetTimeout adds the timeout to the get platforms params
func (o *GetPlatformsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetOperatingSystemsParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func (o *PublicWebLinkPlatformEstablishParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func (o *GetGPUArchitectureParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",...
[ "0.7305111", "0.72466415", "0.71178937", "0.7100496", "0.69969594", "0.6993028", "0.6947879", "0.6941489", "0.69177073", "0.6908698", "0.6838413", "0.6813882", "0.6804481", "0.6794519", "0.67828983", "0.67797804", "0.67492235", "0.6746541", "0.67458135", "0.67379045", "0.6735...
0.8151992
0
WithContext adds the context to the get platforms params
func (o *GetPlatformsParams) WithContext(ctx context.Context) *GetPlatformsParams { o.SetContext(ctx) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func sendWithContext(ctx context.Context, httpClient *http.Client, url string, body io.Reader, opt *Options) (*http.Response, error) {\n\tv, _ := query.Values(opt)\n\n\t// fmt.Print(v.Encode()) will output: \"city=0&mr=1&pb=4&pro=0&yys=0\"\n\tAPIEndpoint := fmt.Sprintf(\"%s&%s\", url, v.Encode())\n\tfmt.Println(AP...
[ "0.5653029", "0.54843134", "0.54253876", "0.5395974", "0.53492355", "0.5234491", "0.5172244", "0.5167735", "0.5149963", "0.51398677", "0.506741", "0.503723", "0.5010748", "0.50087667", "0.50020254", "0.4988482", "0.49845147", "0.4980806", "0.496598", "0.4955769", "0.49531364"...
0.6553357
0
SetContext adds the context to the get platforms params
func (o *GetPlatformsParams) SetContext(ctx context.Context) { o.Context = ctx }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetGPUArchitectureParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}", "func (o *PublicWebLinkPlatformEstablishParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}", "func (o *GetaspecificPbxDeviceFirmwareBinaryParams) SetContext(ctx context.Context) {\n\to.Context = ctx\n}", ...
[ "0.6786597", "0.6569877", "0.6501057", "0.6415769", "0.64072716", "0.6354175", "0.63233936", "0.63068795", "0.63018876", "0.6285175", "0.6277759", "0.6277518", "0.627217", "0.6267961", "0.6259615", "0.6256487", "0.62138826", "0.6211839", "0.6208424", "0.6195113", "0.6182538",...
0.7558212
0
WithHTTPClient adds the HTTPClient to the get platforms params
func (o *GetPlatformsParams) WithHTTPClient(client *http.Client) *GetPlatformsParams { o.SetHTTPClient(client) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func NewGetPlatformsParamsWithHTTPClient(client *http.Client) *GetPlatformsParams {\n\tvar ()\n\treturn &GetPlatformsParams{\n\t\tHTTPClient: client,\n\t}\n}", "func (o *GetBundleByKeyParams) SetHTTPClient(client *...
[ "0.74874324", "0.67684495", "0.6612133", "0.66043484", "0.65645367", "0.6550549", "0.6467634", "0.64491713", "0.64115715", "0.6409021", "0.63899356", "0.63747627", "0.6371442", "0.635973", "0.6344963", "0.6342673", "0.63373876", "0.6336873", "0.63319355", "0.63319236", "0.633...
0.75234395
0
SetHTTPClient adds the HTTPClient to the get platforms params
func (o *GetPlatformsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetGPUArchitectureParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *GetBundleByKeyParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *PublicWebLinkPlatformEstablishParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\...
[ "0.7773785", "0.76442534", "0.76175207", "0.76163924", "0.7615906", "0.7574128", "0.75327814", "0.75107133", "0.7496636", "0.7492477", "0.74772483", "0.7469208", "0.74516153", "0.7449262", "0.74492323", "0.7444003", "0.744089", "0.74403507", "0.7437406", "0.7435754", "0.74265...
0.8377742
0
WithExtended adds the extended to the get platforms params
func (o *GetPlatformsParams) WithExtended(extended *bool) *GetPlatformsParams { o.SetExtended(extended) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) SetExtended(extended *bool) {\n\to.Extended = extended\n}", "func (b *MessagesGetHistoryBuilder) Extended(v bool) *MessagesGetHistoryBuilder {\n\tb.Params[\"extended\"] = v\n\treturn b\n}", "func (b *MessagesGetByIDBuilder) Extended(v bool) *MessagesGetByIDBuilder {\n\tb.Params[\"e...
[ "0.761028", "0.563234", "0.56002456", "0.5536339", "0.5500236", "0.5369291", "0.507227", "0.5051095", "0.49456128", "0.49286032", "0.49263084", "0.49066523", "0.4895168", "0.48209637", "0.4819409", "0.47902983", "0.4787378", "0.47806302", "0.4741045", "0.47262233", "0.4717741...
0.7949409
0
SetExtended adds the extended to the get platforms params
func (o *GetPlatformsParams) SetExtended(extended *bool) { o.Extended = extended }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPlatformsParams) WithExtended(extended *bool) *GetPlatformsParams {\n\to.SetExtended(extended)\n\treturn o\n}", "func (o *VulnerabilitiesRequest) SetExtended(v bool) {\n\to.Extended = &v\n}", "func (b *MessagesGetHistoryBuilder) Extended(v bool) *MessagesGetHistoryBuilder {\n\tb.Params[\"extended\"...
[ "0.71823275", "0.6650728", "0.5868713", "0.5740037", "0.57266814", "0.55311686", "0.53988254", "0.53365576", "0.5276123", "0.51772213", "0.5176059", "0.51389223", "0.51068175", "0.5083746", "0.5057755", "0.5052479", "0.49989742", "0.49774477", "0.49474514", "0.4946438", "0.48...
0.8300686
0
WriteToRequest writes these params to a swagger request
func (o *GetPlatformsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Extended != nil { // query param extended var qrExtended bool if o.Extended != nil { qrExtended = *o.Extended } qExten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *FileInfoCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {\n\n\tif err := r.SetTimeout(o.timeout); err != nil {\n\t\treturn err\n\t}\n\tvar res []error\n\n\tif o.ByteOffset != nil {\n\n\t\t// query param byte_offset\n\t\tvar qrByteOffset int64\n\n\t\tif o.ByteOffset != nil ...
[ "0.7198161", "0.714435", "0.70471495", "0.7021836", "0.69967365", "0.69959503", "0.6979433", "0.6979074", "0.69695425", "0.6966308", "0.69242847", "0.6908102", "0.69045216", "0.6871055", "0.68575305", "0.68564737", "0.6851862", "0.6845359", "0.6844677", "0.684266", "0.6830004...
0.67860335
28
ListMetricEquipAttr implements Licence ListMetricEquipAttr function
func (l *LicenseRepository) ListMetricEquipAttr(ctx context.Context, scopes ...string) ([]*v1.MetricEquipAttrStand, error) { respJSON, err := l.listMetricWithMetricType(ctx, v1.MetricEquipAttrStandard, scopes...) if err != nil { logger.Log.Error("dgraph/ListMetricEquipAttr - listMetricWithMetricType", zap.Error(err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func cmdAttributeList(c *cli.Context) error {\n\tif err := adm.VerifyNoArgument(c); err != nil {\n\t\treturn err\n\t}\n\n\treturn adm.Perform(`get`, `/attribute/`, `list`, nil, c)\n}", "func AttributeList(attr int32) (list map[string]int32) {\n\tlist = map[string]int32{}\n\tfor bit, name := range VideoAttribute ...
[ "0.58724934", "0.5863162", "0.57436544", "0.57390493", "0.54155165", "0.5408128", "0.5230414", "0.51869965", "0.51444864", "0.51340497", "0.50995654", "0.5063905", "0.50034463", "0.4998801", "0.4996387", "0.4985066", "0.49573505", "0.4939282", "0.4936213", "0.4924132", "0.490...
0.8314187
0
NewMockServiceAuth creates a new mock instance
func NewMockServiceAuth(ctrl *gomock.Controller) *MockServiceAuth { mock := &MockServiceAuth{ctrl: ctrl} mock.recorder = &MockServiceAuthMockRecorder{mock} return mock }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewAuth(users map[string]string) policies.AuthServiceClient {\n\treturn &authServiceMock{users}\n}", "func NewMockAuth(t mockConstructorTestingTNewMockAuth) *MockAuth {\n\tmock := &MockAuth{}\n\tmock.Mock.Test(t)\n\n\tt.Cleanup(func() { mock.AssertExpectations(t) })\n\n\treturn mock\n}", "func newAuthServ...
[ "0.7235981", "0.7116139", "0.68920743", "0.6762796", "0.67064947", "0.66278625", "0.6601573", "0.6584503", "0.64793545", "0.6477035", "0.6461894", "0.63040113", "0.6280253", "0.6241314", "0.6233598", "0.61390966", "0.59611005", "0.59576327", "0.59335065", "0.59243286", "0.591...
0.5619934
33
EXPECT returns an object that allows the caller to indicate expected use
func (m *MockServiceAuth) EXPECT() *MockServiceAuthMockRecorder { return m.recorder }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (mmGetObject *mClientMockGetObject) Expect(ctx context.Context, head insolar.Reference) *mClientMockGetObject {\n\tif mmGetObject.mock.funcGetObject != nil {\n\t\tmmGetObject.mock.t.Fatalf(\"ClientMock.GetObject mock is already set by Set\")\n\t}\n\n\tif mmGetObject.defaultExpectation == nil {\n\t\tmmGetObjec...
[ "0.58169925", "0.571553", "0.5674476", "0.5640405", "0.562928", "0.5574723", "0.556962", "0.5530448", "0.550884", "0.5488494", "0.5474579", "0.5464561", "0.54615927", "0.54421943", "0.544173", "0.5407415", "0.54029363", "0.5390068", "0.53847593", "0.53847593", "0.5371173", ...
0.0
-1
Auth mocks base method
func (m *MockServiceAuth) Auth(arg0 models.UserInput) (models.UserBoardsOutside, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Auth", arg0) ret0, _ := ret[0].(models.UserBoardsOutside) ret1, _ := ret[1].(error) return ret0, ret1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestAuthRequestGetters(t *testing.T) {\n\trunTest(t, func(s *res.Service) {\n\t\ts.Handle(\"model\", res.Auth(\"foo\", func(r res.AuthRequest) {\n\t\t\trestest.AssertEqualJSON(t, \"Method\", r.Method(), \"foo\")\n\t\t\trestest.AssertEqualJSON(t, \"CID\", r.CID(), mock.CID)\n\t\t\trestest.AssertEqualJSON(t, \"...
[ "0.656697", "0.644635", "0.6424919", "0.6387047", "0.6359137", "0.6304474", "0.6280732", "0.62320656", "0.6219561", "0.6136139", "0.612664", "0.6107285", "0.60800076", "0.60556173", "0.6026555", "0.6022269", "0.60212576", "0.6004177", "0.59664774", "0.5951194", "0.5931367", ...
0.6943208
0
Auth indicates an expected call of Auth
func (mr *MockServiceAuthMockRecorder) Auth(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Auth", reflect.TypeOf((*MockServiceAuth)(nil).Auth), arg0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MockSession) Auth() error {\n\targs := m.Mock.Called()\n\treturn args.Error(0)\n}", "func Auth() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tc.Writer.Write([]byte(\"auth required for endpoint\"))\n\t}\n}", "func (a HMACAuthenticator) Auth(r *http.Request) bool {\n\treturn true\n}", "func...
[ "0.71050674", "0.6795108", "0.6762102", "0.6671263", "0.66693366", "0.65796834", "0.6568387", "0.6534614", "0.64098936", "0.6380983", "0.63791275", "0.6378445", "0.637458", "0.6303876", "0.6299012", "0.6288495", "0.62703717", "0.62702394", "0.6251795", "0.62452894", "0.624166...
0.6571172
6
CheckCookie mocks base method
func (m *MockServiceAuth) CheckCookie(arg0 echo.Context) (int64, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CheckCookie", arg0) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(error) return ret0, ret1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Checker) HasCookie(key, expectedValue string) *Checker {\n\tvalue, exists := c.cookies[key]\n\tassert.True(c.t, exists && expectedValue == value)\n\treturn c\n}", "func getCookie(r *http.Request, cookiename string) (bool, *http.Cookie) {\n // Ignoring error value because it is likely that the cookie ...
[ "0.612215", "0.6105234", "0.60702807", "0.60390204", "0.59975195", "0.59955245", "0.5935115", "0.5835304", "0.582638", "0.5762133", "0.5701", "0.5612771", "0.5557298", "0.5547791", "0.5532456", "0.55284435", "0.55165887", "0.551043", "0.5466343", "0.5459785", "0.54391205", ...
0.731943
0
CheckCookie indicates an expected call of CheckCookie
func (mr *MockServiceAuthMockRecorder) CheckCookie(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckCookie", reflect.TypeOf((*MockServiceAuth)(nil).CheckCookie), arg0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cook AwaitCookie) Check() error {\n\treturn cook.Cookie.Check()\n}", "func (cook ChangeCounterCookie) Check() error {\n\treturn cook.Cookie.Check()\n}", "func (cook ChangeProviderPropertyCookie) Check() error {\n\treturn cook.Cookie.Check()\n}", "func CheckCookie(r *http.Request) bool {\r\n\t_, err := ...
[ "0.72661316", "0.72648275", "0.7115393", "0.7102399", "0.7091658", "0.7071528", "0.7066889", "0.705049", "0.69304526", "0.6884385", "0.6877508", "0.687586", "0.68542546", "0.6853322", "0.68526745", "0.684854", "0.68435425", "0.682521", "0.67942345", "0.67927617", "0.67770404"...
0.70733666
5
Login mocks base method
func (m *MockServiceAuth) Login(arg0 models.UserInputLogin) (models.UserSession, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Login", arg0) ret0, _ := ret[0].(models.UserSession) ret1, _ := ret[1].(error) return ret0, ret1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MockHandler) Login(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Login\", arg0, arg1)\n}", "func (m *MockAuthService) Login(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Login\", arg0, arg1)\n}", "func TestLogin(w ht...
[ "0.7183621", "0.71248025", "0.6753659", "0.6664102", "0.6646322", "0.66238445", "0.661635", "0.66042656", "0.65960777", "0.65740645", "0.65580904", "0.64773464", "0.64741534", "0.6403498", "0.6395945", "0.6352871", "0.63038814", "0.62659204", "0.6252402", "0.6243144", "0.6224...
0.7311137
0
Login indicates an expected call of Login
func (mr *MockServiceAuthMockRecorder) Login(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Login", reflect.TypeOf((*MockServiceAuth)(nil).Login), arg0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *noAuth) Login(c echo.Context) error {\n\treturn errors.New(\"Can not login when there is no auth\")\n}", "func Login(w http.ResponseWriter, r *http.Request) {\n\tfmt.Println(\"login called\")\n}", "func (c UserInfo) TestLogin(DiscordToken *models.DiscordToken) revel.Result {\n\tif DiscordToken.AccessT...
[ "0.67690563", "0.67624575", "0.67271596", "0.66149926", "0.6585284", "0.6573348", "0.6540424", "0.6521625", "0.6498617", "0.6486779", "0.64378715", "0.64263606", "0.6399371", "0.6376075", "0.63646734", "0.63622534", "0.63606757", "0.6340663", "0.634037", "0.6320144", "0.63151...
0.6261488
26
Logout mocks base method
func (m *MockServiceAuth) Logout(arg0 echo.Context) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Logout", arg0) ret0, _ := ret[0].(error) return ret0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MockAuthService) Logout(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Logout\", arg0, arg1)\n}", "func (m *MockHandler) Logout(arg0 http.ResponseWriter, arg1 *http.Request) {\n\tm.ctrl.T.Helper()\n\tm.ctrl.Call(m, \"Logout\", arg0, arg1)\n}", "func Test_Logou...
[ "0.78230685", "0.7768923", "0.7120076", "0.710372", "0.6728446", "0.65702486", "0.6540324", "0.6384043", "0.63278955", "0.61762667", "0.61235154", "0.6058738", "0.60298705", "0.6000153", "0.5989176", "0.5982589", "0.5948157", "0.5907925", "0.5906584", "0.58800757", "0.5868041...
0.7273181
2
Logout indicates an expected call of Logout
func (mr *MockServiceAuthMockRecorder) Logout(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logout", reflect.TypeOf((*MockServiceAuth)(nil).Logout), arg0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (nb *Newsblur) Logout(UNIMPLEMENTED) {}", "func (s *Session) Logout() error { return nil }", "func (c *Controller) Logout(ctx context.Context) (err error) {\n\t// Build request\n\treq, err := c.requestBuild(ctx, \"GET\", authenticationAPIName, \"logout\", nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"r...
[ "0.73326755", "0.71011513", "0.6862219", "0.6856231", "0.68042403", "0.6794714", "0.6790308", "0.67849296", "0.67800725", "0.67195934", "0.67052", "0.6674224", "0.66567403", "0.66507226", "0.6623271", "0.6619633", "0.6601576", "0.6586629", "0.6575644", "0.65651387", "0.655703...
0.62305826
54
Registration mocks base method
func (m *MockServiceAuth) Registration(arg0 models.UserInputReg) (models.UserSession, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Registration", arg0) ret0, _ := ret[0].(models.UserSession) ret1, _ := ret[1].(error) return ret0, ret1 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MockRoutingRuleClient) Register() error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Register\")\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}", "func mockedGranter(kubeutil *kube.Kube, app *v1.RadixRegistration, namespace string, serviceAccount *corev1.ServiceAccount) error {\n\treturn nil\n}", ...
[ "0.6656541", "0.6569731", "0.6534301", "0.649857", "0.6472692", "0.6407817", "0.6345684", "0.63358206", "0.62946606", "0.6216814", "0.6175665", "0.6145518", "0.6103006", "0.609894", "0.60896176", "0.6068469", "0.603417", "0.5971163", "0.59548897", "0.5937762", "0.58421296", ...
0.65866566
1
Registration indicates an expected call of Registration
func (mr *MockServiceAuthMockRecorder) Registration(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Registration", reflect.TypeOf((*MockServiceAuth)(nil).Registration), arg0) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (_DelegateProfile *DelegateProfileCaller) Registered(opts *bind.CallOpts, _addr common.Address) (bool, error) {\n\tvar (\n\t\tret0 = new(bool)\n\t)\n\tout := ret0\n\terr := _DelegateProfile.contract.Call(opts, out, \"registered\", _addr)\n\treturn *ret0, err\n}", "func (s SwxProxy) Register(_ context.Contex...
[ "0.6324035", "0.6104856", "0.60354984", "0.6025592", "0.59889084", "0.5973536", "0.595364", "0.5939176", "0.59270525", "0.59216005", "0.5921067", "0.5891129", "0.5848316", "0.5830676", "0.58157265", "0.58123446", "0.58084095", "0.57710874", "0.57505393", "0.5747051", "0.57046...
0.7010462
0
Popup is a wrapper around gtk_popover_popup().
func (v *Popover) Popup() { C.gtk_popover_popup(v.native()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *Popover) Popdown() {\n\tC.gtk_popover_popdown(v.native())\n}", "func Popup(name string) *PopupWidget {\n\treturn &PopupWidget{\n\t\tname: Context.FontAtlas.RegisterString(name),\n\t\tflags: 0,\n\t\tlayout: nil,\n\t}\n}", "func NewPopupMenu(parent Widget, b Base, mo ...MenuOption) *PopupMenu {\n\tpm...
[ "0.7245628", "0.67946184", "0.671131", "0.6632335", "0.63890284", "0.58852094", "0.58588827", "0.5829165", "0.57027376", "0.5697189", "0.5695752", "0.5623324", "0.5471221", "0.54265916", "0.5425965", "0.5336367", "0.5220583", "0.51320916", "0.5081396", "0.48694453", "0.486944...
0.8746411
0
Popdown is a wrapper around gtk_popover_popdown().
func (v *Popover) Popdown() { C.gtk_popover_popdown(v.native()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *Popover) Popup() {\n\tC.gtk_popover_popup(v.native())\n}", "func NewPopupMenu(parent Widget, b Base, mo ...MenuOption) *PopupMenu {\n\tpm := &PopupMenu{\n\t\tPanel: NewPanel(nil, b),\n\t}\n\tInitWidget(parent, pm)\n\tpad := pm.MyTheme().Pad\n\tbtH := b.Rect.H() - pad\n\tbtW := b.Rect.W() - pad*2\n\tpm.R...
[ "0.771435", "0.6271339", "0.6096663", "0.60613847", "0.58930135", "0.5520053", "0.5439196", "0.51506114", "0.51457214", "0.510715", "0.50609976", "0.50515825", "0.50288045", "0.49635243", "0.49324164", "0.48336193", "0.4772766", "0.4770371", "0.4765281", "0.47626668", "0.4761...
0.89984757
0
/ GtkFileChooser AddChoice is a wrapper around gtk_file_chooser_add_choice().
func (v *FileChooser) AddChoice(id, label string, options, optionLabels []string) { cId := C.CString(id) defer C.free(unsafe.Pointer(cId)) cLabel := C.CString(label) defer C.free(unsafe.Pointer(cLabel)) if options == nil || optionLabels == nil { C.gtk_file_chooser_add_choice(v.native(), (*C.gchar)(cId), (*C.gc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tcOption := C.CString(option)\n\tdefer C.free(unsafe.Pointer(cOption))\n\tC.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))\n}", "func (v *FileChooser) GetChoice(id st...
[ "0.67540985", "0.6272586", "0.5666724", "0.53501856", "0.5213042", "0.5131987", "0.5029371", "0.49853897", "0.49848685", "0.4980705", "0.49217358", "0.48278055", "0.48229167", "0.48218247", "0.46595183", "0.4618801", "0.4616831", "0.45478475", "0.45407698", "0.45162332", "0.4...
0.8392795
0
RemoveChoice is a wrapper around gtk_file_chooser_remove_choice().
func (v *FileChooser) RemoveChoice(id string) { cId := C.CString(id) defer C.free(unsafe.Pointer(cId)) C.gtk_file_chooser_remove_choice(v.native(), (*C.gchar)(cId)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *FileChooser) GetChoice(id string) string {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tc := C.gtk_file_chooser_get_choice(v.native(), (*C.gchar)(cId))\n\treturn C.GoString(c)\n}", "func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Poi...
[ "0.533146", "0.5215007", "0.5209094", "0.49791583", "0.49628338", "0.49071372", "0.48017108", "0.478262", "0.46966022", "0.4593523", "0.45922872", "0.45756906", "0.45345142", "0.451024", "0.45045552", "0.44789824", "0.4443359", "0.44415736", "0.44238982", "0.44187573", "0.440...
0.86442417
0
SetChoice is a wrapper around gtk_file_chooser_set_choice().
func (v *FileChooser) SetChoice(id, option string) { cId := C.CString(id) defer C.free(unsafe.Pointer(cId)) cOption := C.CString(option) defer C.free(unsafe.Pointer(cOption)) C.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *FileChooser) AddChoice(id, label string, options, optionLabels []string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\n\tcLabel := C.CString(label)\n\tdefer C.free(unsafe.Pointer(cLabel))\n\n\tif options == nil || optionLabels == nil {\n\t\tC.gtk_file_chooser_add_choice(v.native(), (*C...
[ "0.6469274", "0.6148542", "0.6068018", "0.5769264", "0.57536185", "0.56970453", "0.5626628", "0.55424106", "0.51889265", "0.51361847", "0.51076907", "0.5051737", "0.49173164", "0.4893991", "0.4842663", "0.4834679", "0.47279584", "0.46964598", "0.4682138", "0.4653016", "0.4625...
0.86250484
0
GetChoice is a wrapper around gtk_file_chooser_get_choice().
func (v *FileChooser) GetChoice(id string) string { cId := C.CString(id) defer C.free(unsafe.Pointer(cId)) c := C.gtk_file_chooser_get_choice(v.native(), (*C.gchar)(cId)) return C.GoString(c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *FileChooser) SetChoice(id, option string) {\n\tcId := C.CString(id)\n\tdefer C.free(unsafe.Pointer(cId))\n\tcOption := C.CString(option)\n\tdefer C.free(unsafe.Pointer(cOption))\n\tC.gtk_file_chooser_set_choice(v.native(), (*C.gchar)(cId), (*C.gchar)(cOption))\n}", "func Choice(m string, exacts []string...
[ "0.5884683", "0.5797472", "0.5483212", "0.5472473", "0.54234344", "0.53660977", "0.5348636", "0.5299239", "0.52480185", "0.5243561", "0.52337843", "0.5179653", "0.5166573", "0.51321834", "0.5097163", "0.4941595", "0.48885983", "0.48517326", "0.48319155", "0.4736443", "0.47352...
0.8411069
0
/ GtkScrolledWindow GetMaxContentWidth is a wrapper around gtk_scrolled_window_get_max_content_width().
func (v *ScrolledWindow) GetMaxContentWidth() int { c := C.gtk_scrolled_window_get_max_content_width(v.native()) return int(c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) GetMaxContentHeight() int {\n\tc := C.gtk_scrolled_window_get_max_content_height(v.native())\n\treturn int(c)\n}", "func (v *ScrolledWindow) SetMaxContentWidth(width int) {\n\tC.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width))\n}", "func (v *ScrolledWindow) SetMaxCo...
[ "0.7802157", "0.7460506", "0.66026855", "0.6217259", "0.584643", "0.57835525", "0.5716844", "0.56006247", "0.5530119", "0.5475368", "0.5411298", "0.538574", "0.53694135", "0.53360945", "0.53360945", "0.5301836", "0.52574384", "0.52144426", "0.5204811", "0.51416606", "0.512083...
0.8826436
0
SetMaxContentWidth is a wrapper around gtk_scrolled_window_set_max_content_width().
func (v *ScrolledWindow) SetMaxContentWidth(width int) { C.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) SetMaxContentHeight(width int) {\n\tC.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width))\n}", "func (v *ScrolledWindow) GetMaxContentWidth() int {\n\tc := C.gtk_scrolled_window_get_max_content_width(v.native())\n\treturn int(c)\n}", "func (v *ScrolledWindow) GetMaxCo...
[ "0.7728575", "0.7647834", "0.65633065", "0.6101868", "0.55851233", "0.5574874", "0.55399346", "0.54410404", "0.53355515", "0.5113834", "0.505512", "0.49563086", "0.49242747", "0.48697284", "0.48511386", "0.48052323", "0.47839496", "0.47761905", "0.4729902", "0.47225168", "0.4...
0.8705722
0
GetMaxContentHeight is a wrapper around gtk_scrolled_window_get_max_content_height().
func (v *ScrolledWindow) GetMaxContentHeight() int { c := C.gtk_scrolled_window_get_max_content_height(v.native()) return int(c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) GetMaxContentWidth() int {\n\tc := C.gtk_scrolled_window_get_max_content_width(v.native())\n\treturn int(c)\n}", "func (v *ScrolledWindow) SetMaxContentHeight(width int) {\n\tC.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width))\n}", "func (v *ScrolledWindow) SetMaxCo...
[ "0.80224156", "0.738089", "0.6511789", "0.575716", "0.5734719", "0.5732532", "0.5663143", "0.55172205", "0.54255056", "0.5353016", "0.53288096", "0.5287494", "0.5258306", "0.5254579", "0.5203907", "0.5163954", "0.5143804", "0.51205325", "0.5093301", "0.50751376", "0.5039852",...
0.9018182
0
SetMaxContentHeight is a wrapper around gtk_scrolled_window_set_max_content_height().
func (v *ScrolledWindow) SetMaxContentHeight(width int) { C.gtk_scrolled_window_set_max_content_height(v.native(), C.gint(width)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) SetMaxContentWidth(width int) {\n\tC.gtk_scrolled_window_set_max_content_width(v.native(), C.gint(width))\n}", "func (v *ScrolledWindow) GetMaxContentHeight() int {\n\tc := C.gtk_scrolled_window_get_max_content_height(v.native())\n\treturn int(c)\n}", "func (v *ScrolledWindow) GetMaxCo...
[ "0.8023439", "0.7892212", "0.7063212", "0.59386873", "0.5932504", "0.52396935", "0.5048182", "0.5048182", "0.50402075", "0.5032491", "0.5004204", "0.5002754", "0.49823657", "0.49187666", "0.49154866", "0.48963708", "0.48863816", "0.4872838", "0.48663074", "0.48459524", "0.484...
0.87742
0
GetPropagateNaturalWidth is a wrapper around gtk_scrolled_window_get_propagate_natural_width().
func (v *ScrolledWindow) GetPropagateNaturalWidth() bool { c := C.gtk_scrolled_window_get_propagate_natural_width(v.native()) return gobool(c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate))\n}", "func (v *ScrolledWindow) GetPropagateNaturalHeight() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_height(v.native())\n\treturn gobool(c)\n}", ...
[ "0.81382954", "0.74754125", "0.6816626", "0.5524392", "0.55122465", "0.53927827", "0.51792467", "0.5166886", "0.510769", "0.5031366", "0.48824355", "0.48683724", "0.47451147", "0.47078547", "0.46988234", "0.4590461", "0.45584512", "0.4545798", "0.44968885", "0.44810912", "0.4...
0.87654483
0
SetPropagateNaturalWidth is a wrapper around gtk_scrolled_window_set_propagate_natural_width().
func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) { C.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate))\n}", "func (v *ScrolledWindow) GetPropagateNaturalWidth() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_width(v.native())\n\treturn gobool(c)\n}", ...
[ "0.7961128", "0.79388314", "0.6707606", "0.5346279", "0.47825405", "0.4755107", "0.46057013", "0.45764875", "0.45117897", "0.4315776", "0.42900914", "0.4247731", "0.42211503", "0.42068702", "0.42030233", "0.4134348", "0.41119507", "0.4108613", "0.4049972", "0.40450892", "0.40...
0.91999835
0
GetPropagateNaturalHeight is a wrapper around gtk_scrolled_window_get_propagate_natural_height().
func (v *ScrolledWindow) GetPropagateNaturalHeight() bool { c := C.gtk_scrolled_window_get_propagate_natural_height(v.native()) return gobool(c) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate))\n}", "func (v *ScrolledWindow) GetPropagateNaturalWidth() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_width(v.native())\n\treturn gobool(c)\n}", ...
[ "0.7887868", "0.74162084", "0.6701644", "0.5282257", "0.51819026", "0.5121254", "0.501534", "0.4822917", "0.47664776", "0.4716606", "0.46773928", "0.46360207", "0.46136078", "0.45566", "0.45110223", "0.45107284", "0.44809556", "0.4468844", "0.4460032", "0.4425723", "0.4416638...
0.88503075
0
SetPropagateNaturalHeight is a wrapper around gtk_scrolled_window_set_propagate_natural_height().
func (v *ScrolledWindow) SetPropagateNaturalHeight(propagate bool) { C.gtk_scrolled_window_set_propagate_natural_height(v.native(), gbool(propagate)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *ScrolledWindow) GetPropagateNaturalHeight() bool {\n\tc := C.gtk_scrolled_window_get_propagate_natural_height(v.native())\n\treturn gobool(c)\n}", "func (v *ScrolledWindow) SetPropagateNaturalWidth(propagate bool) {\n\tC.gtk_scrolled_window_set_propagate_natural_width(v.native(), gbool(propagate))\n}", ...
[ "0.8024622", "0.7986467", "0.6738286", "0.48992896", "0.46789613", "0.45104513", "0.44237876", "0.43279177", "0.42821398", "0.42359063", "0.41540527", "0.4000865", "0.39987636", "0.397609", "0.39755943", "0.39618266", "0.39565128", "0.3954699", "0.39486593", "0.39300218", "0....
0.91302776
0
GetKlines returns transaction details
func (c *client) GetKlines(query *KlineQuery) ([]Kline, error) { err := query.Check() if err != nil { return nil, err } qp, err := common.QueryParamToMap(*query) if err != nil { return nil, err } resp, err := c.baseClient.Get("/klines", qp) if err != nil { return nil, err } iklines := [][]interface{}{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Coinbene) GetKlines(pair string, start, end time.Time, period string) (resp CandleResponse, err error) {\n\tv := url.Values{}\n\tv.Add(\"symbol\", pair)\n\tif !start.IsZero() {\n\t\tv.Add(\"start\", strconv.FormatInt(start.Unix(), 10))\n\t}\n\tif !end.IsZero() {\n\t\tv.Add(\"end\", strconv.FormatInt(end.U...
[ "0.68609995", "0.65995353", "0.6500681", "0.64912534", "0.6234428", "0.61746275", "0.59557045", "0.5936131", "0.57153326", "0.5679661", "0.5676476", "0.5650398", "0.5535924", "0.54672873", "0.5415281", "0.54126996", "0.53202903", "0.50902885", "0.5074176", "0.50497234", "0.50...
0.64874977
4
NewProvider is redirect hook for fabric/fsblkstorage NewProvider()
func NewProvider(conf *blkstorage.Conf, indexConfig *blkstorage.IndexConfig, _ *ledger.Config, metricsProvider metrics.Provider) (extledgerapi.BlockStoreProvider, error) { return blkstorage.NewProvider(conf, indexConfig, metricsProvider) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewProvider(conf *fsblkstorage.Conf, indexConfig *blkstorage.IndexConfig, ledgerconfig *ledger.Config, metricsProvider metrics.Provider) (blkstorage.BlockStoreProvider, error) {\n\treturn cdbblkstorage.NewProvider(indexConfig, ledgerconfig)\n}", "func NewProvider(net network.StorageMarketNetwork,\n\tds data...
[ "0.6734028", "0.6443289", "0.63513434", "0.6128527", "0.60051745", "0.5913899", "0.58697", "0.5826189", "0.5823582", "0.57931125", "0.5782339", "0.5731485", "0.5709131", "0.57041174", "0.5673461", "0.5671742", "0.5620971", "0.5591743", "0.5571989", "0.5570918", "0.5561377", ...
0.6699755
1
NewConf is redirect hook for fabric/fsblkstorage NewConf()
func NewConf(blockStorageDir string, maxBlockfileSize int) *blkstorage.Conf { return blkstorage.NewConf(blockStorageDir, maxBlockfileSize) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewConf(blockStorageDir string, maxBlockfileSize int) *fsblkstorage.Conf {\n\treturn fsblkstorage.NewConf(blockStorageDir, maxBlockfileSize)\n}", "func newConfig(appName string, pathToKeybase string, log Log, ignoreSnooze bool) (*config, error) {\n\tcfg := newDefaultConfig(appName, pathToKeybase, log, ignor...
[ "0.64874506", "0.63530076", "0.61503875", "0.6060684", "0.5966099", "0.5947129", "0.5844353", "0.5781085", "0.5682955", "0.55900925", "0.5584936", "0.5520305", "0.5500407", "0.54911816", "0.5455597", "0.54216796", "0.53766614", "0.536281", "0.5348187", "0.5343782", "0.5339377...
0.6411646
1