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
UnmarshalJSON supports json.Unmarshaler interface
func (v *BlitzedItemResponse) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} easyjson6a975c40DecodeJsonBenchmark4(&r, v) return r.Error() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (j *jsonNative) UnmarshalJSON(input []byte) error {\n\tfs := fflib.NewFFLexer(input)\n\treturn j.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)\n}", "func unmarshalJSON(j extv1.JSON, output *any) error {\n\tif len(j.Raw) == 0 {\n\t\treturn nil\n\t}\n\treturn json.Unmarshal(j.Raw, output)\n}", "func (j ...
[ "0.70113605", "0.698139", "0.6947301", "0.6867781", "0.68005323", "0.67680764", "0.6741481", "0.67051035", "0.6688701", "0.66797084", "0.6676911", "0.6669605", "0.6661001", "0.66579056", "0.6652777", "0.66498846", "0.6632663", "0.663189", "0.6627629", "0.6612909", "0.6587119"...
0.66243863
19
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *BlitzedItemResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjson6a975c40DecodeJsonBenchmark4(l, v) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (v *Fruit) UnmarshalEasyJSON(l *jlexer.Lexer) {\n\teasyjsonD2b7633eDecodeBackendInternalModels11(l, v)\n}", "func (v *Boo) UnmarshalEasyJSON(l *jlexer.Lexer) {\n\teasyjson42239ddeDecodeMsgpJson(l, v)\n}", "func (v *Element) UnmarshalEasyJSON(l *jlexer.Lexer) {\n\teasyjsonB83d7b77DecodeGoplaygroundMyjson2(...
[ "0.73405373", "0.72584677", "0.72040373", "0.71776104", "0.71510446", "0.7143438", "0.71413064", "0.71286225", "0.7112999", "0.7103849", "0.71005577", "0.7097653", "0.7085183", "0.70850646", "0.7081146", "0.7077145", "0.70403785", "0.70357895", "0.7030433", "0.7028725", "0.70...
0.73436594
0
People ... Create a router group to rs/crud/persons and relative routes
func People(engine *gin.Engine, midlewares ...gin.HandlerFunc) { personGroup := engine.Group("rs/crud/person") personGroup.GET("/:id", controllers.GetPerson) personGroup.GET("/", controllers.GetPagePerson) personGroup.PUT("/:id", controllers.PutPerson) personGroup.DELETE("/:id", controllers.DeletePerson) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func MakePersonHandlers(r *mux.Router, n negroni.Negroni, service person.UseCase) {\n\tr.Handle(\"/person\", n.With(\n\t\tnegroni.Wrap(findAllPersons(service)),\n\t)).Methods(\"GET\", \"OPTIONS\").Name(\"findAllPersons\")\n\n\tr.Handle(\"/person/{key}\", n.With(\n\t\tnegroni.Wrap(findPersonByKey(service)),\n\t)).M...
[ "0.67869747", "0.67589456", "0.6640335", "0.6442103", "0.58659965", "0.56205046", "0.55636376", "0.5562881", "0.5536978", "0.5526658", "0.5520917", "0.54956365", "0.54703736", "0.54550976", "0.5444999", "0.54362804", "0.5415051", "0.53973025", "0.5367491", "0.53587633", "0.53...
0.74560905
0
Validate validates this io k8s api core v1 scoped resource selector requirement
func (m *IoK8sAPICoreV1ScopedResourceSelectorRequirement) Validate(formats strfmt.Registry) error { var res []error if err := m.validateOperator(formats); err != nil { res = append(res, err) } if err := m.validateScopeName(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.Co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (pr *ResourceDescription) Validate() error {\n\tif len(pr.Kinds) == 0 {\n\t\treturn errors.New(\"The Kind is not specified\")\n\t}\n\n\tif pr.Selector != nil {\n\t\tselector, err := metav1.LabelSelectorAsSelector(pr.Selector)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\trequirements, _ := selector.Requi...
[ "0.59584147", "0.5700171", "0.5696888", "0.56482863", "0.55733466", "0.5490589", "0.5441203", "0.5355841", "0.5320605", "0.5286241", "0.528479", "0.51627755", "0.5150385", "0.514723", "0.5142086", "0.51359487", "0.50891954", "0.50874746", "0.5085249", "0.49886724", "0.4986433...
0.71744615
0
NewClient returns an instance of REST API client. If a nil httpClient is provided, http.DefaultClient will be used.
func NewClient(httpClient *http.Client, baseURL string) (*Client, error) { if httpClient == nil { httpClient = http.DefaultClient } base, err := url.Parse(baseURL) if err != nil { return nil, errors.New("Could not parse base URL") } c := &Client{client: httpClient, baseURL: base} return c, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewClient(httpClient *http.Client) *Client {\n\tif httpClient == nil {\n\t\thttpClient = http.DefaultClient\n\t}\n\n\treturn &Client{\n\t\thttpClient: httpClient,\n\t}\n}", "func NewClient(httpClient *http.Client) *Client {\n\tif httpClient == nil {\n\t\thttpClient = http.DefaultClient\n\t}\n\treturn &Clien...
[ "0.8190736", "0.819041", "0.8155558", "0.8001566", "0.7915223", "0.7910204", "0.78870803", "0.7877559", "0.78694683", "0.78224707", "0.7799551", "0.77663815", "0.7759795", "0.7755385", "0.77519286", "0.7749985", "0.77259535", "0.7722583", "0.7718366", "0.7712413", "0.77112836...
0.7719205
18
NewDir creates a new Interface that converts the return value of a Directory's Readdir method into 9P Stat structures.
func NewDir(dir Directory, abspath string, pool *qidpool.Pool) Interface { return &dirReader{ Directory: dir, pool: pool, path: abspath, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func newDir(name string, attr plugin.EntryAttributes, impl Interface, path string) *dir {\n\tvd := &dir{\n\t\tEntryBase: plugin.NewEntry(name),\n\t}\n\tvd.impl = impl\n\tvd.path = path\n\tvd.SetAttributes(attr)\n\treturn vd\n}", "func newDirectory(root string, maxDepth int) *Directory {\n\td, err := os.Lstat(roo...
[ "0.70143336", "0.6318057", "0.6316557", "0.59013355", "0.5891918", "0.57855", "0.5736885", "0.5731109", "0.571727", "0.5715768", "0.5702267", "0.56806433", "0.5642527", "0.5584259", "0.55786663", "0.5512318", "0.5490894", "0.5477301", "0.5384469", "0.53448236", "0.5331859", ...
0.65730906
1
TestConcurrentBuildControllers tests the transition of a build from new to pending. Ensures that only a single New > Pending transition happens and that only a single pod is created during a set period of time.
func TestConcurrentBuildControllers(t *testing.T) { defer testutil.DumpEtcdOnFailure(t) // Start a master with multiple BuildControllers osClient, kClient := setupBuildControllerTest(controllerCount{BuildControllers: 5}, t) build.RunBuildControllerTest(t, osClient, kClient) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestConcurrentBuildPodControllers(t *testing.T) {\n\tdefer testutil.DumpEtcdOnFailure(t)\n\t// Start a master with multiple BuildPodControllers\n\tosClient, kClient := setupBuildControllerTest(controllerCount{BuildPodControllers: 5}, t)\n\tbuild.RunBuildPodControllerTest(t, osClient, kClient)\n}", "func Tes...
[ "0.8165727", "0.80359614", "0.79608786", "0.5846746", "0.5815157", "0.5800607", "0.5719953", "0.55622447", "0.55490845", "0.55087394", "0.55010694", "0.5484525", "0.5433796", "0.5399612", "0.53902775", "0.53603613", "0.5314078", "0.53021586", "0.52998984", "0.52553374", "0.52...
0.8077532
1
TestConcurrentBuildPodControllers tests the lifecycle of a build pod when running multiple controllers.
func TestConcurrentBuildPodControllers(t *testing.T) { defer testutil.DumpEtcdOnFailure(t) // Start a master with multiple BuildPodControllers osClient, kClient := setupBuildControllerTest(controllerCount{BuildPodControllers: 5}, t) build.RunBuildPodControllerTest(t, osClient, kClient) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestConcurrentBuildControllersPodSync(t *testing.T) {\n\t// Start a master with multiple BuildControllers\n\tbuildClient, _, kClient, fn := setupBuildControllerTest(controllerCount{BuildControllers: 5}, t)\n\tdefer fn()\n\tbuild.RunBuildControllerPodSyncTest(t, buildClient, kClient)\n}", "func TestConcurren...
[ "0.84638107", "0.8257509", "0.8186716", "0.60766035", "0.6004586", "0.59796965", "0.59095436", "0.5886478", "0.58263564", "0.5762557", "0.56721723", "0.558922", "0.5555907", "0.552705", "0.54982966", "0.5487726", "0.5478104", "0.54566073", "0.54116815", "0.5399274", "0.539728...
0.88891226
0
Register registers new database migration. Must be called from file with name like "1_initialize_db.go", where: 1 migration version; initialize_db comment.
func Register(fns ...func(DB) error) error { return DefaultCollection.Register(fns...) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Register(up, down func(DB) error) error {\n\t_, file, _, _ := runtime.Caller(1)\n\tversion, err := extractVersion(file)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tallMigrations = append(allMigrations, Migration{\n\t\tVersion: version,\n\t\tUp: up,\n\t\tDown: down,\n\t})\n\treturn nil\n}", "func re...
[ "0.77468985", "0.67866886", "0.62771386", "0.59007233", "0.58881843", "0.5785044", "0.57692766", "0.5756132", "0.5736178", "0.56210345", "0.5598174", "0.5567961", "0.5492138", "0.54760194", "0.5455018", "0.5444859", "0.5422033", "0.5421633", "0.5414794", "0.53998196", "0.5376...
0.5412613
19
RegisterTx is just like Register but marks the migration to be executed inside a transaction.
func RegisterTx(fns ...func(DB) error) error { return DefaultCollection.RegisterTx(fns...) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (pg *Postgres) Tx(ctx context.Context, txFunc store.TxFunc) (err error) {\n\ttx := shared.GetTx(ctx)\n\n\tif tx != nil {\n\t\treturn txFunc(ctx)\n\t}\n\n\ttx, err = pg.BeginTx(ctx, nil)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"begin tx failed\")\n\t}\n\n\tctx = shared.WithTx(ctx, tx)\n\n\t//nolint:go...
[ "0.6274189", "0.6211087", "0.6139333", "0.61136764", "0.61018455", "0.6091702", "0.6074261", "0.6053163", "0.6053163", "0.6019075", "0.6001216", "0.5968726", "0.59503096", "0.59449434", "0.5939692", "0.5934833", "0.5924858", "0.5907003", "0.59001046", "0.5847809", "0.5808601"...
0.7387559
0
RegisteredMigrations returns currently registered Migrations.
func RegisteredMigrations() []*Migration { return DefaultCollection.Migrations() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m Migrator) RunMigrations() error {\n\t// Run everything in a transaction. In case of error, we can roll it back\n\ttx, err := m.Connection.Database.Begin()\n\tif err != nil {\n\t\t// Connection could not be started\n\t\treturn err\n\t}\n\n\t// First check if the database db_migrations exists\n\tres := tx.Qu...
[ "0.59993494", "0.5917453", "0.5908439", "0.5828041", "0.56374675", "0.55805904", "0.5571452", "0.55068016", "0.5480716", "0.5442322", "0.54304135", "0.5336703", "0.533496", "0.5296084", "0.52461225", "0.5194173", "0.5160693", "0.51398253", "0.50593525", "0.49677986", "0.48873...
0.7982301
0
Run runs command on the db. Supported commands are: up [target] runs all available migrations by default or up to target one if argument is provided. down reverts last migration. reset reverts all migrations. version prints current db version. set_version sets db version without running migrations.
func Run(db DB, a ...string) (oldVersion, newVersion int64, err error) { return DefaultCollection.Run(db, a...) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (this *Migrate) Run(args []string) (exitCode int) {\n\tvar how bool\n\tctx := base.GetMigrationContext()\n\tcmdFlags := flag.NewFlagSet(\"migrate\", flag.ContinueOnError)\n\tcmdFlags.StringVar(&ctx.InspectorConnectionConfig.Key.Hostname, \"host\", \"127.0.0.1\", \"\")\n\tcmdFlags.IntVar(&ctx.InspectorConnecti...
[ "0.6652172", "0.66128784", "0.6590393", "0.621843", "0.6063731", "0.6010058", "0.59896505", "0.59123516", "0.5906943", "0.5897017", "0.5849042", "0.582094", "0.58018357", "0.5794039", "0.57828474", "0.5777766", "0.5741259", "0.5738055", "0.57363296", "0.5735054", "0.57171345"...
0.5071458
71
Read MeasurementsGET sends measurements json response
func MeasurementsGET(w http.ResponseWriter, r *http.Request) { // Get condition GET parameter condition := r.URL.Query().Get("condition") // Validate condition reg, errReg := regexp.Compile("^(\\w+[<>=]+\\w+(\\s(and|or)\\s?)?)*$") if errReg != nil { log.Println(errReg) response.SendError(w, http.StatusInterna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *UnsupportedApiService) MeasurementsGET(ctx context.Context, measurementConfigId string) (MeasurementConfig, *http.Response, error) {\n\tvar (\n\t\tlocalVarHttpMethod = strings.ToUpper(\"Get\")\n\t\tlocalVarPostBody interface{}\n\t\tlocalVarFileName string\n\t\tlocalVarFileBytes []byte\n\t\tlocalV...
[ "0.74997777", "0.67356014", "0.6283912", "0.61545205", "0.6074424", "0.6033546", "0.6003006", "0.5927213", "0.5910613", "0.5830679", "0.5797388", "0.5765787", "0.5747032", "0.5735315", "0.5729223", "0.5726011", "0.5648738", "0.56365585", "0.55921185", "0.55593187", "0.5550674...
0.7500745
0
QueryStringParser converts URL querystring into a slice of `FilteredResult.` Given the querystring `?first_name=john:eq:and&last_name=doe:eq`
func QueryStringParser(queryStr string, filters map[string]string) []FilteredResult { //define custom map type to allowduplicate keys type Map struct { Key string Value string } params := []Map{} searchFilters := []FilteredResult{} parts := strings.Split(queryStr, "&") //build a key/value map of the que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ExtractPaginationQueryString(qry url.Values) map[string]interface{} {\n\n\tpg := map[string]interface{}{\n\t\t\"Page\": 1,\n\t\t\"PerPage\": 15,\n\t\t\"Filter\": \"\",\n\t\t\"Order\": \"created_at\",\n\t\t\"OrderType\": \"desc\",\n\t\t\"NoPagination\": false,\n\t}\n\n\t// Extract ...
[ "0.6135432", "0.60866284", "0.59948343", "0.59735113", "0.58965135", "0.5751068", "0.57321346", "0.56327635", "0.5629603", "0.55736727", "0.55452985", "0.5522028", "0.5475098", "0.54211044", "0.53964305", "0.53878003", "0.5383441", "0.5383123", "0.5362183", "0.53502405", "0.5...
0.748404
0
RHSParser separates the fragment part of the query string into three parts value, comparison operator (=, >, , =, LIKE) and logical operator (AND/OR).
func RHSParser(queryStrValue string, valueType string) (value interface{}, comparisonOperator string, logicOperator string) { var val interface{} var cOperator string = " = " var lOperator string = " AND " parts := strings.Split(queryStrValue, ":") len := len(parts) if valueType == "int" { var number int64 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func QueryStringParser(queryStr string, filters map[string]string) []FilteredResult {\n\t//define custom map type to allowduplicate keys\n\ttype Map struct {\n\t\tKey string\n\t\tValue string\n\t}\n\n\tparams := []Map{}\n\tsearchFilters := []FilteredResult{}\n\n\tparts := strings.Split(queryStr, \"&\")\n\n\t//bu...
[ "0.6000679", "0.5544201", "0.5538723", "0.5515873", "0.53919816", "0.5371112", "0.5337646", "0.5244362", "0.5227058", "0.5201624", "0.5035713", "0.49393153", "0.49017668", "0.4891215", "0.48855764", "0.48798397", "0.48732585", "0.486875", "0.48676294", "0.4867318", "0.4865230...
0.73141813
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *DailyRule) DeepCopyInto(out *DailyRule) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DailyRule.
func (in *DailyRule) DeepCopy() *DailyRule { if in == nil { return nil } out := new(DailyRule) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Rule) DeepCopy() *Rule {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Rule)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Rule) DeepCopy() *Rule {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Rule)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Rule) DeepCopy() *Rule {\...
[ "0.5939093", "0.5939093", "0.5939093", "0.5939093", "0.5939093", "0.5546245", "0.5436166", "0.5406394", "0.539924", "0.5398177", "0.5362258", "0.53486407", "0.5299951", "0.52968395", "0.52954674", "0.5180423", "0.51571137", "0.4970968", "0.49688", "0.4924555", "0.49125367", ...
0.8802274
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScaleRule) DeepCopyInto(out *ScaleRule) { *out = *in out.ScaleSpec = in.ScaleSpec if in.Daily != nil { in, out := &in.Daily, &out.Daily *out = new(DailyRule) **out = **in } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215148", "0.8128148", "0.8104491", "0.8086232", "0.8083645", "0.80681837", "0.8064712", "0.80272263", "0.80118906", "0.79957503", "0.79923207", "0.79894227", "0.79878217", "0.7987706", "0.7987706", "0.79856145", "0.7976737", "0.797243", "0.79705614", "0.79705614", "0.7970...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleRule.
func (in *ScaleRule) DeepCopy() *ScaleRule { if in == nil { return nil } out := new(ScaleRule) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScaleTarget) DeepCopy() *ScaleTarget {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScaleTarget)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (c *Li...
[ "0.69663656", "0.6074237", "0.5888195", "0.5856589", "0.57944095", "0.5784623", "0.55765456", "0.55765456", "0.55765456", "0.55765456", "0.55765456", "0.54937565", "0.5412746", "0.53581494", "0.5351253", "0.5344039", "0.53345853", "0.5311341", "0.52926254", "0.5274284", "0.52...
0.86958313
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScaleSpec) DeepCopyInto(out *ScaleSpec) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSpec.
func (in *ScaleSpec) DeepCopy() *ScaleSpec { if in == nil { return nil } out := new(ScaleSpec) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScalableTargetSpec) DeepCopy() *ScalableTargetSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScalableTargetSpec)\n\tin.DeepCopyInto(out)\n\treturn ou...
[ "0.6918439", "0.64695114", "0.64396256", "0.6130816", "0.60759723", "0.6040713", "0.6040713", "0.59715873", "0.59645355", "0.5837462", "0.5815961", "0.579574", "0.5686585", "0.5682257", "0.56207305", "0.55996025", "0.5592483", "0.5588218", "0.5588218", "0.5588218", "0.558774"...
0.883849
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScaleTarget) DeepCopyInto(out *ScaleTarget) { *out = *in if in.Selectors != nil { in, out := &in.Selectors, &out.Selectors *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215148", "0.8128148", "0.8104491", "0.8086232", "0.8083645", "0.80681837", "0.8064712", "0.80272263", "0.80118906", "0.79957503", "0.79923207", "0.79894227", "0.79878217", "0.7987706", "0.7987706", "0.79856145", "0.7976737", "0.797243", "0.79705614", "0.79705614", "0.7970...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleTarget.
func (in *ScaleTarget) DeepCopy() *ScaleTarget { if in == nil { return nil } out := new(ScaleTarget) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Scale) DeepCopy() *Scale {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Scale)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScalableTarget) DeepCopy() *ScalableTarget {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScalableTarget)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "fu...
[ "0.76370376", "0.67633396", "0.62799335", "0.619151", "0.6033552", "0.6033552", "0.59817666", "0.5977553", "0.5958769", "0.5904952", "0.58848196", "0.5880546", "0.58670145", "0.5864372", "0.5860537", "0.58537394", "0.58474916", "0.5838018", "0.5838018", "0.581858", "0.5758691...
0.8381954
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScheduledPodScaler) DeepCopyInto(out *ScheduledPodScaler) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScaler.
func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler { if in == nil { return nil } out := new(ScheduledPodScaler) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScalerSpec) DeepCopy() *ScheduledPodScalerSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScalerSpec)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScaler) DeepCopy() *SchedulingScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Schedulin...
[ "0.71119064", "0.693392", "0.6830506", "0.6721001", "0.61442715", "0.5926196", "0.57947385", "0.56189704", "0.52660084", "0.5264063", "0.52457696", "0.51870626", "0.5126987", "0.5046777", "0.50401556", "0.49712822", "0.49698833", "0.49486116", "0.48586017", "0.4850098", "0.48...
0.8683148
0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ScheduledPodScaler) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ConsoleQuickStart) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *ServingRuntime) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *Keevakind) DeepCopyObject(...
[ "0.7313599", "0.7159773", "0.71078354", "0.7100193", "0.7057998", "0.70420074", "0.70387673", "0.7031404", "0.6999637", "0.69742507", "0.6972281", "0.6956138", "0.6953254", "0.6950686", "0.69374573", "0.6936299", "0.6936299", "0.6927747", "0.69247913", "0.6922769", "0.6912721...
0.0
-1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScheduledPodScalerList) DeepCopyInto(out *ScheduledPodScalerList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ScheduledPodScaler, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.82140106", "0.8126535", "0.81022906", "0.8084453", "0.8082179", "0.8066081", "0.80639637", "0.8025491", "0.80101854", "0.799523", "0.7991342", "0.7987356", "0.7986576", "0.7985699", "0.7985699", "0.7984981", "0.797478", "0.7971586", "0.79687244", "0.79687244", "0.79687244"...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerList.
func (in *ScheduledPodScalerList) DeepCopy() *ScheduledPodScalerList { if in == nil { return nil } out := new(ScheduledPodScalerList) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScaler)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScalerList) DeepCopy() *SchedulingScalerList {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingSca...
[ "0.7750979", "0.7559887", "0.6551569", "0.6509302", "0.6166534", "0.6004988", "0.58682466", "0.5656365", "0.5619697", "0.55305785", "0.54600435", "0.54446167", "0.54325646", "0.5428292", "0.5374004", "0.52421725", "0.5234001", "0.51786524", "0.5168573", "0.5000829", "0.499045...
0.8506346
0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ScheduledPodScalerList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ConsoleQuickStart) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *ServingRuntime) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *Keevakind) DeepCopyObject(...
[ "0.7311342", "0.7156597", "0.7103883", "0.70991915", "0.7054586", "0.7039165", "0.7035086", "0.70284057", "0.69967586", "0.6971953", "0.6969126", "0.69532204", "0.6950954", "0.6948572", "0.69361", "0.6933072", "0.6933072", "0.692678", "0.6922488", "0.69198173", "0.69095355", ...
0.0
-1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScheduledPodScalerSpec) DeepCopyInto(out *ScheduledPodScalerSpec) { *out = *in in.ScaleTarget.DeepCopyInto(&out.ScaleTarget) if in.ScaleRules != nil { in, out := &in.ScaleRules, &out.ScaleRules *out = make([]ScaleRule, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } out.De...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215148", "0.8128148", "0.8104491", "0.8086232", "0.8083645", "0.80681837", "0.8064712", "0.80272263", "0.80118906", "0.79957503", "0.79923207", "0.79894227", "0.79878217", "0.7987706", "0.7987706", "0.79856145", "0.7976737", "0.797243", "0.79705614", "0.79705614", "0.7970...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerSpec.
func (in *ScheduledPodScalerSpec) DeepCopy() *ScheduledPodScalerSpec { if in == nil { return nil } out := new(ScheduledPodScalerSpec) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ScheduledPodScaler)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SchedulingScalerSpec) DeepCopy() *SchedulingScalerSpec {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingSca...
[ "0.7813591", "0.68805146", "0.65664226", "0.64651406", "0.61906093", "0.6134313", "0.6045399", "0.5950982", "0.57670134", "0.5747594", "0.57069665", "0.547154", "0.5444904", "0.536201", "0.53037184", "0.528185", "0.52285314", "0.52279866", "0.52279866", "0.50915116", "0.50893...
0.8583529
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ScheduledPodScalerStatus) DeepCopyInto(out *ScheduledPodScalerStatus) { *out = *in }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduledPodScalerStatus.
func (in *ScheduledPodScalerStatus) DeepCopy() *ScheduledPodScalerStatus { if in == nil { return nil } out := new(ScheduledPodScalerStatus) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *SchedulingScalerStatus) DeepCopy() *SchedulingScalerStatus {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SchedulingScalerStatus)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *ScheduledPodScaler) DeepCopy() *ScheduledPodScaler {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Sched...
[ "0.798133", "0.75455487", "0.6869868", "0.6523821", "0.640999", "0.626312", "0.62318623", "0.6178982", "0.61479557", "0.6132582", "0.61129105", "0.5976912", "0.58940923", "0.58825886", "0.5867689", "0.5855375", "0.5833105", "0.5830422", "0.5802052", "0.5787193", "0.57713723",...
0.86013246
0
PodmanImage provides access to an image reference from podman. same as github.com/google/gocontainerregistry/pkg/v1/daemon
func PodmanImage(ref name.Reference, options ...interface{}) (v1.Image, error) { var img v1.Image pr, pw := io.Pipe() go func() { opener := func() (io.ReadCloser, error) { return pr, nil } var err error tag := ref.(name.Digest).Tag() img, err = tarball.Image(opener, &tag) _ = pr.CloseWithError(err) }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (f *FakeRunner) podman(args []string, _ bool) (string, error) {\n\tswitch cmd := args[0]; cmd {\n\tcase \"--version\":\n\t\treturn \"podman version 1.6.4\", nil\n\n\tcase \"image\":\n\n\t\tif args[1] == \"inspect\" && args[2] == \"--format\" && args[3] == \"{{.Id}}\" {\n\t\t\tif args[3] == \"missing\" {\n\t\t...
[ "0.6808878", "0.66259", "0.6014489", "0.57632554", "0.57444906", "0.5724609", "0.56687987", "0.56613916", "0.56557065", "0.56465936", "0.56103295", "0.55788076", "0.555107", "0.55340725", "0.5532543", "0.5526531", "0.5525078", "0.5503822", "0.54514915", "0.5446481", "0.544018...
0.8102636
0
PodmanWrite saves the image into podman as the given tag. same as github.com/google/gocontainerregistry/pkg/v1/daemon
func PodmanWrite(ref name.Reference, img v1.Image, opts ...tarball.WriteOption) (string, error) { pr, pw := io.Pipe() go func() { _ = pw.CloseWithError(tarball.Write(ref, img, pw, opts...)) }() // write the image in docker save format first, then load it cmd := exec.Command("sudo", "podman", "image", "load") c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func PodmanImage(ref name.Reference, options ...interface{}) (v1.Image, error) {\n\tvar img v1.Image\n\tpr, pw := io.Pipe()\n\tgo func() {\n\t\topener := func() (io.ReadCloser, error) {\n\t\t\treturn pr, nil\n\t\t}\n\t\tvar err error\n\t\ttag := ref.(name.Digest).Tag()\n\t\timg, err = tarball.Image(opener, &tag)\n...
[ "0.6227361", "0.5880108", "0.5780835", "0.5621885", "0.55258745", "0.5268894", "0.526887", "0.5263019", "0.5207825", "0.52056", "0.51899475", "0.51824105", "0.5133775", "0.50878125", "0.5065148", "0.50443953", "0.5037582", "0.503462", "0.5025062", "0.49834082", "0.4976932", ...
0.73809516
0
GenerateTestFile creates a file with the template values inserted into the template
func GenerateTestFile(testFileName string, templateValues *TemplateValues) error { outFile, err := os.Create(testFileName) if err != nil { fmt.Printf("Error creating test file named: %s\n", testFileName) } tmpl := template.Must(template.New("out").Parse(outputTemplate)) if err := tmpl.Execute(outFile, templateVa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateTestFile(fileName string) {\n\tif !strings.HasSuffix(fileName, \"_test.go\") {\n\t\treturn\n\t}\n\tcreateDir(fileName)\n\tif err := ioutil.WriteFile(fileName, []byte(mainttpl), 0644); err != nil {\n\t\tfmt.Printf(\"write file [%s] failed:%v\\n\", fileName, err)\n\t}\n}", "func GenerateWithTestFile(fil...
[ "0.70075065", "0.69138515", "0.6506305", "0.6493352", "0.63416076", "0.62526804", "0.61998314", "0.61942375", "0.61715287", "0.61503637", "0.61255413", "0.6116449", "0.61051226", "0.6090384", "0.60783386", "0.60713553", "0.60068524", "0.6002592", "0.5948072", "0.59080184", "0...
0.7975928
0
ParseFunctions parses a file and returns information about its HTTP handlers
func ParseFunctions(filePath string) *TemplateValues { fset := token.NewFileSet() f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments) if err != nil { log.Fatal(err) } var funcInfos []FunctionInfo packageName := fmt.Sprint(f.Name) containsMux := false for _, decl := range f.Decls { switc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Parse(urlStr string, key ...interface{}) (func(http.Handler) http.Handler,\n\terror) {\n\n\tu, err := mgourl.Parse(urlStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ts, err := mgo.Dial(u.ShortString())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tk := getkey(key...)\n\tif k == nil {\n\t\tk = u.Dat...
[ "0.5851756", "0.55637133", "0.5446869", "0.5426128", "0.5401849", "0.5366215", "0.5277472", "0.5260335", "0.5241706", "0.5218871", "0.5167705", "0.5111928", "0.5108268", "0.5103671", "0.509329", "0.50905794", "0.50709957", "0.5070622", "0.5024615", "0.5015144", "0.4993361", ...
0.60943615
0
/ The src value will be of one of the following types: int64 float64 bool []byte string time.Time nil for NULL values
func (bs *basicScanner) Scan(srcIfc interface{}) error { if srcIfc == nil { // if src is null, should set dest to it's zero value. // eg. when dest is int, should set it to 0. bs.dest.Set(reflect.Zero(bs.dest.Type())) return nil } if scanner := getScanner(bs.dest.Addr()); scanner != nil { return scanner.Sc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func parseNullableFloat64(content []byte, aggErr *AggregateError) *float64 {\n if len(content) == 0 {\n return nil\n }\n result := parseFloat64(content, aggErr)\n return &result\n}", "func ConvertDataNull() time.Time {\n\tDtIni, _ := time.Parse(longForm, dataSpedMysql(\"01011960\"))\n\treturn ...
[ "0.5055043", "0.49458912", "0.49401158", "0.4929327", "0.49207103", "0.4825433", "0.48236334", "0.472747", "0.47201735", "0.46569824", "0.46504113", "0.4647044", "0.46410972", "0.4635526", "0.4630723", "0.46265224", "0.4617849", "0.45988834", "0.4591235", "0.45552418", "0.454...
0.0
-1
the preceding steps ensured that dest is valid
func getRealDest(dest reflect.Value) reflect.Value { if dest.Kind() == reflect.Interface && !dest.IsNil() { dest = dest.Elem() } for dest.Kind() == reflect.Ptr { if dest.IsNil() { dest.Set(reflect.New(dest.Type().Elem())) } dest = dest.Elem() } return dest }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e *copyS2SMigrationEnumeratorBase) validateDestIsService(ctx context.Context, destURL url.URL) error {\n\tswitch e.FromTo {\n\tcase common.EFromTo.BlobBlob(), common.EFromTo.FileBlob(), common.EFromTo.S3Blob():\n\t\tif e.destBlobPipeline == nil {\n\t\t\tpanic(errors.New(\"invalid state, blob type destination...
[ "0.65766543", "0.6280285", "0.6110826", "0.5810207", "0.57578343", "0.5727806", "0.56967705", "0.55596083", "0.55264664", "0.54655516", "0.5427644", "0.5416648", "0.541464", "0.54048395", "0.5392832", "0.53838646", "0.536724", "0.53310525", "0.5314515", "0.5311886", "0.529385...
0.0
-1
use reflect.Value's SetXXX methods instead of pointers and type switch, because we should set by kind, not type.
func scanInt(src int64, dest reflect.Value) error { const ( minInt32 = -1 << 31 maxInt32 = 1<<31 - 1 maxUint32 = 1<<32 - 1 minInt16 = -1 << 15 maxInt16 = 1<<15 - 1 maxUint16 = 1<<16 - 1 minInt8 = -1 << 7 maxInt8 = 1<<7 - 1 maxUint8 = 1<<8 - 1 ) switch dest.Kind() { case reflect.Int64, refl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func setVal(v reflect.Value, pValue interface{}) string {\n\tswitch v.Kind() {\n\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\tx, ok := pValue.(int64)\n\t\tif !ok && pValue != nil {\n\t\t\treturn typeMismatchReason(pValue, v)\n\t\t}\n\t\tif v.OverflowInt(x) {\n\t\t\treturn fmt....
[ "0.6907546", "0.68194133", "0.6770028", "0.6657133", "0.65597194", "0.6393843", "0.6316241", "0.6280417", "0.62752694", "0.62395924", "0.6222948", "0.61953694", "0.6170906", "0.61520475", "0.6135036", "0.612724", "0.6100648", "0.6081042", "0.60615283", "0.60114396", "0.601143...
0.0
-1
ListPods returns the number of running in the current namespace
func (podInfo *PodInfoHandler) ListPods(w http.ResponseWriter, r *http.Request, p httprouter.Params) { pods, err := podInfo.CoreClient.Pods("").List(metav1.ListOptions{}) if err != nil { log.Printf("error listing pods: %v", err) w.WriteHeader(http.StatusInternalServerError) return } log.Printf("There are %d p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ListPod(token string, url string) (resultado int, pods model.Pods) {\n\tresultado = 0\n\tendpoint := url + apiPods\n\tresultado, resposta := GetRequest(token, endpoint)\n\tdefer resposta.Body.Close()\n\tif resposta.StatusCode == 200 {\n\t\tcorpo, err := ioutil.ReadAll(resposta.Body)\n\t\tif err != nil {\n\t\t...
[ "0.6969159", "0.6899663", "0.67352915", "0.6526848", "0.64330655", "0.6380531", "0.63721454", "0.6298754", "0.6271113", "0.6268417", "0.62265736", "0.62258464", "0.61918414", "0.6163917", "0.6134161", "0.6134161", "0.6105759", "0.6101063", "0.6034912", "0.59714705", "0.596004...
0.66986716
3
Deprecated: Use ShareType.Descriptor instead.
func (ShareType) EnumDescriptor() ([]byte, []int) { return file_share_distro_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*FileShare) Descriptor() ([]byte, []int) {\n\treturn file_share_share_proto_rawDescGZIP(), []int{0}\n}", "func (*ShareDistribution) Descriptor() ([]byte, []int) {\n\treturn file_share_distro_proto_rawDescGZIP(), []int{0}\n}", "func (*ShareSaveRequest) Descriptor() ([]byte, []int) {\n\treturn file_share_s...
[ "0.6478613", "0.64235455", "0.62816375", "0.6172562", "0.6044849", "0.60314584", "0.59462136", "0.5939892", "0.5929568", "0.5887795", "0.588171", "0.58685476", "0.58246434", "0.58026844", "0.57739806", "0.5765248", "0.5746607", "0.57274985", "0.57250035", "0.56246614", "0.562...
0.6611507
0
Deprecated: Use ShareDistribution.ProtoReflect.Descriptor instead.
func (*ShareDistribution) Descriptor() ([]byte, []int) { return file_share_distro_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*BodyOldPeer) Descriptor() ([]byte, []int) {\n\treturn file_github_com_getamis_alice_crypto_tss_addshare_message_proto_rawDescGZIP(), []int{1}\n}", "func (*ResourceManifest) Descriptor() ([]byte, []int) {\n\treturn file_google_cloud_gkehub_v1_membership_proto_rawDescGZIP(), []int{4}\n}", "func (*PatchCol...
[ "0.67036504", "0.6569697", "0.6526817", "0.65024304", "0.6499678", "0.6484286", "0.64665836", "0.64648074", "0.6448334", "0.6447736", "0.64468926", "0.6445642", "0.64218575", "0.6412172", "0.64099705", "0.6405386", "0.6403372", "0.638953", "0.6384298", "0.63774955", "0.637087...
0.66709244
1
NewCredentialRepository instance of CredentialRepository
func NewCredentialRepository(db *pgxpool.Pool) CredentialRepository { return &repo{ DB: db, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func New(c *config.Config) (*Repository, error) {\n\tDBURL := fmt.Sprintf(\"host=%s port=%d user=%s dbname=%s sslmode=disable password=%s\",\n\t\tc.Database.DBHost,\n\t\tc.Database.DBPort,\n\t\tc.Database.DBUser,\n\t\tc.Database.DBName,\n\t\tc.Database.DBPassword)\n\n\tdb, err := gorm.Open(dbDriver, DBURL)\n\tif e...
[ "0.59865445", "0.5940002", "0.59099764", "0.5908211", "0.58889973", "0.5883554", "0.58732665", "0.5836357", "0.58078223", "0.57829154", "0.5782139", "0.57490116", "0.5743227", "0.5730849", "0.5683967", "0.56299347", "0.5625149", "0.5606245", "0.55853844", "0.5578856", "0.5571...
0.7442926
0
GetCPUInfo reads the cpu info from the system
func (info *RpiInfo) GetCPUInfo() error { file, err := os.Open("/proc/cpuinfo") if err != nil { return err } defer file.Close() info.readCPUInfo(file) return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *Simple) CPUInfo(req *acomm.Request) (interface{}, *url.URL, error) {\n\tvar args CPUInfoArgs\n\tif err := req.UnmarshalArgs(&args); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif args.GuestID == \"\" {\n\t\treturn nil, nil, errors.New(\"missing guest_id\")\n\t}\n\n\tresult := &CPUInfoResult{\n\t\t&CPUI...
[ "0.78435516", "0.77686065", "0.75853837", "0.7222646", "0.718413", "0.7149646", "0.7146789", "0.7026387", "0.6978236", "0.67174673", "0.6629169", "0.65276617", "0.6524987", "0.6483721", "0.644528", "0.64240366", "0.6423062", "0.6414883", "0.6402341", "0.63637906", "0.6331547"...
0.817543
0
Deprecated: Use PbStatsSampleFeed.ProtoReflect.Descriptor instead.
func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*RateLimitingSampler) Descriptor() ([]byte, []int) {\n\treturn file_github_com_solo_io_gloo_projects_gloo_api_external_envoy_config_trace_v3_opencensus_proto_rawDescG...
[ "0.688585", "0.6697076", "0.6658216", "0.6657251", "0.66076976", "0.6588843", "0.6540398", "0.646052", "0.64041436", "0.6333316", "0.6320216", "0.63077956", "0.6295664", "0.6284261", "0.6254959", "0.6246454", "0.6208883", "0.62084496", "0.6187565", "0.61792845", "0.6176941", ...
0.71332276
0
Deprecated: Use PbStatsSampleEntry.ProtoReflect.Descriptor instead.
func (*PbStatsSampleEntry) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsSampleValue) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{2}\n}", "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) ...
[ "0.68787944", "0.67939395", "0.66097397", "0.6603801", "0.65751487", "0.6460975", "0.64265966", "0.6382489", "0.635776", "0.6314068", "0.6217413", "0.6216349", "0.6167733", "0.6165071", "0.60689914", "0.60576195", "0.6048943", "0.6048222", "0.60278815", "0.6014108", "0.600062...
0.71390134
0
Deprecated: Use PbStatsSampleValue.ProtoReflect.Descriptor instead.
func (*PbStatsSampleValue) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Sample) Descriptor() ([]byte, []int) {\n\treturn file_alameda_api_v1alpha1_datahub_common_metrics_proto_rawDescGZIP(), []int{0}\n}", "func (*PbStatsSampleEntry) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{1}\n}", "func (*RateLimitingSampler) Descriptor() ([]byte, []int...
[ "0.66029704", "0.64383894", "0.63857913", "0.6335666", "0.62955904", "0.6280039", "0.62591803", "0.62557894", "0.6178983", "0.6160721", "0.6110993", "0.6035262", "0.6015043", "0.6011451", "0.59461766", "0.591946", "0.59136045", "0.5894612", "0.5889398", "0.5886022", "0.587540...
0.7226101
0
Deprecated: Use PbStatsIndexList.ProtoReflect.Descriptor instead.
func (*PbStatsIndexList) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{3} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsIndexFeed) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{4}\n}", "func (*BulkIndexRequest) Descriptor() ([]byte, []int) {\n\treturn file_protobuf_index_proto_rawDescGZIP(), []int{14}\n}", "func (*BulkIndexResponse) Descriptor() ([]byte, []int) {\n\treturn file_pro...
[ "0.67219293", "0.65016353", "0.64582133", "0.64516765", "0.6328381", "0.63209164", "0.62839967", "0.62610024", "0.62606573", "0.6250601", "0.6246428", "0.62199354", "0.61826485", "0.617517", "0.6156711", "0.61428595", "0.61351675", "0.6117465", "0.6112063", "0.61055773", "0.6...
0.74354684
0
Deprecated: Use PbStatsIndexFeed.ProtoReflect.Descriptor instead.
func (*PbStatsIndexFeed) Descriptor() ([]byte, []int) { return file_stats_proto_rawDescGZIP(), []int{4} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*PbStatsIndexList) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{3}\n}", "func (*PbStatsSampleFeed) Descriptor() ([]byte, []int) {\n\treturn file_stats_proto_rawDescGZIP(), []int{0}\n}", "func (*Stats) Descriptor() ([]byte, []int) {\n\treturn file_ligato_configurator_stat...
[ "0.6839277", "0.6659184", "0.65105623", "0.6504708", "0.6449082", "0.6407179", "0.64059883", "0.6391535", "0.6383989", "0.63711065", "0.6368005", "0.6338368", "0.63329124", "0.6324471", "0.6310324", "0.63043153", "0.62913704", "0.6273191", "0.6263567", "0.6243064", "0.6239559...
0.7314186
0
NewTree yields a tree corresponding to the given list of symbol frequencies
func NewTree(fs []SymbolFreq) Tree { // Sort frequencies sort.Sort(byFreq(fs)) wrkList := []node{} for _, f := range fs { wrkList = append(wrkList, f) } for { if len(wrkList) < 2 { break } newNode := makeNewNode(wrkList[0], wrkList[1]) wrkList = insertItem(wrkList[2:], newNode) } return Tree{w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEncodingTree(freq map[uint8]uint) *Node {\n\tvar head Node // Fictitious head\n\n\tfor i, v := range freq {\n\t\tnode := &Node{\n\t\t\tvalue: i,\n\t\t\tweight: v,\n\t\t}\n\t\thead.insert(node)\n\t}\n\n\tfor head.next != nil && head.next.next != nil {\n\t\tl := head.popFirst()\n\t\tr := head.popFirst()\n\n...
[ "0.6538434", "0.6366622", "0.62743187", "0.58552384", "0.55338293", "0.55299264", "0.5499571", "0.526624", "0.5263907", "0.5207011", "0.5103051", "0.50884753", "0.50820345", "0.50712985", "0.5066273", "0.50051606", "0.49906793", "0.49906793", "0.49438584", "0.49127695", "0.49...
0.79281396
0
NewTreeFromBS yields a tree from a bitstream encoding of a tree
func NewTreeFromBS(bs *bitstream.BitStream) Tree { root := newTreeFromBS(bs) return Tree{root: root} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewTree() *BPTree {\n\treturn &BPTree{LastAddress: 0, keyPosMap: make(map[string]int64), enabledKeyPosMap: false}\n}", "func NewBTree(\n\tctx context.Context,\n\tobjStore *objstore.ObjectStore,\n\tencConf pbobject.EncryptionConfig,\n) (*BTree, error) {\n\trootNode := &Node{}\n\trootNode.Leaf = true\n\trootR...
[ "0.62798727", "0.6265652", "0.6131476", "0.60316855", "0.598983", "0.5987959", "0.586644", "0.57734203", "0.5725015", "0.56773776", "0.5623112", "0.5601665", "0.5570188", "0.55306107", "0.54862183", "0.5454313", "0.5434976", "0.5397777", "0.53739434", "0.5341786", "0.53324336...
0.8195643
0
Dictionary returns the dictionary defined by this Huffman tree
func (t Tree) Dictionary() DictionaryType { result := DictionaryType{} t.buildDictionary(result, bitstream.BitStream{}, t.root) return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateBinaryTree() {\n\tfmt.Fprintln(os.Stderr, \"CreateBinaryTree\")\n\tvar min1i, min2i, pos1, pos2 int\n\tvar point []int = make([]int, MAX_CODE_LENGTH)\n\tvar code []byte = make([]byte, MAX_CODE_LENGTH)\n\tvar count []int64 = make([]int64, vocab_size*2+1)\n\tvar binaryt []int = make([]int, vocab_size*2+1)...
[ "0.5447956", "0.538165", "0.5371014", "0.5146767", "0.5137261", "0.51136523", "0.5054502", "0.5002691", "0.49787515", "0.49382988", "0.49126276", "0.48784593", "0.4843514", "0.4808261", "0.48030126", "0.4782607", "0.4734426", "0.46656606", "0.4654483", "0.46402845", "0.459030...
0.634084
0
Interpret yilds a byte by interpreting the given bitstream on this Huffman tree
func (t Tree) Interpret(bs *bitstream.BitStream) byte { return t.walk(t.root, bs) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func decodeHuffmanCode(codes *vector.Vector, index int, root *huffmanTreeNode, to *vector.Vector) (int, error) {\n\tif root == nil {\n\t\treturn 0, errors.New(\"No prefix tree supplied\")\n\t}\n\n\tif isLeafNode(root) {\n\t\tto.Append(root.value)\n\t\treturn index, nil\n\t}\n\n\tnext := codes.MustGet(index)\n\tswi...
[ "0.5977924", "0.55451864", "0.5542703", "0.5483379", "0.52692354", "0.51715195", "0.5091173", "0.49814796", "0.4946427", "0.493463", "0.49185503", "0.4905912", "0.488269", "0.48778516", "0.4855809", "0.47979885", "0.47932762", "0.47918868", "0.4782398", "0.4781686", "0.476727...
0.602277
0
AsBitstreams encodes this Huffman tree in a bitstream
func (t Tree) AsBitstream() bitstream.BitStream { result := bitstream.BitStream{} t.asBitstream(&result, t.root) return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEncodingTree(freq map[uint8]uint) *Node {\n\tvar head Node // Fictitious head\n\n\tfor i, v := range freq {\n\t\tnode := &Node{\n\t\t\tvalue: i,\n\t\t\tweight: v,\n\t\t}\n\t\thead.insert(node)\n\t}\n\n\tfor head.next != nil && head.next.next != nil {\n\t\tl := head.popFirst()\n\t\tr := head.popFirst()\n\n...
[ "0.5976212", "0.588826", "0.57714266", "0.56684834", "0.5471367", "0.5359475", "0.53010243", "0.52597386", "0.52532464", "0.5214008", "0.52020335", "0.5191336", "0.5183353", "0.51561105", "0.51269877", "0.51163054", "0.5077814", "0.5068617", "0.50552714", "0.5026026", "0.4995...
0.69163007
0
AllTypes returns all of the value types.
func AllTypes() []Type { return []Type{TypeInt, TypeUInt, TypeFloat, TypeBool, TypeString} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TypeValues() []Type {\n\treturn _TypeValues\n}", "func (pkg *Package) ValuesOfType(typeName string) ([]string, map[string]bool, error) {\n\tvar values, inspectErrs []string\n\ttmplsToExclude := map[string]bool{}\n\n\tfor _, file := range pkg.files {\n\t\tast.Inspect(file, func(node ast.Node) bool {\n\t\t\ts...
[ "0.70301", "0.66016096", "0.65565395", "0.6466942", "0.63187724", "0.6198198", "0.59649175", "0.59599745", "0.5952964", "0.59205806", "0.59042585", "0.58914685", "0.5890263", "0.588717", "0.5848367", "0.5835866", "0.58317244", "0.58302057", "0.5822015", "0.5800212", "0.578242...
0.6932683
1
Valid returns if the current type is one of AllTypes
func (t Type) Valid() bool { for _, typ := range AllTypes() { if t == typ { return true } } return false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t Type) IsValid() bool {\n\tfor _, knownType := range allKnownTypes {\n\t\tif t == knownType {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}", "func (t Type) Valid() bool {\n\treturn EvNone < t && t < EvCount\n}", "func (i ImageType) Valid() bool {\n\tswitch string(i) {\n\tcase \"\", \"local\", \"all...
[ "0.6825694", "0.6371591", "0.62264395", "0.6162184", "0.61585903", "0.61412436", "0.6111977", "0.61091393", "0.6106575", "0.6102013", "0.60669553", "0.6064694", "0.60605884", "0.604936", "0.59423536", "0.59300756", "0.59161454", "0.5910387", "0.5899794", "0.5895834", "0.58766...
0.7091641
0
Equal checks equivalence between resource maps
func (r Resources) Equal(o Resources) bool { Log.Vomit.Printf("Comparing resources: %+ v ?= %+ v", r, o) if len(r) != len(o) { Log.Vomit.Println("Lengths differ") return false } if r.Ports() != o.Ports() { Log.Vomit.Println("Ports differ") return false } if math.Abs(r.Cpus()-o.Cpus()) > 0.001 { Log.Vo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ResourcesEqual(a, b map[string]envoy.Resource) bool {\n\n\tif len(a) != len(b) {\n\t\treturn false\n\t}\n\n\tfor name, resource := range a {\n\t\tif !proto.Equal(resource, b[name]) {\n\t\t\treturn false\n\t\t}\n\t}\n\n\treturn true\n}", "func equalMap(a, b map[string]int) bool {\n\tif len(a) != len(b) {\n\t...
[ "0.7206958", "0.6497191", "0.6308787", "0.6244144", "0.62131625", "0.60163283", "0.5997516", "0.5974839", "0.5958248", "0.5903059", "0.5891591", "0.58830553", "0.5866854", "0.5864131", "0.58572376", "0.5854044", "0.5850056", "0.58350617", "0.5830254", "0.58179975", "0.5817369...
0.6054629
5
TestDecodeEncodedPayload checks that the decoding the encoded payload results in the same payload. This is only a basic sanity check.
func TestDecodeEncodedTRC(t *testing.T) { regularCrt := loadCert(t, "./testdata/regular-voting.crt") trc := cppki.TRC{ Version: 1, ID: cppki.TRCID{ ISD: 1, Base: 3, Serial: 4, }, Validity: cppki.Validity{ NotBefore: regularCrt.NotBefore.Add(time.Hour), NotAfter: regularCrt.NotAfter.Add(-t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestDecodePayloadEmpty(t *testing.T) {\n\tassert := assert.New(t)\n\tpayload := bytes.NewBufferString(\"\")\n\n\tdecoded, err := decodePayload(payload.Bytes())\n\n\tassert.Equal(Payload{}, decoded)\n\tassert.Nil(err)\n}", "func TestDecodePayloadBadJSON(t *testing.T) {\n\tassert := assert.New(t)\n\tbody := `...
[ "0.7281458", "0.6913997", "0.6887471", "0.65974265", "0.658577", "0.6559383", "0.64981526", "0.64610136", "0.6437047", "0.6213342", "0.6192326", "0.61338687", "0.6059971", "0.60194135", "0.59999216", "0.5964416", "0.5939682", "0.5885714", "0.5879129", "0.5861864", "0.58497125...
0.0
-1
ConcatSlice Returns a Concatenanted byte array into string
func ConcatSlice(sliceToConcat []byte) string { var dummy string for index := 0; index < len(sliceToConcat)-1; index++ { dummy = dummy + string(sliceToConcat[index]) + "-" } dummy = dummy + string(sliceToConcat[len(sliceToConcat)-1]) return dummy }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ConcatSlice(sliceToConcat []byte) string {\n\tstringRep := \"\"\n\n\tfor index := 0; index < len(sliceToConcat); index++ {\n\t\tstringRep = stringRep + string(sliceToConcat[index])\n\n\t\tif index+1 != len(sliceToConcat) {\n\t\t\tstringRep = stringRep + \"-\"\n\t\t}\n\t}\n\n\treturn stringRep\n}", "func Con...
[ "0.77931696", "0.7339889", "0.7212358", "0.6981443", "0.6410898", "0.63878906", "0.6327533", "0.61192644", "0.60112464", "0.5952378", "0.59362984", "0.59355867", "0.5909852", "0.589257", "0.58814573", "0.5867457", "0.5865077", "0.5848797", "0.58426183", "0.58351725", "0.57663...
0.776643
1
UseHTTPClient allows the default http client to be overriden for calls to the flow service. This function must be called prior to flows.WithFlow to take effect (e.g. from an init method)
func UseHTTPClient(client *http.Client) { httpClient = client }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func UseHttpClient(client *http.Client) {\n\tdefaultHttpClient = client\n}", "func (o *GetTaskStatesDeprecatedParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (c *Client) SetHTTPClient(client *http.Client) {\n\tif client == nil {\n\t\tc.httpClient = http.DefaultClient\n\t\tretur...
[ "0.75783104", "0.7506294", "0.7492137", "0.74902767", "0.7485698", "0.7479744", "0.7455541", "0.7439341", "0.7431533", "0.74264723", "0.7426049", "0.7418902", "0.7417015", "0.7413888", "0.74032027", "0.73680377", "0.7363684", "0.7361882", "0.7361576", "0.7346382", "0.73421276...
0.8034563
0
Debug enables internal library debugging
func Debug(withDebug bool) { // go won't cast bool to uint32, you better believe it var bint uint32 if withDebug { bint++ } atomic.StoreUint32(&debugMu, bint) debug("Enabled debugging") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *Provider) Debug(debug bool) {}", "func (p *Provider) Debug(debug bool) {}", "func (p *Provider) Debug(debug bool) {}", "func (p *Provider) Debug(debug bool) {}", "func EnableDebug() {\n\tisDebug = true\n}", "func SetDebug() {\n\tglobalDebug = true\n}", "func (patchwork *Patchwork) Debug() {\n\...
[ "0.7404367", "0.7404367", "0.7404367", "0.7404367", "0.7245704", "0.7190543", "0.7055543", "0.7013385", "0.6999899", "0.6962028", "0.6916196", "0.6909126", "0.6896783", "0.6890489", "0.6818804", "0.678027", "0.6773512", "0.67285407", "0.6721295", "0.6720024", "0.67121613", ...
0.6418893
51
Log to stderr when Debug mode is enabled
func Log(msg string) { debug(msg) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func debug(message string) {\n if DebugMode {\n fmt.Fprintln(os.Stderr, \"DEBUG:\", message)\n }\n}", "func EnableDebugMode() {\n\tDefaultLogger.Init(os.Stderr, LogLevelDebug)\n}", "func debugLog(msg ...interface{}) {\n\tlogLocker.Lock()\n\tdefer logLocker.Unlock()\n\tif *confVerbose {\n\t\tcolor....
[ "0.71186876", "0.6873359", "0.6740789", "0.6731206", "0.66628754", "0.66362834", "0.65750813", "0.6462784", "0.6460342", "0.64532936", "0.6423005", "0.6422269", "0.63407636", "0.63320094", "0.632745", "0.6321187", "0.6297259", "0.62850803", "0.6251222", "0.62383026", "0.62302...
0.0
-1
RegisterAction registers a go function so it can be used as an action in a flow stage
func RegisterAction(actionFunc interface{}) { if reflect.TypeOf(actionFunc).Kind() != reflect.Func { panic("Action must be a function!") } actions[getActionKey(actionFunc)] = actionFunc }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Controller) RegisterAction(a *Action) {\n\tc.Actions = append(c.Actions, a)\n}", "func Register(name string, initFunc InitFunc) error {\n\tif _, exists := actions[name]; exists {\n\t\treturn fmt.Errorf(\"action name already registered %s\", name)\n\t}\n\tactions[name] = initFunc\n\n\treturn nil\n}", "...
[ "0.6698025", "0.6472137", "0.6467746", "0.63274443", "0.6133895", "0.61160654", "0.6039291", "0.5966115", "0.5854066", "0.57691675", "0.5761604", "0.56988126", "0.55745447", "0.5440735", "0.54097164", "0.5360043", "0.5345845", "0.525743", "0.52016634", "0.52012056", "0.517592...
0.75820374
0
/It is possible to return named values from a function. If a return value is named, it can be considered as being declared as a variable in the first line of the function.
func main() { fmt.Println("Named Return Values") lenght := 4 width := 4 aa := getArea(lenght, width) fmt.Println(aa) // lets say we receive aa from the function but we dont want to print it, we can use a blank identifier to // ignore the aa to get rid of "not used" error }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func functionWithnamedReturnValues(aName, aCity string, anAge int) (returnVal1 string, returnVal2 error) {\n\n\t// The returnvalues are initialised+declared for us, by the function itself\n\t// since they are part of the function's definition.\n\tfmt.Println(reflect.TypeOf(returnVal1)) // string\n\tfmt.Println(ref...
[ "0.75917506", "0.70015144", "0.6518298", "0.6429605", "0.6157334", "0.61043704", "0.60954314", "0.5995361", "0.58820856", "0.57189393", "0.5700473", "0.5678651", "0.5649994", "0.56494564", "0.56391245", "0.56049734", "0.5599004", "0.5586355", "0.5580948", "0.54909015", "0.546...
0.6962891
2
go test v ./internal/go test v ./internal/imap
func init() { cDir, err := os.Getwd() appDir := filepath.Dir(filepath.Dir(cDir)) os.Setenv("IMAIL_WORK_DIR", appDir) os.Chdir(appDir) if tools.IsExist(appDir + "/custom/conf/app.conf") { err = conf.Init(appDir + "/custom/conf/app.conf") if err != nil { fmt.Println("test init config fail:", err.Error()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestInmemTemplates(t *testing.T) {\n\tfor _, tt := range inmemTemplateTests {\n\t\tExecuteTestInmemTemplate(tt, t)\n\t}\n}", "func _TestMapTypes(t *testing.T) {\n\ttestEndToEnd(\"4-maps\", \"getmap\", t)\n}", "func TestInterfaces(t *testing.T) {\n\tvar verify = func(engine core.VirtualizationEngine) {}\n\...
[ "0.58750165", "0.5579175", "0.5518057", "0.5478015", "0.5452692", "0.54349846", "0.5404309", "0.53754455", "0.5356827", "0.53459847", "0.5344256", "0.5319205", "0.5308026", "0.529849", "0.52878636", "0.5249721", "0.524902", "0.5232891", "0.52287203", "0.52131915", "0.52124083...
0.0
-1
unionRegexp separates values with a | operator to create a string representing a union of regexp patterns.
func unionRegexp(values []string) string { if len(values) == 0 { // As a regular expression, "()" and "" are equivalent so this // condition wouldn't ordinarily be needed to distinguish these // values. But, our internal search engine assumes that "" // implies "no regexp" (no values), while "()" implies "matc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewUnion(l, r Regex) Regex {\n\tswitch l.(type) {\n\tcase *empty:\n\t\treturn r\n\tdefault:\n\t\treturn &union{\n\t\t\tl: l,\n\t\t\tr: r,\n\t\t}\n\t}\n}", "func RegexpSimplify(re *syntax.Regexp,) *syntax.Regexp", "func CombinedPatternsGiven(patterns []*regexp.Regexp) *regexp.Regexp {\n\tvar allPatterns []...
[ "0.61462075", "0.5724693", "0.54109585", "0.5389475", "0.5352758", "0.5311938", "0.5296446", "0.52079266", "0.509988", "0.5068835", "0.50166506", "0.4883824", "0.48613974", "0.48101395", "0.476411", "0.47462666", "0.4721221", "0.47110087", "0.4707788", "0.4707788", "0.4707788...
0.8219543
0
langToFileRegexp converts a lang: parameter to its corresponding file patterns for file filters. The lang value must be valid, cf. validate.go
func langToFileRegexp(lang string) string { lang, _ = enry.GetLanguageByAlias(lang) // Invariant: lang is valid. extensions := enry.GetLanguageExtensions(lang) patterns := make([]string, len(extensions)) for i, e := range extensions { // Add `\.ext$` pattern to match files with the given extension. patterns[i] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func FileExtFilterForLang(lang string) (regex, glob string) {\n\tswitch strings.ToLower(lang) {\n\tcase \"go\", \"golang\":\n\t\treturn \".*\\\\.go\", \"*.go\"\n\t}\n\treturn \".*\", \"*\"\n}", "func FileExtToLanguage(ext string) (Language, error) {\n\tswitch {\n\tcase ext == \"c\":\n\t\treturn LangC, nil\n\tcas...
[ "0.6439551", "0.5576716", "0.5206838", "0.51490414", "0.50916624", "0.5010436", "0.49206352", "0.48391092", "0.47405547", "0.46976352", "0.46198", "0.45917705", "0.45901117", "0.45758092", "0.45268458", "0.45258516", "0.4491104", "0.44281682", "0.4424431", "0.4423438", "0.440...
0.8471336
0
ToTextPatternInfo converts a an atomic query to internal values that drive text search. An atomic query is a Basic query where the Pattern is either nil, or comprises only one Pattern node (hence, an atom, and not an expression). See TextPatternInfo for the values it computes and populates.
func ToTextPatternInfo(q query.Basic, p Protocol, transform query.BasicPass) *TextPatternInfo { q = transform(q) // Handle file: and -file: filters. filesInclude, filesExclude := IncludeExcludeValues(q, query.FieldFile) // Handle lang: and -lang: filters. langInclude, langExclude := IncludeExcludeValues(q, query.F...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func make_pattern_text(T int, // size of text\n\tP int, // size of pattern.\n\tN int, // number of pattern repetitions\n) ([]byte, []byte) {\n\n\tM := int(T / P) // Max # patterns that fit in text\n\tif M < N {\n\t\tpanic(fmt.Sprintf(\"make_pattern_text M < N. T=%d,P=%d,N=%d,M=%d\", T, P, N, M))\n\t}\n\tD := int(M...
[ "0.44653547", "0.40759063", "0.4058076", "0.40355238", "0.4020524", "0.4006181", "0.39993784", "0.39698073", "0.39609438", "0.3935596", "0.3901916", "0.39011815", "0.38950545", "0.38773555", "0.386563", "0.3861176", "0.38457578", "0.3833284", "0.3831979", "0.38072672", "0.380...
0.7166795
0
ReadResponse reads a server response into the received o.
func (o *AddRemoteRDSNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewAddRemoteRDSNodeOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (d *ResourceHandler) ReadResponse(dataOut unsafe.Pointer, bytesToRead int32, bytesRead *int32, callback *Callback) int32 {\n\treturn lookupResourceHandlerProxy(d.Base()).ReadResponse(d, dataOut, bytesToRead, bytesRead, callback)\n}", "func (o *GetServerReader) ReadResponse(response runtime.ClientResponse, c...
[ "0.7640225", "0.7607834", "0.75210214", "0.7509121", "0.74803215", "0.74724656", "0.7433606", "0.74244606", "0.7375357", "0.7367311", "0.73589337", "0.73551553", "0.7350114", "0.7347274", "0.7346054", "0.733966", "0.7336042", "0.73239547", "0.7315819", "0.73155594", "0.731019...
0.0
-1
NewAddRemoteRDSNodeOK creates a AddRemoteRDSNodeOK with default headers values
func NewAddRemoteRDSNodeOK() *AddRemoteRDSNodeOK { return &AddRemoteRDSNodeOK{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewAddRemoteRDSNodeDefault(code int) *AddRemoteRDSNodeDefault {\n\treturn &AddRemoteRDSNodeDefault{\n\t\t_statusCode: code,\n\t}\n}", "func (c *CAPI) AddNode(req *btcjson.AddNodeCmd, resp None) (e error) {\n\tnrh := RPCHandlers\n\tres := nrh[\"addnode\"].Result()\n\tres.Params = req\n\tnrh[\"addnode\"].Call...
[ "0.6163938", "0.5139537", "0.4930724", "0.4848558", "0.4843541", "0.48335683", "0.48124602", "0.4799629", "0.4758989", "0.47470647", "0.47069877", "0.46792316", "0.4665263", "0.46608558", "0.46495008", "0.46242318", "0.4592622", "0.4582136", "0.45796773", "0.4575715", "0.4568...
0.6088182
1
NewAddRemoteRDSNodeDefault creates a AddRemoteRDSNodeDefault with default headers values
func NewAddRemoteRDSNodeDefault(code int) *AddRemoteRDSNodeDefault { return &AddRemoteRDSNodeDefault{ _statusCode: code, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client IdentityClient) createTagDefault(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) {\n\n\thttpRequest, err := request.HTTPRequest(http.MethodPost, \"/tagDefaults\", binaryReqBody, extraHeaders)\n\tif err...
[ "0.5712152", "0.5362989", "0.5276561", "0.5187505", "0.5171736", "0.50459373", "0.49836302", "0.4941398", "0.4921797", "0.49036473", "0.48980224", "0.48975933", "0.48868924", "0.48832646", "0.48829064", "0.4865941", "0.4848242", "0.4837145", "0.48303595", "0.48179057", "0.480...
0.7135118
0
Code gets the status code for the add remote RDS node default response
func (o *AddRemoteRDSNodeDefault) Code() int { return o._statusCode }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddClusterV5Default) Code() int {\n\treturn o._statusCode\n}", "func (o *CreateAntivirusServerDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *CreateServerSwitchingRuleDefault) Code() int {\n\treturn o._statusCode\n}", "func (o *ReplaceServerDefault) Code() int {\n\treturn o._statusCode\...
[ "0.692362", "0.6842809", "0.6776764", "0.6746196", "0.67214376", "0.6714648", "0.67118406", "0.6705345", "0.6704429", "0.6689789", "0.66794825", "0.6672727", "0.663601", "0.66230243", "0.6620177", "0.6610653", "0.6598204", "0.65737337", "0.6566433", "0.65617335", "0.65522105"...
0.80228853
0
Validate validates this add remote RDS node body
func (o *AddRemoteRDSNodeBody) Validate(formats strfmt.Registry) error { return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddRemoteRDSNodeOKBody) Validate(formats strfmt.Registry) error {\n\tvar res []error\n\n\tif err := o.validateRemoteRDS(formats); err != nil {\n\t\tres = append(res, err)\n\t}\n\n\tif len(res) > 0 {\n\t\treturn errors.CompositeValidationError(res...)\n\t}\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKB...
[ "0.68498296", "0.67687345", "0.61033916", "0.51745284", "0.5173281", "0.5138812", "0.5095825", "0.50670433", "0.50491786", "0.50297546", "0.5026576", "0.50178283", "0.49751574", "0.496253", "0.49549386", "0.49383596", "0.49335337", "0.49203494", "0.48882163", "0.48774028", "0...
0.7425289
0
Validate validates this add remote RDS node default body
func (o *AddRemoteRDSNodeDefaultBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateDetails(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddRemoteRDSNodeBody) Validate(formats strfmt.Registry) error {\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKBodyRemoteRDS) Validate(formats strfmt.Registry) error {\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKBody) Validate(formats strfmt.Registry) error {\n\tvar res []error\n\n\tif err := o.val...
[ "0.6955345", "0.64617455", "0.6260935", "0.5257282", "0.51660234", "0.5053359", "0.50475365", "0.5042062", "0.49865404", "0.4915012", "0.48963714", "0.4886728", "0.488275", "0.48794582", "0.48703107", "0.4830896", "0.48222688", "0.47989315", "0.479046", "0.47726774", "0.47579...
0.68783987
1
Validate validates this add remote RDS node OK body
func (o *AddRemoteRDSNodeOKBody) Validate(formats strfmt.Registry) error { var res []error if err := o.validateRemoteRDS(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddRemoteRDSNodeBody) Validate(formats strfmt.Registry) error {\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKBodyRemoteRDS) Validate(formats strfmt.Registry) error {\n\treturn nil\n}", "func (o *AddRemoteRDSNodeDefaultBody) Validate(formats strfmt.Registry) error {\n\tvar res []error\n\n\tif err := ...
[ "0.7103735", "0.6824135", "0.5912142", "0.5291574", "0.51865816", "0.5162585", "0.50906646", "0.502859", "0.49500355", "0.49242705", "0.4908517", "0.48461056", "0.483851", "0.4803192", "0.4801289", "0.47593367", "0.47554696", "0.47550145", "0.4754527", "0.4753902", "0.4747025...
0.69361144
1
Validate validates this add remote RDS node OK body remote RDS
func (o *AddRemoteRDSNodeOKBodyRemoteRDS) Validate(formats strfmt.Registry) error { return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *AddRemoteRDSNodeBody) Validate(formats strfmt.Registry) error {\n\treturn nil\n}", "func (o *AddRemoteRDSNodeOKBody) Validate(formats strfmt.Registry) error {\n\tvar res []error\n\n\tif err := o.validateRemoteRDS(formats); err != nil {\n\t\tres = append(res, err)\n\t}\n\n\tif len(res) > 0 {\n\t\treturn ...
[ "0.6836557", "0.68296754", "0.5618899", "0.53128964", "0.5140611", "0.47949532", "0.47500297", "0.46956733", "0.46739462", "0.46342108", "0.46221286", "0.46184957", "0.46152475", "0.4608739", "0.4607076", "0.45492345", "0.45425236", "0.45373106", "0.45265538", "0.45252773", "...
0.68412226
0
Set of ARNs of the matched Image Builder Infrastructure Configurations.
func (o GetInfrastructureConfigurationsResultOutput) Arns() pulumi.StringArrayOutput { return o.ApplyT(func(v GetInfrastructureConfigurationsResult) []string { return v.Arns }).(pulumi.StringArrayOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultARMImages() ImageSelector {\n\treturn defaultARMImages\n}", "func (d *aciDriver) Config() map[string]string {\n\treturn map[string]string{\n\t\t\"CNAB_AZURE_VERBOSE\": \"Increase verbosity. true, false are supported values\",\n\t\t\"CNAB_AZURE_CLIENT_ID\": ...
[ "0.49807295", "0.49396202", "0.48274466", "0.46540582", "0.46500695", "0.4544582", "0.45358956", "0.45227125", "0.4485528", "0.44812265", "0.44389182", "0.44133228", "0.43842816", "0.4356478", "0.43466344", "0.4339544", "0.43235326", "0.4293703", "0.4269512", "0.42656103", "0...
0.5901255
0
The providerassigned unique ID for this managed resource.
func (o GetInfrastructureConfigurationsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetInfrastructureConfigurationsResult) string { return v.Id }).(pulumi.StringOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *MachineScope) ProviderID() string {\n\treturn ptr.Deref(m.AzureMachine.Spec.ProviderID, \"\")\n}", "func (id ResourceGroupProviderId) ID() string {\n\tfmtString := \"/subscriptions/%s/resourceGroups/%s/providers/%s/%s/%s/%s/%s\"\n\treturn fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, i...
[ "0.682701", "0.6808371", "0.629306", "0.6281841", "0.6188704", "0.61797756", "0.61281586", "0.6087287", "0.6057715", "0.6057062", "0.60541266", "0.60401195", "0.6015796", "0.5990656", "0.59881324", "0.59791076", "0.5976729", "0.5970298", "0.5959781", "0.58148205", "0.5813212"...
0.0
-1
Set of names of the matched Image Builder Infrastructure Configurations.
func (o GetInfrastructureConfigurationsResultOutput) Names() pulumi.StringArrayOutput { return o.ApplyT(func(v GetInfrastructureConfigurationsResult) []string { return v.Names }).(pulumi.StringArrayOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func initImageNames() map[int]string {\n\tswitch getTestArch() {\n\tcase \"s390x\":\n\t\treturn map[int]string{\n\t\t\tbusyboxImage: \"busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977\",\n\t\t\tregistryImage: \"ibmcom/registry:2.6.2.5\",\n\t\t\tkanikoImage: \"gcr.io/kaniko-proj...
[ "0.51636654", "0.50098467", "0.5007201", "0.4983479", "0.49117845", "0.48418006", "0.47519144", "0.47423694", "0.46875143", "0.4671297", "0.46617126", "0.4644778", "0.46275565", "0.45914572", "0.45488852", "0.4517872", "0.45048082", "0.4491206", "0.44843468", "0.44672272", "0...
0.5689205
0
wsMessage handles browser requests to /msg/
func wsMessage(w http.ResponseWriter, r *http.Request) { // Get session, continue only if authenticated sok, vok := checkLogin(r, cfgMap["session name"], "user") if !sok || !vok { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) return } cc := make(chan bool) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (w *BaseWebsocketClient) OnWsMessage(payload []byte, isBinary bool) {}", "func handleMessage(msg *game.InMessage, ws *websocket.Conn, board *game.Board) {\n\tfmt.Println(\"Message Got: \", msg)\n\n}", "func (ctx *Context) MessageHandler(w http.ResponseWriter, r *http.Request) {\n\t//get the current user\n...
[ "0.71633077", "0.7148145", "0.6686693", "0.6623083", "0.6605026", "0.64997613", "0.6431778", "0.6405488", "0.63879466", "0.6301808", "0.62788296", "0.62768406", "0.62759316", "0.6266679", "0.6266447", "0.6254338", "0.6254338", "0.62163866", "0.6205541", "0.6175806", "0.617447...
0.8022294
0
wsChanSend build and send messages to connected browsers, the channel is shared between connections
func wsChanSend() { log.Println("wschan running...") i := 1 for { // send stuff to clients // TODO: solve multiple clients connecting wsChan <- "test: " + strconv.Itoa(i) i++ } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ws_SendMsg(ws *websocket.Conn, send_channel SendChannel) {\n\tfor {\n\t\tselect {\n\t\tcase send_msg := <-send_channel.containers:\n\t\t\tlog.Printf(\"[%s] containers sendMessage= \", __FILE__, send_msg)\n\t\t\twebsocket.JSON.Send(ws, send_msg)\n\t\tcase send_msg := <-send_channel.updateinfo:\n\t\t\tlog.Print...
[ "0.74745584", "0.7103419", "0.67399025", "0.6642084", "0.65906745", "0.6417173", "0.63003063", "0.6281131", "0.6261049", "0.6223444", "0.61551064", "0.6148204", "0.6134059", "0.6101055", "0.60894996", "0.60782266", "0.60752773", "0.6044252", "0.6042677", "0.6040374", "0.60394...
0.77143115
0
Bootstrap registers extensions and startup system services.
func (b *Bootstrap) Bootstrap(hostname string) error { log.Infof("Mounting proc") if err := syscall.Mount("none", "/proc", "proc", 0, ""); err != nil { return err } if err := syscall.Mount("none", "/dev", "devtmpfs", 0, ""); err != nil { return err } if err := syscall.Mount("none", "/dev/pts", "devpts", 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (b Bootstrapper) Bootstrap(ctx map[string]interface{}) error {\n\tdocSrv, ok := ctx[documents.BootstrappedDocumentService].(documents.Service)\n\tif !ok {\n\t\treturn errors.New(\"failed to get %s\", documents.BootstrappedDocumentService)\n\t}\n\n\tjobsMan, ok := ctx[jobs.BootstrappedService].(jobs.Manager)\n...
[ "0.58835244", "0.58062816", "0.5806258", "0.577923", "0.5588837", "0.5588225", "0.54006773", "0.53664774", "0.5350824", "0.5263559", "0.52489525", "0.5238717", "0.5185569", "0.5158178", "0.5131922", "0.5111831", "0.51068217", "0.5072038", "0.5047539", "0.50268966", "0.5012384...
0.471325
53
NewQuotaRateLimit registers a new resource with the given unique name, arguments, and options.
func NewQuotaRateLimit(ctx *pulumi.Context, name string, args *QuotaRateLimitArgs, opts ...pulumi.ResourceOption) (*QuotaRateLimit, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Rate == nil { return nil, errors.New("invalid value for required argument 'Rat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewRateLimit(client curator.CuratorFramework, username string,\n\ttotalAllowedQuota, baseQuota int64, lockTimeout time.Duration, refreshWindow time.Duration,\n\tenableOptimization bool, optimizationPctAsk float64, optimizationPctLeft float64) (*RateLimit, error) {\n\tvar err error\n\trl := &RateLimit{\n\t\tus...
[ "0.70255303", "0.6392232", "0.6372643", "0.6265869", "0.62243545", "0.61384356", "0.6130965", "0.61270595", "0.6043387", "0.58570546", "0.58482", "0.5845201", "0.57947737", "0.57201415", "0.5692513", "0.56593245", "0.56315416", "0.559504", "0.55927944", "0.55651486", "0.55472...
0.7799792
0
GetQuotaRateLimit gets an existing QuotaRateLimit resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func GetQuotaRateLimit(ctx *pulumi.Context, name string, id pulumi.IDInput, state *QuotaRateLimitState, opts ...pulumi.ResourceOption) (*QuotaRateLimit, error) { var resource QuotaRateLimit err := ctx.ReadResource("vault:index/quotaRateLimit:QuotaRateLimit", name, id, state, &resource, opts...) if err != nil { re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *WorkerPool) GetRateLimit(ctx context.Context, rlRequest *RateLimitReq) (retval *RateLimitResp, reterr error) {\n\t// Delegate request to assigned channel based on request key.\n\tworker := p.getWorker(rlRequest.UniqueKey)\n\thandlerRequest := &request{\n\t\tctx: ctx,\n\t\tresp: make(chan *response,...
[ "0.63732344", "0.61184627", "0.6054561", "0.5927608", "0.59067774", "0.5875768", "0.5850694", "0.5722346", "0.5709863", "0.57009006", "0.55981433", "0.55607927", "0.5511379", "0.5488253", "0.545794", "0.545549", "0.5450386", "0.5448698", "0.54485756", "0.5434681", "0.5430217"...
0.7855245
0
If set, when a client reaches a rate limit threshold, the client will be prohibited from any further requests until after the 'block_interval' in seconds has elapsed.
func (o QuotaRateLimitOutput) BlockInterval() pulumi.IntPtrOutput { return o.ApplyT(func(v *QuotaRateLimit) pulumi.IntPtrOutput { return v.BlockInterval }).(pulumi.IntPtrOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Client) RateLimit() int {\n\treturn c.rateLimit\n}", "func (l *LimitRate) Allow() bool {\n\tl.lock.Lock()\n\tdefer l.lock.Unlock()\n\n\tif l.count >= l.rate - 1 {\n\t\tnow := time.Now()\n\t\tif now.Sub(l.begin) >= l.cycle {\n\t\t\tl.Reset(now)\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}...
[ "0.6464643", "0.6186411", "0.61332136", "0.61332136", "0.6096705", "0.6049228", "0.59636146", "0.59079874", "0.5905041", "0.5904702", "0.59023535", "0.58886683", "0.5838211", "0.5838211", "0.5836824", "0.58216697", "0.58089036", "0.57796854", "0.5758372", "0.5756072", "0.5754...
0.0
-1
The duration in seconds to enforce rate limiting for.
func (o QuotaRateLimitOutput) Interval() pulumi.IntOutput { return o.ApplyT(func(v *QuotaRateLimit) pulumi.IntOutput { return v.Interval }).(pulumi.IntOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func RateLimit(d time.Duration) Tick {\n\tvar last *time.Time\n\treturn func(children []Node) (Status, error) {\n\t\tnow := time.Now()\n\t\tif last != nil && now.Add(-d).Before(*last) {\n\t\t\treturn Failure, nil\n\t\t}\n\t\tlast = &now\n\t\treturn Success, nil\n\t}\n}", "func (b *ConstantBackoff) Duration() tim...
[ "0.63258153", "0.6316328", "0.62990874", "0.62531835", "0.6245212", "0.61934334", "0.6176212", "0.6137821", "0.612628", "0.6084323", "0.60666955", "0.6006405", "0.5984351", "0.5980985", "0.5972619", "0.5972619", "0.59549665", "0.5950877", "0.5944542", "0.5939932", "0.59288466...
0.0
-1
Name of the rate limit quota
func (o QuotaRateLimitOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *QuotaRateLimit) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (lim Limit) Name() string { return \"limit\" }", "func (h *RateLimit) GetName() string {\n\treturn \"rate_limit\"\n}", "func (rl *RateLimit) Name() string {\n\treturn \"ratelimit\"\n}", "func (o QuotaLimitOutput) Name() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v QuotaLimit) *string { return v.Na...
[ "0.71486855", "0.71433467", "0.6957979", "0.6637102", "0.6455906", "0.62078303", "0.6179772", "0.61182237", "0.6091988", "0.6065175", "0.60613954", "0.5995879", "0.5939857", "0.59250367", "0.5830743", "0.582435", "0.5771794", "0.5765177", "0.57648367", "0.5748305", "0.5726864...
0.71177906
2
The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The `namespace` is always relative to the provider's configured namespace. Available only for Vault Enterprise.
func (o QuotaRateLimitOutput) Namespace() pulumi.StringPtrOutput { return o.ApplyT(func(v *QuotaRateLimit) pulumi.StringPtrOutput { return v.Namespace }).(pulumi.StringPtrOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o MachineInstanceSpecResourceRefOutput) Namespace() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v MachineInstanceSpecResourceRef) *string { return v.Namespace }).(pulumi.StringPtrOutput)\n}", "func (o SecretBackendV2Output) Namespace() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v *SecretBackendV...
[ "0.6630212", "0.65871453", "0.6586132", "0.6539589", "0.6499313", "0.6485903", "0.6474039", "0.6429713", "0.6429713", "0.6408647", "0.6399491", "0.63927054", "0.6357824", "0.63403904", "0.6333057", "0.631867", "0.6312653", "0.6308866", "0.62932575", "0.6259896", "0.6251117", ...
0.5900611
62
Path of the mount or namespace to apply the quota. A blank path configures a global rate limit quota. For example `namespace1/` adds a quota to a full namespace, `namespace1/auth/userpass` adds a `quota` to `userpass` in `namespace1`. Updating this field on an existing quota can have "moving" effects. For example, upda...
func (o QuotaRateLimitOutput) Path() pulumi.StringPtrOutput { return o.ApplyT(func(v *QuotaRateLimit) pulumi.StringPtrOutput { return v.Path }).(pulumi.StringPtrOutput) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Drive) SetQuota(value Quotaable)() {\n m.quota = value\n}", "func Quota(path string, size ...string) string {\n\tif len(size) > 0 && len(size[0]) > 0 {\n\t\tout, err := exec.Command(\"btrfs\", \"qgroup\", \"limit\", size[0]+\"G\", config.Agent.LxcPrefix+path).CombinedOutput()\n\t\tlog.Check(log.Error...
[ "0.61456865", "0.59919655", "0.58387405", "0.56591785", "0.5576382", "0.5452652", "0.53241897", "0.52723014", "0.5254918", "0.52149916", "0.516941", "0.51012826", "0.5090478", "0.50741565", "0.5069529", "0.50529176", "0.50515765", "0.5025699", "0.49996784", "0.49406362", "0.4...
0.6185023
0
The maximum number of requests at any given second to be allowed by the quota rule. The `rate` must be positive.
func (o QuotaRateLimitOutput) Rate() pulumi.Float64Output { return o.ApplyT(func(v *QuotaRateLimit) pulumi.Float64Output { return v.Rate }).(pulumi.Float64Output) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func RateLimit(w http.ResponseWriter, r *http.Request) {\n\tvar tc *http.Client\n\n\tc := cloudpkgs.NewContext(w, r)\n\tctx := context.Background()\n\n\tt := c.Request.Header.Get(\"Authorization\")\n\tif t != \"\" {\n\t\tts := oauth2.StaticTokenSource(\n\t\t\t&oauth2.Token{AccessToken: t},\n\t\t)\n\t\ttc = oauth2....
[ "0.6884591", "0.67138076", "0.6626268", "0.6499497", "0.6490157", "0.64747286", "0.6463776", "0.64438576", "0.63415706", "0.6335022", "0.6331239", "0.631643", "0.6298596", "0.6294876", "0.61940026", "0.6183884", "0.61823803", "0.6159726", "0.6142608", "0.60829914", "0.6023825...
0.62991774
12
NewEC2RemoteClient creates and initialise a new EC2RemoteClient object, given an AWS Instance ID
func NewEC2RemoteClient(InstanceID *string, credentials *sshCmdClient.SSHCredentials) (*EC2RemoteClient, error) { ins := new(EC2RemoteClient) ins.InstanceID = *InstanceID session, err := session.NewSession() if err != nil { return nil, err } ec2Client := ec2.New(session) ins.session = session ins.ec2Client...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewEC2Client(config EC2ClientConfig) (*AwsEC2, error) {\n\tif config.ControllerID == \"\" {\n\t\treturn nil, fmt.Errorf(\"ControllerID is a required parameter\")\n\t}\n\tif config.Nametag == \"\" {\n\t\treturn nil, fmt.Errorf(\"Nametag is a required parameter\")\n\t}\n\tec2Client, err := getEC2Client(config.E...
[ "0.6973776", "0.632608", "0.63121355", "0.6163207", "0.616059", "0.60730475", "0.6012531", "0.6009894", "0.5945188", "0.59106356", "0.5863934", "0.5777015", "0.57581896", "0.57090247", "0.569607", "0.5663689", "0.56583476", "0.5648572", "0.55632263", "0.55631524", "0.55515754...
0.7414689
0
Close tears down all sessions and connections as appropriate
func (ins *EC2RemoteClient) Close() error { return ins.cmdClient.Close() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func destroy() {\n\tif unique.natsconn != nil {\n\t\tunique.natsconn.Close()\n\t}\n\tfor _, dict := range unique.mdb {\n\t\tdict.Close()\n\t}\n\tunique = nil\n}", "func teardown() {\n\tts.Close()\n\tdb.Close()\n}", "func teardown() {\n\tserver1.Close()\n\tserver2.Close()\n\tserver3.Close()\n}", "func (c *cli...
[ "0.728361", "0.7082861", "0.7051466", "0.7046239", "0.68948776", "0.6801976", "0.67688215", "0.66486776", "0.6642524", "0.66257674", "0.66257674", "0.66257674", "0.66257674", "0.66257674", "0.66257674", "0.66257674", "0.6618159", "0.66098464", "0.66039705", "0.6602691", "0.65...
0.0
-1
startInstance starts an EC2 instance, and waits for it to become ready
func (ins *EC2RemoteClient) startInstance() error { log.Printf("Starting EC2 Instance %s", ins.InstanceID) _, err := ins.ec2Client.StartInstances(&ec2.StartInstancesInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error starting instance : %s", err) } log.Printf("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func startInstance(ec2Service *ec2.EC2, instance *ec2.Instance) error {\n\tinstanceState, err := getInstanceState(*instance)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif instanceState == \"shutting-down\" || instanceState == \"terminated\" || instanceState == \"stopping\" || instanceState == \"stopped\" {\n\t\tfm...
[ "0.7815959", "0.7357949", "0.727267", "0.6916077", "0.67272824", "0.67272824", "0.6538799", "0.6479852", "0.6445755", "0.64103496", "0.63575953", "0.6284689", "0.6194204", "0.61448747", "0.6061127", "0.6014265", "0.5959917", "0.59404624", "0.5913093", "0.5892486", "0.5862958"...
0.819455
0
getIPAddress retrieves the public IP address from AWS. Returns error if no address found
func (ins *EC2RemoteClient) getIPAddress() error { result, err := ins.ec2Client.DescribeInstances(&ec2.DescribeInstancesInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error getting instance details : %s", err) } ins.instanceIP = net.ParseIP(*result.Reservations[0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GetPublicIPAddress() (string, error) {\n\tresp, err := http.Get(\"http://checkip.amazonaws.com/\")\n\tif resp != nil {\n\t\tdefer resp.Body.Close()\n\t\tresp.Close = true\n\t}\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdata, err := ioutil.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\...
[ "0.7920907", "0.72071975", "0.71239483", "0.6998655", "0.69610465", "0.6900017", "0.67306906", "0.67055154", "0.667737", "0.6630442", "0.65781665", "0.65764624", "0.65495", "0.65411216", "0.6536848", "0.6535142", "0.6501289", "0.64331317", "0.6390965", "0.6369778", "0.634591"...
0.7475399
1
makeReady prepares an EC2 instance for running remote SSH commands
func (ins *EC2RemoteClient) makeReady() error { // Check Instance is running - will error if instance doesn't exist result, err := ins.ec2Client.DescribeInstanceStatus(&ec2.DescribeInstanceStatusInput{InstanceIds: aws.StringSlice([]string{ins.InstanceID})}) if err != nil { return fmt.Errorf("Error getting instanc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func setupServer(c *cli.Context) {\n started := time.Now()\n\n config := deployConfig()\n logger := &logger{Prefix: config.Host}\n ssh := newSSHClient(config.Host, config.User)\n\n ssh.execute(fmt.Sprintf(\"mkdir -p %s\", config.DeployTo))\n\n for _, t := range config.Setup {\n ssh.execute(t)\n }\n\n ss...
[ "0.61722517", "0.6099489", "0.5970563", "0.5950927", "0.5914715", "0.58060163", "0.57204074", "0.56962776", "0.5693759", "0.5692265", "0.5665352", "0.5654342", "0.5614", "0.5586875", "0.55865085", "0.5542265", "0.5467121", "0.5443552", "0.53783226", "0.5374821", "0.53677905",...
0.824867
0
RunCommand is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface RunCommandWithOutput discards the stdout and stderr from the command
func (ins *EC2RemoteClient) RunCommand(cmd string) (exitStatus int, err error) { exitStatus, err = ins.cmdClient.RunCommand(cmd) return exitStatus, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ins *EC2RemoteClient) RunCommandWithOutput(cmd string) (exitStatus int, stdoutBuf bytes.Buffer, stderrBuf bytes.Buffer, err error) {\n\texitStatus, stdoutBuf, stderrBuf, err = ins.cmdClient.RunCommandWithOutput(cmd)\n\treturn exitStatus, stdoutBuf, stderrBuf, err\n}", "func (client *Client) Run(command str...
[ "0.76657516", "0.7013193", "0.69211733", "0.6870896", "0.6709051", "0.6662063", "0.6636994", "0.66365516", "0.6481154", "0.641191", "0.638604", "0.6359089", "0.62244153", "0.6218016", "0.6202877", "0.6187682", "0.6128655", "0.6123047", "0.6107656", "0.6102932", "0.6080359", ...
0.70666355
1
RunCommandWithOutput is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface RunCommandWithOutput provides the stdout and stderr from the command
func (ins *EC2RemoteClient) RunCommandWithOutput(cmd string) (exitStatus int, stdoutBuf bytes.Buffer, stderrBuf bytes.Buffer, err error) { exitStatus, stdoutBuf, stderrBuf, err = ins.cmdClient.RunCommandWithOutput(cmd) return exitStatus, stdoutBuf, stderrBuf, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (h *Host) ExecWithOutput(cmd string) (string, error) {\n\tsession, err := h.sshClient.NewSession()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer session.Close()\n\n\toutput, err := session.CombinedOutput(cmd)\n\tif err != nil {\n\t\treturn \"\", nil\n\t}\n\n\treturn strings.TrimSpace(string(output)),...
[ "0.6952449", "0.6858897", "0.6641178", "0.6570179", "0.64580804", "0.64087915", "0.6398316", "0.63903344", "0.6342059", "0.62891215", "0.621401", "0.6113792", "0.61105305", "0.6021509", "0.60071635", "0.5958194", "0.5943652", "0.5935481", "0.58707535", "0.5860281", "0.5839429...
0.8034174
0
BackgroundCommand is a wrapper around the SSH client to run a command abstracts the SSH connection details from the EC2 client interface
func (ins *EC2RemoteClient) BackgroundCommand(cmd string, discardOutput bool) (int, error) { exitStatus, err := ins.cmdClient.BackgroundCommand(cmd, discardOutput) return exitStatus, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func cmdSSH() {\n\tswitch state := status(B2D.VM); state {\n\tcase vmUnregistered:\n\t\tlog.Fatalf(\"%s is not registered.\", B2D.VM)\n\tcase vmRunning:\n\t\tcmdParts := append(strings.Fields(B2D.SSHPrefix), fmt.Sprintf(\"%d\", B2D.SSHPort), \"docker@localhost\")\n\t\tif err := cmd(cmdParts[0], cmdParts[1:]...); e...
[ "0.5552612", "0.5394377", "0.5374934", "0.5220337", "0.51360375", "0.5109867", "0.5089216", "0.5080416", "0.50411", "0.5035837", "0.5011521", "0.50001675", "0.4995725", "0.49885878", "0.4986906", "0.4981291", "0.4974931", "0.49558264", "0.4928265", "0.49180338", "0.4910491", ...
0.7470312
0
CopyFile copies a file from the local filesystem to that on the EC2 instance
func (ins *EC2RemoteClient) CopyFile(source string, destination string) error { err := ins.cmdClient.CopyFile(source, destination) return err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func copyFile(srcFile string, destFile string) error {\n\tsrcReader, err := assets.FS.Open(srcFile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error opening %s file: %w\", srcFile, err)\n\t}\n\tdefer srcReader.Close()\n\n\tdestReader, err := os.Create(destFile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error cr...
[ "0.7557772", "0.7409318", "0.7393557", "0.73781157", "0.73433125", "0.72831494", "0.7226255", "0.7216362", "0.7208918", "0.7180465", "0.7172702", "0.7170716", "0.7159853", "0.71534693", "0.71534246", "0.7148969", "0.7106985", "0.7104262", "0.70982164", "0.7090298", "0.7056388...
0.7871186
0