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
CompareAllocatableResources compares `expected` and `got` map zone:allocatableResources respectively (see: AllocatableResourceListFromNodeResourceTopology), and informs the caller if the maps are equal. Here `equal` means the same zoneNames with the same resources, where the resources are equal if they have the same resources with the same quantities. Returns the name of the different zone, the name of the different resources within the zone, the comparison result (same semantic as strings.Compare) and a boolean that reports if the resourceLists are consistent. See `CompareResourceList`.
func CompareAllocatableResources(expected, got map[string]corev1.ResourceList) (string, string, int, bool) { if len(got) != len(expected) { framework.Logf("-> expected=%v (len=%d) got=%v (len=%d)", expected, len(expected), got, len(got)) return "", "", 0, false } for expZoneName, expResList := range expected { gotResList, ok := got[expZoneName] if !ok { return expZoneName, "", 0, false } if resName, cmp, ok := CompareResourceList(expResList, gotResList); !ok || cmp != 0 { return expZoneName, resName, cmp, ok } } return "", "", 0, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CompareResourceList(expected, got corev1.ResourceList) (string, int, bool) {\n\tif len(got) != len(expected) {\n\t\tframework.Logf(\"-> expected=%v (len=%d) got=%v (len=%d)\", expected, len(expected), got, len(got))\n\t\treturn \"\", 0, false\n\t}\n\tfor expResName, expResQty := range expected {\n\t\tgotResQt...
[ "0.64290345", "0.5865311", "0.58325607", "0.5697454", "0.54446197", "0.5403544", "0.5374727", "0.53742474", "0.53078616", "0.52964586", "0.52862316", "0.51846445", "0.51759404", "0.5174776", "0.51174635", "0.5074527", "0.50719815", "0.50290644", "0.5021602", "0.5009109", "0.4...
0.84132695
0
CompareResourceList compares `expected` and `got` ResourceList respectively, and informs the caller if the two ResourceList are equal. Here `equal` means the same resources with the same quantities. Returns the different resource, the comparison result (same semantic as strings.Compare) and a boolean that reports if the resourceLists are consistent. The ResourceLists are consistent only if the represent the same resource set (all the resources listed in one are also present in the another; no ResourceList is a superset nor a subset of the other)
func CompareResourceList(expected, got corev1.ResourceList) (string, int, bool) { if len(got) != len(expected) { framework.Logf("-> expected=%v (len=%d) got=%v (len=%d)", expected, len(expected), got, len(got)) return "", 0, false } for expResName, expResQty := range expected { gotResQty, ok := got[expResName] if !ok { return string(expResName), 0, false } if cmp := gotResQty.Cmp(expResQty); cmp != 0 { framework.Logf("-> resource=%q cmp=%d expected=%v got=%v", expResName, cmp, expResQty, gotResQty) return string(expResName), cmp, true } } return "", 0, true }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestResourceListSorting(t *testing.T) {\n\tsortedResourceList := make([]string, len(resourceList))\n\tcopy(sortedResourceList, resourceList)\n\tsort.Strings(sortedResourceList)\n\tfor i := 0; i < len(resourceList); i++ {\n\t\tif resourceList[i] != sortedResourceList[i] {\n\t\t\tt.Errorf(\"Expected resourceLis...
[ "0.65800613", "0.6343115", "0.6236883", "0.59654737", "0.55586445", "0.5427846", "0.5257756", "0.5227804", "0.5226022", "0.51560676", "0.5124971", "0.5118968", "0.50719607", "0.5029155", "0.50274366", "0.50094444", "0.5001012", "0.49900916", "0.49872172", "0.49872172", "0.497...
0.83638287
0
IsValidNodeTopology checks the provided NodeResourceTopology object if it is wellformad, internally consistent and consistent with the given kubelet config object. Returns true if the NodeResourceTopology object is consistent and well formet, false otherwise; if return false, logs the failure reason.
func IsValidNodeTopology(nodeTopology *v1alpha2.NodeResourceTopology, kubeletConfig *kubeletconfig.KubeletConfiguration) bool { if nodeTopology == nil || len(nodeTopology.TopologyPolicies) == 0 { framework.Logf("failed to get topology policy from the node topology resource") return false } tmPolicy := string(topologypolicy.DetectTopologyPolicy(kubeletConfig.TopologyManagerPolicy, kubeletConfig.TopologyManagerScope)) if nodeTopology.TopologyPolicies[0] != tmPolicy { framework.Logf("topology policy mismatch got %q expected %q", nodeTopology.TopologyPolicies[0], tmPolicy) return false } expectedPolicyAttribute := v1alpha2.AttributeInfo{ Name: nfdtopologyupdater.TopologyManagerPolicyAttributeName, Value: kubeletConfig.TopologyManagerPolicy, } if !containsAttribute(nodeTopology.Attributes, expectedPolicyAttribute) { framework.Logf("topology policy attributes don't have correct topologyManagerPolicy attribute expected %v attributeList %v", expectedPolicyAttribute, nodeTopology.Attributes) return false } expectedScopeAttribute := v1alpha2.AttributeInfo{ Name: nfdtopologyupdater.TopologyManagerScopeAttributeName, Value: kubeletConfig.TopologyManagerScope, } if !containsAttribute(nodeTopology.Attributes, expectedScopeAttribute) { framework.Logf("topology policy attributes don't have correct topologyManagerScope attribute expected %v attributeList %v", expectedScopeAttribute, nodeTopology.Attributes) return false } if nodeTopology.Zones == nil || len(nodeTopology.Zones) == 0 { framework.Logf("failed to get topology zones from the node topology resource") return false } foundNodes := 0 for _, zone := range nodeTopology.Zones { // TODO constant not in the APIs if !strings.HasPrefix(strings.ToUpper(zone.Type), "NODE") { continue } foundNodes++ if !isValidCostList(zone.Name, zone.Costs) { framework.Logf("invalid cost list for zone %q", zone.Name) return false } if !isValidResourceList(zone.Name, zone.Resources) { framework.Logf("invalid resource list for zone %q", zone.Name) return false } } return foundNodes > 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func nodeIsValidForTopologyAwareHints(node *corev1.Node) bool {\n\treturn !node.Status.Allocatable.Cpu().IsZero() && node.Labels[corev1.LabelTopologyZone] != \"\"\n}", "func (t Topology) Validate() error {\n\terrs := []string{}\n\n\t// Check all node metadatas are valid, and the keys are parseable, i.e.\n\t// co...
[ "0.61786824", "0.5564089", "0.5552909", "0.5381619", "0.50309676", "0.50297743", "0.5022979", "0.49563727", "0.49521244", "0.48063827", "0.47571453", "0.47314247", "0.4716992", "0.47108042", "0.4706679", "0.4685612", "0.4675897", "0.4675828", "0.46655697", "0.46429", "0.46191...
0.8106002
0
ParseSoftwareAttribute parses the bytes into a SoftwareAttribute instance.
func ParseSoftwareAttribute(r *read.BigEndian, l uint16) (SoftwareAttribute, error) { sw, err := Read127CharString(r, l) return SoftwareAttribute{sw}, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ParseAttribute(b []byte) (Attribute, error) {\n\tif len(b) < 22 {\n\t\treturn Attribute{}, fmt.Errorf(\"attribute data should be at least 22 bytes but is %d\", len(b))\n\t}\n\n\tr := binutil.NewLittleEndianReader(b)\n\n\tnameLength := r.Byte(0x09)\n\tnameOffset := r.Uint16(0x0A)\n\n\tname := \"\"\n\tif nameLe...
[ "0.6094672", "0.49585745", "0.49561727", "0.47174284", "0.4682577", "0.4675515", "0.4654408", "0.46499464", "0.45818946", "0.4525342", "0.45146385", "0.44944", "0.44848514", "0.44841257", "0.44420215", "0.44036722", "0.4384886", "0.43354794", "0.42904556", "0.42374355", "0.42...
0.82919925
0
false: false, "", 0, "false", "off", empty slice/map
func Bool(i interface{}) bool { if i == nil { return false } if v, ok := i.(bool); ok { return v } if s, ok := i.(string); ok { if _, ok := emptyStringMap[s]; ok { return false } return true } rv := reflect.ValueOf(i) switch rv.Kind() { case reflect.Ptr: return !rv.IsNil() case reflect.Map: fallthrough case reflect.Array: fallthrough case reflect.Slice: return rv.Len() != 0 case reflect.Struct: return true default: s := String(i) if _, ok := emptyStringMap[s]; ok { return false } return true } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func slice_literals() {\n tmp := []bool{true, true, false}\n fmt.Println(tmp)\n tmp[0] = false\n fmt.Println(tmp)\n}", "func init() {\n\tSliceOfString = make([]string, 0, 10)\n\tMapOfString = make(map[string]string)\n\tMapOfBool = make(map[string]bool)\n}", "func empty(thing []uint8) bool {\n\tfor ...
[ "0.5626376", "0.5512267", "0.5465469", "0.53896105", "0.5348433", "0.5338991", "0.5324013", "0.52970034", "0.5254964", "0.5250206", "0.52483", "0.5214961", "0.5191665", "0.51714694", "0.5155821", "0.51013535", "0.50277764", "0.50219125", "0.5010307", "0.49857587", "0.49795234...
0.5007939
19
SetGlobalBalancer set grpc balancer with scheme.
func SetGlobalBalancer(scheme string, builder selector.Builder) { mu.Lock() defer mu.Unlock() b := base.NewBalancerBuilder( scheme, &Builder{builder: builder}, base.Config{HealthCheck: true}, ) gBalancer.Register(b) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *ioThrottlerPool) SetGlobalLimit(r rate.Limit, b int) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tp.globalLimiter.SetBurst(b)\n\tp.globalLimiter.SetLimit(r)\n\tp.updateBufferSize()\n}", "func startGrpcBalancer(host string, addresses []string) (error) {\n\t// Start tcp listening port\n\tlis, err := net.Lis...
[ "0.5183199", "0.5077026", "0.49607387", "0.4854912", "0.47470388", "0.47414953", "0.4728902", "0.47090948", "0.46896395", "0.46880862", "0.46415812", "0.4627773", "0.46094668", "0.4597579", "0.45945796", "0.45730206", "0.45671153", "0.45562032", "0.4491078", "0.44766483", "0....
0.8345059
0
Build creates a grpc Picker.
func (b *Builder) Build(info base.PickerBuildInfo) gBalancer.Picker { if len(info.ReadySCs) == 0 { // Block the RPC until a new picker is available via UpdateState(). return base.NewErrPicker(gBalancer.ErrNoSubConnAvailable) } nodes := make([]selector.Node, 0) for conn, info := range info.ReadySCs { ins, _ := info.Address.Attributes.Value("rawServiceInstance").(*registry.ServiceInstance) nodes = append(nodes, &grpcNode{ Node: selector.NewNode(info.Address.Addr, ins), subConn: conn, }) } p := &Picker{ selector: b.builder.Build(), } p.selector.Apply(nodes) return p }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*nodePickerBuilder) Build(info base.PickerBuildInfo) balancer.V2Picker {\n\tif len(info.ReadySCs) == 0 {\n\t\treturn base.NewErrPickerV2(balancer.ErrNoSubConnAvailable)\n\t}\n\n\tvar scs []balancer.SubConn\n\tfor sc := range info.ReadySCs {\n\t\tscs = append(scs, sc)\n\t}\n\n\treturn &nodePicker{\n\t\tsubCon...
[ "0.64123386", "0.54491264", "0.5207384", "0.519233", "0.51873875", "0.5060041", "0.500911", "0.49661744", "0.49641725", "0.49387065", "0.4873675", "0.48730406", "0.48674744", "0.48580194", "0.48238623", "0.48182973", "0.4813414", "0.48090446", "0.47689024", "0.47326857", "0.4...
0.75783914
0
Get get a grpc trailer value.
func (t Trailer) Get(k string) string { v := metadata.MD(t).Get(k) if len(v) > 0 { return v[0] } return "" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func GrpcMetadataTrailer(ctx context.Context) *metadata.MD {\n\treturn ctx.Value(trailerKey{}).(*metadata.MD)\n}", "func (parser *PdfParser) GetTrailer() *PdfObjectDictionary {\n\treturn parser.trailer\n}", "func isTrailer(gRPCFrameByte byte) bool {\n\treturn gRPCFrameByte&(1<<7) == (1 << 7)\n}", "func (h *R...
[ "0.6455265", "0.59738564", "0.54605633", "0.52981204", "0.52911794", "0.518575", "0.510424", "0.5035648", "0.5035331", "0.4973329", "0.4951593", "0.49217966", "0.4897951", "0.48978537", "0.4867257", "0.4833172", "0.48279515", "0.4811198", "0.47573626", "0.47364062", "0.472992...
0.44370463
93
Given a list of args return an array of `ParamValue`s
func Params(params ...) []ParamValue { pStruct := reflect.NewValue(params).(*reflect.StructValue) par := make([]ParamValue, pStruct.NumField()) for n := 0; n < len(par); n++ { par[n] = param(pStruct.Field(n)) } return par }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func makeParams(args ...interface{}) []rpcValue {\n\tif len(args) == 0 {\n\t\treturn nil\n\t}\n\tarr := make([]rpcValue, 0, len(args))\n\tfor _, v := range args {\n\t\tarr = append(arr, makeValue(v))\n\t}\n\treturn arr\n}", "func (c ResolverGetUploadsByIDsFuncCall) Args() []interface{} {\n\ttrailing := []interfa...
[ "0.66049415", "0.64075565", "0.63898826", "0.63461345", "0.6190019", "0.61842114", "0.61597705", "0.6145489", "0.61268765", "0.6112695", "0.60974354", "0.6086292", "0.6066323", "0.6032512", "0.6027523", "0.60196614", "0.60185295", "0.60125184", "0.59949327", "0.5989697", "0.5...
0.5878419
21
Deprecated: Use MetricSpec.ProtoReflect.Descriptor instead.
func (*MetricSpec) Descriptor() ([]byte, []int) { return file_api_adaptive_load_metric_spec_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Metric) Descriptor() ([]byte, []int) {\n\treturn file_go_chromium_org_luci_analysis_proto_v1_metrics_proto_rawDescGZIP(), []int{2}\n}", "func (*TargetMetrics_Metric) Descriptor() ([]byte, []int) {\n\treturn file_asgt_type_target_metrics_proto_rawDescGZIP(), []int{0, 0}\n}", "func (*Metrics) Descriptor()...
[ "0.68842673", "0.68259895", "0.6754421", "0.66955364", "0.6689265", "0.6643883", "0.66222525", "0.65758026", "0.65588665", "0.6558328", "0.65321547", "0.6504689", "0.64963424", "0.64895487", "0.64671564", "0.64627165", "0.64118576", "0.640645", "0.6402437", "0.63927925", "0.6...
0.66302645
6
Deprecated: Use ThresholdSpec.ProtoReflect.Descriptor instead.
func (*ThresholdSpec) Descriptor() ([]byte, []int) { return file_api_adaptive_load_metric_spec_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*MetricSpecWithThreshold) Descriptor() ([]byte, []int) {\n\treturn file_api_adaptive_load_metric_spec_proto_rawDescGZIP(), []int{2}\n}", "func (*TelemetryThreshold) Descriptor() ([]byte, []int) {\n\treturn file_huawei_telemetry_proto_rawDescGZIP(), []int{5}\n}", "func (*NodeThreshold) Descriptor() ([]byt...
[ "0.6747329", "0.66270244", "0.63288754", "0.6282511", "0.6232712", "0.61830735", "0.61650217", "0.6095416", "0.60849476", "0.6023062", "0.6021123", "0.59890085", "0.59753263", "0.59735835", "0.59627837", "0.59447163", "0.59056884", "0.5885518", "0.5869348", "0.5867261", "0.58...
0.69594944
0
Deprecated: Use MetricSpecWithThreshold.ProtoReflect.Descriptor instead.
func (*MetricSpecWithThreshold) Descriptor() ([]byte, []int) { return file_api_adaptive_load_metric_spec_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ThresholdSpec) Descriptor() ([]byte, []int) {\n\treturn file_api_adaptive_load_metric_spec_proto_rawDescGZIP(), []int{1}\n}", "func (*TelemetryThreshold) Descriptor() ([]byte, []int) {\n\treturn file_huawei_telemetry_proto_rawDescGZIP(), []int{5}\n}", "func (*AlertingCondition_Spec_TimeSeries_Threshold)...
[ "0.6960433", "0.65074533", "0.60811925", "0.6029226", "0.60165745", "0.6012746", "0.59527254", "0.5918514", "0.58969796", "0.5872111", "0.5858821", "0.5857826", "0.58539706", "0.58046436", "0.5786188", "0.5784575", "0.5756746", "0.572665", "0.56305903", "0.56272644", "0.55960...
0.7160946
0
You want to add the type of the input and also the type of the return
func greeting(name string) string { return "Hello" + name }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func add[Type IntOrString](items []Type) (result Type) {\n\tfor _, item := range items {\n\t\tresult = result + item\n\t}\n\treturn\n}", "func (fn *CXFunction) AddInput(prgrm *CXProgram, param *CXArgument) *CXFunction {\n\tfnInputs := fn.GetInputs(prgrm)\n\tfor _, inputIdx := range fnInputs {\n\t\tinput := prgrm...
[ "0.6031924", "0.57332414", "0.56366175", "0.54564303", "0.54341835", "0.53188676", "0.53181654", "0.52928877", "0.5157182", "0.5127778", "0.5097387", "0.50824916", "0.5081217", "0.5073113", "0.50724816", "0.50678504", "0.50589323", "0.5040073", "0.5036362", "0.49995402", "0.4...
0.0
-1
Deprecated: Use Scorecard.ProtoReflect.Descriptor instead.
func (*Scorecard) Descriptor() ([]byte, []int) { return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Score) Descriptor() ([]byte, []int) {\n\treturn file_mitre_cvss_v3_cvss_proto_rawDescGZIP(), []int{2}\n}", "func (*BaseScore) Descriptor() ([]byte, []int) {\n\treturn file_mitre_cvss_v3_cvss_proto_rawDescGZIP(), []int{3}\n}", "func (*CMsgPlayerCard) Descriptor() ([]byte, []int) {\n\treturn file_dota_gcm...
[ "0.700281", "0.6879392", "0.68285745", "0.6728023", "0.66748387", "0.6673123", "0.6658392", "0.6644106", "0.66355675", "0.66153055", "0.66022944", "0.66015166", "0.65768534", "0.6576063", "0.65572953", "0.6551013", "0.65416706", "0.6523413", "0.6518851", "0.651338", "0.650620...
0.72033995
0
Deprecated: Use Scorecard_GaugeView.ProtoReflect.Descriptor instead.
func (*Scorecard_GaugeView) Descriptor() ([]byte, []int) { return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0, 0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ClrGC) Descriptor() ([]byte, []int) {\n\treturn file_language_agent_CLRMetric_proto_rawDescGZIP(), []int{2}\n}", "func (*KafkaGauge) Descriptor() ([]byte, []int) {\n\treturn file_pkg_sinks_plugin_proto_metrics_proto_rawDescGZIP(), []int{1}\n}", "func (*CLRMetric) Descriptor() ([]byte, []int) {\n\treturn...
[ "0.6824529", "0.68163484", "0.67460763", "0.66216606", "0.65765965", "0.65765387", "0.6563826", "0.65418273", "0.6529831", "0.65259284", "0.65070504", "0.6475942", "0.6463522", "0.6460196", "0.6457537", "0.6445932", "0.6419697", "0.6413116", "0.6407112", "0.63850945", "0.6349...
0.77736974
0
Deprecated: Use Scorecard_SparkChartView.ProtoReflect.Descriptor instead.
func (*Scorecard_SparkChartView) Descriptor() ([]byte, []int) { return file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0, 1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*FeedbackMetrics) Descriptor() ([]byte, []int) {\n\treturn file_ssn_dataservice_v1_dataservice_proto_rawDescGZIP(), []int{12}\n}", "func (*Scorecard_GaugeView) Descriptor() ([]byte, []int) {\n\treturn file_google_monitoring_dashboard_v1_scorecard_proto_rawDescGZIP(), []int{0, 0}\n}", "func (*Chart) Descr...
[ "0.65494704", "0.6429943", "0.63701975", "0.6346591", "0.6337553", "0.62929755", "0.6288999", "0.62860525", "0.6271876", "0.6259072", "0.6255981", "0.6247951", "0.6228296", "0.6202115", "0.6201875", "0.6154162", "0.61452585", "0.6145207", "0.61450595", "0.61404777", "0.613757...
0.7641592
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *AESConfiguration) DeepCopyInto(out *AESConfiguration) { *out = *in if in.Keys != nil { in, out := &in.Keys, &out.Keys *out = make([]Key, len(*in)) copy(*out, *in) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.82150793", "0.81278837", "0.8103475", "0.80859107", "0.808366", "0.80668724", "0.806427", "0.8026438", "0.80119294", "0.7996162", "0.7991859", "0.79883516", "0.79867214", "0.79867214", "0.79865664", "0.7985051", "0.7975424", "0.7972233", "0.796902", "0.796902", "0.796902",...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AESConfiguration.
func (in *AESConfiguration) DeepCopy() *AESConfiguration { if in == nil { return nil } out := new(AESConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EncryptionConfiguration) DeepCopy() *EncryptionConfiguration {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EncryptionConfiguration)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *EncryptionConfig) DeepCopy() *EncryptionConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Encryp...
[ "0.6966809", "0.64778304", "0.5603832", "0.53495884", "0.53042156", "0.52616113", "0.5155239", "0.5146213", "0.51294535", "0.5119548", "0.5056005", "0.4989806", "0.49877337", "0.49724552", "0.49615574", "0.49553683", "0.4941303", "0.49344137", "0.48960802", "0.4832625", "0.48...
0.89656043
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *EncryptionConfiguration) DeepCopyInto(out *EncryptionConfiguration) { *out = *in out.TypeMeta = in.TypeMeta if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]ResourceConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8213356", "0.8126085", "0.81016994", "0.8084519", "0.808198", "0.80653447", "0.8062857", "0.80252475", "0.80096555", "0.79938054", "0.7990593", "0.79874957", "0.7984788", "0.7984788", "0.79846936", "0.7983698", "0.79741865", "0.7970389", "0.79674816", "0.79674816", "0.7967...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionConfiguration.
func (in *EncryptionConfiguration) DeepCopy() *EncryptionConfiguration { if in == nil { return nil } out := new(EncryptionConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *EncryptionConfig) DeepCopy() *EncryptionConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(EncryptionConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (s *DataLakeResource) SetEncryptionConfiguration(v *DataLakeEncryptionConfiguration) *DataLakeResource {\n\ts.EncryptionConfiguration ...
[ "0.81821805", "0.69133514", "0.67663676", "0.6730935", "0.6721722", "0.6714277", "0.65690655", "0.6349009", "0.6184369", "0.60215807", "0.59392107", "0.5796518", "0.56959784", "0.5585565", "0.5557125", "0.5539182", "0.5539182", "0.5539182", "0.55084985", "0.54757833", "0.5467...
0.895874
0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *EncryptionConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ConsoleQuickStart) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *ServingRuntime) DeepCopyObject() runtime.Object {\n\tif c := in.DeepCopy(); c != nil {\n\t\treturn c\n\t}\n\treturn nil\n}", "func (in *Keevakind) DeepCopyObject(...
[ "0.73118716", "0.7157215", "0.71052337", "0.7099557", "0.7055543", "0.7039787", "0.70361906", "0.7028781", "0.6997706", "0.69724673", "0.69699717", "0.69541174", "0.6951929", "0.6948912", "0.6936584", "0.6933856", "0.6933856", "0.6926833", "0.6922871", "0.69208986", "0.691095...
0.0
-1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *IdentityConfiguration) DeepCopyInto(out *IdentityConfiguration) { *out = *in return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityConfiguration.
func (in *IdentityConfiguration) DeepCopy() *IdentityConfiguration { if in == nil { return nil } out := new(IdentityConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *WorkloadIdentityConfig) DeepCopy() *WorkloadIdentityConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(WorkloadIdentityConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Identity) DeepCopy() *Identity {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Identity)\n\tin.DeepCopyI...
[ "0.7011574", "0.6334423", "0.60347545", "0.57493186", "0.571666", "0.56987476", "0.5546887", "0.5438429", "0.5377126", "0.5345208", "0.5251954", "0.5242645", "0.523284", "0.510815", "0.5105444", "0.50964445", "0.50964445", "0.5054068", "0.5006278", "0.50049424", "0.49703652",...
0.84669703
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *KMSConfiguration) DeepCopyInto(out *KMSConfiguration) { *out = *in if in.CacheSize != nil { in, out := &in.CacheSize, &out.CacheSize *out = new(int32) **out = **in } if in.Timeout != nil { in, out := &in.Timeout, &out.Timeout *out = new(v1.Duration) **out = **in } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSConfiguration.
func (in *KMSConfiguration) DeepCopy() *KMSConfiguration { if in == nil { return nil } out := new(KMSConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *KalmConfig) DeepCopy() *KalmConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(KalmConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *KubemanagerConfig) DeepCopy() *KubemanagerConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(KubemanagerConfig)\n\tin.DeepCopyInto(out)\...
[ "0.7320824", "0.6503556", "0.6401234", "0.6188418", "0.6117832", "0.6105569", "0.59326637", "0.5710905", "0.5679013", "0.56328255", "0.5623401", "0.5505632", "0.54571265", "0.5398764", "0.5378795", "0.5364599", "0.53576845", "0.5333917", "0.5312741", "0.5305671", "0.5305671",...
0.81662655
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *Key) DeepCopyInto(out *Key) { *out = *in return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Key.
func (in *Key) DeepCopy() *Key { if in == nil { return nil } out := new(Key) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *KeyReference) DeepCopy() *KeyReference {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(KeyReference)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *SignerKey) DeepCopy() *SignerKey {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(SignerKey)\n\tin.DeepCopyInto(out)\n\treturn out\n}",...
[ "0.73871976", "0.714478", "0.709059", "0.6912021", "0.6843181", "0.6613832", "0.65244293", "0.64699113", "0.64592344", "0.642474", "0.64237607", "0.64236516", "0.6421394", "0.641982", "0.6363098", "0.63512987", "0.63231707", "0.6312608", "0.6305274", "0.6305012", "0.6303637",...
0.862469
1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ProviderConfiguration) DeepCopyInto(out *ProviderConfiguration) { *out = *in if in.AESGCM != nil { in, out := &in.AESGCM, &out.AESGCM *out = new(AESConfiguration) (*in).DeepCopyInto(*out) } if in.AESCBC != nil { in, out := &in.AESCBC, &out.AESCBC *out = new(AESConfiguration) (*in).DeepCopyInto(*out) } if in.Secretbox != nil { in, out := &in.Secretbox, &out.Secretbox *out = new(SecretboxConfiguration) (*in).DeepCopyInto(*out) } if in.Identity != nil { in, out := &in.Identity, &out.Identity *out = new(IdentityConfiguration) **out = **in } if in.KMS != nil { in, out := &in.KMS, &out.KMS *out = new(KMSConfiguration) (*in).DeepCopyInto(*out) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfiguration.
func (in *ProviderConfiguration) DeepCopy() *ProviderConfiguration { if in == nil { return nil } out := new(ProviderConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *Provider) DeepCopy() *Provider {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Provider)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *Provider) DeepCopy() *Provider {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(Provider)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *P...
[ "0.65710604", "0.65710604", "0.65028113", "0.63433236", "0.5991025", "0.59304255", "0.58877087", "0.5869135", "0.57617694", "0.5751949", "0.56482095", "0.56043553", "0.5583803", "0.55688334", "0.55674565", "0.5523267", "0.5475685", "0.5468203", "0.5455061", "0.54211265", "0.5...
0.8349167
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *ResourceConfiguration) DeepCopyInto(out *ResourceConfiguration) { *out = *in if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]string, len(*in)) copy(*out, *in) } if in.Providers != nil { in, out := &in.Providers, &out.Providers *out = make([]ProviderConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceConfiguration.
func (in *ResourceConfiguration) DeepCopy() *ResourceConfiguration { if in == nil { return nil } out := new(ResourceConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (in *ResourceConfig) DeepCopy() *ResourceConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(ResourceConfig)\n\tin.DeepCopyInto(out)\n\treturn out\n}", "func (in *BaseKubernetesResourceConfig) DeepCopy() *BaseKubernetesResourceConfig {\n\tif in == nil {\n\t\treturn nil\n\t}\n\tout := new(BaseKuber...
[ "0.7895176", "0.6825849", "0.67865694", "0.6739", "0.6708907", "0.6551092", "0.613349", "0.60686964", "0.60686964", "0.6034275", "0.6017182", "0.5848022", "0.58381516", "0.5824164", "0.5757487", "0.57524174", "0.5726038", "0.5726038", "0.5726038", "0.57107085", "0.57107085", ...
0.8736436
0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be nonnil.
func (in *SecretboxConfiguration) DeepCopyInto(out *SecretboxConfiguration) { *out = *in if in.Keys != nil { in, out := &in.Keys, &out.Keys *out = make([]Key, len(*in)) copy(*out, *in) } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *RunInfo) DeepCopyInto(out *RunInfo) {\n\t*out = *r\n}", "func (in *Base) DeepCopyInto(out *Base) {\n\t*out = *in\n\treturn\n}", "func (in *ForkObject) DeepCopyInto(out *ForkObject) {\n\t*out = *in\n}", "func (in *TargetObjectInfo) DeepCopyInto(out *TargetObjectInfo) {\n\t*out = *in\n}", "func (in ...
[ "0.8215289", "0.81280124", "0.81039286", "0.80862963", "0.8083811", "0.80673146", "0.8064545", "0.8026454", "0.8012046", "0.7996313", "0.799204", "0.79887754", "0.7987097", "0.7986994", "0.7986994", "0.79854053", "0.7975989", "0.7972486", "0.79695636", "0.79695636", "0.796956...
0.0
-1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretboxConfiguration.
func (in *SecretboxConfiguration) DeepCopy() *SecretboxConfiguration { if in == nil { return nil } out := new(SecretboxConfiguration) in.DeepCopyInto(out) return out }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *VaultConfig) Copy() *VaultConfig {\n\tif c == nil {\n\t\treturn nil\n\t}\n\n\tvar o VaultConfig\n\to.Address = c.Address\n\n\to.Enabled = c.Enabled\n\n\to.Namespace = c.Namespace\n\n\to.RenewToken = c.RenewToken\n\n\tif c.Retry != nil {\n\t\to.Retry = c.Retry.Copy()\n\t}\n\n\tif c.SSL != nil {\n\t\to.SSL ...
[ "0.60144943", "0.5966961", "0.5891478", "0.5733064", "0.5586271", "0.55468184", "0.55379814", "0.55241823", "0.5468137", "0.54423493", "0.5412706", "0.53246456", "0.53073645", "0.52828056", "0.52819806", "0.527624", "0.525599", "0.5251909", "0.5250702", "0.52440095", "0.52373...
0.83404136
0
IsOk check response code is equal to 200
func (r *Response) IsOk() bool { return r.Code == ok }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (resp *Response) OK() bool {\n\treturn resp.StatusCode < 400\n}", "func (w *responseWrapper) IsOK() bool {\n\treturn w.status == 200\n}", "func (resp *Response) Ok() bool {\n\treturn resp.OK()\n}", "func (s *APIStatusResponse) OK() bool {\n\treturn s.StatusCode == \"ok\"\n}", "func isOK(statusCode int...
[ "0.7763328", "0.7720846", "0.74847406", "0.7463899", "0.7392119", "0.73865634", "0.7201045", "0.7040394", "0.70257586", "0.6942052", "0.68642926", "0.68560714", "0.677577", "0.67510307", "0.6729229", "0.671001", "0.66298383", "0.65708536", "0.6570777", "0.65460277", "0.654073...
0.7804289
0
Deprecated: Use SyncLocationReq.ProtoReflect.Descriptor instead.
func (*SyncLocationReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*UpdateLocationRequest) Descriptor() ([]byte, []int) {\n\treturn file_api_protobuf_spec_connection_user_v1_proto_rawDescGZIP(), []int{2}\n}", "func (*SyncLocationRsp) Descriptor() ([]byte, []int) {\n\treturn file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{1}\n}", "func (*GetLocationRequest) Descripto...
[ "0.71103185", "0.69038934", "0.6815616", "0.6785577", "0.67049074", "0.66889256", "0.6613836", "0.66054076", "0.65946", "0.65917665", "0.6582088", "0.65695715", "0.6560337", "0.6535074", "0.65338737", "0.65247077", "0.65170616", "0.6483615", "0.64714944", "0.64662427", "0.645...
0.7409314
0
Deprecated: Use SyncLocationRsp.ProtoReflect.Descriptor instead.
func (*SyncLocationRsp) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{1} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*SyncLocationReq) Descriptor() ([]byte, []int) {\n\treturn file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{0}\n}", "func (*UpdateFriendStatusRsp) Descriptor() ([]byte, []int) {\n\treturn file_v1_friend_friend_proto_rawDescGZIP(), []int{3}\n}", "func (*RefreshResponse) Descriptor() ([]byte, []int) {\n...
[ "0.6654763", "0.663932", "0.6555286", "0.65550774", "0.65344405", "0.65240306", "0.6431467", "0.6428126", "0.6421469", "0.64044356", "0.64010787", "0.6398879", "0.6377352", "0.6371854", "0.6344242", "0.6334764", "0.6315522", "0.6313767", "0.63100225", "0.63098186", "0.6308928...
0.73720187
0
Deprecated: Use RemoveKeeperReq.ProtoReflect.Descriptor instead.
func (*RemoveKeeperReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{2} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ExternalIDPRemoveRequest) Descriptor() ([]byte, []int) {\n\treturn file_management_proto_rawDescGZIP(), []int{162}\n}", "func (*RemoveCheckRequest) Descriptor() ([]byte, []int) {\n\treturn file_api_ocp_check_api_ocp_check_api_proto_rawDescGZIP(), []int{10}\n}", "func (*RemoveRequest) Descriptor() ([]byt...
[ "0.7382873", "0.7358745", "0.7324274", "0.721699", "0.71849823", "0.7162527", "0.7161694", "0.71450984", "0.7122148", "0.7120509", "0.71141547", "0.70940745", "0.7093572", "0.7085726", "0.7074796", "0.7035921", "0.7029398", "0.702928", "0.70082223", "0.7003014", "0.6984949", ...
0.7849878
0
Deprecated: Use AddKeeperReq.ProtoReflect.Descriptor instead.
func (*AddKeeperReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{3} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*RemoveKeeperReq) Descriptor() ([]byte, []int) {\n\treturn file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{2}\n}", "func (*AddPeerRequest) Descriptor() ([]byte, []int) {\n\treturn file_github_com_yahuizhan_dappley_metrics_go_api_rpc_pb_rpc_proto_rawDescGZIP(), []int{8}\n}", "func (*AddRequest) Descri...
[ "0.71223587", "0.698026", "0.68898994", "0.6857225", "0.67590207", "0.67427474", "0.67198485", "0.6710893", "0.66748834", "0.6674649", "0.66576546", "0.6655914", "0.6629135", "0.6626807", "0.6617738", "0.66125524", "0.6579504", "0.6575033", "0.65688556", "0.6568845", "0.65657...
0.7387112
0
Deprecated: Use AssignAck.ProtoReflect.Descriptor instead.
func (*AssignAck) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{4} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*Ack) Descriptor() ([]byte, []int) {\n\treturn file_chatMsg_msg_proto_rawDescGZIP(), []int{0}\n}", "func (*EpochChangeAck) Descriptor() ([]byte, []int) {\n\treturn file_msgs_msgs_proto_rawDescGZIP(), []int{22}\n}", "func (*AckRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_acknowledge_proto_...
[ "0.6931855", "0.6785189", "0.67617804", "0.6728953", "0.65926194", "0.6559347", "0.6514554", "0.64602405", "0.6412379", "0.64036167", "0.624473", "0.62233335", "0.6151008", "0.6145046", "0.61359626", "0.6081008", "0.6074918", "0.60593617", "0.60510236", "0.60306334", "0.60263...
0.7436857
0
Deprecated: Use SwitchKeeperReq.ProtoReflect.Descriptor instead.
func (*SwitchKeeperReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{5} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*ControlRequest) Descriptor() ([]byte, []int) {\n\treturn file_proto_gateway_v1_control_proto_rawDescGZIP(), []int{0}\n}", "func (*CheckRequest) Descriptor() ([]byte, []int) {\n\treturn file_google_api_servicecontrol_v1_service_controller_proto_rawDescGZIP(), []int{0}\n}", "func (*SwitchRuntimeRequest) D...
[ "0.67672926", "0.67448694", "0.6714067", "0.6700932", "0.66939986", "0.6679988", "0.66392297", "0.6629699", "0.66290075", "0.66290075", "0.66270024", "0.6600582", "0.6593718", "0.65869516", "0.6586671", "0.65798324", "0.6578982", "0.65722543", "0.6559393", "0.6541644", "0.652...
0.7221775
0
Deprecated: Use SwitchKeeperRsp.ProtoReflect.Descriptor instead.
func (*SwitchKeeperRsp) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{6} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (SVC_Messages) EnumDescriptor() ([]byte, []int) {\n\treturn file_csgo_netmessages_proto_rawDescGZIP(), []int{4}\n}", "func (SVC_Messages) EnumDescriptor() ([]byte, []int) {\n\treturn file_netmessages_proto_rawDescGZIP(), []int{4}\n}", "func (*Deprecation) Descriptor() ([]byte, []int) {\n\treturn file_exte...
[ "0.6646759", "0.66103727", "0.65684617", "0.65414816", "0.6525648", "0.6515199", "0.65136725", "0.6510185", "0.6498448", "0.64884603", "0.6486122", "0.6476423", "0.64567405", "0.6449851", "0.6436708", "0.64062786", "0.640551", "0.6400204", "0.6399626", "0.6393379", "0.6385847...
0.7286045
0
Deprecated: Use ClusterReq.ProtoReflect.Descriptor instead.
func (*ClusterReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{7} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*UpdateClusterRequest) Descriptor() ([]byte, []int) {\n\treturn file_yandex_cloud_mdb_greenplum_v1_cluster_service_proto_rawDescGZIP(), []int{5}\n}", "func (*GetClusterRequest) Descriptor() ([]byte, []int) {\n\treturn file_yandex_cloud_mdb_greenplum_v1_cluster_service_proto_rawDescGZIP(), []int{0}\n}", "...
[ "0.7491125", "0.73855895", "0.73499507", "0.726328", "0.7217145", "0.7166124", "0.7159625", "0.7125232", "0.7053558", "0.70486265", "0.6986181", "0.6923441", "0.69186765", "0.6912716", "0.6911513", "0.69101065", "0.689375", "0.68757945", "0.6842361", "0.68397844", "0.68354857...
0.7318657
3
Deprecated: Use ClusterRsp.ProtoReflect.Descriptor instead.
func (*ClusterRsp) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{8} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*UnregisterClusterResponse) Descriptor() ([]byte, []int) {\n\treturn file_pkg_grpc_proto_cluster_cluster_proto_rawDescGZIP(), []int{4}\n}", "func (*Deprecation) Descriptor() ([]byte, []int) {\n\treturn file_external_cfgmgmt_response_nodes_proto_rawDescGZIP(), []int{8}\n}", "func (*GroupRsp) Descriptor() ...
[ "0.6898454", "0.67633843", "0.6758483", "0.6746874", "0.6743965", "0.67191446", "0.66340137", "0.66231334", "0.6572636", "0.6567905", "0.6558229", "0.6550756", "0.6548363", "0.65297997", "0.65099263", "0.65075445", "0.6496817", "0.64858085", "0.64842874", "0.6477165", "0.6475...
0.7362352
0
Deprecated: Use RegisterNodeReq.ProtoReflect.Descriptor instead.
func (*RegisterNodeReq) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{9} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*RegisterClusterNodeRequest) Descriptor() ([]byte, []int) {\n\treturn file_service_node_proto_rawDescGZIP(), []int{2}\n}", "func (*NodeGroupForNodeRequest) Descriptor() ([]byte, []int) {\n\treturn file_cloudprovider_externalgrpc_protos_externalgrpc_proto_rawDescGZIP(), []int{4}\n}", "func (*SetNodeConfig...
[ "0.6880646", "0.6877073", "0.6814076", "0.6804911", "0.67620736", "0.6750105", "0.67320293", "0.6688599", "0.66595477", "0.66334426", "0.6607929", "0.6590114", "0.6576788", "0.6574392", "0.6560336", "0.65601087", "0.65396374", "0.6493717", "0.649143", "0.64790636", "0.6475721...
0.73164415
0
Deprecated: Use RegisterNodeRsp.ProtoReflect.Descriptor instead.
func (*RegisterNodeRsp) Descriptor() ([]byte, []int) { return file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{10} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (*RegisterNodeReq) Descriptor() ([]byte, []int) {\n\treturn file_Assigneer_Assigneer_proto_rawDescGZIP(), []int{9}\n}", "func (*RegisterReply_SecondaryNodeReply) Descriptor() ([]byte, []int) {\n\treturn file_supernode_proto_rawDescGZIP(), []int{3, 1}\n}", "func (*RegisterClusterNodeResponse) Descriptor() ...
[ "0.65351105", "0.6272938", "0.6221827", "0.6136749", "0.6130905", "0.6119569", "0.61121607", "0.6094849", "0.60934556", "0.6086631", "0.6078589", "0.6075387", "0.6069023", "0.6054839", "0.60497314", "0.6033443", "0.6018209", "0.6007721", "0.59920925", "0.59901917", "0.5986334...
0.73833364
0
Serializes a tree to a single string.
func (this *Codec) serialize(root *TreeNode) string { this.s(root) return "[" + strings.Join(this.data, ",") + "]" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Tree) String() string {\n\treturn t.root.TreeString()\n}", "func (this *Codec) serialize(root *TreeNode) string {\n\tif root == nil {\n\t\treturn \"\"\n\t}\n\tans := make([]string, 0, 10)\n\tserialize(root, &ans)\n\n\treturn strings.Join(ans, \",\")\n}", "func (this *Codec) serialize(root *TreeNode) s...
[ "0.746832", "0.73955613", "0.7394086", "0.73931366", "0.7385134", "0.7371911", "0.736461", "0.7330904", "0.73293006", "0.7313392", "0.7312375", "0.7310615", "0.7280303", "0.72729224", "0.7263317", "0.72591245", "0.7251835", "0.72475904", "0.72358364", "0.7220292", "0.71898097...
0.7100859
23
Deserializes your encoded data to tree.
func (this *Codec) deserialize(data string) *TreeNode { data = data[1 : len(data)-1] this.data = strings.Split(data, ",") n := this.d() return n }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (this *Codec) deserialize(data string) *TreeNode {\n\tlist := strings.Split(data, \",\")\n\treturn buildTree(&list)\n}", "func (this *Codec) deserialize(data string) *TreeNode {\n\n\tqueue := strings.Split(data, \",\")\n\treturn buildTree(&queue)\n}", "func (this *Codec) deserialize(data string) *TreeNode...
[ "0.72836035", "0.7193018", "0.7156152", "0.70064354", "0.69082284", "0.68782", "0.68505496", "0.6845451", "0.6837301", "0.6799518", "0.6791657", "0.67909694", "0.678274", "0.6773538", "0.67478335", "0.6734582", "0.6712768", "0.6674699", "0.6654595", "0.6651541", "0.65485096",...
0.7252706
1
Process the elements of the 'do' special form
func EvalDo(env Env, seq Sequence) (res Value, err error) { res = Nil for !seq.Empty() { // Not a tail call in this position t, ok := res.(TailCall) if ok == true { res, err = t.Return() if err != nil { return } } res, err = seq.Head().Eval(env) if err != nil { return } seq = seq.Tail() } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Tempo) Do(input *SimpleBuffer) {\n\tif t.o == nil {\n\t\treturn\n\t}\n\tC.aubio_tempo_do(t.o, input.vec, t.buf.vec)\n}", "func Do(ctx context.Context, doc interface{}, opType operator.OpType, opts ...interface{}) error {\n\tif !validatorNeeded(opType) {\n\t\treturn nil\n\t}\n\tto := reflect.TypeOf(doc)\...
[ "0.6447774", "0.6129042", "0.60955185", "0.60474503", "0.6016045", "0.59603953", "0.59271395", "0.59009576", "0.5867061", "0.5775187", "0.5773696", "0.574748", "0.5735404", "0.5732381", "0.5718782", "0.57125884", "0.5695367", "0.5691763", "0.5640797", "0.5632126", "0.56307566...
0.0
-1
TableName overrides the default tablename generated by GORM
func (HealthMenstruationPersonalInfoORM) TableName() string { return "health_menstruation_personal_infos" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (user *User) TableName() string {\n return \"users\"\n}", "func (User) TableName() string {\n\treturn tableName\n}", "func (TblUser) TableName() string {\n\treturn \"tblUser\"\n}", "func TableNameNoSchema(dialect Dialect, mapper names.Mapper, tableName interface{}) string {\n\tquote := dialect.Quoter...
[ "0.7302173", "0.713911", "0.7083268", "0.7068281", "0.7064129", "0.6997782", "0.6992626", "0.69540036", "0.6950419", "0.6922991", "0.6906448", "0.6896193", "0.68884236", "0.6842365", "0.6842365", "0.6842365", "0.6842365", "0.684192", "0.6834944", "0.68174136", "0.6791999", ...
0.6537073
57
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (m *HealthMenstruationPersonalInfo) ToORM(ctx context.Context) (HealthMenstruationPersonalInfoORM, error) { to := HealthMenstruationPersonalInfoORM{} var err error if prehook, ok := interface{}(m).(HealthMenstruationPersonalInfoWithBeforeToORM); ok { if err = prehook.BeforeToORM(ctx, &to); err != nil { return to, err } } to.Id = m.Id if m.CreatedAt != nil { var t time.Time if t, err = ptypes1.Timestamp(m.CreatedAt); err != nil { return to, err } to.CreatedAt = &t } if m.UpdatedAt != nil { var t time.Time if t, err = ptypes1.Timestamp(m.UpdatedAt); err != nil { return to, err } to.UpdatedAt = &t } to.ProfileId = m.ProfileId to.PeriodLengthInDays = m.PeriodLengthInDays to.CycleLengthInDays = m.CycleLengthInDays if posthook, ok := interface{}(m).(HealthMenstruationPersonalInfoWithAfterToORM); ok { err = posthook.AfterToORM(ctx, &to) } return to, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Contact) ToORM(ctx context.Context) (ContactORM, error) {\n\tto := ContactORM{}\n\tvar err error\n\tif prehook, ok := interface{}(m).(ContactWithBeforeToORM); ok {\n\t\tif err = prehook.BeforeToORM(ctx, &to); err != nil {\n\t\t\treturn to, err\n\t\t}\n\t}\n\tto.Id = m.Id\n\tto.FirstName = m.FirstName\n\tt...
[ "0.734709", "0.71402293", "0.71162224", "0.7063234", "0.67791146", "0.66816986", "0.6518742", "0.65066636", "0.61664253", "0.61527824", "0.60039365", "0.5621043", "0.56026745", "0.55870265", "0.55276644", "0.5513942", "0.5510278", "0.54907125", "0.5351097", "0.5330373", "0.52...
0.7026667
4
ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object
func (m *HealthMenstruationPersonalInfoORM) ToPB(ctx context.Context) (HealthMenstruationPersonalInfo, error) { to := HealthMenstruationPersonalInfo{} var err error if prehook, ok := interface{}(m).(HealthMenstruationPersonalInfoWithBeforeToPB); ok { if err = prehook.BeforeToPB(ctx, &to); err != nil { return to, err } } to.Id = m.Id if m.CreatedAt != nil { if to.CreatedAt, err = ptypes1.TimestampProto(*m.CreatedAt); err != nil { return to, err } } if m.UpdatedAt != nil { if to.UpdatedAt, err = ptypes1.TimestampProto(*m.UpdatedAt); err != nil { return to, err } } to.ProfileId = m.ProfileId to.PeriodLengthInDays = m.PeriodLengthInDays to.CycleLengthInDays = m.CycleLengthInDays if posthook, ok := interface{}(m).(HealthMenstruationPersonalInfoWithAfterToPB); ok { err = posthook.AfterToPB(ctx, &to) } return to, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *ContactORM) ToPB(ctx context.Context) (Contact, error) {\n\tto := Contact{}\n\tvar err error\n\tif prehook, ok := interface{}(m).(ContactWithBeforeToPB); ok {\n\t\tif err = prehook.BeforeToPB(ctx, &to); err != nil {\n\t\t\treturn to, err\n\t\t}\n\t}\n\tto.Id = m.Id\n\tto.FirstName = m.FirstName\n\tto.Midd...
[ "0.7008476", "0.69752324", "0.6808838", "0.67246944", "0.67070097", "0.6107308", "0.603101", "0.59871733", "0.5983137", "0.57622445", "0.56662786", "0.5660519", "0.5600947", "0.55079126", "0.5474511", "0.5421043", "0.53751045", "0.53708917", "0.5343565", "0.53416985", "0.5310...
0.6098772
6
TableName overrides the default tablename generated by GORM
func (HealthMenstruationDailyEntryORM) TableName() string { return "health_menstruation_daily_entries" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (user *User) TableName() string {\n return \"users\"\n}", "func (User) TableName() string {\n\treturn tableName\n}", "func (TblUser) TableName() string {\n\treturn \"tblUser\"\n}", "func TableNameNoSchema(dialect Dialect, mapper names.Mapper, tableName interface{}) string {\n\tquote := dialect.Quoter...
[ "0.7302173", "0.713911", "0.7083268", "0.7068281", "0.7064129", "0.6997782", "0.6992626", "0.69540036", "0.6950419", "0.6922991", "0.6906448", "0.6896193", "0.68884236", "0.6842365", "0.6842365", "0.6842365", "0.6842365", "0.684192", "0.6834944", "0.68174136", "0.6791999", ...
0.6397078
81
ToORM runs the BeforeToORM hook if present, converts the fields of this object to ORM format, runs the AfterToORM hook, then returns the ORM object
func (m *HealthMenstruationDailyEntry) ToORM(ctx context.Context) (HealthMenstruationDailyEntryORM, error) { to := HealthMenstruationDailyEntryORM{} var err error if prehook, ok := interface{}(m).(HealthMenstruationDailyEntryWithBeforeToORM); ok { if err = prehook.BeforeToORM(ctx, &to); err != nil { return to, err } } to.Id = m.Id if m.CreatedAt != nil { var t time.Time if t, err = ptypes1.Timestamp(m.CreatedAt); err != nil { return to, err } to.CreatedAt = &t } if m.UpdatedAt != nil { var t time.Time if t, err = ptypes1.Timestamp(m.UpdatedAt); err != nil { return to, err } to.UpdatedAt = &t } to.ProfileId = m.ProfileId if m.Day != nil { var t time.Time if t, err = ptypes1.Timestamp(m.Day); err != nil { return to, err } to.Day = &t } to.IntensityPercentage = m.IntensityPercentage to.Type = int32(m.Type) to.Manual = m.Manual to.BasedOnPrediction = m.BasedOnPrediction if posthook, ok := interface{}(m).(HealthMenstruationDailyEntryWithAfterToORM); ok { err = posthook.AfterToORM(ctx, &to) } return to, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *Contact) ToORM(ctx context.Context) (ContactORM, error) {\n\tto := ContactORM{}\n\tvar err error\n\tif prehook, ok := interface{}(m).(ContactWithBeforeToORM); ok {\n\t\tif err = prehook.BeforeToORM(ctx, &to); err != nil {\n\t\t\treturn to, err\n\t\t}\n\t}\n\tto.Id = m.Id\n\tto.FirstName = m.FirstName\n\tt...
[ "0.7346256", "0.7139889", "0.71160406", "0.7061915", "0.7026141", "0.6680758", "0.651739", "0.65058774", "0.6165296", "0.61525524", "0.60034645", "0.5619845", "0.56022626", "0.5586433", "0.5527513", "0.5513322", "0.55083215", "0.5489093", "0.5349258", "0.53281444", "0.5287390...
0.67786556
5
ToPB runs the BeforeToPB hook if present, converts the fields of this object to PB format, runs the AfterToPB hook, then returns the PB object
func (m *HealthMenstruationDailyEntryORM) ToPB(ctx context.Context) (HealthMenstruationDailyEntry, error) { to := HealthMenstruationDailyEntry{} var err error if prehook, ok := interface{}(m).(HealthMenstruationDailyEntryWithBeforeToPB); ok { if err = prehook.BeforeToPB(ctx, &to); err != nil { return to, err } } to.Id = m.Id if m.CreatedAt != nil { if to.CreatedAt, err = ptypes1.TimestampProto(*m.CreatedAt); err != nil { return to, err } } if m.UpdatedAt != nil { if to.UpdatedAt, err = ptypes1.TimestampProto(*m.UpdatedAt); err != nil { return to, err } } to.ProfileId = m.ProfileId if m.Day != nil { if to.Day, err = ptypes1.TimestampProto(*m.Day); err != nil { return to, err } } to.IntensityPercentage = m.IntensityPercentage to.Type = HealthMenstruationDailyEntry_Type(m.Type) to.Manual = m.Manual to.BasedOnPrediction = m.BasedOnPrediction if posthook, ok := interface{}(m).(HealthMenstruationDailyEntryWithAfterToPB); ok { err = posthook.AfterToPB(ctx, &to) } return to, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (m *ContactORM) ToPB(ctx context.Context) (Contact, error) {\n\tto := Contact{}\n\tvar err error\n\tif prehook, ok := interface{}(m).(ContactWithBeforeToPB); ok {\n\t\tif err = prehook.BeforeToPB(ctx, &to); err != nil {\n\t\t\treturn to, err\n\t\t}\n\t}\n\tto.Id = m.Id\n\tto.FirstName = m.FirstName\n\tto.Midd...
[ "0.7009581", "0.69764227", "0.6810474", "0.67255133", "0.67079705", "0.610796", "0.6100014", "0.6029623", "0.5987019", "0.5984469", "0.57624716", "0.5666927", "0.5660824", "0.5600371", "0.5506886", "0.54738975", "0.54206467", "0.53750503", "0.53714156", "0.5343201", "0.534181...
0.5228932
24
DefaultCreateHealthMenstruationPersonalInfo executes a basic gorm create call
func DefaultCreateHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) { if in == nil { return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeCreate_); ok { if db, err = hook.BeforeCreate_(ctx, db); err != nil { return nil, err } } if err = db.Create(&ormObj).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithAfterCreate_); ok { if err = hook.AfterCreate_(ctx, db); err != nil { return nil, err } } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultCreateHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif hook, ok :...
[ "0.62478477", "0.61608213", "0.60926765", "0.58868814", "0.5844858", "0.5783213", "0.5739187", "0.57295036", "0.5607786", "0.55578446", "0.5516983", "0.5479335", "0.5433335", "0.5418112", "0.5392498", "0.5370654", "0.5341402", "0.5338584", "0.5335343", "0.53119457", "0.530992...
0.81025505
0
DefaultReadHealthMenstruationPersonalInfo executes a basic gorm read call
func DefaultReadHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) { if in == nil { return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if ormObj.Id == 0 { return nil, errors1.EmptyIdError } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeReadApplyQuery); ok { if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { return nil, err } } if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &HealthMenstruationPersonalInfoORM{}); err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeReadFind); ok { if db, err = hook.BeforeReadFind(ctx, db); err != nil { return nil, err } } ormResponse := HealthMenstruationPersonalInfoORM{} if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormResponse).(HealthMenstruationPersonalInfoORMWithAfterReadFind); ok { if err = hook.AfterReadFind(ctx, db); err != nil { return nil, err } } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultListHealthMenstruationPersonalInfo(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*HealthMenstruationPersonalInfo, error) {\n\tin := HealthMenstruationPersonalInfo{}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\tr...
[ "0.6508357", "0.6502102", "0.592265", "0.55418086", "0.5489267", "0.5150009", "0.5091859", "0.5085893", "0.50467646", "0.50467646", "0.5016166", "0.498452", "0.49298856", "0.49238548", "0.48962358", "0.4871131", "0.4861762", "0.4857159", "0.48419893", "0.4817505", "0.4797317"...
0.82387173
0
DefaultStrictUpdateHealthMenstruationPersonalInfo clears first level 1:many children and then executes a gorm update call
func DefaultStrictUpdateHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateHealthMenstruationPersonalInfo") } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } lockedRow := &HealthMenstruationPersonalInfoORM{} db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err } } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeStrictUpdateSave); ok { if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { return nil, err } } if err = db.Save(&ormObj).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithAfterStrictUpdateSave); ok { if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { return nil, err } } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tvar pbObj HealthMenstruationPersonalInfo\n\tvar er...
[ "0.5985215", "0.5647233", "0.5622791", "0.56116664", "0.55547845", "0.5524893", "0.5467763", "0.5339883", "0.5237392", "0.5117131", "0.49089316", "0.4896554", "0.48413637", "0.47866955", "0.47696465", "0.47048986", "0.4685417", "0.46649095", "0.46379796", "0.45873073", "0.458...
0.66284704
0
DefaultPatchHealthMenstruationPersonalInfo executes a basic gorm update call with patch behavior
func DefaultPatchHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) { if in == nil { return nil, errors1.NilArgumentError } var pbObj HealthMenstruationPersonalInfo var err error if hook, ok := interface{}(&pbObj).(HealthMenstruationPersonalInfoWithBeforePatchRead); ok { if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { return nil, err } } pbReadRes, err := DefaultReadHealthMenstruationPersonalInfo(ctx, &HealthMenstruationPersonalInfo{Id: in.GetId()}, db) if err != nil { return nil, err } pbObj = *pbReadRes if hook, ok := interface{}(&pbObj).(HealthMenstruationPersonalInfoWithBeforePatchApplyFieldMask); ok { if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { return nil, err } } if _, err := DefaultApplyFieldMaskHealthMenstruationPersonalInfo(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(HealthMenstruationPersonalInfoWithBeforePatchSave); ok { if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } pbResponse, err := DefaultStrictUpdateHealthMenstruationPersonalInfo(ctx, &pbObj, db) if err != nil { return nil, err } if hook, ok := interface{}(pbResponse).(HealthMenstruationPersonalInfoWithAfterPatchSave); ok { if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } return pbResponse, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultStrictUpdateHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) {\n\tif in == nil {\n\t\treturn nil, fmt.Errorf(\"Nil argument to DefaultStrictUpdateHealthMenstruationPersonalInfo\")\n\t}\n\tormObj, err := in.ToO...
[ "0.6955901", "0.6920714", "0.67520493", "0.6015795", "0.5904203", "0.58468133", "0.57761717", "0.54057676", "0.5382812", "0.5315544", "0.53136206", "0.52500725", "0.52303386", "0.52146894", "0.52062315", "0.5170349", "0.51479495", "0.5147029", "0.5141474", "0.5135123", "0.512...
0.7722697
0
DefaultPatchSetHealthMenstruationPersonalInfo executes a bulk gorm update call with patch behavior
func DefaultPatchSetHealthMenstruationPersonalInfo(ctx context.Context, objects []*HealthMenstruationPersonalInfo, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*HealthMenstruationPersonalInfo, error) { if len(objects) != len(updateMasks) { return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) } results := make([]*HealthMenstruationPersonalInfo, 0, len(objects)) for i, patcher := range objects { pbResponse, err := DefaultPatchHealthMenstruationPersonalInfo(ctx, patcher, updateMasks[i], db) if err != nil { return nil, err } results = append(results, pbResponse) } return results, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tvar pbObj HealthMenstruationPersonalInfo\n\tvar er...
[ "0.73712814", "0.68489635", "0.67874825", "0.6128026", "0.5711539", "0.5652175", "0.56520283", "0.5566631", "0.531773", "0.5257406", "0.5192818", "0.51048386", "0.50799334", "0.50211227", "0.4973502", "0.495612", "0.49225268", "0.48665044", "0.48514032", "0.4844714", "0.48313...
0.7332748
1
DefaultApplyFieldMaskHealthMenstruationPersonalInfo patches an pbObject with patcher according to a field mask.
func DefaultApplyFieldMaskHealthMenstruationPersonalInfo(ctx context.Context, patchee *HealthMenstruationPersonalInfo, patcher *HealthMenstruationPersonalInfo, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) { if patcher == nil { return nil, nil } else if patchee == nil { return nil, errors1.NilArgumentError } var err error for _, f := range updateMask.Paths { if f == prefix+"Id" { patchee.Id = patcher.Id continue } if f == prefix+"CreatedAt" { patchee.CreatedAt = patcher.CreatedAt continue } if f == prefix+"UpdatedAt" { patchee.UpdatedAt = patcher.UpdatedAt continue } if f == prefix+"ProfileId" { patchee.ProfileId = patcher.ProfileId continue } if f == prefix+"PeriodLengthInDays" { patchee.PeriodLengthInDays = patcher.PeriodLengthInDays continue } if f == prefix+"CycleLengthInDays" { patchee.CycleLengthInDays = patcher.CycleLengthInDays continue } } if err != nil { return nil, err } return patchee, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchSetHealthMenstruationPersonalInfo(ctx context.Context, objects []*HealthMenstruationPersonalInfo, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*HealthMenstruationPersonalInfo, error) {\n\tif len(objects) != len(updateMasks) {\n\t\treturn nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, l...
[ "0.68944365", "0.6709619", "0.6301576", "0.6023577", "0.59261936", "0.58738303", "0.53895783", "0.52678984", "0.5183263", "0.51596296", "0.5065274", "0.5012141", "0.4974999", "0.49678084", "0.4946724", "0.4827448", "0.47386423", "0.4725287", "0.4687354", "0.46094146", "0.4591...
0.7750504
0
DefaultListHealthMenstruationPersonalInfo executes a gorm list call
func DefaultListHealthMenstruationPersonalInfo(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*HealthMenstruationPersonalInfo, error) { in := HealthMenstruationPersonalInfo{} ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeListApplyQuery); ok { if db, err = hook.BeforeListApplyQuery(ctx, db, f, s, p, fs); err != nil { return nil, err } } db, err = gorm2.ApplyCollectionOperators(ctx, db, &HealthMenstruationPersonalInfoORM{}, &HealthMenstruationPersonalInfo{}, f, s, p, fs) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithBeforeListFind); ok { if db, err = hook.BeforeListFind(ctx, db, f, s, p, fs); err != nil { return nil, err } } db = db.Where(&ormObj) db = db.Order("id") ormResponse := []HealthMenstruationPersonalInfoORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationPersonalInfoORMWithAfterListFind); ok { if err = hook.AfterListFind(ctx, db, &ormResponse, f, s, p, fs); err != nil { return nil, err } } pbResponse := []*HealthMenstruationPersonalInfo{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) if err != nil { return nil, err } pbResponse = append(pbResponse, &temp) } return pbResponse, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultReadHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif ormObj...
[ "0.66679907", "0.62190366", "0.6153077", "0.59601074", "0.5529576", "0.54876083", "0.54529107", "0.53328735", "0.53084356", "0.5276146", "0.5210479", "0.5182747", "0.51378894", "0.51373833", "0.51039445", "0.5103527", "0.5103344", "0.5102155", "0.5064931", "0.5045218", "0.504...
0.821063
0
DefaultCreateHealthMenstruationDailyEntry executes a basic gorm create call
func DefaultCreateHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) { if in == nil { return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeCreate_); ok { if db, err = hook.BeforeCreate_(ctx, db); err != nil { return nil, err } } if err = db.Create(&ormObj).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithAfterCreate_); ok { if err = hook.AfterCreate_(ctx, db); err != nil { return nil, err } } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultCreateHealthMenstruationPersonalInfo(ctx context.Context, in *HealthMenstruationPersonalInfo, db *gorm1.DB) (*HealthMenstruationPersonalInfo, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif hook...
[ "0.63600236", "0.6293879", "0.62592554", "0.6080919", "0.5723222", "0.56579703", "0.5514651", "0.5431401", "0.5408429", "0.5314862", "0.5306656", "0.53030455", "0.5234485", "0.5054075", "0.5029634", "0.5025869", "0.49344203", "0.49251345", "0.49183023", "0.4915359", "0.487645...
0.8274689
0
DefaultReadHealthMenstruationDailyEntry executes a basic gorm read call
func DefaultReadHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) { if in == nil { return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if ormObj.Id == 0 { return nil, errors1.EmptyIdError } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeReadApplyQuery); ok { if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { return nil, err } } if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &HealthMenstruationDailyEntryORM{}); err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeReadFind); ok { if db, err = hook.BeforeReadFind(ctx, db); err != nil { return nil, err } } ormResponse := HealthMenstruationDailyEntryORM{} if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormResponse).(HealthMenstruationDailyEntryORMWithAfterReadFind); ok { if err = hook.AfterReadFind(ctx, db); err != nil { return nil, err } } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultListHealthMenstruationDailyEntry(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*HealthMenstruationDailyEntry, error) {\n\tin := HealthMenstruationDailyEntry{}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\treturn ...
[ "0.68675816", "0.65901476", "0.630962", "0.59756255", "0.57466877", "0.5386397", "0.5284462", "0.51186156", "0.5106763", "0.51045865", "0.50709534", "0.5024787", "0.49427426", "0.4860348", "0.48528224", "0.48139605", "0.47631463", "0.47389635", "0.46977806", "0.4647224", "0.4...
0.83156854
0
DefaultStrictUpdateHealthMenstruationDailyEntry clears first level 1:many children and then executes a gorm update call
func DefaultStrictUpdateHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateHealthMenstruationDailyEntry") } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } lockedRow := &HealthMenstruationDailyEntryORM{} db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err } } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeStrictUpdateSave); ok { if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { return nil, err } } if err = db.Save(&ormObj).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithAfterStrictUpdateSave); ok { if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { return nil, err } } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } return &pbResponse, err }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tvar pbObj HealthMenstruationDailyEntry\n\tvar err error\...
[ "0.6325353", "0.60747105", "0.6054701", "0.59975785", "0.58065385", "0.5620147", "0.54418504", "0.50306076", "0.49060896", "0.47815248", "0.47454336", "0.4728229", "0.47249833", "0.47200248", "0.47140735", "0.46733493", "0.46712738", "0.46654415", "0.4653481", "0.46406284", "...
0.6900533
0
DefaultPatchHealthMenstruationDailyEntry executes a basic gorm update call with patch behavior
func DefaultPatchHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) { if in == nil { return nil, errors1.NilArgumentError } var pbObj HealthMenstruationDailyEntry var err error if hook, ok := interface{}(&pbObj).(HealthMenstruationDailyEntryWithBeforePatchRead); ok { if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { return nil, err } } pbReadRes, err := DefaultReadHealthMenstruationDailyEntry(ctx, &HealthMenstruationDailyEntry{Id: in.GetId()}, db) if err != nil { return nil, err } pbObj = *pbReadRes if hook, ok := interface{}(&pbObj).(HealthMenstruationDailyEntryWithBeforePatchApplyFieldMask); ok { if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { return nil, err } } if _, err := DefaultApplyFieldMaskHealthMenstruationDailyEntry(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(HealthMenstruationDailyEntryWithBeforePatchSave); ok { if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } pbResponse, err := DefaultStrictUpdateHealthMenstruationDailyEntry(ctx, &pbObj, db) if err != nil { return nil, err } if hook, ok := interface{}(pbResponse).(HealthMenstruationDailyEntryWithAfterPatchSave); ok { if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } return pbResponse, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchSetHealthMenstruationDailyEntry(ctx context.Context, objects []*HealthMenstruationDailyEntry, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*HealthMenstruationDailyEntry, error) {\n\tif len(objects) != len(updateMasks) {\n\t\treturn nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(upd...
[ "0.7222593", "0.7203764", "0.71346027", "0.61198723", "0.611169", "0.61003435", "0.60970485", "0.5833735", "0.56815296", "0.5427646", "0.5337418", "0.5189905", "0.51254106", "0.5099041", "0.5030987", "0.5012633", "0.5009468", "0.49955863", "0.49036223", "0.490358", "0.4886072...
0.7921038
0
DefaultPatchSetHealthMenstruationDailyEntry executes a bulk gorm update call with patch behavior
func DefaultPatchSetHealthMenstruationDailyEntry(ctx context.Context, objects []*HealthMenstruationDailyEntry, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*HealthMenstruationDailyEntry, error) { if len(objects) != len(updateMasks) { return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) } results := make([]*HealthMenstruationDailyEntry, 0, len(objects)) for i, patcher := range objects { pbResponse, err := DefaultPatchHealthMenstruationDailyEntry(ctx, patcher, updateMasks[i], db) if err != nil { return nil, err } results = append(results, pbResponse) } return results, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tvar pbObj HealthMenstruationDailyEntry\n\tvar err error\...
[ "0.75062126", "0.7110765", "0.7044403", "0.6352366", "0.584969", "0.58379257", "0.5815472", "0.58114034", "0.58000535", "0.5753678", "0.49336112", "0.49001288", "0.4879783", "0.487446", "0.4820178", "0.48102048", "0.4777965", "0.47738504", "0.47666943", "0.47600615", "0.47389...
0.755557
0
DefaultApplyFieldMaskHealthMenstruationDailyEntry patches an pbObject with patcher according to a field mask.
func DefaultApplyFieldMaskHealthMenstruationDailyEntry(ctx context.Context, patchee *HealthMenstruationDailyEntry, patcher *HealthMenstruationDailyEntry, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) { if patcher == nil { return nil, nil } else if patchee == nil { return nil, errors1.NilArgumentError } var err error for _, f := range updateMask.Paths { if f == prefix+"Id" { patchee.Id = patcher.Id continue } if f == prefix+"CreatedAt" { patchee.CreatedAt = patcher.CreatedAt continue } if f == prefix+"UpdatedAt" { patchee.UpdatedAt = patcher.UpdatedAt continue } if f == prefix+"ProfileId" { patchee.ProfileId = patcher.ProfileId continue } if f == prefix+"Day" { patchee.Day = patcher.Day continue } if f == prefix+"IntensityPercentage" { patchee.IntensityPercentage = patcher.IntensityPercentage continue } if f == prefix+"Type" { patchee.Type = patcher.Type continue } if f == prefix+"Manual" { patchee.Manual = patcher.Manual continue } if f == prefix+"BasedOnPrediction" { patchee.BasedOnPrediction = patcher.BasedOnPrediction continue } } if err != nil { return nil, err } return patchee, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultPatchSetHealthMenstruationDailyEntry(ctx context.Context, objects []*HealthMenstruationDailyEntry, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*HealthMenstruationDailyEntry, error) {\n\tif len(objects) != len(updateMasks) {\n\t\treturn nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(upd...
[ "0.7373707", "0.70680124", "0.67444634", "0.6065729", "0.5949686", "0.57163745", "0.5495746", "0.54638475", "0.5452421", "0.5412164", "0.5399574", "0.53054893", "0.52838326", "0.5168645", "0.505817", "0.5040415", "0.46125427", "0.46034554", "0.45514354", "0.4538858", "0.45022...
0.8058049
0
DefaultListHealthMenstruationDailyEntry executes a gorm list call
func DefaultListHealthMenstruationDailyEntry(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*HealthMenstruationDailyEntry, error) { in := HealthMenstruationDailyEntry{} ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeListApplyQuery); ok { if db, err = hook.BeforeListApplyQuery(ctx, db, f, s, p, fs); err != nil { return nil, err } } db, err = gorm2.ApplyCollectionOperators(ctx, db, &HealthMenstruationDailyEntryORM{}, &HealthMenstruationDailyEntry{}, f, s, p, fs) if err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithBeforeListFind); ok { if db, err = hook.BeforeListFind(ctx, db, f, s, p, fs); err != nil { return nil, err } } db = db.Where(&ormObj) db = db.Order("id") ormResponse := []HealthMenstruationDailyEntryORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } if hook, ok := interface{}(&ormObj).(HealthMenstruationDailyEntryORMWithAfterListFind); ok { if err = hook.AfterListFind(ctx, db, &ormResponse, f, s, p, fs); err != nil { return nil, err } } pbResponse := []*HealthMenstruationDailyEntry{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) if err != nil { return nil, err } pbResponse = append(pbResponse, &temp) } return pbResponse, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func DefaultReadHealthMenstruationDailyEntry(ctx context.Context, in *HealthMenstruationDailyEntry, db *gorm1.DB) (*HealthMenstruationDailyEntry, error) {\n\tif in == nil {\n\t\treturn nil, errors1.NilArgumentError\n\t}\n\tormObj, err := in.ToORM(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif ormObj.Id ==...
[ "0.6793589", "0.63662523", "0.63374996", "0.6103", "0.59037894", "0.5617607", "0.550038", "0.52984416", "0.51921606", "0.4919258", "0.49057636", "0.48713672", "0.4870926", "0.48581", "0.48579657", "0.48564038", "0.4812534", "0.47780845", "0.47510096", "0.47248134", "0.4717043...
0.8378897
0
Rank returns how many nodes less than max value.
func (t *Tree) Rank(max int) int { return rank(t.Tree, max) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Tree) Rank(val float64) int {\n\treturn t.root.Rank(val)\n}", "func (e *Election) Rank() []int {\n\tres := make([]int, e.N)\n\tfor i := 0; i < e.N; i++ {\n\t\tfor j := i + 1; j < e.N; j++ {\n\t\t\tr := e.cmp(i, j)\n\t\t\tif r < 0 {\n\t\t\t\tres[i]++\n\t\t\t} else if r > 0 {\n\t\t\t\tres[j]++\n\t\t\t}\n\...
[ "0.67093927", "0.65358585", "0.64453703", "0.62586796", "0.62451345", "0.62282676", "0.6174461", "0.6084651", "0.59903634", "0.5844654", "0.5832536", "0.580517", "0.567707", "0.561967", "0.5608135", "0.5576382", "0.55679417", "0.5543277", "0.5539918", "0.550763", "0.5503924",...
0.7792387
0
Size returns how many nodes between range
func (t *Tree) Size(lo, hi int) int { result := rank(t.Tree, hi) - rank(t.Tree, lo) if contains(t.Tree, hi) { result++ } return result }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (g *Graph) Size() int { return len(g.nodes) }", "func (n *TreeBuilderNode) Size() uint64 { return n.size }", "func (n Nodes) Len() int", "func (h *hashRing) Size() int {\n\treturn len(h.nodes)\n}", "func (n nodes) Len() int { return len(n) }", "func (lb *LoadBalancer) Size() int {\n\treturn len(lb.n...
[ "0.74679583", "0.71741176", "0.7047884", "0.7019155", "0.69828427", "0.6826053", "0.6789677", "0.67552245", "0.6690559", "0.66762626", "0.6667847", "0.66322196", "0.6608516", "0.6595891", "0.65939176", "0.65819585", "0.6556362", "0.65378356", "0.65339345", "0.6522922", "0.651...
0.676163
7
RegisterChannelzServiceToServer registers the channelz service to the given server. Note: it is preferred to use the admin API ( instead to register Channelz and other administrative services.
func RegisterChannelzServiceToServer(s grpc.ServiceRegistrar) { channelzgrpc.RegisterChannelzServer(s, newCZServer()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func RegisterServer(cb interface{}, s interface{}) {\n\tsvrName, _ := reflector.GetName(s)\n\tsvr := &grpcService{\n\t\tname: svrName,\n\t\tcb: cb,\n\t\tsvc: s,\n\t}\n\tgrpcServers = append(grpcServers, svr)\n}", "func (ss *storageServer) RegisterServer(args *storagerpc.RegisterArgs, reply *storagerpc.Registe...
[ "0.6962951", "0.6499365", "0.64940494", "0.62961686", "0.6150645", "0.61200964", "0.609665", "0.60660225", "0.593484", "0.5928594", "0.59166455", "0.59086245", "0.58979774", "0.58734566", "0.58527607", "0.5834305", "0.5828885", "0.5793394", "0.5770595", "0.57611436", "0.57187...
0.876372
0
parseFunctions ... Reads a parsers.of lines and parses Function structs from it.
func (i Interface) parseFunctions(contentLines []string) []Function { var functions []Function for _, line := range contentLines { if isPureVirtualDefinition(line) { newFunction := NewFunction(line) functions = append(functions, *newFunction) } } return functions }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ParseGo(code string) (functions map[uint64]*function.Function) {\n\n\tcodeLines := strings.Split(code, \"\\n\")\n\n\tfunctions = make(map[uint64]*function.Function)\n\n\tvar (\n\t\tstartLine uint64\n\t\tendLine uint64\n\t\tcomment string\n\t\tfunctionContent string\n\t\tstate =...
[ "0.647542", "0.6471392", "0.64463437", "0.64396536", "0.641464", "0.6380902", "0.62952745", "0.6153932", "0.60824454", "0.60764724", "0.59445286", "0.5792225", "0.56793004", "0.5501519", "0.54934597", "0.54603106", "0.5328648", "0.5324013", "0.5319592", "0.5314563", "0.526967...
0.72543186
0
parseDependencies ... The term "dependency" is used here to refer to any data type that may require an include or forward declare.
func (i *Interface) parseDependencies() { var dependencies []string for _, function := range i.Functions { // "expanded" refers to creating a parsers.from a templated type, i.e "QMap <int, QString>" becomes [QMap int QString] expandedReturnType := strings.FieldsFunc(function.ReturnType, templatedTypeSeparators) for _, dataType := range(expandedReturnType) { dependencies = append(dependencies, strings.TrimSpace(dataType)) } for _, parameter := range function.Parameters { expandedParameter := strings.FieldsFunc(parameter.Type, templatedTypeSeparators) for _, innerParameter := range expandedParameter { dependencies = append(dependencies, strings.TrimSpace(innerParameter)) } } } i.Dependencies = dependencies i.Dependencies = parsers.RemoveConstSpecifiers(i.Dependencies) i.Dependencies = parsers.RemovePointersAndReferences(i.Dependencies) i.Dependencies = parsers.RemoveStdDataTypes(i.Dependencies) i.Dependencies = parsers.MapDataTypesToLibraryDependencies(i.Dependencies) i.Dependencies = parsers.RemoveDuplicates(i.Dependencies) sort.Strings(i.Dependencies) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func calculateDependencies(definition string) (definitions dependencies, err error) {\n half := make(dependencies, 0)\n marked := make(dependencies, 0)\n\n err = visitDefinition(definition, &half, &marked)\n\n if nil == err {\n definitions = marked\n }\n\n return\n}", "func convertDependencies(deps []st...
[ "0.65340716", "0.61912113", "0.61908144", "0.60914624", "0.60624367", "0.60466945", "0.6029449", "0.60245776", "0.5904961", "0.58684546", "0.58485883", "0.5831142", "0.5789253", "0.5765972", "0.5744005", "0.5741016", "0.56804025", "0.5667477", "0.5642951", "0.5637858", "0.562...
0.70350784
0
parseIncludes .. Parses dependencies to create an include string for each.
func (i *Interface) parseIncludes() { for _, dependency := range i.Dependencies { include := NewInclude(dependency) if parsers.ShouldBeIncludedInHeader(dependency) { i.HeaderIncludesString += include.ToString() + "\n" } else { i.ImplementationIncludesString += include.ToString() + "\n" } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func processIncludes(source string) string {\n\tlines := strings.Split(source, \"\\n\")\n\tvar result []string\n\tfor _, line := range lines {\n\t\ttrimmed := strings.TrimSpace(line)\n\t\tif url := parseIncludeURL(trimmed); url != \"\" {\n\t\t\tif buf, err := curl(url); err == nil {\n\t\t\t\tresult = append(result...
[ "0.678124", "0.6446041", "0.61750436", "0.610039", "0.6088763", "0.59693265", "0.5771785", "0.5586935", "0.5545841", "0.5491811", "0.5489514", "0.5452785", "0.5350742", "0.5308133", "0.53067124", "0.53055584", "0.53052", "0.5304817", "0.53026134", "0.5296373", "0.5293165", ...
0.8502233
0
parseForwardDeclares .. Parses dependencies to create an foward declare string for each.
func (i *Interface) parseForwardDeclares() { for _, dependency := range i.Dependencies { if !parsers.ShouldBeIncludedInHeader(dependency) { i.ForwardDeclaresString += "class " + dependency + ";\n" } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (i *Interface) parseDependencies() {\n\tvar dependencies []string\n\tfor _, function := range i.Functions {\n\n\t\t// \"expanded\" refers to creating a parsers.from a templated type, i.e \"QMap <int, QString>\" becomes [QMap int QString]\n\t\texpandedReturnType := strings.FieldsFunc(function.ReturnType, templ...
[ "0.5435614", "0.52448463", "0.5116722", "0.5092922", "0.50283545", "0.49758297", "0.49256507", "0.48094022", "0.4736206", "0.47182396", "0.47119275", "0.47046313", "0.46832284", "0.46707126", "0.4668004", "0.46470323", "0.46359763", "0.46307617", "0.46247268", "0.4615384", "0...
0.808147
0
isPureVirtualDefinition ... Returns whether a function is pure virtual.
func isPureVirtualDefinition(line string) bool { line = strings.Replace(line, " ", "", -1) return (strings.Contains(line, "virtual") && strings.Contains(line, "=0;")) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (tp Type) IsVirtualTable() bool {\n\treturn tp == VirtualTable\n}", "func (b *IBFCell) IsPure() bool {\n\treturn (b.Count == 1 || b.Count == -1) && b.HashSum.Uint64() == checkSumHash(b.IDSum.Uint64())\n}", "func (o *os) HasVirtualKeyboard() gdnative.Bool {\n\to.ensureSingleton()\n\t//log.Println(\"Calling...
[ "0.5725554", "0.56338274", "0.52214384", "0.52026784", "0.5111255", "0.4992483", "0.49429774", "0.48418856", "0.47752437", "0.46805793", "0.46731955", "0.4661175", "0.46523353", "0.46268716", "0.45680475", "0.45335254", "0.45149964", "0.44207093", "0.44183782", "0.44175613", ...
0.7474248
0
Fields ... The fields within templates to be replaced.
func (i Interface) Fields() map[string]string { fields := make(map[string]string) fields["{{Interface.Name}}"] = i.Name fields["{{FileName}}"] = i.FileName fields["{{Interface.DefineName}}"] = i.DefineName return fields }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {\n\tc.urlParams_.Set(\"fields\", googleapi.CombineFields(s))\n\treturn c\n}", "func (Template) Fields() []ent.Field {\n\treturn []ent.Field{\n\t\tfield.String(\"name\").MaxLen(255).MinLen(1),\n\t\tfield.Enum(\"sele...
[ "0.6189393", "0.61858684", "0.6121268", "0.60077", "0.5991178", "0.5689581", "0.5688557", "0.5664367", "0.5615151", "0.55025023", "0.5417566", "0.53887886", "0.5387306", "0.53794956", "0.53793156", "0.53708047", "0.53572786", "0.5301624", "0.52675027", "0.52467805", "0.524158...
0.0
-1
templatedTypeSeparators ... Used to expand templated types such as QMap>
func templatedTypeSeparators (r rune) bool { return r == '<' || r == '>' || r == ',' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func mapKeyType(v interface{}) string {\n\tstr := toString(v)\n\tkey, value, found := stringsCut(str, \",\")\n\tif !found || !strings.HasPrefix(key, \"map<\") || !strings.HasSuffix(value, \">\") {\n\t\tpanic(fmt.Errorf(\"mapKeyValue: expected map<Type1,Type2>, got %v\", str))\n\t}\n\treturn strings.TrimPrefix(key,...
[ "0.49833834", "0.49633592", "0.46772054", "0.4589316", "0.4566254", "0.45600334", "0.45434427", "0.45412755", "0.4482598", "0.44440588", "0.44426832", "0.44411588", "0.44343516", "0.4406544", "0.4406173", "0.44015318", "0.43420374", "0.4330905", "0.43104362", "0.43059155", "0...
0.7430346
0
isEtcdConfigFile returns whether the given path looks like a configuration file, and in that case it returns the corresponding hash to detect modifications.
func isEtcdConfigFile(path string) (bool, fhash) { if info, err := os.Stat(path); err != nil || info.IsDir() { return false, fhash{} } b, err := os.ReadFile(path) if err != nil { return false, fhash{} } // search for the "endpoints:" string if strings.Contains(string(b), "endpoints:") { return true, sha256.Sum256(b) } return false, fhash{} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ParseConfigFile(path string) (*Config, error) {\n\t// slurp\n\tvar buf bytes.Buffer\n\tpath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tf, err := os.Open(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer f.Close()\n\tif _, err := io.Copy(&buf, f); err != nil {\n\t\tr...
[ "0.5153754", "0.50409085", "0.50409085", "0.49216852", "0.48767686", "0.476166", "0.46999902", "0.4645964", "0.46016797", "0.45887595", "0.4587537", "0.45873547", "0.45760208", "0.4569562", "0.4514388", "0.45088005", "0.45053396", "0.4501646", "0.4494398", "0.4474307", "0.446...
0.8127358
0
getDirection from byte. Panics on unknown direction.
func getDirection(d byte) direction { switch d { case 'R': return right case 'L': return left case 'U': return up case 'D': return down default: panic(fmt.Sprintf("unknown direction %v", d)) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (behaviour *Dumb) GetDirection() basic.Direction {\n\treturn behaviour.direction\n}", "func (self Source) GetDirection(result *Vector) {\n\tresult[x], result[y], result[z] = self.Get3f(AlDirection)\n}", "func convertDirectionCode(gpxDirCode string) uint8 {\n\n\tbrytonDirCode := DirectionCodeGoAhead\n\n\ts...
[ "0.61097026", "0.6080042", "0.5982142", "0.5905596", "0.5870495", "0.58615726", "0.5804797", "0.5659074", "0.56584334", "0.5656549", "0.5628965", "0.5622957", "0.5585129", "0.54656595", "0.5448121", "0.54473263", "0.5446236", "0.5445572", "0.5425969", "0.539548", "0.5385884",...
0.79665715
0
addSegment to the wire.
func (w *wire) addSegment(dir direction, dist int) { var lastPoint point if len(w.points) != 0 { lastPoint = w.points[len(w.points)-1] } w.points = append(w.points, lastPoint.move(dir, dist)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (a *AST) AddSegment(seg *Segment) {\n\t_ = seg.SetParent(a)\n\ta.segs = append(a.segs, seg)\n}", "func (wire *Wire) AddWireSegment(dir byte, magnitude int) error {\n\tvar newSegment segment\n\tif wire.wireSegments == nil {\n\t\tnewSegment.start = Point{0, 0}\n\t\tnewSegment.end = Point{0, 0}\n\t} else {\n\t...
[ "0.6925719", "0.68303204", "0.6809465", "0.6660276", "0.6556915", "0.6511233", "0.6299954", "0.6058295", "0.5953473", "0.5953473", "0.5953473", "0.5941569", "0.5933238", "0.58960634", "0.57868844", "0.5649867", "0.55553", "0.5448272", "0.5372132", "0.5351253", "0.52755", "0...
0.76127625
0
interceptPoints returns every point where the wire collides with wire o. The points' wireLen is the total wire length to get to that point (both wire combined).
func (w *wire) interceptPoints(o wire) []point { var interceptPoints []point for i := 1; i < len(w.points); i++ { v1 := segment{ from: w.points[i-1], to: w.points[i], } for u := 1; u < len(o.points); u++ { v2 := segment{ from: o.points[u-1], to: o.points[u], } intercept := v1.intercepts(v2) if intercept.x != 0 && intercept.y != 0 { // Calculate total wire length (both wires combined) intercept.wireLen = v1.from.wireLen + intercept.distanceToPoint(v1.from) + v2.from.wireLen + intercept.distanceToPoint(v2.from) interceptPoints = append(interceptPoints, intercept) } } } return interceptPoints }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (l line2) SlopeIntercept() (float64, float64) {\n\tslope := (l.end.y - l.start.y) / (l.end.x - l.start.x)\n\tintercept := l.start.y - slope*l.start.x\n\treturn slope, intercept\n}", "func (l *Line) GetIntersectionPoints(other Shape) []IntersectionPoint {\n\n\tintersections := []IntersectionPoint{}\n\n\tswit...
[ "0.5369969", "0.5363394", "0.52974355", "0.5246381", "0.5191002", "0.48185128", "0.46456409", "0.45902103", "0.4585371", "0.45481473", "0.45180067", "0.44956204", "0.44434085", "0.44339702", "0.4428231", "0.44268453", "0.4377828", "0.43652183", "0.43572596", "0.43551555", "0....
0.8265049
0
move returns a new point that has the same properties as the point, but has moved a certain distance dist in direction dir.
func (p point) move(dir direction, dist int) point { var movedPoint point switch dir { case up: movedPoint = point{x: p.x, y: p.y + dist} case down: movedPoint = point{x: p.x, y: p.y - dist} case right: movedPoint = point{x: p.x + dist, y: p.y} case left: movedPoint = point{x: p.x - dist, y: p.y} } movedPoint.wireLen = p.wireLen + dist return movedPoint }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func movePoint(p *Point2D, dx, dy float64) {\n\tp.Move(dx, dy)\n}", "func (p *Point2D) Move(deltaX, deltaY float64) {\n\t// if you want to modify the \"object\" (i.e. the value) you need to pass a pointer\n\t// otherwise you would only get a copy (by-value)\n\n\t// this is actually short-hand for (*p).x and (*p)...
[ "0.67348295", "0.66218054", "0.6323302", "0.63009393", "0.61992556", "0.5959389", "0.5927495", "0.59226626", "0.59119165", "0.59011596", "0.5887739", "0.5831569", "0.5827473", "0.5818151", "0.5785061", "0.5772917", "0.5739919", "0.5737568", "0.5686841", "0.56842166", "0.56729...
0.83701855
0
distanceToOrigin returns the Manhattan distance to origin (0, 0).
func (p point) distanceToOrigin() int { return p.distanceToPoint(point{x: 0, y: 0}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *ship) manhattanDistance() int {\n\tabs := func(num int) int {\n\t\tif num < 0 {\n\t\t\treturn -num\n\t\t}\n\t\treturn num\n\t}\n\treturn abs(s.x) + abs(s.y)\n}", "func (d Position2D) GetManhattanDistance(cmpPos Position2D) int {\n\treturn max(d.Row-cmpPos.Row, cmpPos.Row-d.Row) + max(d.Col-cmpPos.Col, c...
[ "0.66292995", "0.6283916", "0.62757933", "0.60816836", "0.60361654", "0.59825534", "0.5843758", "0.53704447", "0.5285398", "0.51062644", "0.509364", "0.5085574", "0.50114954", "0.49696583", "0.4951331", "0.49022195", "0.49021795", "0.4899322", "0.4876255", "0.4805026", "0.475...
0.67163694
0
distanceToPoint returns the Manhattan distance to point o.
func (p point) distanceToPoint(o point) int { return abs(abs(p.x)-abs(o.x)) + abs(abs(p.y)-abs(o.y)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *ship) manhattanDistance() int {\n\tabs := func(num int) int {\n\t\tif num < 0 {\n\t\t\treturn -num\n\t\t}\n\t\treturn num\n\t}\n\treturn abs(s.x) + abs(s.y)\n}", "func ManhattanDistance(p1, p2 Point) int {\n\tdx := p1.x - p2.x\n\tif dx < 0 {\n\t\tdx = -dx\n\t}\n\tdy := p1.y - p2.y\n\tif dy < 0 {\n\t\tdy...
[ "0.69864243", "0.679119", "0.67451143", "0.6473577", "0.6260607", "0.61529875", "0.61317617", "0.6004432", "0.58881074", "0.5762732", "0.5652657", "0.5214538", "0.5203245", "0.51792425", "0.5148506", "0.5065928", "0.505602", "0.50225365", "0.5002041", "0.49768972", "0.4932305...
0.64441717
4
abs returns the absolute value of i.
func abs(i int) int { if i < 0 { return -i } return i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func absInt(i int) int {\n\tif i > 0 {\n\t\treturn i\n\t}\n\treturn i * -1\n}", "func Iabs(a int) int {\n\tif a < 0 {\n\t\treturn -a\n\t}\n\treturn a\n}", "func iAbs(x int) int { if x >= 0 { return x } else { return -x } }", "func abs(val int) int {\n\tif val < 0 {\n\t\treturn -val\n\t}\n\treturn val\n}", ...
[ "0.79870635", "0.7803045", "0.77631706", "0.7357731", "0.73555064", "0.7263729", "0.7263729", "0.7168951", "0.7148395", "0.71423554", "0.71259594", "0.7081049", "0.7076965", "0.70459354", "0.7041281", "0.7041281", "0.7041281", "0.7021915", "0.69966334", "0.69423425", "0.69110...
0.8626241
1
unchangingAxis returns what axis and the value of that axis. It assumes that exactly one axis is changing.
func (v segment) unchangingAxis() (val int, xAxis bool) { if v.from.x == v.to.x { return v.from.x, true } return v.from.y, false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (i *InputHandler) GetAxis(negativeKey, positiveKey Key) float32 {\n\tsum := float32(0)\n\tif i.GetKey(negativeKey) {\n\t\tsum -= 1.0\n\t}\n\tif i.GetKey(positiveKey) {\n\t\tsum += 1.0\n\t}\n\treturn sum\n}", "func (js *joystickState) getAxis(joystick Joystick, axis int) float64 {\n\t// Check that the joysti...
[ "0.63404655", "0.62930727", "0.62930727", "0.5801007", "0.54575765", "0.543033", "0.53913295", "0.5386404", "0.5381786", "0.5270984", "0.5190748", "0.51589876", "0.5095693", "0.50670105", "0.50371903", "0.49964777", "0.49689302", "0.4904455", "0.48489913", "0.48389292", "0.48...
0.6370387
0
intercepts returns where the segment intercepts segment o. If there is no interception then (0, 0) will be returned. wirelen is not provided.
func (v segment) intercepts(o segment) point { // With the assumption that no interceptions occur when segments are // parallel, and that segments always move either horizontally or // vertically (not both), we can pretty easily check for interceptions. // // First find the values where interception could occur, and what axis for // both segments are changing. I.e. if the segments are horizontal // or vertical. a, axAxis := v.unchangingAxis() b, bxAxis := o.unchangingAxis() if axAxis == bxAxis { // We're assuming that they can't overlap // when they are parallel return point{} } // Check if the first value (x or y) is on the interval of the // same axis of the other segment. Do this for the other value (axis) too. var aCanCollide bool if axAxis { aCanCollide = inRange(a, o.from.x, o.to.x) } else { aCanCollide = inRange(a, o.from.y, o.to.y) } var bCanCollide bool if bxAxis { bCanCollide = inRange(b, v.from.x, v.to.x) } else { bCanCollide = inRange(b, v.from.y, v.to.y) } // If both axes are in range then they collide if aCanCollide && bCanCollide { // Check if a is an x- or y-value if axAxis { return point{x: a, y: b} } return point{x: b, y: a} } return point{x: 0, y: 0} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (w *wire) interceptPoints(o wire) []point {\n\tvar interceptPoints []point\n\tfor i := 1; i < len(w.points); i++ {\n\t\tv1 := segment{\n\t\t\tfrom: w.points[i-1],\n\t\t\tto: w.points[i],\n\t\t}\n\t\tfor u := 1; u < len(o.points); u++ {\n\t\t\tv2 := segment{\n\t\t\t\tfrom: o.points[u-1],\n\t\t\t\tto: o.poi...
[ "0.6160073", "0.5302833", "0.5037876", "0.47532725", "0.4733476", "0.46008787", "0.45846316", "0.43068388", "0.42624182", "0.42509186", "0.42478302", "0.42192173", "0.42065093", "0.4164991", "0.41622105", "0.414886", "0.41471472", "0.4143421", "0.412669", "0.41088027", "0.410...
0.561719
1
inRange returns whether true if a >= val = val <= a.
func inRange(val, a, b int) bool { return val >= a && val <= b || val >= b && val <= a }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func InRange(val, min, max float64) float64 {\n\tif val < min {\n\t\treturn min\n\t} else if val > max {\n\t\treturn max\n\t}\n\treturn val\n}", "func InRange(value, left, right float64) bool {\n\tif left > right {\n\t\tleft, right = right, left\n\t}\n\treturn value >= left && value <= right\n}", "func within(...
[ "0.8011385", "0.7935231", "0.78916985", "0.76261526", "0.7270945", "0.72031903", "0.7193918", "0.7107037", "0.70942944", "0.6980476", "0.697944", "0.69790214", "0.69614846", "0.69448054", "0.6925115", "0.68934387", "0.68205553", "0.67717755", "0.67509115", "0.6705743", "0.664...
0.87714565
0
Run executes the pull command.
func (c *PullCommand) Run(args []string) int { cmdFlags := flag.NewFlagSet("pull", flag.ContinueOnError) cmdFlags.Usage = func() { c.UI.Output(c.Help()) } config := c.Config cmdFlags.StringVar(&config.Secret, "secret", config.Secret, "") cmdFlags.StringVar(&config.TargetDirectory, "target", config.TargetDirectory, "") cmdFlags.StringVar(&config.Encoding, "encoding", config.Encoding, "") cmdFlags.StringVar(&config.Format, "format", config.Format, "") req := new(phrase.DownloadRequest) cmdFlags.StringVar(&req.Tag, "tag", "", "") var updatedSince string cmdFlags.StringVar(&updatedSince, "updated-since", "", "") cmdFlags.BoolVar(&req.ConvertEmoji, "convert-emoji", false, "") cmdFlags.BoolVar(&req.SkipUnverifiedTranslations, "skip-unverified-translations", false, "") cmdFlags.BoolVar(&req.IncludeEmptyTranslations, "include-empty-translations", false, "") if err := cmdFlags.Parse(args); err != nil { return 1 } if updatedSince != "" { var err error req.UpdatedSince, err = time.Parse(timeFormat, updatedSince) if err != nil { c.UI.Error(fmt.Sprintf("Error parsing updated-since (%s), format should be YYYYMMDDHHMMSS", updatedSince)) return 1 } } if config.Format == "" { config.Format = defaultDownloadFormat } c.API.AuthToken = config.Secret req.Encoding = config.Encoding req.Format = config.Format if err := config.Valid(); err != nil { c.UI.Error(err.Error()) return 1 } err := c.fetch(req, cmdFlags.Args()) if err != nil { c.UI.Error(fmt.Sprintf("Error encountered fetching the locales:\n\t%s", err.Error())) return 1 } return 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (p *PullCommand) runPull(args []string) error {\n\treturn pullMissingImage(context.Background(), p.cli.Client(), args[0], true)\n}", "func (config *ReleaseCommandConfig) Run() error {\n\n\tgit, err := gitpkg.GetGit()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = release(git)\n\n\treturn err\n}", "fun...
[ "0.7724834", "0.7001258", "0.6845062", "0.6809112", "0.6801887", "0.65916026", "0.65858054", "0.6569583", "0.6555816", "0.6421461", "0.6414631", "0.64013046", "0.63939244", "0.6381241", "0.631539", "0.6242557", "0.6239383", "0.6225722", "0.6219979", "0.6218955", "0.61963075",...
0.8103023
0
Help displays available options for the pull command.
func (c *PullCommand) Help() string { helpText := ` Usage: phrase pull [options] [LOCALE] Download the translation files in the current project. Options: --format=yml See documentation for list of allowed formats --target=./phrase/locales Target folder to store locale files --tag=foo Limit results to a given tag instead of all translations --updated-since=YYYYMMDDHHMMSS Limit results to translations updated after the given date (UTC) --include-empty-translations Include empty translations in the result --convert-emoji Convert Emoji symbols --encoding=utf-8 Convert .strings or .properties with alternate encoding --skip-unverified-translations Skip unverified translations in the result --secret=YOUR_AUTH_TOKEN The Auth Token to use for this operation instead of the saved one (optional) ` return strings.TrimSpace(helpText) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cmd PullCmd) Description() string {\n\treturn \"Fetch from a dolt remote data repository and merge.\"\n}", "func (d *downloadCommand) Help() string {\n\thelp := `Usage: hashicorp-releases download <product> <version>`\n\treturn help\n}", "func help() {\n\tlog.Infoln(\"#: the number of the peer you want t...
[ "0.67475915", "0.6715028", "0.6536846", "0.6511913", "0.63175184", "0.62976", "0.6272036", "0.62529284", "0.6177238", "0.6158495", "0.61454433", "0.613495", "0.6116337", "0.6108647", "0.6097167", "0.6093562", "0.6082107", "0.60775214", "0.6075261", "0.60701317", "0.6062361", ...
0.77002186
0
Synopsis displays a synopsis of the pull command.
func (c *PullCommand) Synopsis() string { return "Download the translation files in the current project" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (cmd PullCmd) Description() string {\n\treturn \"Fetch from a dolt remote data repository and merge.\"\n}", "func (c *SyncCommand) Synopsis() string {\n\treturn \"Pull latest on all branches in all repositories\"\n}", "func (c *PullCommand) Help() string {\n\thelpText := `\n\tUsage: phrase pull [options] ...
[ "0.7215579", "0.69286245", "0.66183007", "0.6583596", "0.6178542", "0.6172102", "0.6038832", "0.6024933", "0.58987576", "0.586869", "0.5860437", "0.58348995", "0.5785484", "0.57617813", "0.5743024", "0.57364047", "0.57247514", "0.5713961", "0.5707902", "0.57045203", "0.567522...
0.77371424
0
add depth to all children
func (fi *finalizeFileInfo) addProperties(depth int) { fi.depth = depth for _, e := range fi.children { e.parent = fi e.addProperties(depth + 1) } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func fixFields(n, parent *node, depth int) {\n\tn.parent = parent\n\tn.depth = depth\n\tfor _, c := range n.children {\n\t\tfixFields(c, n, depth+1)\n\t}\n}", "func (t *FaultDomainTree) Depth() int {\n\tif t == nil {\n\t\treturn 0\n\t}\n\n\tdepth := 0\n\tfor _, c := range t.Children {\n\t\tchildMax := c.Depth() ...
[ "0.5680863", "0.5596721", "0.550769", "0.5493143", "0.54508895", "0.5405676", "0.5312346", "0.53112936", "0.5299934", "0.5266087", "0.52549666", "0.5252434", "0.52466196", "0.5237852", "0.52225965", "0.52033013", "0.5199025", "0.518541", "0.51852065", "0.5169843", "0.5168419"...
0.640293
0
New returns a new instance of an echo HTTP server
func New() Server { return &echoServer{ Instance: echo.New(), } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func New(address string, branch string, secret string, logger *logrus.Logger) http.Handler {\n\tproto := \"tcp\"\n\taddr := address\n\tif strings.HasPrefix(addr, \"unix:\") {\n\t\tproto = \"unix\"\n\t\taddr = addr[5:]\n\t}\n\treturn &Server{\n\t\tproto: proto,\n\t\taddress: addr,\n\t\tbranch: branch,\n\t\tsecre...
[ "0.71665865", "0.71398956", "0.7123811", "0.7121933", "0.7121786", "0.708344", "0.7081363", "0.70667744", "0.7039178", "0.7034454", "0.6998099", "0.6891638", "0.6876491", "0.68591356", "0.6854021", "0.6827344", "0.6814313", "0.6813561", "0.68123925", "0.6777675", "0.677665", ...
0.7557735
0
Start the web server
func (s *echoServer) Start() { e := s.Instance // Currently this server is only used for the core API so the logic below // is fine here. If we need to expand this to be used in multiple locations // the below can be done via first-class functions e.Pre(middleware.HTTPSRedirect()) e.Use(middleware.RequestID()) e.Use(middleware.Recover()) e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ Output: logger.Instance().Logger().Writer(), })) router.Setup(e) port := utils.GetVariable(consts.API_PORT) port = fmt.Sprintf(":%s", port) certDir := utils.GetVariable(consts.CERT_DIR) e.Logger.Fatal(e.StartTLS(port, fmt.Sprintf("%s/%s", certDir, utils.GetVariable(consts.API_CERT)), fmt.Sprintf("%s/%s", certDir, utils.GetVariable(consts.API_KEY)))) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func Start() {\n\twebServer.Engine.Run(\":\" + strconv.Itoa(cfg.Read().App.WebServerPort))\n}", "func StartWebserver() {\n\tlog.Fatal(http.ListenAndServe(\":8080\", nil))\n}", "func (ws *WebServer) Start() {\n\tlog.Logger.Info(\"Launching webserver\")\n\tlastRun := &run.Result{}\n\n\ttemplate, err := sysutil.C...
[ "0.79586124", "0.77553374", "0.7676101", "0.7660521", "0.76436174", "0.7618598", "0.7560046", "0.7443683", "0.7432194", "0.74232006", "0.7418631", "0.74167246", "0.7392946", "0.7371495", "0.7233208", "0.723225", "0.72229004", "0.7216855", "0.7203143", "0.71656066", "0.714282"...
0.0
-1
Hey returns bob's response to what talked to him
func Hey(remark string) string { r := strings.TrimSpace(remark) empty := len(r) == 0 question := strings.HasSuffix(r, "?") yell := strings.ToUpper(r) == r && strings.ContainsAny(r, allUppercaseLetters) switch { case empty: return emptyReply case question && yell: return questionYellReply case question: return questonReply case yell: return yellReply default: return othersReply } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func greet (name string) string {\n var reply string\n\n switch name {\n case \"Olivia\":\n reply = \"Hey! How was your sleep. Did you have any nice dreams?\"\n case \"Kirsten\":\n reply = \"Hey K! How was your day?\"\n default:\n reply = \"Have a good one!\"\n }\n return reply\n}", "...
[ "0.6887991", "0.6805804", "0.6371363", "0.63041806", "0.6247341", "0.60800767", "0.6031572", "0.6002164", "0.5963795", "0.59617203", "0.59487236", "0.5942278", "0.59154445", "0.5886197", "0.58427376", "0.5841882", "0.5812266", "0.5799674", "0.57988113", "0.5794499", "0.576361...
0.59117913
13
NewPodmanDriver returns a new DriverPlugin implementation
func NewPodmanDriver(logger hclog.Logger) drivers.DriverPlugin { ctx, cancel := context.WithCancel(context.Background()) return &Driver{ eventer: eventer.NewEventer(ctx, logger), config: &PluginConfig{}, tasks: newTaskStore(), ctx: ctx, signalShutdown: cancel, logger: logger.Named(pluginName), } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewPodmanDriver(logger hclog.Logger) drivers.DriverPlugin {\n\tctx, cancel := context.WithCancel(context.Background())\n\tlogger = logger.Named(pluginName)\n\treturn &Driver{\n\t\teventer: eventer.NewEventer(ctx, logger),\n\t\tconfig: &Config{},\n\t\ttasks: newTaskStore(),\n\t\tctx: ...
[ "0.82380116", "0.60484475", "0.6010558", "0.5986228", "0.5868032", "0.58672225", "0.58576405", "0.58369595", "0.5824131", "0.5824131", "0.5811279", "0.5768812", "0.57687277", "0.5760002", "0.57332784", "0.57026", "0.5667394", "0.5626511", "0.56003225", "0.55854213", "0.555412...
0.81757015
1
PluginInfo returns metadata about the podman driver plugin
func (d *Driver) PluginInfo() (*base.PluginInfoResponse, error) { return pluginInfo, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func PluginInfo() map[string]string {\n\treturn map[string]string{\n\t\t\"pluginAPIVersion\": \"0.1.0\",\n\t\t\"type\": \"connector.tcp\",\n\t\t\"id\": \"example-tcp-connector\",\n\t\t\"description\": \"Example TCP Connector Plugin\",\n\t}\n}", "func PluginInfo() map[string]string ...
[ "0.69334555", "0.6821398", "0.67342067", "0.6526161", "0.6484056", "0.63790214", "0.6310753", "0.6254248", "0.623014", "0.6096925", "0.6095875", "0.60840565", "0.60450107", "0.5966684", "0.58506525", "0.5838877", "0.5838877", "0.58286035", "0.5825507", "0.57368577", "0.570274...
0.69817346
0
ConfigSchema function allows a plugin to tell Nomad the schema for its configuration. This configuration is given in a plugin block of the client configuration. The schema is defined with the hclspec package.
func (d *Driver) ConfigSchema() (*hclspec.Spec, error) { return configSpec, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func hookConfigurationSchema() *schema.Schema {\n\treturn &schema.Schema{\n\t\tType: schema.TypeList,\n\t\tOptional: true,\n\t\tMaxItems: 1,\n\t\tElem: &schema.Resource{\n\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\"invocation_condition\": func() *schema.Schema {\n\t\t\t\t\tschema := documentAttributeCo...
[ "0.6281331", "0.5918551", "0.5734096", "0.5686296", "0.5664485", "0.5613437", "0.5569505", "0.5495627", "0.5485626", "0.54754454", "0.54539895", "0.5391567", "0.5384628", "0.5379263", "0.53001755", "0.529274", "0.5225631", "0.5206114", "0.52046055", "0.5195457", "0.5191281", ...
0.6769226
0
SetConfig function is called when starting the plugin for the first time. The Config given has two different configuration fields. The first PluginConfig, is an encoded configuration from the plugin block of the client config. The second, AgentConfig, is the Nomad agent's configuration which is given to all plugins.
func (d *Driver) SetConfig(cfg *base.Config) error { var pluginConfig PluginConfig if len(cfg.PluginConfig) != 0 { if err := base.MsgPackDecode(cfg.PluginConfig, &pluginConfig); err != nil { return err } } d.config = &pluginConfig if cfg.AgentConfig != nil { d.nomadConfig = cfg.AgentConfig.Driver } clientConfig := api.DefaultClientConfig() if pluginConfig.SocketPath != "" { clientConfig.SocketPath = pluginConfig.SocketPath } d.podman = api.NewClient(d.logger, clientConfig) return nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func SetConfig(c cfg.RPCConfig) {\n\tconfig = c\n}", "func SetConfig(c cfg.RPCConfig) {\n\tconfig = c\n}", "func (nc *NabtoClient) SetConfig() {\n\tviper.Set(\"nabto\", nc)\n\tviper.WriteConfig()\n\tnc.ApplyConfig()\n}", "func (c *Client) SetConfig(conf *ClientConfig) (err error) {\n\tif conf == nil {\n\t\tc...
[ "0.6838962", "0.6838962", "0.6446589", "0.6371859", "0.6350033", "0.6323569", "0.6291822", "0.6218653", "0.62132025", "0.6208128", "0.62070537", "0.6196594", "0.61428446", "0.61320055", "0.6111926", "0.6038208", "0.6037457", "0.60338557", "0.60234916", "0.60036546", "0.599884...
0.77980506
0