query_id
stringlengths
32
32
query
stringlengths
7
4.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e238d47df3d1fdea43fdbc9ca363c3d2
init for getting command line arguments
[ { "docid": "827dedab580bcf03fcb24b8de4e008f4", "score": "0.63859963", "text": "func init() {\n\tflag.Usage = usage\n\ttimeDuration = flag.Int(\"duration\", 5, \"time duration for which server should be run\")\n\tflag.Parse()\n}", "title": "" } ]
[ { "docid": "ed87fa700c61e5f2b4b7eb7396389dec", "score": "0.74075615", "text": "func argsInit() {\n\tArgs = make([]string, 0, 0)\n\tArgs = append(Args, os.Args...)\n\tExecFile = getopt.ExecFileOfPid(os.Getpid())\n\tArgLine = getopt.ArgsToSpLine(Args)\n\tArgFullLine = getopt.CleanArgLine(os.Args[0] + \" \...
e16f2f1f098974715b75f2f8ca614b15
Test is the proxy function for the method defined in the tars file, with the context
[ { "docid": "a1beca43a2fd69d4aa43645a032d11eb", "score": "0.52452004", "text": "func (_obj *UserInfoService) Test(testStr *string, _opt ...map[string]string) (ret int32, err error) {\n\n\tvar length int32\n\tvar have bool\n\tvar ty byte\n\t_os := codec.NewBuffer()\n\terr = _os.Write_string((*testStr), 1)...
[ { "docid": "91de39ce7114a1c4ebb74e109afa7ac4", "score": "0.6090719", "text": "func Test(t *testing.T) { TestingT(t)}", "title": "" }, { "docid": "07f4e382ffea56ba01853b7e04be5a78", "score": "0.5909676", "text": "func Test(t *testing.T) { TestingT(t) }", "title": "" }, { "...
9789e0db2709e17aa9c3db1d555ade1a
GetCertificateProperties implements the CertificatePropertiesClassification interface for type CertificateProperties.
[ { "docid": "8a4428b3790eacd86906672f88496bbe", "score": "0.8049162", "text": "func (c *CertificateProperties) GetCertificateProperties() *CertificateProperties { return c }", "title": "" } ]
[ { "docid": "b6d3b2aeeac42cff6d24355de6f5f807", "score": "0.6159769", "text": "func (c *Client) GetTLSCertProps(configuration *rest.Config) (certProps tls.TlsCertificateProps, err error) {\n\tapiServerURL, err := url.Parse(configuration.Host)\n\tif err != nil {\n\t\treturn certProps, err\n\t}\n\tcertProp...
00b6aa0dc82dc9d6f188347a7feb1d9d
parse reads a serialized attribute from r and parses it into this NLAttr instance.
[ { "docid": "8fe42e7d2fce11fe24d0e153e767d4c0", "score": "0.7107415", "text": "func (a *NLAttr) parse(r *bytes.Reader) error {\n\tif r.Len() < syscall.NLA_HDRLEN {\n\t\treturn errors.New(\"Truncated attribute\")\n\t}\n\tvar alen uint16\n\tbinary.Read(r, native, &alen)\n\tbinary.Read(r, native, &a.Type)\n...
[ { "docid": "4a11a67fc1a1414be7e3b40e01b67ce4", "score": "0.58566576", "text": "func ParseAttr(r *bytes.Reader) (*NLAttr, error) {\n\tattr := &NLAttr{}\n\tif err := attr.parse(r); err != nil {\n\t\treturn nil, err\n\t}\n\treturn attr, nil\n}", "title": "" }, { "docid": "6bc4dd7b125cf1b5e350c9...
5803547f8e8b8ebeebb63ff9f4239ae0
NewIntentCompilationService makes a new Intent Compilation Service.
[ { "docid": "050d9f51f27093f51e7c0dd168e2d543", "score": "0.77258223", "text": "func NewIntentCompilationService() (*IntentCompilationService, error) {\n\tc := config.ReadConfig()\n\n\tec, err := etcd.NewClientByViper(serviceName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tapiClient := newAPIClien...
[ { "docid": "d1b4f00c3f509d7ec8b171dd259c9e75", "score": "0.678782", "text": "func RunIntentCompilationService(t *testing.T, apiURL string) context.CancelFunc {\n\tsetViper(map[string]interface{}{\n\t\t\"compilation.plugin_directory\": pluginDirectory,\n\t\t\"compilation.number_of_workers\": 4,\n\t\...
e4cbddcb2168f824d6038b8aaafeb252
Raw returns the raw expression string before conversion into Reverse Polish notation. Validation of a raw expression is not confirmed until it is compiled.
[ { "docid": "bf1280734077f261f69085ba20ed7063", "score": "0.7121323", "text": "func (e *Expr) Raw() string {\n\treturn e.raw\n}", "title": "" } ]
[ { "docid": "1c0a5aecc1826d7d793612fc9f3172a0", "score": "0.6883958", "text": "func Raw(raw string, parent ...Expression) Expression {\n\trawExp := &rawExpression{Raw: raw}\n\trawExp.ExpressionInterfaceImpl.Parent = OptionalOrDefaultExpression(rawExp, parent...)\n\n\treturn rawExp\n}", "title": "" ...
5985decb21324417107e41bed07e7480
Send mocks base method.
[ { "docid": "f4ab5eb42070cf07ea41b820a5ea6dcd", "score": "0.7294059", "text": "func (m *MockGitops_GetObjectsToSynchronizeServer) Send(arg0 *rpc.ObjectsToSynchronizeResponse) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Send\", arg0)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}", "title"...
[ { "docid": "07626e6cd186d0735e43dce1a0b51db5", "score": "0.74400985", "text": "func (m *MockWorker_FetchDDLInfoServer) Send(arg0 *pb.DDLInfo) error {\n\tm.ctrl.T.Helper()\n\tret := m.ctrl.Call(m, \"Send\", arg0)\n\tret0, _ := ret[0].(error)\n\treturn ret0\n}", "title": "" }, { "docid": "e015...
5c4537e0f77afb0bc5ef832fb462c2f4
GetNested returns all keys under specific key
[ { "docid": "47a64d280268f4b94842a97c40719ab8", "score": "0.5896326", "text": "func GetNested(key string) *Config {\n\tnested := viper.Sub(key)\n\tif nested == nil {\n\t\treturn nil\n\t}\n\n\treturn &Config{configs: nested}\n}", "title": "" } ]
[ { "docid": "d75fe234dd112be020d76f45d3065ff0", "score": "0.57297087", "text": "func (p *pinner) RecursiveKeys() []util.Key {\n\treturn p.recursePin.GetKeys()\n}", "title": "" }, { "docid": "115b46daf43dadcd2adbe48fe7aaac73", "score": "0.5561257", "text": "func (f BodyField) getNested...
d3635471b0a0e2bc8e18b4335f0f344a
/ DeleteApiKey Delete API Key Delete an API key for any user in your organization.
[ { "docid": "1000029d66088df7afc6c9d2eace551c", "score": "0.80864424", "text": "func (a *APIKeysApiService) DeleteApiKey(ctx context.Context, name string, user string) ApiDeleteApiKeyRequest {\n\treturn ApiDeleteApiKeyRequest{\n\t\tApiService: a,\n\t\tctx: ctx,\n\t\tname: name,\n\t\tuser: user,\n\t}\n}",...
[ { "docid": "633d106b16d42c23d843186ce60cee6e", "score": "0.765434", "text": "func (client *RestClient) DeleteAPIKey(name string) error {\n\tapikey := &corev2.APIKey{\n\t\tObjectMeta: corev2.ObjectMeta{\n\t\t\tName: name,\n\t\t},\n\t}\n\treturn client.Delete(apikey.URIPath())\n}", "title": "" }, ...
5e64a718b6a1e80403e53a5a83093f66
HasColumnKeys returns true if any values use a column key.
[ { "docid": "fc16b1320c388d9d6420254760d9e4e4", "score": "0.86220956", "text": "func (p Bits) HasColumnKeys() bool {\n\tfor i := range p {\n\t\tif p[i].ColumnKey != \"\" {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}", "title": "" } ]
[ { "docid": "4fc0cffaa0a1feb1d7c0c0bde4cac687", "score": "0.8744028", "text": "func (p FieldValues) HasColumnKeys() bool {\n\tfor i := range p {\n\t\tif p[i].ColumnKey != \"\" {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}", "title": "" }, { "docid": "4fc0cffaa0a1feb1d7c0c0bde4cac687", ...
1300c84ff74ef495bb12e2216a79dcd8
read will read key to v
[ { "docid": "cd140a40bb76f1942104c2fcc9221fad", "score": "0.7510938", "text": "func (c *collection) read(key string, v interface{}) error {\n\tif c.Keys[key] == nil {\n\t\treturn errors.New(\"key does not exist: \" + key)\n\t}\n\treturn c.Keys[key].read(v)\n}", "title": "" } ]
[ { "docid": "9e038e0868768b55ecf24eeccea43c3f", "score": "0.7001931", "text": "func (d *Driver) Read(key string, v interface{}) error {\n\n\tif key == \"\" {\n\t\treturn ErrMissingKey\n\t}\n\n\treturn d.readFile(key, v)\n}", "title": "" }, { "docid": "4f253d259b9ec828ef3326dd567644f1", "s...
87df3cabe0fd5fd40bda8cd7f842751e
NewSamRTCHost creates a new default server
[ { "docid": "3bb7b92dc600638cee701c43627f1799", "score": "0.52206266", "text": "func NewSamRTCHost() (*SamRTCHost, error) {\n\treturn NewSamRTCHostFromOptions()\n}", "title": "" } ]
[ { "docid": "2d36b0788da002f29ce4d5cc396f751e", "score": "0.67803544", "text": "func newDefaultServer() server {\n\t// TODO: fix by only ever creating server in one place\n\thost, _ := os.Hostname()\n\n\treturn server{\n\t\tScmClass: scmDCPM,\n\t\tBdevClass: bdNVMe,\n\t\tHostname: host,\n\t\tNrXs...
3f70187401ed7560218160b12f5a9413
MatchesLabelFilter returns true if the spec satisfies the passed in label filter query
[ { "docid": "93ba6c8cbeda8280873faf4f9307a92c", "score": "0.8153823", "text": "func (report SpecReport) MatchesLabelFilter(query string) (bool, error) {\n\tfilter, err := ParseLabelFilter(query)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn filter(report.Labels()), nil\n}", "title": "" }...
[ { "docid": "b1cf21acb1819c6b102efc5b1e42304d", "score": "0.7033321", "text": "func LabelFilter(ctx context.Context, labelfilter string) ResultFilter {\n\t// We need to handle both label=key and label=key=value\n\treturn func(i *Image) bool {\n\t\tvar value string\n\t\tsplitFilter := strings.Split(labelf...
44a4f479d8702f1b250b2910bf6b17cc
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
[ { "docid": "6dd9e29aca3faad7d4b26fe07a81cfdd", "score": "0.0", "text": "func (_KNS *KNSRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {\n\treturn _KNS.Contract.KNSTransactor.contract.Transfer(opts)\n}", "title": "" } ]
[ { "docid": "a9fbe45302e463879260664fa7f2b45e", "score": "0.7362061", "text": "func (_ApproveAndCallFallBack *ApproveAndCallFallBackTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {\n\treturn _ApproveAndCallFallBack.Contract.contract.Transfer(opts)\n}", "title": "" }, ...
c4db9f395e36a71ef83b5e771e6377ab
Indicates whether or not to export logs. This is false by default, which means no health check logging will be done.
[ { "docid": "d0fe1b62476db40345f02c5bc89eb262", "score": "0.0", "text": "func (o RegionHealthCheckLogConfigPtrOutput) Enable() pulumi.BoolPtrOutput {\n\treturn o.ApplyT(func(v *RegionHealthCheckLogConfig) *bool {\n\t\tif v == nil {\n\t\t\treturn nil\n\t\t}\n\t\treturn v.Enable\n\t}).(pulumi.BoolPtrOutput...
[ { "docid": "389f5902b6dcb6eb5a2ca464898d57bd", "score": "0.564781", "text": "func logToStdoutBasedOnEnv() bool {\n\treturn isDocker() && !isJail()\n}", "title": "" }, { "docid": "0072d1d10b52ab11eeb3d8654802674f", "score": "0.5525433", "text": "func (s *Sender) Logging() bool { retur...
835dc51c89a40715153d95e3aa8b064e
Test Uint64 % Float64
[ { "docid": "e922cc5826fab266d6ba3a852d1c5e3e", "score": "0.71974504", "text": "func TestCheckBinaryTypedExprUint64RemFloat64(t *testing.T) {\n\tenv := MakeSimpleEnv()\n\n\texpectCheckError(t, `uint64(0xffffffffffffffff) % float64(0xffffffff)`, env,\n\t\t`invalid operation: 18446744073709551615 % 4.29497...
[ { "docid": "1817f13e07a94b55fbebbd9147629447", "score": "0.74663436", "text": "func TestCheckBinaryTypedExprUint64RemFloat(t *testing.T) {\n\tenv := MakeSimpleEnv()\n\n\texpectConst(t, `uint64(0xffffffffffffffff) % 2.0`, env, uint64(0xffffffffffffffff) % 2.0, reflect.TypeOf(uint64(0xffffffffffffffff) % ...
00535001edeff749536431ca01af03bd
BigIntSummation generates the summation of the values in stream. For example if stream generates the primes, BigIntSummation would generate 2, 5, 10, 17, ...
[ { "docid": "88fe86a83238aee91eb54e19ae250154", "score": "0.8656936", "text": "func BigIntSummation(stream BigIntStream) BigIntStream {\n\treturn &bigIntSumStream{\n\t\tstream: stream, nextVal: new(big.Int), sum: new(big.Int)}\n}", "title": "" } ]
[ { "docid": "18ba4eb81c12bc429c04daabb2e387ec", "score": "0.7164875", "text": "func IntSummation(stream IntStream) IntStream {\n\treturn &intSumStream{stream: stream}\n}", "title": "" }, { "docid": "cb6e6bb06faf2ad978d37c7842db8a54", "score": "0.5821734", "text": "func sum(arr []*big....
ef2ae61573bc98f0c3a38bbf1e8ab37a
OrderedBy returns a Sorter that sorts using the less functions, in order. Call its Sort method to sort the data.
[ { "docid": "75298f6864347713af4b8163ff410f3c", "score": "0.7719327", "text": "func OrderedBy(less ...lessFunc) *multiSorter {\n\treturn &multiSorter{\n\t\tless: less,\n\t}\n}", "title": "" } ]
[ { "docid": "33c105e640ef250a545dec3bd15d5f06", "score": "0.7745591", "text": "func OrderedBy(less ...lessFunc) *MultiSorter {\n\treturn &MultiSorter{\n\t\tfilms: nil,\n\t\tlessFuncs: less,\n\t}\n}", "title": "" }, { "docid": "3b8baec9d430ea675e70e2e77af8440b", "score": "0.71469694", ...
8349ba7bb062dfba13e72aa9d40b945e
CreateAttestationNote creates an attestation note from AttestationAuthority
[ { "docid": "b4a15f320b274e6fb37cb752d1b3fc50", "score": "0.8336177", "text": "func (c Client) CreateAttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error) {\n\taaNote := &attestation.Authority{\n\t\tHint: &attestation.Authority_Hint{\n\t\t\tHumanReadableName: aa.Name,\n\t\t},\n\t...
[ { "docid": "e1ce9bdfc5a99925f36ef3af016193e9", "score": "0.7018076", "text": "func (c Client) AttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error) {\n\treq := &grafeas.GetNoteRequest{\n\t\tName: fmt.Sprintf(\"projects/%s/notes/%s\", DefaultProject, aa.Name),\n\t}\n\treturn c.cl...
3d2b2500a772ded1c9b021154be50a34
PutByte writes the given byte to the given effective address.
[ { "docid": "c4cbb3f64f858a989d538336a8b2af15", "score": "0.8430324", "text": "func (m *Memory) PutByte(v byte, base, offset uint32) {\n\tm.bytes[effectiveAddress(base, offset)] = v\n}", "title": "" } ]
[ { "docid": "94819eabba50e2bbc95ff43bde66493e", "score": "0.8075227", "text": "func (m *Memory) PutByte(v byte, base, offset uint32) {\n\tp := (*byte)(unsafe.Pointer(m.start + uintptr(base) + uintptr(offset)))\n\t*p = v\n}", "title": "" }, { "docid": "4f61a30e3810ca235ceae82bfafc371e", "s...
dd7dae7d37b5b37c253068fd67bb8dd7
PatientHeightGTE applies the GTE predicate on the "Patient_height" field.
[ { "docid": "d85fddb8ea64bbf59466a087047ee0f8", "score": "0.8499357", "text": "func PatientHeightGTE(v float64) predicate.Patient {\n\treturn predicate.Patient(func(s *sql.Selector) {\n\t\ts.Where(sql.GTE(s.C(FieldPatientHeight), v))\n\t})\n}", "title": "" } ]
[ { "docid": "26b7a4447d324aefa70bfe9f3fa82415", "score": "0.84881526", "text": "func PatientHeightGTE(v string) predicate.Patient {\n\treturn predicate.Patient(func(s *sql.Selector) {\n\t\ts.Where(sql.GTE(s.C(FieldPatientHeight), v))\n\t})\n}", "title": "" }, { "docid": "c868c931c825272eff5bf...
f5fbfa369200064185be654ebfc05893
decrypt reads lines of text, encrypts them, and prints the decrypted plaintext.
[ { "docid": "6a275f1d76bddf07be8a010ce9e7a272", "score": "0.5616346", "text": "func decrypt(in io.Reader) error {\n\tinput := bufio.NewScanner(in)\n\tfor input.Scan() {\n\t\tbroadcast := rsaBroadcaster(input.Text())\n\t\tbuf := breakBroadcast(broadcast)\n\t\tfmt.Println(string(buf))\n\t}\n\treturn input....
[ { "docid": "a9581f9105566fd2d42d430984b7f3d1", "score": "0.59707147", "text": "func decrypt(in io.Reader, mode cipher.BlockMode) error {\n\tbuf, err := ioutil.ReadAll(base64.NewDecoder(base64.StdEncoding, in))\n\tif err != nil {\n\t\treturn err\n\t}\n\tmode.CryptBlocks(buf, buf)\n\tif buf, err = PKCS7Un...
3d69fbf04e234f3f7f882acbcddd7d01
newDonut creates a demo Donut widget.
[ { "docid": "6942d92e3efbff8d9507fbd5e1d4b6e4", "score": "0.69998324", "text": "func newDonut(ctx context.Context) (*donut.Donut, error) {\n\td, err := donut.New(donut.CellOpts(\n\t\tcell.FgColor(cell.ColorNumber(33))),\n\t)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconst start = 35\n\tprogress :...
[ { "docid": "848abd12fb710e68d7088690ba7186ee", "score": "0.58640033", "text": "func NewDonut(donutName string, nodeDiskMap map[string][]string) (Donut, error) {\n\tif donutName == \"\" || len(nodeDiskMap) == 0 {\n\t\treturn nil, iodine.New(InvalidArgument{}, nil)\n\t}\n\tnodes := make(map[string]Node)\n...
ca96d5ac13cec44c6636e07d2a3c02ea
UnmountPath is a common unmount routine that unmounts the given path and deletes the remaining directory if successful.
[ { "docid": "8701e644599b66ad303ce6b130413695", "score": "0.80375", "text": "func UnmountPath(mountPath string, mounter Interface) error {\n\tpathExists, pathErr := PathExists(mountPath)\n\tif !pathExists {\n\t\treturn nil\n\t}\n\tcorruptedMnt := IsCorruptedMnt(pathErr)\n\tif pathErr != nil && !corrupted...
[ { "docid": "f911201c3b600b4a73831b737ce7b851", "score": "0.7302605", "text": "func (f FSUtil) UnMount(path string) error {\n\t// If the path isn't a directory, we're not mounted there.\n\t_, err := exec.Command(\"test\", \"-d\", path).CombinedOutput()\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\t// If t...
a75b719de5230e145a54f235e276ec9f
GetForecastTenDay returns the ForecastTenDay
[ { "docid": "d64a6417f2ca10660bd333b8a1f1ee25", "score": "0.8395998", "text": "func (w *Wug) GetForecastTenDay(query *Query) (*ForecastTenDay, error) {\n\tdata, err := w.GetRawForecastTenDay(query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tforecast := &ForecastTenDay{}\n\terr = json.Unmarshal(dat...
[ { "docid": "28a833dfea0b1ea4ac13d3646a8655e5", "score": "0.74425346", "text": "func (w *Wug) GetRawForecastTenDay(query *Query) ([]byte, error) {\n\treturn w.Get(ForeTenDay, query)\n}", "title": "" }, { "docid": "365ad22538cf21eecf2e61095d70e474", "score": "0.61820894", "text": "func...
de285f5eb838169c2508ef153410c57d
Get the current namespace for an environment
[ { "docid": "a0b57663217b6638608ba882e4703154", "score": "0.6527862", "text": "func Get(env string) (string, error) {\n\tif len(env) == 0 {\n\t\treturn \"\", errors.New(\"Missing env value\")\n\t}\n\n\tif ns, err := config.Get(config.Path(\"namespaces\", env, \"current\")); err != nil {\n\t\treturn \"\",...
[ { "docid": "790fec867e62c2eb542d56569d8c5eb2", "score": "0.732134", "text": "func getNamespace() string {\n\treturn util.GetEnv(util.OpenEBSNamespace)\n}", "title": "" }, { "docid": "87db7dd2ceb6688738afa70ca9a2f33c", "score": "0.7232082", "text": "func GetNamespace() string {\n\tv :...