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 |
|---|---|---|---|---|---|---|
/ It returns a value type ARRAY. | func (this *ObjectNames) Type() value.Type { return value.ARRAY } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v Value) Array() []Value {\n\tif v.Typ == '*' && !v.Null {\n\t\treturn v.ArrayV\n\t}\n\treturn nil\n}",
"func (v Value) AsArray() []Value {\n\treturn v.iface.([]Value)\n}",
"func ArrayValue(vals []Value) Value { return Value{Typ: '*', ArrayV: vals} }",
"func (v *Value) Array() ([]Value, error) {\n\tif ... | [
"0.7823361",
"0.75855696",
"0.74754494",
"0.7281895",
"0.7198584",
"0.7157273",
"0.7129963",
"0.7129963",
"0.7126476",
"0.71061283",
"0.7052501",
"0.7034025",
"0.7030175",
"0.6983035",
"0.68611586",
"0.68397593",
"0.6761906",
"0.6658249",
"0.6644863",
"0.6622976",
"0.66021454... | 0.60708594 | 52 |
/ Calls the Eval method for unary functions and passes in the receiver, current item and current context. | func (this *ObjectNames) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (fn NoArgFunc) Eval(ctx *Context, r Row) (interface{}, error) {\n\treturn fn.Logic(ctx, r)\n}",
"func (bp *BinaryPlus) Eval() float64 {\n\treturn bp.left.(Eval).Eval() + bp.right.(Eval).Eval()\n}",
"func (ast *Unary) Eval(env *Env, ctx *Codegen, gen *ssa.Generator) (\n\tssa.Value, bool, error) {\n\texpr, ... | [
"0.65595543",
"0.62546283",
"0.6108872",
"0.6097263",
"0.60695493",
"0.6036691",
"0.5988384",
"0.59279025",
"0.59279025",
"0.5880389",
"0.5870704",
"0.5835574",
"0.58030385",
"0.58030385",
"0.5791403",
"0.5744493",
"0.57420194",
"0.573196",
"0.57011765",
"0.5694317",
"0.56893... | 0.51304144 | 76 |
/ This method takes in an object and returns a slice of values that contains the attribute names. If the type of input is missing then return a missing value, and if not an object return a null value. Convert it to a valid Go type. Cast it to a map from string to interface. Range over this map and retrieve the keys. So... | func (this *ObjectNames) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (nvp *NameValues) ToInterfaceArray() []interface{} {\n\treturn NameValuesToInterfaceArray(*nvp)\n}",
"func objToNames(obj interface{}, names []string, tag string) []string {\n\tvar typ reflect.Type\n\n\tif sf, ok := obj.(reflect.StructField); ok {\n\t\ttyp = sf.Type\n\t} else {\n\t\ttyp = reflect.TypeOf(obj... | [
"0.53901917",
"0.527543",
"0.5258148",
"0.51660067",
"0.51634353",
"0.51448506",
"0.5136107",
"0.51138806",
"0.5065162",
"0.50453967",
"0.50142014",
"0.50008076",
"0.4989892",
"0.4953383",
"0.49406418",
"0.49164325",
"0.49099028",
"0.48897067",
"0.4877051",
"0.48768914",
"0.4... | 0.45692024 | 51 |
/ The constructor returns a NewObjectNames with the an operand cast to a Function as the FunctionConstructor. | func (this *ObjectNames) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectNames(operands[0])
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *ObjectAdd) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewObjectAdd(operands[0], operands[1], operands[2])\n\t}\n}",
"func (this *StrToZoneName) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewS... | [
"0.7036529",
"0.6818059",
"0.67975676",
"0.6667405",
"0.66347975",
"0.66347975",
"0.66178346",
"0.65968144",
"0.65968144",
"0.65434146",
"0.65172905",
"0.6424325",
"0.6424325",
"0.641571",
"0.63585794",
"0.6329511",
"0.6329511",
"0.6309147",
"0.6287411",
"0.6280646",
"0.62142... | 0.78175247 | 1 |
/ The function NewObjectPairs calls NewUnaryFunctionBase to create a function named OBJECT_PAIRS with an expression as input. | func NewObjectPairs(operand Expression) Function {
rv := &ObjectPairs{
*NewUnaryFunctionBase("object_pairs", operand),
}
rv.expr = rv
return rv
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewObjectInnerPairs(operand Expression) Function {\n\trv := &ObjectInnerPairs{\n\t\t*NewUnaryFunctionBase(\"object_innerpairs\", operand),\n\t}\n\n\trv.expr = rv\n\treturn rv\n}",
"func NewPairs(array *expression.ArrayConstruct) (pairs Pairs, err error) {\n\toperands := array.Operands()\n\tpairs = make(Pair... | [
"0.77096313",
"0.681373",
"0.6260862",
"0.61187327",
"0.5915429",
"0.5915429",
"0.55906564",
"0.5551416",
"0.55439746",
"0.55439746",
"0.5494457",
"0.5456087",
"0.5395901",
"0.52397954",
"0.52306813",
"0.52306813",
"0.5191114",
"0.5183652",
"0.50730604",
"0.5071748",
"0.50323... | 0.83893144 | 1 |
/ It calls the VisitFunction method by passing in the receiver to and returns the interface. It is a visitor pattern. | func (this *ObjectPairs) Accept(visitor Visitor) (interface{}, error) {
return visitor.VisitFunction(this)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *NowStr) Accept(visitor Visitor) (interface{}, error) {\n\treturn visitor.VisitFunction(this)\n}",
"func (e FunctionCallExpression) Visit(env Environment) Value {\n\treturn NoneValue()\n}",
"func (i *InterfaceSet) Visit(n ast.Node) (w ast.Visitor) {\n\tswitch n := n.(type) {\n\tcase *ast.TypeSpec:\n... | [
"0.60175425",
"0.5906299",
"0.59027874",
"0.5845828",
"0.5825935",
"0.5819577",
"0.5819577",
"0.580104",
"0.5785162",
"0.5777933",
"0.5703701",
"0.56876904",
"0.56876904",
"0.5627525",
"0.5536116",
"0.549273",
"0.54699755",
"0.54699755",
"0.5463964",
"0.5434355",
"0.5402595",... | 0.54164505 | 21 |
/ It returns a value type ARRAY. | func (this *ObjectPairs) Type() value.Type { return value.ARRAY } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v Value) Array() []Value {\n\tif v.Typ == '*' && !v.Null {\n\t\treturn v.ArrayV\n\t}\n\treturn nil\n}",
"func (v Value) AsArray() []Value {\n\treturn v.iface.([]Value)\n}",
"func ArrayValue(vals []Value) Value { return Value{Typ: '*', ArrayV: vals} }",
"func (v *Value) Array() ([]Value, error) {\n\tif ... | [
"0.7823326",
"0.7585927",
"0.7475762",
"0.7281528",
"0.71981394",
"0.7158558",
"0.7132027",
"0.7132027",
"0.71263963",
"0.7104742",
"0.7050486",
"0.7032845",
"0.7031735",
"0.6985119",
"0.6861485",
"0.68375707",
"0.6759842",
"0.6657196",
"0.6643962",
"0.66232395",
"0.6600766",... | 0.62758046 | 36 |
/ Calls the Eval method for unary functions and passes in the receiver, current item and current context. | func (this *ObjectPairs) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (fn NoArgFunc) Eval(ctx *Context, r Row) (interface{}, error) {\n\treturn fn.Logic(ctx, r)\n}",
"func (bp *BinaryPlus) Eval() float64 {\n\treturn bp.left.(Eval).Eval() + bp.right.(Eval).Eval()\n}",
"func (ast *Unary) Eval(env *Env, ctx *Codegen, gen *ssa.Generator) (\n\tssa.Value, bool, error) {\n\texpr, ... | [
"0.65601635",
"0.62554264",
"0.610906",
"0.6098628",
"0.60711527",
"0.6037241",
"0.5988044",
"0.5928711",
"0.5928711",
"0.58814615",
"0.587307",
"0.58361375",
"0.5803793",
"0.5803793",
"0.5791637",
"0.5744556",
"0.57429147",
"0.5731631",
"0.5702675",
"0.5695341",
"0.56899124"... | 0.0 | -1 |
/ This method takes in an object and returns a map of name value pairs. If the type of input is missing then return a missing value, and if not an object return a null value. Convert it to a valid Go type. Cast it to a map from string to interface. Range over this map and save the keys. Sort the keys and range over the... | func (this *ObjectPairs) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ToStringStringMap(tagName string, input interface{}, properties ...string) (map[string]string, error) {\n\tvmap := make(map[string]string)\n\ts := structs.New(input)\n\ts.TagName = tagName\n\tif len(properties) == 0 {\n\t\tproperties = s.Names()\n\t}\n\n\tfor _, field := range s.Fields() {\n\t\tif !field.IsEx... | [
"0.55518925",
"0.53633374",
"0.52951515",
"0.5275693",
"0.52526355",
"0.52313364",
"0.5227172",
"0.51874036",
"0.5143649",
"0.5123114",
"0.51198953",
"0.5041665",
"0.5022825",
"0.5012383",
"0.4960311",
"0.4957528",
"0.49427733",
"0.49382833",
"0.49110433",
"0.49001646",
"0.48... | 0.4940914 | 18 |
/ The constructor returns a NewObjectPairs with the an operand cast to a Function as the FunctionConstructor. | func (this *ObjectPairs) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectPairs(operands[0])
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *ObjectInnerPairs) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewObjectInnerPairs(operands[0])\n\t}\n}",
"func (this *ObjectValues) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewObjectValues(o... | [
"0.7153522",
"0.7010794",
"0.7010794",
"0.694256",
"0.6708602",
"0.66994077",
"0.66873187",
"0.66873187",
"0.66498196",
"0.64264494",
"0.64111173",
"0.62730813",
"0.62703615",
"0.6267153",
"0.6256307",
"0.6193001",
"0.6129393",
"0.6126082",
"0.6126082",
"0.6101058",
"0.607602... | 0.7555158 | 1 |
/ The function NewObjectValues calls NewUnaryFunctionBase to create a function named OBJECT_VALUES with an expression as input. | func NewObjectValues(operand Expression) Function {
rv := &ObjectValues{
*NewUnaryFunctionBase("object_values", operand),
}
rv.expr = rv
return rv
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewObjectInnerValues(operand Expression) Function {\n\trv := &ObjectInnerValues{\n\t\t*NewUnaryFunctionBase(\"object_innervalues\", operand),\n\t}\n\n\trv.expr = rv\n\treturn rv\n}",
"func NewValuesFunc(ctx sessionctx.Context, offset int, retTp *types.FieldType) *ScalarFunction {\n\tfc := &valuesFunctionCla... | [
"0.751708",
"0.63653314",
"0.6325895",
"0.6325895",
"0.621891",
"0.6025096",
"0.58745253",
"0.5860087",
"0.5854441",
"0.57969606",
"0.5770344",
"0.57039964",
"0.57039964",
"0.5660476",
"0.5660476",
"0.5658049",
"0.5558985",
"0.54201657",
"0.5405711",
"0.5354272",
"0.53477496"... | 0.83485734 | 1 |
/ It calls the VisitFunction method by passing in the receiver to and returns the interface. It is a visitor pattern. | func (this *ObjectValues) Accept(visitor Visitor) (interface{}, error) {
return visitor.VisitFunction(this)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *NowStr) Accept(visitor Visitor) (interface{}, error) {\n\treturn visitor.VisitFunction(this)\n}",
"func (e FunctionCallExpression) Visit(env Environment) Value {\n\treturn NoneValue()\n}",
"func (i *InterfaceSet) Visit(n ast.Node) (w ast.Visitor) {\n\tswitch n := n.(type) {\n\tcase *ast.TypeSpec:\n... | [
"0.601801",
"0.59070253",
"0.59054166",
"0.58446676",
"0.58266926",
"0.5802115",
"0.57868934",
"0.577937",
"0.57069504",
"0.56891",
"0.56891",
"0.5627799",
"0.5535857",
"0.5494115",
"0.5471187",
"0.5471187",
"0.5465064",
"0.5435572",
"0.54174775",
"0.54174775",
"0.5403646",
... | 0.5820728 | 6 |
/ It returns a value type ARRAY. | func (this *ObjectValues) Type() value.Type { return value.ARRAY } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (v Value) Array() []Value {\n\tif v.Typ == '*' && !v.Null {\n\t\treturn v.ArrayV\n\t}\n\treturn nil\n}",
"func (v Value) AsArray() []Value {\n\treturn v.iface.([]Value)\n}",
"func ArrayValue(vals []Value) Value { return Value{Typ: '*', ArrayV: vals} }",
"func (v *Value) Array() ([]Value, error) {\n\tif ... | [
"0.7823361",
"0.75855696",
"0.74754494",
"0.7281895",
"0.7198584",
"0.7157273",
"0.7126476",
"0.71061283",
"0.7052501",
"0.7034025",
"0.7030175",
"0.6983035",
"0.68611586",
"0.68397593",
"0.6761906",
"0.6658249",
"0.6644863",
"0.6622976",
"0.66021454",
"0.65110886",
"0.650292... | 0.7129963 | 7 |
/ Calls the Eval method for unary functions and passes in the receiver, current item and current context. | func (this *ObjectValues) Evaluate(item value.Value, context Context) (value.Value, error) {
return this.UnaryEval(this, item, context)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (fn NoArgFunc) Eval(ctx *Context, r Row) (interface{}, error) {\n\treturn fn.Logic(ctx, r)\n}",
"func (bp *BinaryPlus) Eval() float64 {\n\treturn bp.left.(Eval).Eval() + bp.right.(Eval).Eval()\n}",
"func (ast *Unary) Eval(env *Env, ctx *Codegen, gen *ssa.Generator) (\n\tssa.Value, bool, error) {\n\texpr, ... | [
"0.65595543",
"0.62546283",
"0.6108872",
"0.6097263",
"0.60695493",
"0.6036691",
"0.5988384",
"0.59279025",
"0.59279025",
"0.5880389",
"0.5870704",
"0.5835574",
"0.58030385",
"0.58030385",
"0.5791403",
"0.5744493",
"0.57420194",
"0.573196",
"0.57011765",
"0.5694317",
"0.56893... | 0.5362784 | 42 |
/ This method takes in an object and returns a slice that contains the attribute values. If the type of input is missing then return a missing value, and if not an object return a null value. Convert it to a valid Go type. Cast it to a map from string to interface. Range over this map and retrieve the keys. Sort it and... | func (this *ObjectValues) Apply(context Context, arg value.Value) (value.Value, error) {
if arg.Type() == value.MISSING {
return value.MISSING_VALUE, nil
} else if arg.Type() != value.OBJECT {
return value.NULL_VALUE, nil
}
oa := arg.Actual().(map[string]interface{})
keys := make(sort.StringSlice, 0, len(oa))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (set *AppleSet) ToInterfaceSlice() []interface{} {\n\tset.s.RLock()\n\tdefer set.s.RUnlock()\n\n\ts := make([]interface{}, 0, len(set.m))\n\tfor v := range set.m {\n\t\ts = append(s, v)\n\t}\n\treturn s\n}",
"func Values(i interface{}) ([]interface{}) {\n\tvar result []interface{}\n\tv := reflect.ValueOf(i)... | [
"0.5377597",
"0.53151846",
"0.52673537",
"0.5089155",
"0.50724846",
"0.506726",
"0.5065719",
"0.506426",
"0.5048821",
"0.5048821",
"0.5006157",
"0.50016093",
"0.49946824",
"0.49070972",
"0.49048558",
"0.4893779",
"0.48834392",
"0.48525932",
"0.4825139",
"0.4813861",
"0.480345... | 0.0 | -1 |
/ The constructor returns a NewObjectValues with the an operand cast to a Function as the FunctionConstructor. | func (this *ObjectValues) Constructor() FunctionConstructor {
return func(operands ...Expression) Function {
return NewObjectValues(operands[0])
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *ObjectInnerValues) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewObjectInnerValues(operands[0])\n\t}\n}",
"func (this *ObjectAdd) Constructor() FunctionConstructor {\n\treturn func(operands ...Expression) Function {\n\t\treturn NewObjectAdd(opera... | [
"0.73529464",
"0.7189014",
"0.6843478",
"0.6823034",
"0.6823034",
"0.67909425",
"0.67158616",
"0.6683737",
"0.66169643",
"0.66169643",
"0.65581906",
"0.65378344",
"0.6475921",
"0.64629835",
"0.64629835",
"0.64201945",
"0.63533115",
"0.63398314",
"0.6316713",
"0.63069826",
"0.... | 0.78348684 | 1 |
UnmarshalText fills structure fields from text data | func (t *Texture) UnmarshalText(text []byte) error {
textureImage, _ := utils.Try2(ebitenutil.NewImageFromFile(string(text)))
t.Image = textureImage
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (z *Rat) UnmarshalText(text []byte) error {}",
"func (record *Packed) UnmarshalText(s []byte) error {\n\tsize := hex.DecodedLen(len(s))\n\t*record = make([]byte, size)\n\t_, err := hex.Decode(*record, s)\n\treturn err\n}",
"func (u tu) UnmarshalText(data []byte) error {\n\tu.Text = string(data)\n\treturn ... | [
"0.6836672",
"0.6598402",
"0.65422213",
"0.6540831",
"0.6502182",
"0.6487281",
"0.64397895",
"0.6400636",
"0.6398449",
"0.63800514",
"0.6366616",
"0.6342884",
"0.63396364",
"0.63101435",
"0.62852067",
"0.62751365",
"0.6274501",
"0.62648505",
"0.62611896",
"0.62392396",
"0.623... | 0.63764447 | 10 |
NewTransform creates a new default transform, corresponding to identity. | func NewTransform() *Transform {
return &Transform{}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewTransform() *Transform {\n\treturn transformPool.Get().(*Transform)\n}",
"func NewTransform() Transform {\n\tt := transform{\n\t\tmodelView: mgl32.Ident4(),\n\t\trotation: mgl32.Vec3{0, 0, 0},\n\t\ttranslation: mgl32.Vec3{0, 0, 0},\n\t}\n\treturn &t\n}",
"func (t *Transform) New() *Transform {\n\t... | [
"0.7560676",
"0.7552853",
"0.7524606",
"0.72407454",
"0.66244805",
"0.6586805",
"0.6541571",
"0.64616334",
"0.6403893",
"0.6273406",
"0.6072438",
"0.6038543",
"0.58727026",
"0.5844496",
"0.5673262",
"0.5662089",
"0.5576789",
"0.55677426",
"0.55498636",
"0.55261695",
"0.552174... | 0.7824815 | 0 |
SetScale sets transform scale. | func (t *Transform) SetScale(sx, sy float64) *Transform {
t.Scale1.X = sx - 1
t.Scale1.Y = sy - 1
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (xf *Transform) SetScale(scale float32) {\n\txf.Scale = mgl32.Vec2{scale, scale}\n}",
"func (t *Transform) SetScale(v *Vector) ITransform {\n\tt.Scale = v\n\treturn t\n}",
"func (this *Transformable) SetScale(scale Vector2f) {\n\tC.sfTransformable_setScale(this.cptr, scale.toC())\n}",
"func (g *GameObje... | [
"0.82044643",
"0.82026076",
"0.8044438",
"0.80010784",
"0.738389",
"0.73492926",
"0.72787267",
"0.7259887",
"0.72031957",
"0.71859896",
"0.7162448",
"0.71623427",
"0.714276",
"0.7092354",
"0.7020097",
"0.6801338",
"0.65981305",
"0.65689886",
"0.65219027",
"0.64675266",
"0.646... | 0.8562481 | 0 |
SetRotation sets transform rotation. | func (t *Transform) SetRotation(angle float64) *Transform {
t.Rotation = angle
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t *Transform) SetRotation(r float64) ITransform {\n\tt.Rotation = r\n\treturn t\n}",
"func (this *Transformable) SetRotation(rot float32) {\n\tC.sfTransformable_setRotation(this.cptr, C.float(rot))\n}",
"func (p *Plane) SetRotation(rot mgl32.Mat4) {\n\tp.model.Rotation = rot\n}",
"func (d *Device) SetR... | [
"0.8625573",
"0.8057875",
"0.8017207",
"0.77256304",
"0.7505977",
"0.74746484",
"0.74095",
"0.7240528",
"0.7185497",
"0.7154693",
"0.6705631",
"0.6337583",
"0.6166817",
"0.602419",
"0.6017595",
"0.59994197",
"0.59966457",
"0.5940456",
"0.5913534",
"0.5878609",
"0.5819131",
... | 0.85688853 | 1 |
SetTranslation sets transform translation. | func (t *Transform) SetTranslation(tx, ty float64) *Transform {
t.Translation.X = tx
t.Translation.Y = ty
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (s *Surface) SetTransform(a, b, c, d, e, f float64) {\n\ts.Ctx.Call(\"setTransform\", a, b, c, d, e, f)\n}",
"func (g *Group) SetTransform(m *algebra.Matrix) {\n\tif len(m.Get()) != 4 || len(m.Get()[0]) != 4 {\n\t\tpanic(algebra.ExpectedDimension(4))\n\t}\n\tg.transform = m\n}",
"func (c *canvasRenderer) ... | [
"0.6251086",
"0.59690094",
"0.58699065",
"0.5786746",
"0.57243615",
"0.5712761",
"0.5690545",
"0.5640491",
"0.54449964",
"0.5348975",
"0.5331226",
"0.5321163",
"0.53097576",
"0.5235144",
"0.50976515",
"0.5094021",
"0.5056659",
"0.5056363",
"0.50562334",
"0.50424784",
"0.50373... | 0.822304 | 0 |
SetDepth sets transform depth. | func (t *Transform) SetDepth(depth float64) *Transform {
t.Depth = depth
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *Dig) SetDepth(v int32) {\n\to.Depth = v\n}",
"func (a *GetFlattenedDocumentArgs) SetDepth(depth int) *GetFlattenedDocumentArgs {\n\ta.Depth = &depth\n\treturn a\n}",
"func (dev *Device) SetDepthMode(mode FrameMode) int {\n\treturn int(C.freenect_set_depth_mode(dev.ptr(), *mode.ptr()))\n}",
"func (a ... | [
"0.72426546",
"0.66944337",
"0.6489197",
"0.64702225",
"0.63566595",
"0.63047695",
"0.62911135",
"0.6192278",
"0.6161013",
"0.60781723",
"0.6054071",
"0.5927159",
"0.580917",
"0.5697966",
"0.56346196",
"0.5625042",
"0.54987735",
"0.5410169",
"0.53793144",
"0.535777",
"0.53403... | 0.8295805 | 0 |
SetOrigin sets transform origin. | func (t *Transform) SetOrigin(origin string) *Transform {
t.Origin = origin
return t
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *Transformable) SetOrigin(orig Vector2f) {\n\tC.sfTransformable_setOrigin(this.cptr, orig.toC())\n}",
"func SetOrigin(\n\tctx context.Context,\n\tcallOrigin string,\n) context.Context {\n\treturn setIncomingMD(ctx, map[string]string{callOriginHeaderName: callOrigin})\n}",
"func (a *SetPermissionArgs... | [
"0.80196726",
"0.7189707",
"0.7154953",
"0.7088292",
"0.6934476",
"0.68809646",
"0.6803109",
"0.67791086",
"0.6698489",
"0.6690764",
"0.66876876",
"0.66319853",
"0.65280163",
"0.6461048",
"0.6432481",
"0.6425079",
"0.6382391",
"0.6347609",
"0.6234449",
"0.6170806",
"0.6167759... | 0.79898334 | 1 |
ComputeOriginOffset returns the transform origin offset. | func (t *Transform) ComputeOriginOffset(screenWidth, screenHeight float64) (offsetX, offsetY float64) {
switch t.Origin {
case TransformOriginTopLeft:
offsetX, offsetY = 0, screenHeight
case TransformOriginTopMiddle:
offsetX, offsetY = screenWidth/2, screenHeight
case TransformOriginTopRight:
offsetX, offsetY... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (this *Transformable) GetOrigin() (origin Vector2f) {\n\torigin.fromC(C.sfTransformable_getOrigin(this.cptr))\n\treturn\n}",
"func (p point) distanceToOrigin() int {\n\treturn p.distanceToPoint(point{x: 0, y: 0})\n}",
"func (tlc *TLCMessage) GetOrigin() string {\n\treturn tlc.Origin\n}",
"func calcCoord... | [
"0.5914239",
"0.53744346",
"0.5362208",
"0.53457284",
"0.5273407",
"0.5206835",
"0.51678556",
"0.51544935",
"0.513803",
"0.5098593",
"0.50667167",
"0.49152374",
"0.49146998",
"0.49081457",
"0.48933637",
"0.48863855",
"0.4874854",
"0.48649567",
"0.4814246",
"0.481144",
"0.4782... | 0.7910798 | 0 |
RunExampleResolver shows how you would setup one resolver to use this pattern The resolver would typically be a mutation, as queries have their own implementation The GraphQL server acts as a thin proxy that maps and passes requests onto the handler Initialise request structs Pass in the writer and reader Add in the mi... | func (r *RootResolver) RunExampleResolver(ctx context.Context) {
// Prepare args
req := handlers.MustNewReader(&OnboardStartRequest{})
resp := &bytes.Buffer{}
// Prepare func
fn := handlers.WithLogging(handlers.WithMetrics("start", r.Calls, r.Errors, r.Saturation, r.Duration, OnboardStart(r.userStore, r.acc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewResolver(\n\tlogger logger.Logger,\n\tshortLinkRetriever shortlink.Retriever,\n\tshortLinkCreator shortlink.Creator,\n\tshortLinkUpdater shortlink.Updater,\n\tchangeLog changelog.ChangeLog,\n\trequesterVerifier requester.Verifier,\n\tauthenticator authenticator.Authenticator,\n\tuserRepo repository.User,\n... | [
"0.5636411",
"0.54876155",
"0.5424582",
"0.54115343",
"0.53352714",
"0.5161797",
"0.50907403",
"0.5038632",
"0.5028125",
"0.4968094",
"0.495937",
"0.49110553",
"0.49010876",
"0.48503396",
"0.48065484",
"0.47772992",
"0.4776931",
"0.4754101",
"0.47482422",
"0.47311452",
"0.472... | 0.67912567 | 0 |
OnboardStart holds the business logic in a signature agnostic way, allowing for middlewares to be applied It returns a func, allowing for additional data to be passed via closures | func OnboardStart(userStore UserStore, accountStore AccountStore) handlers.Handler {
fn := func(ctx context.Context, w handlers.Writer, r handlers.Reader) error {
req := &OnboardStartRequest{}
handlers.MustDecode(r, req)
// Handle validations
if true {
return &handlers.UserError{"3c157e31-0a63-4f96-9c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (b *Bot) addStartFunc(fn server.Component) {\n\tb.server.RunComponent(fn)\n}",
"func Start(handler fn) error {\n\tlog.Println(\"starting lambda handler...\")\n\n\tlambda.Start(handler)\n\treturn nil\n}",
"func (*GenericFramework) Startup(ctx *NetworkContext) {}",
"func (s *BasejossListener) EnterFunctio... | [
"0.5348516",
"0.5344849",
"0.5320611",
"0.5279906",
"0.5275717",
"0.52645797",
"0.5166758",
"0.5149979",
"0.51414245",
"0.50449175",
"0.4997565",
"0.49922016",
"0.49668092",
"0.49571022",
"0.49519426",
"0.49445203",
"0.4919629",
"0.4913685",
"0.48777905",
"0.48777905",
"0.486... | 0.69999826 | 0 |
Log ... Log message to Console | func Log(format string, a ...interface{}) {
s := fmt.Sprintf(format, a...)
s = fmt.Sprintf("%v: %s", time.Now().Format("2006-01-02T15:04:05.000"), s)
fmt.Println(s)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func ConsoleLog(msg string) {\n\tconsoleLog(stringToPointer(msg), uint32(len(msg)))\n}",
"func (c *Canvas) Log(args ...interface{}) {\n\tc.window.Get(\"console\").Call(\"log\", args...)\n}",
"func (c *Canvas) Log(args ...interface{}) {\n\tc.window.Get(\"console\").Call(\"log\", args...)\n}",
"func Log(messag... | [
"0.7198924",
"0.70782137",
"0.70782137",
"0.69335264",
"0.6820805",
"0.6767752",
"0.6740621",
"0.67047006",
"0.66775966",
"0.66761005",
"0.6645149",
"0.6567815",
"0.65659356",
"0.65493184",
"0.6532021",
"0.65160286",
"0.65047544",
"0.64814675",
"0.6448005",
"0.6447785",
"0.64... | 0.0 | -1 |
Deprecated: Use TopicSubmissionMessage.ProtoReflect.Descriptor instead. | func (*TopicSubmissionMessage) Descriptor() ([]byte, []int) {
return file_topic_submission_message_proto_rawDescGZIP(), []int{0}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (*Topic) Descriptor() ([]byte, []int) {\n\treturn file_feedbackreq_proto_rawDescGZIP(), []int{2}\n}",
"func (*Topic) Descriptor() ([]byte, []int) {\n\treturn file_proto_google_fhir_proto_r5_core_resources_topic_proto_rawDescGZIP(), []int{0}\n}",
"func (*TopicMessage) Descriptor() ([]byte, []int) {\n\tretu... | [
"0.68175507",
"0.67892355",
"0.67468566",
"0.6635227",
"0.6584398",
"0.6502781",
"0.64011806",
"0.6390371",
"0.6389811",
"0.63250625",
"0.629232",
"0.6287109",
"0.6235323",
"0.62342507",
"0.61407334",
"0.6138201",
"0.612377",
"0.6117275",
"0.6095283",
"0.60721815",
"0.6071343... | 0.72706485 | 0 |
NewVvolBindingDeleteParams creates a new VvolBindingDeleteParams object, with the default timeout for this client. Default values are not hydrated, since defaults are normally applied by the API server side. To enforce default values in parameter, use SetDefaults or WithDefaults. | func NewVvolBindingDeleteParams() *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: cr.DefaultTimeout,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewVvolBindingDeleteParamsWithTimeout(timeout time.Duration) *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\ttimeout: timeout,\n\t}\n}",
"func (o *VvolBindingDeleteParams) WithTimeout(timeout time.Duration) *VvolBindingDeleteParams {\n\to.SetTimeout(timeout)\n\treturn o\n}",
"func NewV... | [
"0.8443394",
"0.80488086",
"0.79342115",
"0.7605265",
"0.73258764",
"0.71807414",
"0.66015834",
"0.656757",
"0.6386962",
"0.6290172",
"0.624446",
"0.62381047",
"0.61957663",
"0.61885685",
"0.61526823",
"0.6124373",
"0.6017747",
"0.6001432",
"0.5993086",
"0.5975276",
"0.596195... | 0.89485335 | 0 |
NewVvolBindingDeleteParamsWithTimeout creates a new VvolBindingDeleteParams object with the ability to set a timeout on a request. | func NewVvolBindingDeleteParamsWithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
timeout: timeout,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithTimeout(timeout time.Duration) *VvolBindingDeleteParams {\n\to.SetTimeout(timeout)\n\treturn o\n}",
"func NewVvolBindingDeleteParams() *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func (o *VvolBindingDeleteParam... | [
"0.833041",
"0.75770617",
"0.75299597",
"0.75071734",
"0.7177665",
"0.71717817",
"0.7094056",
"0.7027132",
"0.69987446",
"0.6997985",
"0.6857217",
"0.68130285",
"0.6753555",
"0.67476237",
"0.67308384",
"0.6725506",
"0.6687974",
"0.66241753",
"0.65718096",
"0.65705854",
"0.653... | 0.89275056 | 0 |
NewVvolBindingDeleteParamsWithContext creates a new VvolBindingDeleteParams object with the ability to set a context for a request. | func NewVvolBindingDeleteParamsWithContext(ctx context.Context) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
Context: ctx,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewVvolBindingDeleteParams() *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func NewVvolBindingDeleteParamsWithHTTPClient(client *http.Client) *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\tHTTPClient: client,\n\t}\n}",
"func... | [
"0.7681622",
"0.74235815",
"0.72549915",
"0.64245224",
"0.64204115",
"0.6269961",
"0.6203132",
"0.6025189",
"0.5897464",
"0.58345693",
"0.5770824",
"0.56995344",
"0.5696491",
"0.5662892",
"0.5658423",
"0.56506205",
"0.5478355",
"0.5402012",
"0.52876925",
"0.5245509",
"0.52265... | 0.883239 | 0 |
NewVvolBindingDeleteParamsWithHTTPClient creates a new VvolBindingDeleteParams object with the ability to set a custom HTTPClient for a request. | func NewVvolBindingDeleteParamsWithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
return &VvolBindingDeleteParams{
HTTPClient: client,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithHTTPClient(client *http.Client) *VvolBindingDeleteParams {\n\to.SetHTTPClient(client)\n\treturn o\n}",
"func NewVvolBindingDeleteParams() *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}",
"func NewVolumeDeleteParamsWi... | [
"0.8671437",
"0.7384527",
"0.7372792",
"0.73189396",
"0.7087894",
"0.7058488",
"0.6999345",
"0.6938914",
"0.69215393",
"0.68205565",
"0.68110675",
"0.66864115",
"0.66708326",
"0.6662493",
"0.6658155",
"0.6491086",
"0.647839",
"0.6460584",
"0.6460478",
"0.6459379",
"0.6436317"... | 0.85762304 | 1 |
WithDefaults hydrates default values in the vvol binding delete params (not the query body). All values with no default are reset to their zero value. | func (o *VvolBindingDeleteParams) WithDefaults() *VvolBindingDeleteParams {
o.SetDefaults()
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetDefaults() {\n\tvar (\n\t\tdeleteAllReferencesDefault = bool(false)\n\t)\n\n\tval := VvolBindingDeleteParams{\n\t\tDeleteAllReferences: &deleteAllReferencesDefault,\n\t}\n\n\tval.timeout = o.timeout\n\tval.Context = o.Context\n\tval.HTTPClient = o.HTTPClient\n\t*o = val\n}",
... | [
"0.8024694",
"0.69307846",
"0.6919275",
"0.68561697",
"0.68067634",
"0.6789882",
"0.6783438",
"0.6654979",
"0.65403056",
"0.64354616",
"0.6425076",
"0.6423718",
"0.63207895",
"0.6310937",
"0.62996227",
"0.6297419",
"0.6264217",
"0.6254231",
"0.624768",
"0.6148051",
"0.6038849... | 0.7161946 | 1 |
SetDefaults hydrates default values in the vvol binding delete params (not the query body). All values with no default are reset to their zero value. | func (o *VvolBindingDeleteParams) SetDefaults() {
var (
deleteAllReferencesDefault = bool(false)
)
val := VvolBindingDeleteParams{
DeleteAllReferences: &deleteAllReferencesDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *DeleteBlueprintRequestUsingDELETE1Params) SetDefaults() {\n\t// no default values defined for this parameter\n}",
"func (o *ComponentDeleteParams) SetDefaults() {\n\t// no default values defined for this parameter\n}",
"func (o *DeleteUsingDELETE1Params) SetDefaults() {\n\t// no default values defined... | [
"0.75364006",
"0.75100535",
"0.7508836",
"0.74438876",
"0.7425384",
"0.729681",
"0.7260536",
"0.72358084",
"0.7212591",
"0.71349096",
"0.71285725",
"0.7104628",
"0.7054597",
"0.7035304",
"0.697078",
"0.6863822",
"0.67509896",
"0.6714793",
"0.67139083",
"0.6703411",
"0.6660703... | 0.84096485 | 0 |
WithTimeout adds the timeout to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithTimeout(timeout time.Duration) *VvolBindingDeleteParams {
o.SetTimeout(timeout)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func NewVvolBindingDeleteParamsWithTimeout(timeout time.Duration) *VvolBindingDeleteParams {\n\treturn &VvolBindingDeleteParams{\n\t\ttimeout: timeout,\n\t}\n}",
"func (o *VolumeDeleteParams) SetTimeout(timeout t... | [
"0.7468831",
"0.67573833",
"0.6754353",
"0.66252846",
"0.6508116",
"0.6367591",
"0.6355736",
"0.63485533",
"0.6238335",
"0.6232378",
"0.62192976",
"0.621058",
"0.6202076",
"0.6191659",
"0.61659044",
"0.616456",
"0.6153679",
"0.60536504",
"0.5998588",
"0.5980925",
"0.597944",
... | 0.751193 | 0 |
SetTimeout adds the timeout to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VolumeDeleteParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func (o *DeleteProtocolUsingDELETEParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func (o *DeleteDebugRequestParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}",
"func (o ... | [
"0.7573724",
"0.7207692",
"0.7046025",
"0.7044389",
"0.70108753",
"0.7000114",
"0.6995935",
"0.6985808",
"0.6983977",
"0.69346863",
"0.6927923",
"0.68983376",
"0.68788433",
"0.6873153",
"0.68369544",
"0.68284047",
"0.6817396",
"0.6802894",
"0.6794395",
"0.67751145",
"0.676817... | 0.81471366 | 0 |
WithContext adds the context to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithContext(ctx context.Context) *VvolBindingDeleteParams {
o.SetContext(ctx)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (_obj *DataService) DeleteApplyWithContext(tarsCtx context.Context, wx_id string, club_id string, affectRows *int32, _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(wx_id, 1)\n\tif err != nil {\n\t\... | [
"0.64454263",
"0.60833406",
"0.58650833",
"0.58637446",
"0.58177453",
"0.5742704",
"0.5684418",
"0.5624618",
"0.5609532",
"0.5564796",
"0.554032",
"0.547962",
"0.54498094",
"0.540922",
"0.53513414",
"0.53345364",
"0.5332606",
"0.5327155",
"0.5310653",
"0.52597976",
"0.5203785... | 0.6696297 | 0 |
SetContext adds the context to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetContext(ctx context.Context) {
o.Context = ctx
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithContext(ctx context.Context) *VvolBindingDeleteParams {\n\to.SetContext(ctx)\n\treturn o\n}",
"func (t *TrudyPipe) DeleteContext(key string) {\n\tt.pipeMutex.Lock()\n\tdelete(t.KV, key)\n\tt.pipeMutex.Unlock()\n}",
"func (o *VolumeDeleteParams) SetContext(ctx context.Conte... | [
"0.66318446",
"0.6619967",
"0.61802596",
"0.6071842",
"0.6011937",
"0.59528744",
"0.57643175",
"0.56513625",
"0.56484604",
"0.56130177",
"0.5583455",
"0.5573217",
"0.5562416",
"0.5535417",
"0.5529479",
"0.5527358",
"0.55204093",
"0.5519037",
"0.55094343",
"0.5493999",
"0.5492... | 0.70238644 | 0 |
WithHTTPClient adds the HTTPClient to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithHTTPClient(client *http.Client) *VvolBindingDeleteParams {
o.SetHTTPClient(client)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *VolumeDeleteParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *VolumeDeleteParams) WithHTTPClient(client *http.Client) *VolumeDeleteParams {\n\to.SetHTTPClient(client... | [
"0.7519185",
"0.6756765",
"0.66501546",
"0.6649163",
"0.66412854",
"0.65906143",
"0.65437907",
"0.6530756",
"0.64375067",
"0.64069736",
"0.64000154",
"0.6371847",
"0.63688064",
"0.6310587",
"0.62990755",
"0.6244727",
"0.62355083",
"0.61710334",
"0.6162737",
"0.6149288",
"0.61... | 0.7508446 | 1 |
SetHTTPClient adds the HTTPClient to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VolumeDeleteParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *DeleteProtocolUsingDELETEParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}",
"func (o *DeleteGerritListenerByIDUsingDELETEParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient... | [
"0.75474316",
"0.74891007",
"0.7454922",
"0.73563224",
"0.7226734",
"0.719675",
"0.71747655",
"0.7127238",
"0.7110341",
"0.7092532",
"0.70717365",
"0.70638525",
"0.70218146",
"0.701651",
"0.70134234",
"0.70107466",
"0.7001641",
"0.6992659",
"0.69905186",
"0.69791144",
"0.6966... | 0.81960213 | 0 |
WithDeleteAllReferences adds the deleteAllReferences to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithDeleteAllReferences(deleteAllReferences *bool) *VvolBindingDeleteParams {
o.SetDeleteAllReferences(deleteAllReferences)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetDeleteAllReferences(deleteAllReferences *bool) {\n\to.DeleteAllReferences = deleteAllReferences\n}",
"func (o *VvolBindingDeleteParams) SetDefaults() {\n\tvar (\n\t\tdeleteAllReferencesDefault = bool(false)\n\t)\n\n\tval := VvolBindingDeleteParams{\n\t\tDeleteAllReferences: &... | [
"0.7380496",
"0.6893267",
"0.6104744",
"0.604309",
"0.58674455",
"0.58534765",
"0.5822575",
"0.5779294",
"0.5631722",
"0.5625062",
"0.5582434",
"0.5573762",
"0.5568083",
"0.5548098",
"0.55454016",
"0.5544827",
"0.5540688",
"0.55064595",
"0.54958194",
"0.5486631",
"0.54630715"... | 0.74422747 | 0 |
SetDeleteAllReferences adds the deleteAllReferences to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetDeleteAllReferences(deleteAllReferences *bool) {
o.DeleteAllReferences = deleteAllReferences
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithDeleteAllReferences(deleteAllReferences *bool) *VvolBindingDeleteParams {\n\to.SetDeleteAllReferences(deleteAllReferences)\n\treturn o\n}",
"func (o *VvolBindingDeleteParams) SetDefaults() {\n\tvar (\n\t\tdeleteAllReferencesDefault = bool(false)\n\t)\n\n\tval := VvolBindingD... | [
"0.70774865",
"0.69914395",
"0.6261222",
"0.61479115",
"0.6081627",
"0.6005739",
"0.5977111",
"0.57168645",
"0.56603426",
"0.56408215",
"0.5606522",
"0.56003577",
"0.5594191",
"0.55833054",
"0.55614084",
"0.5522759",
"0.55059785",
"0.55058986",
"0.5471875",
"0.5471104",
"0.54... | 0.7569814 | 0 |
WithProtocolEndpointUUID adds the protocolEndpointUUID to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingDeleteParams {
o.SetProtocolEndpointUUID(protocolEndpointUUID)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetProtocolEndpointUUID(protocolEndpointUUID string) {\n\to.ProtocolEndpointUUID = protocolEndpointUUID\n}",
"func (a *DeprecatedBusManagementRouterApiService) DeleteBindingUsingDELETE(ctx _context.Context, routingKeyFilter string, fifoName string) ApiDeleteBindingUsingDELETEReq... | [
"0.78896624",
"0.6120699",
"0.5892373",
"0.58651924",
"0.56486714",
"0.5636188",
"0.5624453",
"0.5530282",
"0.55268186",
"0.5493304",
"0.5451638",
"0.5444671",
"0.54328173",
"0.5395458",
"0.53122944",
"0.52827656",
"0.52808744",
"0.5268355",
"0.52518433",
"0.52463406",
"0.524... | 0.79024434 | 0 |
SetProtocolEndpointUUID adds the protocolEndpointUuid to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetProtocolEndpointUUID(protocolEndpointUUID string) {
o.ProtocolEndpointUUID = protocolEndpointUUID
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingDeleteParams {\n\to.SetProtocolEndpointUUID(protocolEndpointUUID)\n\treturn o\n}",
"func (ec *ExtensionClient) DeleteEndpoint(extensionID, serviceID, URL string) error {\n\n\turl := url.QueryEscape(URL)\n\trequest... | [
"0.7659155",
"0.570262",
"0.5665805",
"0.5574231",
"0.5487855",
"0.5458138",
"0.54484373",
"0.53901285",
"0.53780055",
"0.5294667",
"0.525582",
"0.52462846",
"0.5224845",
"0.51934177",
"0.51763844",
"0.5141262",
"0.51157594",
"0.50997233",
"0.50864244",
"0.5083183",
"0.507416... | 0.8175953 | 0 |
WithVvolUUID adds the vvolUUID to the vvol binding delete params | func (o *VvolBindingDeleteParams) WithVvolUUID(vvolUUID string) *VvolBindingDeleteParams {
o.SetVvolUUID(vvolUUID)
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) SetVvolUUID(vvolUUID string) {\n\to.VvolUUID = vvolUUID\n}",
"func (o *VvolBindingDeleteParams) WithProtocolEndpointUUID(protocolEndpointUUID string) *VvolBindingDeleteParams {\n\to.SetProtocolEndpointUUID(protocolEndpointUUID)\n\treturn o\n}",
"func DeleteVol(uuid string) int... | [
"0.6342966",
"0.57557654",
"0.56391346",
"0.5401194",
"0.5321719",
"0.5308691",
"0.52751863",
"0.52710754",
"0.5231506",
"0.5231353",
"0.5230582",
"0.5166526",
"0.5165278",
"0.51168615",
"0.5112844",
"0.50630164",
"0.5059387",
"0.5027256",
"0.50054806",
"0.5002026",
"0.498795... | 0.70726687 | 0 |
SetVvolUUID adds the vvolUuid to the vvol binding delete params | func (o *VvolBindingDeleteParams) SetVvolUUID(vvolUUID string) {
o.VvolUUID = vvolUUID
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *VvolBindingDeleteParams) WithVvolUUID(vvolUUID string) *VvolBindingDeleteParams {\n\to.SetVvolUUID(vvolUUID)\n\treturn o\n}",
"func DeleteVol(uuid string) int32 {\n\n\t_, conn, err := utils.DialVolMgr(VolMgrHosts)\n\tif err != nil {\n\t\tlogger.Error(\"DeleteVol failed,Dial to VolMgrHosts fail :%v\", er... | [
"0.6738907",
"0.5607763",
"0.53754246",
"0.5191161",
"0.5182265",
"0.5169527",
"0.5094504",
"0.5089154",
"0.50468004",
"0.50332665",
"0.5024225",
"0.49893975",
"0.4986372",
"0.49672964",
"0.4869989",
"0.48687732",
"0.48615307",
"0.48320144",
"0.47920194",
"0.47809136",
"0.474... | 0.7143403 | 0 |
WriteToRequest writes these params to a swagger request | func (o *VvolBindingDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.DeleteAllReferences != nil {
// query param delete_all_references
var qrDeleteAllReferences bool
if o.DeleteAllReferenc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *FileInfoCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {\n\n\tif err := r.SetTimeout(o.timeout); err != nil {\n\t\treturn err\n\t}\n\tvar res []error\n\n\tif o.ByteOffset != nil {\n\n\t\t// query param byte_offset\n\t\tvar qrByteOffset int64\n\n\t\tif o.ByteOffset != nil ... | [
"0.71981704",
"0.71441984",
"0.70468456",
"0.70210433",
"0.69960576",
"0.699581",
"0.697964",
"0.6979474",
"0.69690293",
"0.6965975",
"0.69236904",
"0.6907789",
"0.69033754",
"0.687153",
"0.68571347",
"0.6856087",
"0.68518764",
"0.6844234",
"0.6843567",
"0.68418425",
"0.68292... | 0.0 | -1 |
New returns a new MemStore. | func New() *MemStore {
return &MemStore{
privateKeyEntryMap: make(map[string]*uid.KeyEntry),
publicKeyEntryMap: make(map[string]*uid.KeyEntry),
sessionStates: make(map[string]*session.State),
sessions: make(map[string]*memSession),
sessionKeys: make(map[string]*sessionKey),
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func New() *MemStore {\n\treturn NewWithCleanupInterval(time.Minute)\n}",
"func New() *MemStore {\n\ts := new(MemStore)\n\ts.did = make(map[string]common.Role)\n\ts.act = make(map[string]common.Role)\n\ts.tkt = make(map[string]common.Ticket)\n\t// initialize random gen\n\ts.rand = rand.New(rand.NewSource(time.No... | [
"0.8351379",
"0.8183977",
"0.8082516",
"0.76006484",
"0.7484564",
"0.74830467",
"0.7418862",
"0.7375718",
"0.7306339",
"0.72738653",
"0.72706604",
"0.72225034",
"0.72098786",
"0.7162066",
"0.71599466",
"0.71214986",
"0.71214986",
"0.7108652",
"0.7102591",
"0.7079366",
"0.7070... | 0.81686974 | 2 |
SessionKey returns the most recent sessionKey in MemStore. | func (ms *MemStore) SessionKey() string {
return ms.sessionKey
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (a *Account) SessionKey() *big.Int {\n\tif a.sessionKey == nil {\n\t\ta.sessionKey, _ = new(big.Int).SetString(a.SessionKeyStr, 16)\n\t}\n\n\treturn a.sessionKey\n}",
"func (session *Session) GetSessionKey() string {\n\treturn session.id.String()\n}",
"func SessionStoreKey() string {\n\treturn app.Session... | [
"0.66067576",
"0.6544803",
"0.6505307",
"0.64512503",
"0.6407087",
"0.6332514",
"0.62486035",
"0.61219746",
"0.606997",
"0.6033466",
"0.6021937",
"0.6005555",
"0.59739584",
"0.5952178",
"0.59406084",
"0.593616",
"0.5876714",
"0.5831891",
"0.58072",
"0.5770329",
"0.56571907",
... | 0.7522756 | 0 |
AddPrivateKeyEntry adds private KeyEntry to memory store. | func (ms *MemStore) AddPrivateKeyEntry(ke *uid.KeyEntry) {
ms.privateKeyEntryMap[ke.HASH] = ke
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (s *Service) AddPrivateKey(keyID string, privateKey crypto.PrivateKey) error {\n\tif _, ok := s.keys[keyID]; ok {\n\t\ts.log.Error(\"The specified key ID is already in use\", \"keyID\", keyID)\n\t\treturn signingkeys.ErrSigningKeyAlreadyExists.Errorf(\"The specified key ID is already in use: %s\", keyID)\n\t}... | [
"0.70359194",
"0.6639596",
"0.5902523",
"0.5467966",
"0.5320013",
"0.5296554",
"0.5258727",
"0.5252541",
"0.52133185",
"0.51536345",
"0.513239",
"0.5129155",
"0.5101568",
"0.5091105",
"0.5075747",
"0.5056588",
"0.5034122",
"0.50106305",
"0.5004521",
"0.50001854",
"0.49769345"... | 0.8498008 | 0 |
AddPublicKeyEntry adds public KeyEntry from identity to memory store. | func (ms *MemStore) AddPublicKeyEntry(identity string, ke *uid.KeyEntry) {
ms.publicKeyEntryMap[identity] = ke
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (rd *RootDomain) AddNewMemberToPublicKeyMap(publicKey string, memberRef insolar.Reference) error {\n\ttrimmedPublicKey := foundation.TrimPublicKey(publicKey)\n\tshardIndex := foundation.GetShardIndex(trimmedPublicKey, insolar.GenesisAmountPublicKeyShards)\n\tif shardIndex >= len(rd.PublicKeyShards) {\n\t\tret... | [
"0.63024616",
"0.59909403",
"0.569348",
"0.5526946",
"0.5513472",
"0.5460001",
"0.5453411",
"0.5379979",
"0.533164",
"0.53291917",
"0.532534",
"0.5313849",
"0.5195983",
"0.515629",
"0.51547736",
"0.51377964",
"0.50954324",
"0.50908095",
"0.50813365",
"0.50612247",
"0.5059582"... | 0.847996 | 0 |
GetSessionState implemented in memory. | func (ms *MemStore) GetSessionState(sessionStateKey string) (
*session.State,
error,
) {
return ms.sessionStates[sessionStateKey], nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetState(sid string, sessionKey string, rs RedisStore, sessionState interface{}) (interface{}, error) {\n\ttoken, err:= ValidateID(sid, sessionKey)\n\n\tif err != nil {\n\t\treturn \"invalid session\", err\n\t}\n\n\tsessionState, err = rs.Get(token, sessionState)\n\t// fmt.Printf(\"user is: %+v\\n\", sessionS... | [
"0.6782715",
"0.6444168",
"0.62722516",
"0.5943054",
"0.5837123",
"0.5833319",
"0.5795831",
"0.57569706",
"0.57566524",
"0.565932",
"0.563737",
"0.56201184",
"0.5608902",
"0.5605511",
"0.5574754",
"0.5481208",
"0.5473911",
"0.54708517",
"0.54691565",
"0.545781",
"0.5446316",
... | 0.57678425 | 7 |
SetSessionState implemented in memory. | func (ms *MemStore) SetSessionState(
sessionStateKey string,
sessionState *session.State,
) error {
ms.sessionStates[sessionStateKey] = sessionState
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (mc *mgmtClient) SetSessionState(ctx context.Context, sessionID string, state []byte) error {\n\tuuid, err := uuid.New()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tamqpMsg := &amqp.Message{\n\t\tValue: map[string]interface{}{\n\t\t\t\"session-id\": sessionID,\n\t\t\t\"session-state\": state,\n\t\t},\n\... | [
"0.75131947",
"0.6425117",
"0.6318091",
"0.6184344",
"0.6074247",
"0.6017674",
"0.59498626",
"0.58186895",
"0.5739513",
"0.57371587",
"0.5629504",
"0.56084186",
"0.5596258",
"0.5556739",
"0.55478746",
"0.5545527",
"0.5541016",
"0.5524564",
"0.55016655",
"0.5493186",
"0.546998... | 0.7806558 | 0 |
StoreSession implemented in memory. | func (ms *MemStore) StoreSession(
sessionKey, rootKeyHash, chainKey string,
send, recv []string,
) error {
if len(send) != len(recv) {
return log.Error("memstore: len(send) != len(recv)")
}
log.Debugf("memstore.StoreSession(): %s", sessionKey)
s, ok := ms.sessions[sessionKey]
if !ok {
ms.sessions[sessionKey]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func Store() gorillaSessions.Store {\n\n}",
"func (session *Session) Store() error {\n\treturn session.cache.Store(session.id, session)\n}",
"func (s *inMemorySessionStore) Save(session USSDSession) {\n\ts.lock.Lock()\n\tdefer s.lock.Unlock()\n\ts.deleteOldestIfFull()\n\tif s.store[session.ID] == nil {\n\t\ts.... | [
"0.7168202",
"0.7162182",
"0.7039447",
"0.6854262",
"0.68216854",
"0.6818332",
"0.6646486",
"0.66210485",
"0.6595175",
"0.6536938",
"0.6471403",
"0.6465982",
"0.6429156",
"0.64185417",
"0.6374666",
"0.6370199",
"0.63664067",
"0.63397634",
"0.6339028",
"0.6318748",
"0.6291724"... | 0.7362877 | 0 |
HasSession implemented in memory. | func (ms *MemStore) HasSession(sessionKey string) bool {
_, ok := ms.sessions[sessionKey]
return ok
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (pder *MemSessionProvider) HasSession(sid string) (bool, error) {\r\n\tpder.lock.RLock()\r\n\tdefer pder.lock.RUnlock()\r\n\r\n\t_, ok := pder.sessions[sid]\r\n\treturn ok, nil\r\n}",
"func (f *Features) canSession(ctx context.Context, adminDB *mongo.Database) {\n\tcmd := bson.D{\n\t\t{\n\t\t\tKey: \"repl... | [
"0.73276985",
"0.6829984",
"0.663619",
"0.66340333",
"0.6624183",
"0.66232616",
"0.66033375",
"0.65276873",
"0.6525407",
"0.6486037",
"0.6478318",
"0.6466748",
"0.64379466",
"0.6426397",
"0.63889796",
"0.6324362",
"0.63059235",
"0.6290662",
"0.623621",
"0.6206161",
"0.6145826... | 0.7448208 | 0 |
GetPrivateKeyEntry implemented in memory. | func (ms *MemStore) GetPrivateKeyEntry(pubKeyHash string) (*uid.KeyEntry, error) {
ke, ok := ms.privateKeyEntryMap[pubKeyHash]
if !ok {
return nil, log.Error(session.ErrNoKeyEntry)
}
return ke, nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (a *Account) GetPrivateKey() crypto.PrivateKey { return a.key }",
"func (a *Account) GetPrivateKey() crypto.PrivateKey {\n\treturn a.key\n}",
"func (w *Whisper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error) {\n\tw.keyMu.RLock()\n\tdefer w.keyMu.RUnlock()\n\tkey := w.privateKeys[id]\n\tif key == nil ... | [
"0.7356036",
"0.66376597",
"0.65908307",
"0.651616",
"0.6494148",
"0.647002",
"0.6434694",
"0.6398078",
"0.6364217",
"0.63412416",
"0.6313559",
"0.62824595",
"0.62165207",
"0.6210221",
"0.6189422",
"0.6186901",
"0.61555266",
"0.6147926",
"0.6114492",
"0.6103414",
"0.60985696"... | 0.71336013 | 1 |
GetPublicKeyEntry implemented in memory. | func (ms *MemStore) GetPublicKeyEntry(uidMsg *uid.Message) (*uid.KeyEntry, string, error) {
ke, ok := ms.publicKeyEntryMap[uidMsg.Identity()]
if !ok {
return nil, "", log.Error(session.ErrNoKeyEntry)
}
return ke, "undefined", nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (pk PrivateKey) GetPublicKey() PublicKey {\n\treturn NewPublicKey(pk[32:])\n}",
"func (store *keyStore) GetPublicKey(address string) (*openpgp.Entity, error) {\n\tel := store.lookupPublicKey(address)\n\tif len(el) > 0 {\n\t\treturn el[0], nil\n\t}\n\treturn nil, nil\n}",
"func (pk *PrivateKey) GetPublicKe... | [
"0.6892429",
"0.68824655",
"0.6855572",
"0.68315506",
"0.67732835",
"0.6762745",
"0.673968",
"0.67140543",
"0.667578",
"0.66340315",
"0.66220355",
"0.6611298",
"0.6580103",
"0.6537619",
"0.6503447",
"0.6442019",
"0.6441319",
"0.6419658",
"0.6399346",
"0.63818866",
"0.63710785... | 0.7593955 | 0 |
NumMessageKeys implemented in memory. | func (ms *MemStore) NumMessageKeys(sessionKey string) (uint64, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return 0, log.Errorf("memstore: no session found for %s", sessionKey)
}
return uint64(len(s.send)), nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (m *Message) NKeys() int { return 12 }",
"func (m *SubMessage) NKeys() int { return 4 }",
"func (p BnetAuthCheckPacket) NumKeys() int {\n\tpb := PacketBuffer(p)\n\treturn pb.Uint32(16)\n}",
"func (m *WatcherMetrics) NKeys() int { return 4 }",
"func (m *Metric) NKeys() int { return 5 }",
"func (d *Da... | [
"0.81549484",
"0.78064597",
"0.75367594",
"0.7298265",
"0.7173821",
"0.7139803",
"0.7030167",
"0.6948036",
"0.6934252",
"0.69107145",
"0.6790297",
"0.6749787",
"0.6585243",
"0.65516406",
"0.6520214",
"0.6461423",
"0.64228487",
"0.64208007",
"0.63739985",
"0.63620496",
"0.6316... | 0.80916345 | 1 |
GetMessageKey implemented in memory. | func (ms *MemStore) GetMessageKey(
sessionKey string,
sender bool,
msgIndex uint64,
) (*[64]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
if msgIndex >= uint64(len(s.send)) {
return nil, log.Error("memstore: message index ou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (m Message) Key() []byte {\n\tstart, end, size := m.keyOffsets()\n\tif size == -1 {\n\t\treturn nil\n\t}\n\treturn m[start+4 : end]\n}",
"func MessageKey(authKey Key, plaintextPadded []byte, mode Side) bin.Int128 {\n\t// `msg_key_large = SHA256 (substr (auth_key, 88+x, 32) + plaintext + random_padding);`\n\... | [
"0.73595506",
"0.6789251",
"0.6704122",
"0.66150147",
"0.6544578",
"0.6529682",
"0.64331543",
"0.641901",
"0.6389284",
"0.6387634",
"0.63848305",
"0.63806224",
"0.63209355",
"0.62894017",
"0.62710315",
"0.62678534",
"0.6229667",
"0.62214786",
"0.6218583",
"0.61587995",
"0.615... | 0.7453689 | 0 |
GetRootKeyHash implemented in memory. | func (ms *MemStore) GetRootKeyHash(sessionKey string) (*[64]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
// decode root key hash
var hash [64]byte
k, err := base64.Decode(s.rootKeyHash)
if err != nil {
return nil, log.Error... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (eln *EmptyLeafNode) GetKey() []byte {\n\treturn nil\n}",
"func GetRootHash(msg []byte) []byte {\n\tx := sha1.Sum(msg)\n\treturn x[:]\n}",
"func (ws *workingSet) RootHash() hash.Hash32B {\n\treturn ws.accountTrie.RootHash()\n}",
"func (d *dataUsageCache) rootHash() dataUsageHash {\n\treturn hashPath(d.I... | [
"0.6185094",
"0.6163292",
"0.6006869",
"0.59640056",
"0.5943054",
"0.5922559",
"0.5867593",
"0.58194095",
"0.5785975",
"0.57525444",
"0.5704679",
"0.5667827",
"0.5604741",
"0.5592587",
"0.558746",
"0.55859965",
"0.55706024",
"0.5570442",
"0.5508317",
"0.5495532",
"0.5494974",... | 0.63743734 | 0 |
GetChainKey implemented in memory. | func (ms *MemStore) GetChainKey(sessionKey string) (*[32]byte, error) {
s, ok := ms.sessions[sessionKey]
if !ok {
return nil, log.Errorf("memstore: no session found for %s", sessionKey)
}
// decode chain key
var key [32]byte
k, err := base64.Decode(s.chainKey)
if err != nil {
return nil, log.Error("memstore:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetChainKey(chainID string) []byte {\n\treturn append(KeyPrefix(ChainKey), []byte(chainID)...)\n}",
"func (hs *HandshakeState) GetChainingKey() []byte {\n\treturn hs.ss.chainingKey[:]\n}",
"func (k *Keychain) Key() (string, error) {\n\tkey, err := k.BinKey()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n... | [
"0.7708475",
"0.6766239",
"0.6656993",
"0.6499389",
"0.6392745",
"0.62943345",
"0.62314993",
"0.6175444",
"0.6171842",
"0.614765",
"0.6102029",
"0.6063963",
"0.6012486",
"0.59941924",
"0.5986066",
"0.5903795",
"0.589596",
"0.5884794",
"0.58799124",
"0.5879614",
"0.58652234",
... | 0.75926346 | 1 |
DelMessageKey implemented in memory. | func (ms *MemStore) DelMessageKey(
sessionKey string,
sender bool,
msgIndex uint64,
) error {
s, ok := ms.sessions[sessionKey]
if !ok {
return log.Errorf("memstore: no session found for %s", sessionKey)
}
if msgIndex >= uint64(len(s.send)) {
return log.Error("memstore: message index out of bounds")
}
// de... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (k Keeper) RemoveMessage(ctx sdk.Context, id uint64) {\n\tstore := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.MessageKey))\n\tstore.Delete(GetMessageIDBytes(id))\n}",
"func (c Context) Del(key string) {\n\tdelete(c.data, key)\n}",
"func (u *UdMap) Del(key string) { delete(u.Data, key) ... | [
"0.6409165",
"0.62833005",
"0.62153774",
"0.6165137",
"0.6157906",
"0.61292326",
"0.60809404",
"0.60754925",
"0.60167915",
"0.5963728",
"0.5958929",
"0.5957783",
"0.5909399",
"0.59034777",
"0.58986545",
"0.5890563",
"0.5835201",
"0.58141613",
"0.5803102",
"0.57944787",
"0.578... | 0.805607 | 0 |
AddSessionKey implemented in memory. | func (ms *MemStore) AddSessionKey(
hash, json, privKey string,
cleanupTime uint64,
) error {
ms.sessionKeys[hash] = &sessionKey{
json: json,
privKey: privKey,
cleanupTime: cleanupTime,
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (s *Session) Add(key string, value interface{}) error {\n\tbts, err := json.Marshal(value)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts.values[key] = string(bts)\n\n\treturn nil\n}",
"func addSession(user *User) error {\n\trandBytes, err := scrypt.GenerateRandomBytes(32)\n\tif err != nil {\n\t\treturn err... | [
"0.6423503",
"0.6323099",
"0.62819356",
"0.6256926",
"0.61663294",
"0.616442",
"0.6119882",
"0.6119334",
"0.6081158",
"0.6046519",
"0.5989558",
"0.5984429",
"0.5983712",
"0.59713036",
"0.59532416",
"0.59405285",
"0.5913878",
"0.59074885",
"0.5815175",
"0.5807486",
"0.580188",... | 0.8089887 | 0 |
GetSessionKey implemented in memory. | func (ms *MemStore) GetSessionKey(hash string) (
json, privKey string,
err error,
) {
sk, ok := ms.sessionKeys[hash]
if !ok {
return "", "", log.Error(session.ErrNoKeyEntry)
}
return sk.json, sk.privKey, nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (session *Session) GetSessionKey() string {\n\treturn session.id.String()\n}",
"func (s *session) getKey() string {\n\treturn s.uuid\n}",
"func (m *RegistryKeyState) GetKey()(*string) {\n return m.key\n}",
"func (p *Provider) GetKey() interface{} {\n\treturn p.key\n}",
"func (ms *MemStore) SessionK... | [
"0.70029384",
"0.6841103",
"0.6389375",
"0.63144046",
"0.6304477",
"0.62602717",
"0.6162837",
"0.61327755",
"0.61287624",
"0.6114548",
"0.60990095",
"0.6028275",
"0.598803",
"0.5966878",
"0.59385234",
"0.5934305",
"0.5903026",
"0.58605933",
"0.58512104",
"0.5850547",
"0.58319... | 0.63485473 | 3 |
DelPrivSessionKey implemented in memory. | func (ms *MemStore) DelPrivSessionKey(hash string) error {
sk, ok := ms.sessionKeys[hash]
if !ok {
return nil
}
sk.privKey = ""
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (privKey *YubiHsmPrivateKey) UnloadYubiHsmPrivKey() {\n\tif privKey.sessionMgr == nil {\n\t\treturn\n\t}\n\tprivKey.sessionMgr.Destroy()\n}",
"func (sess Session) Del(key string) {\n\tdelete(sess, key)\n}",
"func (m *MemoryStorer) Del(key string) error {\n\tm.mut.Lock()\n\tdelete(m.sessions, key)\n\tm.mut... | [
"0.6715381",
"0.6082555",
"0.5926367",
"0.5817727",
"0.5523478",
"0.551132",
"0.54544395",
"0.53445286",
"0.530673",
"0.52464896",
"0.5220689",
"0.52179104",
"0.5181789",
"0.51731354",
"0.5166579",
"0.51601577",
"0.51547384",
"0.51293325",
"0.51090336",
"0.51075536",
"0.51048... | 0.81617534 | 0 |
CleanupSessionKeys implemented in memory. | func (ms *MemStore) CleanupSessionKeys(t uint64) error {
var oldKeys []string
for hash, sk := range ms.sessionKeys {
if sk.cleanupTime < t {
oldKeys = append(oldKeys, hash)
}
}
for _, hash := range oldKeys {
delete(ms.sessionKeys, hash)
}
return nil
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func SessionCleanup() {\n\tfor {\n\t\tselect {\n\t\tcase <-time.After(SessionManager.SessionCleanupTime * time.Minute):\n\t\t\tSessionManager.ReqSessionMem <- 1 // ask to access the shared mem, blocks until granted\n\t\t\t<-SessionManager.ReqSessionMemAck // make sure we got it\n\t\t\tss := make(map[string]*Sess... | [
"0.7089904",
"0.61599636",
"0.58887005",
"0.5850469",
"0.57533306",
"0.56555283",
"0.5642214",
"0.56363297",
"0.5590619",
"0.55601865",
"0.55595326",
"0.5538021",
"0.551168",
"0.5497634",
"0.5470665",
"0.544381",
"0.54413",
"0.5432986",
"0.54288346",
"0.53801996",
"0.53740805... | 0.7981413 | 0 |
NewDatapoint creates a new Datapoint, inserts it to the database and returns it | func NewDatapoint(datasetID int64, imageURL string) (dp *Datapoint, err error) {
var id int64
err = DB.QueryRow("INSERT INTO datapoint (dataset_id, image_url) VALUES ($1, $2) RETURNING id", datasetID, imageURL).Scan(&id)
if err != nil {
return // something went wrong! lets get out of here!
}
//blank space for... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (db *PostgresDatapointRepo) CreateDatapoint(dp earthworks.Datapoint) (earthworks.Datapoint, error) {\n\tquery := `INSERT INTO datapoint (location) VALUES ($1) RETURNING id`\n\tcreated := earthworks.Datapoint{}\n\terr := db.Get(&created, query, wkt.MarshalString(dp.Location))\n\tif err != nil {\n\t\treturn ear... | [
"0.8000808",
"0.6696262",
"0.63995373",
"0.6313884",
"0.59810144",
"0.58154607",
"0.5605545",
"0.5546164",
"0.5510137",
"0.54992396",
"0.54607934",
"0.54099196",
"0.53961456",
"0.53786576",
"0.5377734",
"0.5367833",
"0.5366217",
"0.5314214",
"0.52989596",
"0.5285048",
"0.5267... | 0.7536382 | 1 |
GetDatapointByID fetches a datapoint from the database and returns it | func GetDatapointByID(id int64) (dp *Datapoint, err error) {
var datasetID int64
var imageURL string
err = DB.QueryRow("SELECT id, dataset_id, image_url FROM datapoint WHERE id=$1", id).Scan(&id, &datasetID, &imageURL)
if err != nil {
return // something went wrong! lets get out of here!
}
dp = &Datapoint{
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetDataByID(c *gin.Context) {\r\n\tid := c.Params.ByName(\"id\")\r\n\tvar predict Models.Predict\r\n\terr := Models.GetDataByID(&predict, id)\r\n\tif err != nil {\r\n\t\tc.AbortWithStatus(http.StatusNotFound)\r\n\t} else {\r\n\t\tc.JSON(http.StatusOK, predict)\r\n\t}\r\n}",
"func (c *MainController) getData... | [
"0.6412124",
"0.6151225",
"0.61227614",
"0.5906473",
"0.5903145",
"0.5848986",
"0.58184546",
"0.57869554",
"0.5733625",
"0.5729925",
"0.5715823",
"0.56466913",
"0.5554012",
"0.55272156",
"0.540155",
"0.53998554",
"0.5389559",
"0.53856915",
"0.5385416",
"0.53666097",
"0.536644... | 0.81728685 | 0 |
NewDeleteCoreV1NamespacedPodOK creates DeleteCoreV1NamespacedPodOK with default headers values | func NewDeleteCoreV1NamespacedPodOK() *DeleteCoreV1NamespacedPodOK {
return &DeleteCoreV1NamespacedPodOK{}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewDeleteCoreV1NamespacedServiceOK() *DeleteCoreV1NamespacedServiceOK {\n\treturn &DeleteCoreV1NamespacedServiceOK{}\n}",
"func NewCreateCoreV1NamespacedPodOK() *CreateCoreV1NamespacedPodOK {\n\treturn &CreateCoreV1NamespacedPodOK{}\n}",
"func NewDeleteCoreV1NamespacedPodUnauthorized() *DeleteCoreV1Namesp... | [
"0.68976986",
"0.68763286",
"0.6668603",
"0.66465414",
"0.6645578",
"0.6539118",
"0.62248933",
"0.61037683",
"0.6061472",
"0.5951946",
"0.5913124",
"0.5850097",
"0.5843914",
"0.5727536",
"0.5688485",
"0.5683131",
"0.5660715",
"0.5644126",
"0.55773365",
"0.5564169",
"0.5547353... | 0.7737533 | 0 |
WithPayload adds the payload to the delete core v1 namespaced pod o k response | func (o *DeleteCoreV1NamespacedPodOK) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodOK {
o.Payload = payload
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *DeleteCoreV1NamespacedPodOK) SetPayload(payload *models.IoK8sAPICoreV1Pod) {\n\to.Payload = payload\n}",
"func (o *DeleteCoreV1NamespacedPodAccepted) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodAccepted {\n\to.Payload = payload\n\treturn o\n}",
"func (o *DeleteCoreV1Namesp... | [
"0.6468498",
"0.64082247",
"0.63500136",
"0.61151206",
"0.59689397",
"0.5954123",
"0.58461696",
"0.58247715",
"0.5803609",
"0.5773006",
"0.5763528",
"0.5742729",
"0.5729572",
"0.57046115",
"0.5686261",
"0.5660893",
"0.55726016",
"0.55641377",
"0.5547944",
"0.5534036",
"0.5494... | 0.7650072 | 0 |
SetPayload sets the payload to the delete core v1 namespaced pod o k response | func (o *DeleteCoreV1NamespacedPodOK) SetPayload(payload *models.IoK8sAPICoreV1Pod) {
o.Payload = payload
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *DeleteCoreV1NamespacedPodAccepted) SetPayload(payload *models.IoK8sAPICoreV1Pod) {\n\to.Payload = payload\n}",
"func (o *DeleteCoreV1NamespacedConfigMapOK) SetPayload(payload *models.IoK8sApimachineryPkgApisMetaV1Status) {\n\to.Payload = payload\n}",
"func (o *DeleteOrganizationOK) SetPayload(payload ... | [
"0.73235345",
"0.72438246",
"0.7051416",
"0.6964047",
"0.67757857",
"0.67754436",
"0.6732913",
"0.6657868",
"0.6622713",
"0.66210383",
"0.6610833",
"0.66014844",
"0.65748113",
"0.6540989",
"0.6538674",
"0.651376",
"0.64942646",
"0.6494105",
"0.64776886",
"0.64722115",
"0.6457... | 0.78772104 | 0 |
WriteResponse to the client | func (o *DeleteCoreV1NamespacedPodOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(200)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (r *Response) Write(w io.Writer) error",
"func (c *Operation) writeResponse(rw http.ResponseWriter, status int, data []byte) { // nolint: unparam\n\trw.WriteHeader(status)\n\n\tif _, err := rw.Write(data); err != nil {\n\t\tlogger.Errorf(\"Unable to send error message, %s\", err)\n\t}\n}",
"func WriteResp... | [
"0.81303823",
"0.7882039",
"0.77722245",
"0.7771901",
"0.7753117",
"0.7740585",
"0.76670325",
"0.7638451",
"0.76095873",
"0.75798",
"0.7579178",
"0.7567389",
"0.7560546",
"0.75579476",
"0.75447774",
"0.7542929",
"0.75416607",
"0.753386",
"0.7531158",
"0.75192654",
"0.75191355... | 0.0 | -1 |
NewDeleteCoreV1NamespacedPodAccepted creates DeleteCoreV1NamespacedPodAccepted with default headers values | func NewDeleteCoreV1NamespacedPodAccepted() *DeleteCoreV1NamespacedPodAccepted {
return &DeleteCoreV1NamespacedPodAccepted{}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewCreateCoreV1NamespacedPodAccepted() *CreateCoreV1NamespacedPodAccepted {\n\treturn &CreateCoreV1NamespacedPodAccepted{}\n}",
"func NewDeleteCoreV1NamespacedEventAccepted() *DeleteCoreV1NamespacedEventAccepted {\n\treturn &DeleteCoreV1NamespacedEventAccepted{}\n}",
"func NewDeleteCoreV1NamespacedService... | [
"0.7400152",
"0.71234435",
"0.7122447",
"0.70157105",
"0.6747055",
"0.6736624",
"0.62136",
"0.61368066",
"0.6057876",
"0.59432584",
"0.58190614",
"0.57760686",
"0.5772118",
"0.5759336",
"0.5682018",
"0.5618317",
"0.55684346",
"0.5558717",
"0.5553073",
"0.54162437",
"0.5408024... | 0.7965179 | 0 |
WithPayload adds the payload to the delete core v1 namespaced pod accepted response | func (o *DeleteCoreV1NamespacedPodAccepted) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodAccepted {
o.Payload = payload
return o
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *DeleteCoreV1NamespacedPodOK) WithPayload(payload *models.IoK8sAPICoreV1Pod) *DeleteCoreV1NamespacedPodOK {\n\to.Payload = payload\n\treturn o\n}",
"func (o *DeleteCoreV1NamespacedPodAccepted) SetPayload(payload *models.IoK8sAPICoreV1Pod) {\n\to.Payload = payload\n}",
"func (o *DeleteCoreV1NamespacedCo... | [
"0.71526045",
"0.6462131",
"0.6293177",
"0.6276558",
"0.61928785",
"0.61641407",
"0.6049591",
"0.5963603",
"0.58372116",
"0.5814466",
"0.5764856",
"0.5737774",
"0.56375915",
"0.5615515",
"0.5608715",
"0.55636376",
"0.55465573",
"0.55429196",
"0.5533813",
"0.5521526",
"0.55142... | 0.7290295 | 0 |
SetPayload sets the payload to the delete core v1 namespaced pod accepted response | func (o *DeleteCoreV1NamespacedPodAccepted) SetPayload(payload *models.IoK8sAPICoreV1Pod) {
o.Payload = payload
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (o *DeleteCoreV1NamespacedPodOK) SetPayload(payload *models.IoK8sAPICoreV1Pod) {\n\to.Payload = payload\n}",
"func (o *DeleteCoreV1NamespacedConfigMapOK) SetPayload(payload *models.IoK8sApimachineryPkgApisMetaV1Status) {\n\to.Payload = payload\n}",
"func (o *DeleteCoreV1NamespacedConfigMapAccepted) SetPay... | [
"0.7707723",
"0.7229816",
"0.7217126",
"0.71624154",
"0.70172673",
"0.69015056",
"0.6838018",
"0.67712045",
"0.67628366",
"0.67597437",
"0.6754284",
"0.6739403",
"0.6705884",
"0.6703655",
"0.6668181",
"0.66570735",
"0.6654698",
"0.66288686",
"0.6608131",
"0.65916646",
"0.6590... | 0.77040833 | 1 |
WriteResponse to the client | func (o *DeleteCoreV1NamespacedPodAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(202)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (r *Response) Write(w io.Writer) error",
"func (c *Operation) writeResponse(rw http.ResponseWriter, status int, data []byte) { // nolint: unparam\n\trw.WriteHeader(status)\n\n\tif _, err := rw.Write(data); err != nil {\n\t\tlogger.Errorf(\"Unable to send error message, %s\", err)\n\t}\n}",
"func WriteResp... | [
"0.81303823",
"0.7882039",
"0.77722245",
"0.7771901",
"0.7753117",
"0.7740585",
"0.76670325",
"0.7638451",
"0.76095873",
"0.75798",
"0.7579178",
"0.7567389",
"0.7560546",
"0.75579476",
"0.75447774",
"0.7542929",
"0.75416607",
"0.753386",
"0.7531158",
"0.75192654",
"0.75191355... | 0.0 | -1 |
NewDeleteCoreV1NamespacedPodUnauthorized creates DeleteCoreV1NamespacedPodUnauthorized with default headers values | func NewDeleteCoreV1NamespacedPodUnauthorized() *DeleteCoreV1NamespacedPodUnauthorized {
return &DeleteCoreV1NamespacedPodUnauthorized{}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewCreateCoreV1NamespacedPodUnauthorized() *CreateCoreV1NamespacedPodUnauthorized {\n\treturn &CreateCoreV1NamespacedPodUnauthorized{}\n}",
"func NewDeleteCoreV1NamespacedServiceUnauthorized() *DeleteCoreV1NamespacedServiceUnauthorized {\n\treturn &DeleteCoreV1NamespacedServiceUnauthorized{}\n}",
"func Ne... | [
"0.740951",
"0.6979649",
"0.6803902",
"0.67638403",
"0.674884",
"0.6690887",
"0.6411087",
"0.6345015",
"0.62293595",
"0.6227683",
"0.6223361",
"0.6140357",
"0.60931987",
"0.59411067",
"0.59172565",
"0.58970165",
"0.58314055",
"0.5726889",
"0.57166153",
"0.5705346",
"0.5610533... | 0.7787556 | 0 |
WriteResponse to the client | func (o *DeleteCoreV1NamespacedPodUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (r *Response) Write(w io.Writer) error",
"func (c *Operation) writeResponse(rw http.ResponseWriter, status int, data []byte) { // nolint: unparam\n\trw.WriteHeader(status)\n\n\tif _, err := rw.Write(data); err != nil {\n\t\tlogger.Errorf(\"Unable to send error message, %s\", err)\n\t}\n}",
"func WriteResp... | [
"0.81303823",
"0.7882039",
"0.77722245",
"0.7771901",
"0.7753117",
"0.7740585",
"0.76670325",
"0.7638451",
"0.76095873",
"0.75798",
"0.7579178",
"0.7567389",
"0.7560546",
"0.75579476",
"0.75447774",
"0.7542929",
"0.75416607",
"0.753386",
"0.7531158",
"0.75192654",
"0.75191355... | 0.0 | -1 |
NewDriver returns a new instance of pilosa.Driver which satisfies sql.IndexDriver interface | func NewDriver(root string) *Driver {
return &Driver{
root: root,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewIndexDriver(root string) sql.IndexDriver {\n\treturn NewDriver(root, pilosa.DefaultClient())\n}",
"func NewDriver() godfish.Driver { return &driver{} }",
"func newDriver() *driver {\n\treturn &driver{\n\t\tnetworks: map[string]*bridgeNetwork{},\n\t\tportAllocator: portallocator.Get(),\n\t}\n}",
... | [
"0.72023934",
"0.627724",
"0.6087702",
"0.6054594",
"0.6042574",
"0.5936483",
"0.5933362",
"0.58980846",
"0.5811265",
"0.5788316",
"0.5722886",
"0.57088774",
"0.5673194",
"0.5624739",
"0.5623983",
"0.5612024",
"0.5610115",
"0.56064487",
"0.5585477",
"0.5568059",
"0.5529486",
... | 0.5648367 | 13 |
ID returns the unique name of the driver. | func (*Driver) ID() string {
return DriverID
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (d *driver) Name() string {\n\treturn driverName\n}",
"func (d *driver) Name() string {\n\treturn driverName\n}",
"func (d *driver) Name() string {\n\treturn driverName\n}",
"func (d *hdbDriver) Name() string { return DriverName }",
"func ID() (string, error) {\n\tid, err := hardwareId()\n\tif err !=... | [
"0.7027706",
"0.7010078",
"0.7010078",
"0.69331926",
"0.67615914",
"0.6571657",
"0.65653706",
"0.65030783",
"0.6484946",
"0.6479828",
"0.62847674",
"0.62813586",
"0.62324375",
"0.6207377",
"0.6207377",
"0.61767435",
"0.60884994",
"0.60639834",
"0.6063588",
"0.60591555",
"0.60... | 0.83944076 | 1 |
Create a new index. | func (d *Driver) Create(
db, table, id string,
expressions []sql.Expression,
config map[string]string,
) (sql.Index, error) {
_, err := mkdir(d.root, db, table, id)
if err != nil {
return nil, err
}
if config == nil {
config = make(map[string]string)
}
exprs := make([]string, len(expressions))
for i, e ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func CreateIndex(context *web.AppContext) *web.AppError {\n\n\tdb := context.MDB\n\tvar input model.Index\n\tjson.NewDecoder(context.Body).Decode(&input)\n\n\terr := db.Session.DB(\"\").C(input.Target).EnsureIndex(input.Index)\n\tif err != nil {\n\t\tmessage := fmt.Sprintf(\"Error creating index [%+v]\", input)\n\... | [
"0.7451471",
"0.73931766",
"0.7387334",
"0.73535496",
"0.7331499",
"0.72258705",
"0.71987957",
"0.71313417",
"0.71217936",
"0.7087117",
"0.7081512",
"0.70770717",
"0.70503527",
"0.7039608",
"0.7037315",
"0.69063324",
"0.6902682",
"0.68916285",
"0.68763065",
"0.6869368",
"0.68... | 0.6787004 | 26 |
LoadAll loads all indexes for given db and table | func (d *Driver) LoadAll(db, table string) ([]sql.Index, error) {
var (
indexes []sql.Index
errors []string
root = filepath.Join(d.root, db, table)
)
dirs, err := ioutil.ReadDir(root)
if err != nil {
if os.IsNotExist(err) {
return indexes, nil
}
return nil, err
}
for _, info := range dirs {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (d *Driver) LoadAll(db, table string) ([]sql.Index, error) {\n\tvar (\n\t\tindexes []sql.Index\n\t\terrors []string\n\t\troot = filepath.Join(d.root, db, table)\n\t)\n\n\tdirs, err := ioutil.ReadDir(root)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn indexes, nil\n\t\t}\n\t\treturn nil, er... | [
"0.78944623",
"0.68740505",
"0.6471731",
"0.603011",
"0.59038955",
"0.5777211",
"0.57490975",
"0.57390857",
"0.56201786",
"0.5588074",
"0.54888165",
"0.5481768",
"0.5458776",
"0.544559",
"0.54259926",
"0.5420168",
"0.53962743",
"0.5382967",
"0.533865",
"0.5331422",
"0.5327325... | 0.790122 | 0 |
Save the given index (mapping and bitmap) | func (d *Driver) Save(
ctx *sql.Context,
i sql.Index,
iter sql.PartitionIndexKeyValueIter,
) (err error) {
start := time.Now()
idx, ok := i.(*pilosaIndex)
if !ok {
return errInvalidIndexType.New(i)
}
if err := idx.index.Open(); err != nil {
return err
}
defer idx.index.Close()
idx.wg.Add(1)
defer idx... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func writeBitmap(file *os.File, index int64, bitMap []byte) {\n\tfile.Seek(index, 0)\n\t//Empezamos el proceso de guardar en binario la data en memoria del struct\n\tvar binaryDisc bytes.Buffer\n\tbinary.Write(&binaryDisc, binary.BigEndian, &bitMap)\n\twriteNextBytes(file, binaryDisc.Bytes())\n}",
"func (p *Buff... | [
"0.71930915",
"0.69759154",
"0.6161804",
"0.60840106",
"0.6021097",
"0.5984564",
"0.59675753",
"0.5964417",
"0.5816666",
"0.57352865",
"0.57342404",
"0.5704661",
"0.5688048",
"0.56743187",
"0.5582231",
"0.55643815",
"0.5542597",
"0.54274356",
"0.53837913",
"0.5376069",
"0.536... | 0.56505734 | 14 |
Delete the given index for all partitions in the iterator. | func (d *Driver) Delete(i sql.Index, partitions sql.PartitionIter) error {
idx, ok := i.(*pilosaIndex)
if !ok {
return errInvalidIndexType.New(i)
}
if idx.cancel != nil {
idx.cancel()
idx.wg.Wait()
}
if err := idx.index.Open(); err != nil {
return err
}
defer idx.index.Close()
if err := os.RemoveAll(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func deleteAllInt(index int, testMode bool) error {\n\tallPaths, errPaths := getPaths()\n\tif errPaths != nil {\n\t\tcolor.Red(\":: Error while reading .tempestcf\")\n\t\treturn errPaths\n\t}\n\tif index >= 0 && index < len(allPaths) {\n\t\tfor indx, indPath := range allPaths {\n\t\t\tif index == indx {\n\t\t\t\t/... | [
"0.5937287",
"0.5925396",
"0.58589005",
"0.5849641",
"0.5842001",
"0.58279634",
"0.5782409",
"0.573398",
"0.5665251",
"0.5616104",
"0.55277663",
"0.5515673",
"0.54987186",
"0.544783",
"0.5431024",
"0.5401115",
"0.53936225",
"0.53904444",
"0.538792",
"0.5361978",
"0.5354139",
... | 0.6939409 | 0 |
mkdir makes an empty index directory (if doesn't exist) and returns a path. | func mkdir(elem ...string) (string, error) {
path := filepath.Join(elem...)
return path, os.MkdirAll(path, 0750)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (f *Fs) _mkdir(ctx context.Context, dirPath string) error {\n\t// We assume the root is already created\n\tif dirPath == \"\" {\n\t\treturn nil\n\t}\n\t// Collections must end with /\n\tif !strings.HasSuffix(dirPath, \"/\") {\n\t\tdirPath += \"/\"\n\t}\n\topts := rest.Opts{\n\t\tMethod: \"MKCOL\",\n\t\tPa... | [
"0.6038284",
"0.59488344",
"0.5914573",
"0.58726186",
"0.5827066",
"0.58112764",
"0.5776086",
"0.577299",
"0.5670937",
"0.5577498",
"0.55641913",
"0.5538944",
"0.5530562",
"0.5509765",
"0.5497098",
"0.5447239",
"0.54208314",
"0.5413843",
"0.5393368",
"0.53671104",
"0.53648835... | 0.5145812 | 34 |
dedupLiveResources handles removes live resource duplicates with the same UID. Duplicates are created in a separate resource groups. E.g. apps/Deployment produces duplicate in extensions/Deployment, authorization.openshift.io/ClusterRole produces duplicate in rbac.authorization.k8s.io/ClusterRole etc. The method remove... | func dedupLiveResources(targetObjs []*unstructured.Unstructured, liveObjsByKey map[kubeutil.ResourceKey]*unstructured.Unstructured) {
targetObjByKey := make(map[kubeutil.ResourceKey]*unstructured.Unstructured)
for i := range targetObjs {
targetObjByKey[kubeutil.GetResourceKey(targetObjs[i])] = targetObjs[i]
}
liv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (r *ContainerizedWorkloadReconciler) cleanupResources(ctx context.Context,\n\tworkload *oamv1alpha2.ContainerizedWorkload, deployUID, serviceUID *types.UID) error {\n\tlog := r.Log.WithValues(\"gc deployment\", workload.Name)\n\tvar deploy appsv1.Deployment\n\tvar service corev1.Service\n\tfor _, res := range... | [
"0.570892",
"0.55854475",
"0.53175753",
"0.5260137",
"0.5203018",
"0.50135106",
"0.50129366",
"0.5002672",
"0.49678025",
"0.49068257",
"0.49068257",
"0.4880002",
"0.4870154",
"0.48697236",
"0.48677993",
"0.48084393",
"0.48019645",
"0.4737808",
"0.47268918",
"0.47148904",
"0.4... | 0.732469 | 0 |
Index sets indexes on appropriate columns/properties | func (n *Notification) Index() mgo.Index {
return mgo.Index{
Key: []string{"uid", "list"},
Unique: true,
//DropDups: true,
Background: true,
//Sparse: true,
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (m *Mongo) Index(gid string, background bool) error {\n\tm.Session.ResetIndexCache()\n\n\tsessionCopy := m.Session.Copy()\n\tdefer sessionCopy.Close()\n\tcol := sessionCopy.DB(m.DBName).C(gid)\n\n\tcInfo := &mgo.CollectionInfo{DisableIdIndex: true}\n\terr := col.Create(cInfo)\n\tif err != nil {\n\t\tlog.Error... | [
"0.6745448",
"0.65392023",
"0.65343076",
"0.6283328",
"0.6246127",
"0.6234686",
"0.61355233",
"0.6058079",
"0.60186356",
"0.6000727",
"0.5930021",
"0.58883613",
"0.58581555",
"0.58448315",
"0.5811686",
"0.5805725",
"0.58047396",
"0.57995695",
"0.5793175",
"0.5792225",
"0.5766... | 0.54256165 | 56 |
Collection getter method for the collections constant | func (n *Notification) Collection() string {
return COLLECTION
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetCollection(ctx context.Context, c Client, uri string) (*Collection, error) {\n\tresp, err := c.Get(ctx, uri)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tvar result Collection\n\terr = json.NewDecoder(resp.Body).Decode(&result)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\... | [
"0.64066327",
"0.6346272",
"0.6314892",
"0.6311393",
"0.62494123",
"0.623893",
"0.62287575",
"0.6194703",
"0.6170104",
"0.612091",
"0.6087927",
"0.60627484",
"0.60557365",
"0.6017529",
"0.5995261",
"0.5989541",
"0.59014827",
"0.58967024",
"0.58730906",
"0.5862669",
"0.5838353... | 0.6095918 | 10 |
NewCreateUserRepository creates new createUserRepository with its dependencies | func NewCreateUserRepository(handler *database.MongoHandler) entity.UserRepositoryCreator {
return createUserRepository{
handler: handler,
collection: "users",
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (c *UserRepositoriesClient) Create(ctx context.Context,\n\tref gitprovider.UserRepositoryRef,\n\treq gitprovider.RepositoryInfo,\n\topts ...gitprovider.RepositoryCreateOption) (gitprovider.UserRepository, error) {\n\t// Make sure the RepositoryRef is valid\n\tif err := validateUserRepositoryRef(ref, c.host); ... | [
"0.6687183",
"0.66358143",
"0.65263623",
"0.6430974",
"0.6306735",
"0.6288708",
"0.6258359",
"0.61549735",
"0.6132873",
"0.6104257",
"0.60754794",
"0.606565",
"0.5990323",
"0.59862757",
"0.5980177",
"0.5976259",
"0.59719974",
"0.5967437",
"0.5949544",
"0.59149235",
"0.5890608... | 0.6640742 | 1 |
Create performs insertOne into the database | func (c createUserRepository) Create(ctx context.Context, u entity.User) (entity.User, error) {
var bson = createUserBSON{
ID: u.ID().Value(),
FullName: u.FullName().Value(),
Document: createUserDocumentBSON{
Type: u.Document().Type().String(),
Value: u.Document().Value(),
},
Email: u.Email()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (repo *sqlRepository) Create(interface{}) error{\n\tvar (\n\t\t\tdb *sql.DB\n\t\t\tstmt *sql.Stmt\n\t\t)\n\t db, _ = sql.Open(driver, repo.user + \":\" + repo.password + \"@tcp(\" + repo.host + \":\" + repo.port + \")/\" + repo.database)\n\n\tstmt, err := db.Prepare(\"INSERT users SET name=?,gender=?,age=?\")... | [
"0.6750509",
"0.67373616",
"0.6689686",
"0.66649663",
"0.6654316",
"0.66212976",
"0.6599416",
"0.6594931",
"0.6594112",
"0.65927285",
"0.6590238",
"0.6590238",
"0.65799296",
"0.65766186",
"0.65734625",
"0.65650755",
"0.6561134",
"0.6551655",
"0.6546562",
"0.6536333",
"0.65285... | 0.0 | -1 |
syncBucket syncs the local gallery with the bucket | func syncBucket(name string) {
objects, err := s3.ListBucket(name, "")
if err != nil {
log.Printf("Can't list objects in bucket: %v", err)
}
// download each file that we don't have yet locally:
for _, object := range objects {
localfile := filepath.Join(galleryPath, object)
if _, err := os.Stat(localfile); ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func Sync(t time.Time, log *zap.Logger) {\n\tlog.Info(\"S3 sync begun\")\n\n\tbucket := Config.bucket\n\tregion := Config.bucketRegion\n\n\tsvc := setUpAwsSession(region)\n\tresp, err := listBucket(bucket, region, svc, log)\n\tif err != nil {\n\t\tlog.Error(\"failed to list bucket\",\n\t\t\tzap.Error(err),\n\t\t\t... | [
"0.6680358",
"0.602391",
"0.57765335",
"0.5678034",
"0.5564744",
"0.55118626",
"0.5504865",
"0.5477009",
"0.5462354",
"0.54434687",
"0.54375553",
"0.54249734",
"0.5424158",
"0.53969073",
"0.5366358",
"0.5366358",
"0.5363845",
"0.5360529",
"0.5357023",
"0.5355839",
"0.5343172"... | 0.8269777 | 0 |
RegisterHandler registers a file descriptor with the Poller and returns a Pollable which can be used for reading/writing as well as readiness notification. File descriptors registered with the poller will be placed into nonblocking mode. | func (p *Poller) RegisterHandler(fd uintptr, h EventHandler, data interface{}) (*Pollable, error) {
if err := syscall.SetNonblock(int(fd), true); err != nil {
return nil, err
}
return p.register(fd, h, data)
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewPoller() (*Epoll, error) {\n\treturn NewPollerWithBuffer(128)\n}",
"func (h *Handler) AddPoller(c echo.Context) error {\n\tid := c.Param(\"id\")\n\trequest := &PollerRequest{}\n\tvar err error\n\tif err = c.Bind(request); err != nil {\n\t\treturn err\n\t}\n\tp := &poller.Poller{}\n\tp.UUID = uuid.NewV4()... | [
"0.5313639",
"0.52643883",
"0.5241936",
"0.5210753",
"0.5175671",
"0.5104131",
"0.50692457",
"0.5018211",
"0.49877605",
"0.49037454",
"0.48952135",
"0.4866136",
"0.48658457",
"0.48586193",
"0.48374307",
"0.4825528",
"0.4811092",
"0.47992",
"0.47865638",
"0.47729722",
"0.47683... | 0.7504527 | 0 |
GetInstNameField returns the inst name field | func GetInstNameField(objID string) string {
switch objID {
case BKInnerObjIDApp:
return BKAppNameField
case BKInnerObjIDSet:
return BKSetNameField
case BKInnerObjIDModule:
return BKModuleNameField
case BKInnerObjIDObject:
return BKInstNameField
case BKInnerObjIDHost:
return BKHostNameField
case BKInne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (p *GetField) Name() string { return p.name }",
"func (inst *InstFPToUI) GetName() string {\n\treturn inst.Name\n}",
"func (inst *InstTrunc) GetName() string {\n\treturn inst.Name\n}",
"func (inst *InstFPExt) GetName() string {\n\treturn inst.Name\n}",
"func (inst *InstSExt) GetName() string {\n\tretu... | [
"0.683984",
"0.66691345",
"0.66529775",
"0.6619471",
"0.65891474",
"0.6570262",
"0.6415572",
"0.63976705",
"0.6358292",
"0.6319564",
"0.62703145",
"0.62133884",
"0.62109816",
"0.61973596",
"0.6195115",
"0.6148975",
"0.61299187",
"0.6109643",
"0.61041665",
"0.60617775",
"0.601... | 0.81934553 | 0 |
GetInstIDField get primary key of object's collection/table | func GetInstIDField(objType string) string {
switch objType {
case BKInnerObjIDApp:
return BKAppIDField
case BKInnerObjIDSet:
return BKSetIDField
case BKInnerObjIDModule:
return BKModuleIDField
case BKInnerObjIDObject:
return BKInstIDField
case BKInnerObjIDHost:
return BKHostIDField
case BKInnerObjIDPr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func getPrimaryKeyField(data []models.Create) (models.TableField, string, error) {\n\tfor _, d := range data {\n\t\tfor _, f := range d.TableFields {\n\t\t\tif f.Tags.PrimaryKey {\n\t\t\t\treturn f, d.TableName, nil\n\t\t\t}\n\t\t}\n\t}\n\treturn models.TableField{}, \"\", errors.New(\"unable to find primary key\"... | [
"0.64741033",
"0.64149576",
"0.6027425",
"0.5938452",
"0.59127915",
"0.588824",
"0.5860908",
"0.5822916",
"0.579606",
"0.5791429",
"0.5788975",
"0.5778923",
"0.57776135",
"0.5776322",
"0.5768322",
"0.5766646",
"0.5741552",
"0.5735442",
"0.57068944",
"0.56671613",
"0.5661163",... | 0.71526545 | 0 |
IsInnerMainlineModel judge if the object type is inner mainline model | func IsInnerMainlineModel(objType string) bool {
switch objType {
case BKInnerObjIDApp, BKInnerObjIDSet, BKInnerObjIDModule:
return true
default:
return false
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (t Type) IsModel() bool {\n\t_, isModel := t.impl.(*modelImpl)\n\treturn isModel\n}",
"func (ref *UIElement) IsMain() bool {\n\tret, _ := ref.BoolAttr(MainAttribute)\n\treturn ret\n}",
"func (c Category) IsMainSet() bool {\n\treturn c.Main != 0\n}",
"func (o *LinkRouteTable) GetMainOk() (*bool, bool) {\... | [
"0.5549369",
"0.54470146",
"0.5239084",
"0.5052032",
"0.5040084",
"0.5008778",
"0.49941906",
"0.49561843",
"0.49561843",
"0.49077177",
"0.4892996",
"0.48708993",
"0.486818",
"0.4856625",
"0.48033246",
"0.4745723",
"0.47209913",
"0.470247",
"0.46628037",
"0.4641946",
"0.463597... | 0.89547443 | 0 |
/ DBConn Function which opens a new connection with db | func DBConn() (db *sql.DB) {
dbDriver := "mysql"
dbUser := "root"
dbPass := "vrajupaj"
dbName := "example"
db, err := sql.Open(dbDriver, dbUser+":"+dbPass+"@/"+dbName)
if err != nil {
panic(err.Error())
} else {
log.Println("Connection was opened correctly")
}
return db
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func newDbConnection(connStr string) *sql.DB {\n\tdb, err := sql.Open(\"postgres\", connStr)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\terr = db.Ping()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(\"[es] new db connection established.\")\n\treturn db\n}",
"func dbConn() (db *sql.DB) {\n\t// dec... | [
"0.76061195",
"0.7395707",
"0.7394749",
"0.7332755",
"0.7270426",
"0.7248962",
"0.723286",
"0.72274655",
"0.7204548",
"0.7196246",
"0.71668965",
"0.7166142",
"0.7125072",
"0.7085214",
"0.7083889",
"0.7082635",
"0.7049826",
"0.7041966",
"0.70018184",
"0.7000479",
"0.69844055",... | 0.70031714 | 18 |
NewNodeResourceTopologies makes a CRD golang object representing NodeResourceTopology definition | func NewNodeResourceTopologies() (*apiextensionsv1.CustomResourceDefinition, error) {
_, file, _, ok := runtime.Caller(0)
if !ok {
return nil, fmt.Errorf("cannot retrieve manifests directory")
}
baseDir := filepath.Dir(file)
crdPath := filepath.Clean(filepath.Join(baseDir, "..", "..", "..", "deployment", "base"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func CreateNodeResourceTopologies(ctx context.Context, extClient extclient.Interface) (*apiextensionsv1.CustomResourceDefinition, error) {\n\tcrd, err := NewNodeResourceTopologies()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Delete existing CRD (if any) with this we also get rid of stale objects\n\terr =... | [
"0.7307852",
"0.5481046",
"0.51689094",
"0.51133436",
"0.5092512",
"0.5070375",
"0.50654244",
"0.50550437",
"0.49681288",
"0.4944798",
"0.49046588",
"0.48953402",
"0.48414528",
"0.48259762",
"0.48138842",
"0.4809819",
"0.47841248",
"0.47633776",
"0.47466254",
"0.47246203",
"0... | 0.7762249 | 0 |
CreateNodeResourceTopologies creates the NodeResourceTopology in the cluster if the CRD doesn't exists already. Returns the CRD golang object present in the cluster. | func CreateNodeResourceTopologies(ctx context.Context, extClient extclient.Interface) (*apiextensionsv1.CustomResourceDefinition, error) {
crd, err := NewNodeResourceTopologies()
if err != nil {
return nil, err
}
// Delete existing CRD (if any) with this we also get rid of stale objects
err = extClient.Apiexten... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func NewNodeResourceTopologies() (*apiextensionsv1.CustomResourceDefinition, error) {\n\t_, file, _, ok := runtime.Caller(0)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"cannot retrieve manifests directory\")\n\t}\n\n\tbaseDir := filepath.Dir(file)\n\tcrdPath := filepath.Clean(filepath.Join(baseDir, \"..\", \"..\", \... | [
"0.76723534",
"0.56957585",
"0.5255607",
"0.52420557",
"0.5161676",
"0.51323014",
"0.51153105",
"0.5114872",
"0.51094985",
"0.50911283",
"0.50660753",
"0.5031809",
"0.50017095",
"0.49854472",
"0.49768355",
"0.49335805",
"0.49045685",
"0.48949906",
"0.48829058",
"0.4836229",
"... | 0.80550957 | 0 |
GetNodeTopology returns the NodeResourceTopology data for the node identified by `nodeName`. | func GetNodeTopology(ctx context.Context, topologyClient *topologyclientset.Clientset, nodeName string) *v1alpha2.NodeResourceTopology {
var nodeTopology *v1alpha2.NodeResourceTopology
var err error
gomega.EventuallyWithOffset(1, func() bool {
nodeTopology, err = topologyClient.TopologyV1alpha2().NodeResourceTopol... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func (ct *ClusterTopology) GetNodeByName(name string) (node *ClusterTopologyNode, ind int) {\n\tmux.RLock()\n\tdefer mux.RUnlock()\n\treturn ct.getNodeByName(name)\n}",
"func IsValidNodeTopology(nodeTopology *v1alpha2.NodeResourceTopology, kubeletConfig *kubeletconfig.KubeletConfiguration) bool {\n\tif nodeTopol... | [
"0.5269962",
"0.52621764",
"0.5247785",
"0.52404493",
"0.51715285",
"0.5158596",
"0.510464",
"0.4999241",
"0.49666396",
"0.484828",
"0.48107776",
"0.47864768",
"0.47457278",
"0.4745136",
"0.4700492",
"0.4690143",
"0.46838033",
"0.46773323",
"0.46604025",
"0.4645714",
"0.46251... | 0.69008017 | 0 |
AllocatableResourceListFromNodeResourceTopology extract the map zone:allocatableResources from the given NodeResourceTopology instance. | func AllocatableResourceListFromNodeResourceTopology(nodeTopo *v1alpha2.NodeResourceTopology) map[string]corev1.ResourceList {
allocRes := make(map[string]corev1.ResourceList)
for _, zone := range nodeTopo.Zones {
if zone.Type != "Node" {
continue
}
resList := make(corev1.ResourceList)
for _, res := range ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"func GetMemoryResources(reservedMemory map[int]int64, getAvailableMemory func() ([]*topology.Node, []*rtesysinfo.Hugepages, error)) (map[string]PerNUMACounters, error) {\n\tnumaMemory := make(map[string]PerNUMACounters)\n\tnodes, hugepages, err := getAvailableMemory()\n\tif err != nil {\n\t\treturn numaMemory, err... | [
"0.5364796",
"0.50617653",
"0.5001727",
"0.4769316",
"0.47181323",
"0.4706976",
"0.46147397",
"0.4606428",
"0.45965248",
"0.45897478",
"0.45863438",
"0.45834994",
"0.45776933",
"0.45581096",
"0.45503893",
"0.4532366",
"0.45284724",
"0.45280227",
"0.45074448",
"0.45017514",
"0... | 0.8464234 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.