query
stringlengths
10
3.85k
ru_query
stringlengths
9
3.76k
document
stringlengths
17
430k
metadata
dict
negatives
listlengths
97
100
negative_scores
listlengths
97
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSConfiguration.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый объект 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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Key.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый 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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderConfiguration.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получатель, создавая новый 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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceConfiguration.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получатель, создавая новый 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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretboxConfiguration.
DeepCopy — это автоматически сгенерированная функция глубокого копирования, копирующая получателя, создавая новый объект 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
Проверка кода ответа на равенство 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.
Устарело: используйте SyncLocationReq.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте SyncLocationRsp.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте RemoveKeeperReq.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте AddKeeperReq.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте AssignAck.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте SwitchKeeperReq.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте SwitchKeeperRsp.ProtoReflect.Descriptor вместо этого.
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 ClusterRsp.ProtoReflect.Descriptor instead.
Устаревший: используйте ClusterRsp.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте RegisterNodeReq.ProtoReflect.Descriptor вместо этого.
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.
Устарело: используйте RegisterNodeRsp.ProtoReflect.Descriptor вместо этого.
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
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
DefaultCreateHealthMenstruationPersonalInfo executes a basic gorm create call
DefaultCreateHealthMenstruationPersonalInfo выполняет базовый вызов gorm create
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{}(&or...
{ "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
DefaultReadHealthMenstruationPersonalInfo выполняет базовый вызов gorm для чтения
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...
{ "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
DefaultPatchHealthMenstruationPersonalInfo executes a basic gorm update call with patch behavior
DefaultPatchHealthMenstruationPersonalInfo выполняет базовый вызов gorm update с поведением patch
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...
{ "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
DefaultPatchSetHealthMenstruationPersonalInfo выполняет bulk gorm update вызов с поведением patch
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(updateM...
{ "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.
DefaultApplyFieldMaskHealthMenstruationPersonalInfo применяет патчер к pbObject в соответствии с маской поля.
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 pat...
{ "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
DefaultListHealthMenstruationPersonalInfo выполняет вызов gorm list
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...
{ "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
DefaultCreateHealthMenstruationDailyEntry выполняет базовый вызов gorm create
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)....
{ "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
DefaultReadHealthMenstruationDailyEntry выполняет базовый вызов gorm для чтения
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, erro...
{ "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
DefaultPatchHealthMenstruationDailyEntry executes a basic gorm update call with patch behavior
DefaultPatchHealthMenstruationDailyEntry выполняет базовый вызов gorm update с поведением patch
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 := ...
{ "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
DefaultPatchSetHealthMenstruationDailyEntry выполняет bulk gorm update вызов с поведением patch
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),...
{ "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.
DefaultApplyFieldMaskHealthMenstruationDailyEntry применяет патчер к pbObject в соответствии с маской поля.
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 == ...
{ "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
DefaultListHealthMenstruationDailyEntry выполняет вызов gorm list
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 } i...
{ "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.
Rank возвращает количество узлов, значение которых меньше максимального значения.
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
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.
RegisterChannelzServiceToServer регистрирует службу channelz на заданном сервере. Примечание: предпочтительнее использовать административный API (для регистрации Channelz и других административных служб.
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.
parseFunctions ... Читает строки из parsers.of и парсит структуры Function из них.
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.
parseDependencies ... В данном контексте термин "зависимость" используется для обозначения любого типа данных, который может требовать включения или предварительного объявления.
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) ...
{ "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.
parseIncludes .. Парсит зависимости для создания строки include для каждой.
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.
parseForwardDeclares .. Парсит зависимости для создания строки forward declare для каждой.
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.
isPureVirtualDefinition ... Возвращает true, если функция является чисто виртуальной.
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
templatedTypeSeparators ... Used to expand templated types such as QMap>
templatedTypeSeparators ... Используется для расширения шаблонных типов, таких как 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.
isEtcdConfigFile возвращает true, если заданный путь выглядит как файл конфигурации, и в таком случае возвращает соответствующий хеш для обнаружения изменений.
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, sha2...
{ "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.
getDirection из байта. Вызывает панику при неизвестном направлении.
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).
interceptPoints возвращает каждый точку, где провод пересекается с проводом o. wireLen каждой точки — это общая длина провода до этой точки (суммарно для обоих проводов).
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.intercep...
{ "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.
move возвращает новый точку, которая имеет те же свойства, что и исходная точка, но сдвинута на определенное расстояние dist в направлении 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} } move...
{ "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
abs returns the absolute value of i.
abs возвращает абсолютное значение 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
inRange returns whether true if a >= val = val <= a.
inRange возвращает true, если 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.
Run выполняет команду pull.
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.TargetDirector...
{ "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.
Помощь отображает доступные варианты для команды pull.
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 f...
{ "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.
Synopsis отображает синопсис команды pull.
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
New returns a new instance of an echo HTTP server
New возвращает новый экземпляр сервера HTTP-эхо
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
NewPodmanDriver returns a new DriverPlugin implementation
NewPodmanDriver возвращает новый реализацию DriverPlugin
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: ...
{ "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
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.
Функция SetConfig вызывается при первом запуске плагина. Конфигурация, переданная в качестве аргумента, содержит два разных поля настройки. Первое, PluginConfig, представляет собой закодированную конфигурацию из блока плагина конфигурации клиента. Второе, AgentConfig, — это конфигурация агента Nomad, которая предоставл...
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 } cl...
{ "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
TaskConfigSchema returns the schema for the driver configuration of the task.
TaskConfigSchema возвращает схему для настройки драйвера задачи.
func (d *Driver) TaskConfigSchema() (*hclspec.Spec, error) { return taskConfigSpec, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (d *Driver) ConfigSchema() (*hclspec.Spec, error) {\n\treturn configSpec, nil\n}", "func GetUserConfigSchema(t string) map[string]interface{} {\n\tif _, ok := getUserConfigurationOptionsSchemaFilenames()[t]; !ok {\n\t\tlog.Panicf(\"user configuration options schema type `%s` is not available\", t)\n\t}\n\n\...
[ "0.6586699", "0.58137196", "0.56230664", "0.53895205", "0.5364081", "0.53349406", "0.52917063", "0.52878046", "0.51269746", "0.50748026", "0.505897", "0.5052785", "0.5022496", "0.49787623", "0.49776208", "0.49759728", "0.4963513", "0.48683783", "0.4866191", "0.48051867", "0.4...
0.85169226
0
RecoverTask detects running tasks when nomad client or task driver is restarted. When a driver is restarted it is not expected to persist any internal state to disk. To support this, Nomad will attempt to recover a task that was previously started if the driver does not recognize the task ID. During task recovery, Noma...
RecoverTask обнаруживает запущенные задачи при перезапуске клиента Nomad или драйвера задач. При перезапуске драйвера не ожидается сохранение любого внутреннего состояния на диск. Для поддержки этого Nomad попытается восстановить задачу, которая ранее была запущена, если драйвер не распознает идентификатор задачи. Во в...
func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error { if handle == nil { return fmt.Errorf("error: handle cannot be nil") } if _, ok := d.tasks.Get(handle.Config.ID); ok { return nil } var taskState TaskState if err := handle.GetDriverState(&taskState); err != nil { return fmt.Errorf("failed to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func TestLibvirtDriver_Start_Stop_Recover_Task(t *testing.T) {\n\tutil.RequireLibvirt(t)\n\n\trequire := require.New(t)\n\n\td := NewLibvirtDriver(testlog.HCLogger(t)).(*Driver)\n\tharness := dtestutil.NewDriverHarness(t, d)\n\n\trequire.NoError(task.EncodeConcreteDriverConfig(&taskCfg))\n\n\tcleanup := harness.Mk...
[ "0.58838654", "0.5342246", "0.4967397", "0.49165246", "0.48566574", "0.48527366", "0.48488343", "0.4843941", "0.48418212", "0.4827211", "0.481903", "0.47926974", "0.47663003", "0.47648853", "0.47385824", "0.47373864", "0.47090328", "0.47073582", "0.4702934", "0.46741527", "0....
0.7950789
0
BuildContainerName returns the podman container name for a given TaskConfig
BuildContainerName возвращает имя контейнера podman для заданной TaskConfig
func BuildContainerName(cfg *drivers.TaskConfig) string { return fmt.Sprintf("%s-%s", cfg.Name, cfg.AllocID) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (e *dockerExec) containerName() string {\n\tpathHex := reflow.Digester.FromString(e.path()).Short()\n\treturn fmt.Sprintf(\"reflow-%s-%s-%s\", e.Executor.ID, e.id.Hex(), pathHex)\n}", "func (o ClusterBuildStrategySpecBuildStepsEnvValueFromResourceFieldRefOutput) ContainerName() pulumi.StringPtrOutput {\n\tr...
[ "0.6439012", "0.62852246", "0.622028", "0.6200449", "0.6197181", "0.61668086", "0.61047316", "0.6056285", "0.60304743", "0.5793392", "0.5791889", "0.57634854", "0.57511026", "0.5727425", "0.5724323", "0.56959724", "0.56770957", "0.56690484", "0.56192434", "0.5603206", "0.5591...
0.7562802
0
WaitTask function is expected to return a channel that will send an ExitResult when the task exits or close the channel when the context is canceled. It is also expected that calling WaitTask on an exited task will immediately send an ExitResult on the returned channel. A call to WaitTask after StopTask is valid and sh...
Функция WaitTask ожидается, чтобы вернуть канал, который отправит ExitResult при завершении задачи или закроет канал при отмене контекста. Также ожидается, что вызов WaitTask для уже завершенной задачи сразу отправит ExitResult по возвращенному каналу. Вызов WaitTask после StopTask является допустимым и должен быть обр...
func (d *Driver) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error) { d.logger.Debug("WaitTask called", "task", taskID) handle, ok := d.tasks.Get(taskID) if !ok { return nil, drivers.ErrTaskNotFound } ch := make(chan *drivers.ExitResult) go handle.runExitWatcher(ctx, ch) return ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Task) Wait(timeout time.Duration) (TaskResult, error) {\n\tselect {\n\tcase <-t.startedChan:\n\tdefault:\n\t\treturn nil, ErrNotExecuting\n\t}\n\n\tt.resultLock.RLock()\n\tif t.waitResult != nil {\n\t\tt.resultLock.RUnlock()\n\t\treturn t.waitResult, nil\n\t}\n\tt.resultLock.RUnlock()\n\n\tvar timeoutChan...
[ "0.68873113", "0.6370824", "0.6234808", "0.6090943", "0.60882926", "0.60077477", "0.59856975", "0.5946728", "0.57896346", "0.5758922", "0.5743035", "0.57364565", "0.5708013", "0.56723464", "0.5585439", "0.5556589", "0.54844946", "0.54625577", "0.5353345", "0.5346748", "0.5334...
0.76350826
0
StopTask function is expected to stop a running task by sending the given signal to it. If the task does not stop during the given timeout, the driver must forcefully kill the task. StopTask does not clean up resources of the task or remove it from the driver's internal state.
Функция StopTask ожидается, чтобы остановить запущенную задачу, отправив ей заданный сигнал. Если задача не останавливается в течение заданного таймаута, драйвер должен принудительно завершить задачу. StopTask не очищает ресурсы задачи или удаляет её из внутреннего состояния драйвера.
func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error { d.logger.Info("Stopping task", "taskID", taskID, "signal", signal) handle, ok := d.tasks.Get(taskID) if !ok { return drivers.ErrTaskNotFound } // fixme send proper signal to container err := d.podman.ContainerStop(d.ctx, hand...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Task) StopWithTimeout(timeout time.Duration) error {\n\tdefer func() { recover() }()\n\tclose(*t.Stopper)\n\n\tselect {\n\tcase <-*t.Done:\n\t\treturn nil\n\tcase <-time.After(timeout):\n\t\treturn goerr.Wrap(&ErrStoppingTaskTimeout{})\n\t}\n}", "func (h *Hub) StopTask(ctx context.Context, request *pb.S...
[ "0.6536051", "0.61022145", "0.5902817", "0.57699805", "0.5755604", "0.5728442", "0.56008637", "0.549826", "0.5445834", "0.5424107", "0.5390439", "0.53785425", "0.53028846", "0.5296322", "0.52536076", "0.5202666", "0.5167302", "0.50993377", "0.507832", "0.50076854", "0.4984623...
0.7427215
0
DestroyTask function cleans up and removes a task that has terminated. If force is set to true, the driver must destroy the task even if it is still running.
Функция DestroyTask очищает и удаляет задачу, которая завершилась. Если параметр force установлен в true, драйвер должен уничтожить задачу даже если она еще выполняется.
func (d *Driver) DestroyTask(taskID string, force bool) error { handle, ok := d.tasks.Get(taskID) if !ok { return drivers.ErrTaskNotFound } if handle.isRunning() && !force { return fmt.Errorf("cannot destroy running task") } if handle.isRunning() { d.logger.Debug("Have to destroyTask but container is stil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CleanTask() {\n\tfor taskID, t := range kv.DefaultClient.GetStorage().Tasks {\n\t\tflag := true\n\t\tfor nid := range kv.DefaultClient.GetStorage().Nodes {\n\t\t\tif t.NodeID == nid {\n\t\t\t\tflag = false\n\t\t\t}\n\t\t}\n\t\tif flag {\n\t\t\tif t.Timer {\n\t\t\t\tlog.Info(\"clean timer:\", taskID)\n\t\t\t\t...
[ "0.60128415", "0.59829104", "0.59223276", "0.5853163", "0.5822631", "0.5637229", "0.55053747", "0.5499162", "0.54739857", "0.54706156", "0.5426137", "0.54249454", "0.5411983", "0.5394763", "0.53803176", "0.5303343", "0.529844", "0.52842695", "0.52794904", "0.526981", "0.52620...
0.7716327
0
InspectTask function returns detailed status information for the referenced taskID.
Функция InspectTask возвращает подробную информацию о статусе для отсылаемого taskID.
func (d *Driver) InspectTask(taskID string) (*drivers.TaskStatus, error) { d.logger.Debug("InspectTask called") handle, ok := d.tasks.Get(taskID) if !ok { return nil, drivers.ErrTaskNotFound } return handle.taskStatus(), nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Client) InspectTask(id string) (*swarm.Task, error) {\n\tresp, err := c.do(http.MethodGet, \"/tasks/\"+id, doOptions{})\n\tif err != nil {\n\t\tvar e *Error\n\t\tif errors.As(err, &e) && e.Status == http.StatusNotFound {\n\t\t\treturn nil, &NoSuchTask{ID: id}\n\t\t}\n\t\treturn nil, err\n\t}\n\tdefer resp...
[ "0.6450777", "0.612711", "0.6043263", "0.60372734", "0.5894179", "0.5767152", "0.5736859", "0.57292414", "0.5600359", "0.55213696", "0.5463764", "0.5417522", "0.5382704", "0.535509", "0.5335711", "0.53252643", "0.5318367", "0.52696025", "0.5261585", "0.5251186", "0.5250223", ...
0.7474207
0
SignalTask function is used by drivers which support sending OS signals (SIGHUP, SIGKILL, SIGUSR1 etc.) to the task. It is an optional function and is listed as a capability in the driver Capabilities struct.
Функция SignalTask используется драйверами, поддерживающими отправку сигналов ОС (SIGHUP, SIGKILL, SIGUSR1 и т.д.) задаче. Это опциональная функция, которая перечисляется как возможность в структуре Capabilities драйвера.
func (d *Driver) SignalTask(taskID string, signal string) error { handle, ok := d.tasks.Get(taskID) if !ok { return drivers.ErrTaskNotFound } return d.podman.ContainerKill(d.ctx, handle.containerID, signal) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func ProcessSignal(p *os.Process, sig os.Signal,) error", "func signal_disable(uint32) {}", "func signal(s os.Signal) {\n\tp, _ := os.FindProcess(os.Getpid())\n\t_ = p.Signal(s)\n\t// Sleep so test won't finish and signal will be received.\n\ttime.Sleep(999)\n}", "func signal_disable(s uint32) {\n}", "func...
[ "0.61870855", "0.5511749", "0.5325872", "0.5245061", "0.52382535", "0.5158235", "0.5155546", "0.5136468", "0.5113385", "0.5107931", "0.50993425", "0.508363", "0.50823617", "0.5018183", "0.5008709", "0.49947438", "0.49496862", "0.49458396", "0.49453184", "0.49269986", "0.49240...
0.7002219
0
ExecTask function is used by the Nomad client to execute commands inside the task execution context.
Функция ExecTask используется клиентом Nomad для выполнения команд внутри контекста выполнения задачи.
func (d *Driver) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error) { return nil, fmt.Errorf("Podman driver does not support exec") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (ts *TaskService) Exec(ctx context.Context, req *taskAPI.ExecProcessRequest) (*types.Empty, error) {\n\tdefer logPanicAndDie(log.G(ctx))\n\n\tlog.G(ctx).WithFields(logrus.Fields{\"id\": req.ID, \"exec_id\": req.ExecID}).Debug(\"exec\")\n\ttask, err := ts.taskManager.Task(req.ID)\n\tif err != nil {\n\t\treturn...
[ "0.7491893", "0.74503505", "0.71984", "0.7141873", "0.70722926", "0.6939766", "0.6800779", "0.6633108", "0.65625066", "0.6557004", "0.652908", "0.6454363", "0.6441503", "0.6435012", "0.6338124", "0.6324664", "0.6318782", "0.6309154", "0.6298092", "0.6294548", "0.62881535", ...
0.78052336
0
expandPath returns the absolute path of dir, relative to base if dir is relative path. base is expected to be an absolute path
expandPath возвращает абсолютный путь dir, относительно base, если dir — относительный путь. base ожидается как абсолютный путь
func expandPath(base, dir string) string { if filepath.IsAbs(dir) { return filepath.Clean(dir) } return filepath.Clean(filepath.Join(base, dir)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func expandFilePath(filePath string, baseDir string) string {\n\tif !strings.HasPrefix(filePath, \"/\") {\n\t\tfilePath = path.Join(baseDir, filePath)\n\t}\n\treturn filePath\n}", "func expandPath(path string) (string, error) {\n\tif len(path) == 0 {\n\t\treturn \"\", nil\n\t}\n\tif path[0] == '~' && (len(path) ...
[ "0.7221674", "0.63791376", "0.62171954", "0.6203149", "0.60714793", "0.6038171", "0.60058975", "0.5962914", "0.58609414", "0.5853772", "0.5846553", "0.58370256", "0.58066094", "0.5787698", "0.5785019", "0.57407224", "0.57359976", "0.5726426", "0.567552", "0.5660976", "0.56590...
0.79213846
0
isParentPath returns true if path is a child or a descendant of parent path. Both inputs need to be absolute paths.
isParentPath возвращает true, если path является дочерним или потомком parent path. Оба входных параметра должны быть абсолютными путями.
func isParentPath(parent, path string) bool { rel, err := filepath.Rel(parent, path) return err == nil && !strings.HasPrefix(rel, "..") }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func pathIsChild(parent, child string) bool {\n\tif !strings.HasPrefix(child, parent) {\n\t\treturn false\n\t}\n\trel := child[len(parent):]\n\trel = strings.Trim(rel, \"/\")\n\treturn !strings.Contains(rel, \"/\")\n}", "func (d *Driver) isParent(id, parent string) bool {\n\t// TODO (maybe): this function is cal...
[ "0.6913496", "0.6632338", "0.6614952", "0.6239509", "0.6065598", "0.6004529", "0.599899", "0.5987033", "0.5987033", "0.57555145", "0.5745408", "0.5715766", "0.56958073", "0.5602596", "0.5588836", "0.5535407", "0.5507737", "0.5400315", "0.5310334", "0.5297292", "0.52722096", ...
0.78000367
0
GetOcJusticeTerminalCase invokes the dt_oc_info.GetOcJusticeTerminalCase API synchronously
GetOcJusticeTerminalCase вызывает API dt_oc_info.GetOcJusticeTerminalCase синхронно
func (client *Client) GetOcJusticeTerminalCase(request *GetOcJusticeTerminalCaseRequest) (response *GetOcJusticeTerminalCaseResponse, err error) { response = CreateGetOcJusticeTerminalCaseResponse() err = client.DoAction(request, response) return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) GetOcJusticeTerminalCaseWithCallback(request *GetOcJusticeTerminalCaseRequest, callback func(response *GetOcJusticeTerminalCaseResponse, err error)) <-chan int {\n\tresult := make(chan int, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tvar response *GetOcJusticeTerminalCaseResponse\n\t\tvar ...
[ "0.76105475", "0.7207098", "0.63172954", "0.6272593", "0.42553726", "0.41234902", "0.40939113", "0.4023941", "0.39742783", "0.38595548", "0.38287857", "0.378181", "0.37741143", "0.37575984", "0.37342227", "0.37036774", "0.36915794", "0.3683943", "0.3679489", "0.36713696", "0....
0.8129121
0
GetOcJusticeTerminalCaseWithChan invokes the dt_oc_info.GetOcJusticeTerminalCase API asynchronously
GetOcJusticeTerminalCaseWithChan асинхронно вызывает API dt_oc_info.GetOcJusticeTerminalCase
func (client *Client) GetOcJusticeTerminalCaseWithChan(request *GetOcJusticeTerminalCaseRequest) (<-chan *GetOcJusticeTerminalCaseResponse, <-chan error) { responseChan := make(chan *GetOcJusticeTerminalCaseResponse, 1) errChan := make(chan error, 1) err := client.AddAsyncTask(func() { defer close(responseChan) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) GetOcJusticeTerminalCaseWithCallback(request *GetOcJusticeTerminalCaseRequest, callback func(response *GetOcJusticeTerminalCaseResponse, err error)) <-chan int {\n\tresult := make(chan int, 1)\n\terr := client.AddAsyncTask(func() {\n\t\tvar response *GetOcJusticeTerminalCaseResponse\n\t\tvar ...
[ "0.79232085", "0.64444685", "0.5182867", "0.50883555", "0.478109", "0.45607275", "0.45374334", "0.45302606", "0.4415868", "0.43623936", "0.4354781", "0.42620373", "0.41785672", "0.40921018", "0.40574202", "0.40431407", "0.40057978", "0.4002611", "0.40005198", "0.39568612", "0...
0.8225025
0
GetOcJusticeTerminalCaseWithCallback invokes the dt_oc_info.GetOcJusticeTerminalCase API asynchronously
GetOcJusticeTerminalCaseWithCallback вызывает асинхронно API dt_oc_info.GetOcJusticeTerminalCase
func (client *Client) GetOcJusticeTerminalCaseWithCallback(request *GetOcJusticeTerminalCaseRequest, callback func(response *GetOcJusticeTerminalCaseResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { var response *GetOcJusticeTerminalCaseResponse var err error def...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) GetOcJusticeTerminalCase(request *GetOcJusticeTerminalCaseRequest) (response *GetOcJusticeTerminalCaseResponse, err error) {\n\tresponse = CreateGetOcJusticeTerminalCaseResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}", "func (client *Client) GetOcJusticeTerminalCaseWithC...
[ "0.66025335", "0.66022605", "0.5441328", "0.5314528", "0.4794885", "0.47772574", "0.44892713", "0.4443668", "0.43273535", "0.42628276", "0.4138406", "0.41172293", "0.41120696", "0.4096734", "0.40186015", "0.3951663", "0.39511362", "0.3897255", "0.38712794", "0.38415867", "0.3...
0.8397443
0
CreateGetOcJusticeTerminalCaseRequest creates a request to invoke GetOcJusticeTerminalCase API
CreateGetOcJusticeTerminalCaseRequest создает запрос для вызова API GetOcJusticeTerminalCase
func CreateGetOcJusticeTerminalCaseRequest() (request *GetOcJusticeTerminalCaseRequest) { request = &GetOcJusticeTerminalCaseRequest{ RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("dt-oc-info", "2022-08-29", "GetOcJusticeTerminalCase", "", "") request.Method = requests.POST return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (client *Client) GetOcJusticeTerminalCase(request *GetOcJusticeTerminalCaseRequest) (response *GetOcJusticeTerminalCaseResponse, err error) {\n\tresponse = CreateGetOcJusticeTerminalCaseResponse()\n\terr = client.DoAction(request, response)\n\treturn\n}", "func CreateGetOcJusticeTerminalCaseResponse() (resp...
[ "0.7281973", "0.718111", "0.60141575", "0.59981817", "0.53045654", "0.529162", "0.5089326", "0.50162315", "0.48275313", "0.46769378", "0.46516144", "0.45637316", "0.44809666", "0.44730073", "0.44580668", "0.44391593", "0.43980765", "0.4389381", "0.43701097", "0.43534452", "0....
0.8775902
0
CreateGetOcJusticeTerminalCaseResponse creates a response to parse from GetOcJusticeTerminalCase response
CreateGetOcJusticeTerminalCaseResponse создает ответ для парсинга из ответа GetOcJusticeTerminalCase
func CreateGetOcJusticeTerminalCaseResponse() (response *GetOcJusticeTerminalCaseResponse) { response = &GetOcJusticeTerminalCaseResponse{ BaseResponse: &responses.BaseResponse{}, } return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func CreateGetOcJusticeTerminalCaseRequest() (request *GetOcJusticeTerminalCaseRequest) {\n\trequest = &GetOcJusticeTerminalCaseRequest{\n\t\tRpcRequest: &requests.RpcRequest{},\n\t}\n\trequest.InitWithApiInfo(\"dt-oc-info\", \"2022-08-29\", \"GetOcJusticeTerminalCase\", \"\", \"\")\n\trequest.Method = requests.PO...
[ "0.77589756", "0.7157844", "0.61063325", "0.6026642", "0.59860957", "0.59467834", "0.56416875", "0.5634511", "0.556447", "0.5405703", "0.52253896", "0.5192126", "0.51881194", "0.51555777", "0.50910974", "0.50739145", "0.5035087", "0.5018713", "0.5008554", "0.499794", "0.49734...
0.899438
0
GetCmdQueryProfile queries a profile from the given address or dtag
GetCmdQueryProfile запрашивает профиль из заданного адреса или dtag
func GetCmdQueryProfile(cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "profile [address_or_dtag]", Short: "Retrieve the profile having the specified user address or profile dtag, if any.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func queryProfile(ctx sdk.Context, path []string, _ abci.RequestQuery, keeper Keeper) ([]byte, error) {\n\tif len(strings.TrimSpace(path[0])) == 0 {\n\t\treturn nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, \"DTag or address cannot be empty or blank\")\n\t}\n\n\taddress, err := sdk.AccAddressFromBech32(path[0])...
[ "0.73663527", "0.66192484", "0.66032195", "0.6373226", "0.62577033", "0.5889509", "0.5735262", "0.5682528", "0.56526613", "0.54866666", "0.5468216", "0.54676366", "0.5464707", "0.5439784", "0.5404302", "0.5396977", "0.53676295", "0.53150916", "0.53021604", "0.5297001", "0.525...
0.8442145
0
GetCmdQueryProfiles queries all the profiles
GetCmdQueryProfiles запрашивает все профили
func GetCmdQueryProfiles(cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "all", Short: "Retrieve all the registered profiles.", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) route := fmt.Sprintf("custom/%s/%s"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *SmartContract) QueryAllProfiles(ctx contractapi.TransactionContextInterface) ([]QueryProfileResult, error) {\n\tstartKey := \"\"\n\tendKey := \"\"\n\n\tresultsIterator, err := ctx.GetStub().GetStateByRange(startKey, endKey)\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resultsIterator.Close()\n\...
[ "0.7198962", "0.6869934", "0.6789719", "0.67125577", "0.6603376", "0.65903366", "0.6403358", "0.61283404", "0.5979468", "0.59100527", "0.58843744", "0.5871112", "0.58510584", "0.5812088", "0.57750744", "0.5740033", "0.57312274", "0.57131714", "0.57038635", "0.5665462", "0.565...
0.8219907
0
GetCmdQueryProfileParams queries all the profiles' module params
GetCmdQueryProfileParams запрашивает все параметры модулей профилей
func GetCmdQueryProfileParams(cdc *codec.Codec) *cobra.Command { return &cobra.Command{ Use: "parameters", Short: "Retrieve all the profile module parameters", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { cliCtx := context.NewCLIContext().WithCodec(cdc) route := fmt.Sprin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func queryProfileParams(ctx sdk.Context, _ abci.RequestQuery, keeper Keeper) ([]byte, error) {\n\tprofileParams := keeper.GetParams(ctx)\n\n\tbz, err := codec.MarshalJSONIndent(keeper.Cdc, &profileParams)\n\tif err != nil {\n\t\tpanic(\"could not marshal result to JSON\")\n\t}\n\n\treturn bz, nil\n}", "func GetC...
[ "0.67599773", "0.6400527", "0.5847315", "0.5535475", "0.55341256", "0.55146354", "0.55065244", "0.5402974", "0.5288138", "0.5251579", "0.520587", "0.51665294", "0.5144454", "0.5124429", "0.5092634", "0.5016223", "0.49747425", "0.4949739", "0.49178165", "0.48966557", "0.487474...
0.7892636
0
stringView returns a view of the []byte as a string. In unsafe mode, it doesn't incur allocation and copying caused by conversion. In regular safe mode, it is an allocation and copy. Usage: Always maintain a reference to v while result of this call is in use, and call keepAlive4BytesView(v) at point where done with vie...
stringView возвращает представление []byte в виде строки. В режиме unsafe не происходит выделения памяти и копирования, вызванного преобразованием. В обычном безопасном режиме это выделение и копирование. Использование: всегда сохраняйте ссылку на v во время использования результата этого вызова, и вызывайте keepAlive4...
func stringView(v []byte) string { return string(v) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func bytesView(v string) []byte {\n\treturn []byte(v)\n}", "func (v ByteVec) String() string { return string([]byte(v)) }", "func (v *View) String() string {\n\tf := format.NewASCII()\n\treturn v.FormatString(f)\n}", "func (s View) String() string {\n\treturn awsutil.Prettify(s)\n}", "func (s View) Strin...
[ "0.63379955", "0.5909125", "0.58037746", "0.56420934", "0.56420934", "0.54916877", "0.54738015", "0.5430865", "0.5414218", "0.5414218", "0.53638655", "0.5337022", "0.53342456", "0.53323567", "0.52999586", "0.52574825", "0.52541006", "0.52512985", "0.5248777", "0.5213757", "0....
0.7783467
0
bytesView returns a view of the string as a []byte. In unsafe mode, it doesn't incur allocation and copying caused by conversion. In regular safe mode, it is an allocation and copy. Usage: Always maintain a reference to v while result of this call is in use, and call keepAlive4BytesView(v) at point where done with view...
bytesView возвращает представление строки в виде []byte. В режиме unsafe преобразование не вызывает выделение памяти и копирование. В обычном безопасном режиме это выделение и копирование. Использование: всегда сохраняйте ссылку на v во время использования результата этого вызова, и вызывайте keepAlive4BytesView(v) в т...
func bytesView(v string) []byte { return []byte(v) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func stringView(v []byte) string {\n\treturn string(v)\n}", "func NewView(b []byte) *View { return &View{b} }", "func GetBytesBuffer4K() *bytes.Buffer {\n\tif b := getb4K(); b != nil {\n\t\treturn b\n\t}\n\tif p := get4K(); p != nil {\n\t\treturn bytes.NewBuffer(internal.Puts(p))\n\t}\n\treturn bytes.NewBuffer...
[ "0.6358887", "0.5210643", "0.47978938", "0.47844735", "0.47593164", "0.46141908", "0.4609627", "0.46013665", "0.45809", "0.4562257", "0.45536464", "0.4526796", "0.45103198", "0.45092463", "0.4495565", "0.4488356", "0.4468821", "0.4467235", "0.4460009", "0.44589624", "0.443517...
0.75592566
0
Subscribe will create a channel that will be published to each time a change on ONE partition changes
Subscribe создаст канал, который будет публиковаться каждый раз, когда изменится одна из партиций
func (n *Node) Subscribe(topic string) <-chan Message { consumer := make(chan Message) parts := n.getPartitionsFor(topic) var part partition for _, p := range parts { part = smallestOf(part, p) } log.Debug("Created subscriber for %s:%v", topic, part) part.Subscribe(consumer) return consumer }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c Conference) Subscribe(id uuid.UUID, topic string, out chan Notification) {\n\ttree, ok := c.Room[topic]\n\tif !ok {\n\t\ttree = &bst.BinarySearchTree{}\n\t\tc.Room[topic] = tree\n\t}\n\tc.mutex.Lock()\n\tdefer c.mutex.Unlock()\n\ttree.Add(NewSubscriber(id, out))\n}", "func (h *Hub) Subscribe(t string, c ...
[ "0.66779685", "0.6572508", "0.6495061", "0.6422174", "0.63689184", "0.6352444", "0.6288932", "0.6274408", "0.62708884", "0.625784", "0.6244839", "0.62359333", "0.6185336", "0.6170156", "0.61666375", "0.6162882", "0.6162781", "0.61599725", "0.61536837", "0.61132455", "0.608628...
0.71316516
0
SubscribeToAll creates a channel that is registered to ALL of the different partitions
SubscribeToAll создает канал, который зарегистрирован во всех разных разделах
func (n *Node) SubscribeToAll(topic string) <-chan Message { consumer := make(chan Message) parts := n.getPartitionsFor(topic) for _, p := range parts { p.Subscribe(consumer) } return consumer }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (x *Pep) SubscribeToAll(ctx context.Context, host string, jid *jid.JID) {\n\tx.runQueue.Run(func() {\n\t\tif err := x.subscribeToAll(ctx, host, jid); err != nil {\n\t\t\tlog.Error(err)\n\t\t}\n\t})\n}", "func (cp *CandlesProvider) SubscribeAll(d time.Duration) chan schemas.ResultChannel {\n\tch := make(chan...
[ "0.6937696", "0.58796257", "0.5855679", "0.5842687", "0.57394993", "0.5554731", "0.55545205", "0.5499015", "0.5495352", "0.54776376", "0.54013604", "0.53748983", "0.5313518", "0.52899235", "0.52726644", "0.52343976", "0.5234129", "0.5231414", "0.52018505", "0.51724696", "0.51...
0.78876483
0
RegisterStrategy allows a different RoutingStrategy to be specified for a given topic
RegisterStrategy позволяет указать разный RoutingStrategy для заданной темы
func (n *Node) RegisterStrategy(topic string, strategy RoutingStrategy) { n.strategyMap[topic] = strategy }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func RegisterStrategy(info *StrategyInfo) {\n\tstrategyRegistry = append(strategyRegistry, info)\n}", "func RoutingStrategy(r RoutingStrategyType) metaOp {\n\treturn func(m *PluginMeta) {\n\t\tm.RoutingStrategy = r\n\t}\n}", "func (t Twitter) registerRoutes(r *mux.Router) {\n\n}", "func (n networkRoute) Regi...
[ "0.6233871", "0.60150677", "0.5539055", "0.5388272", "0.5353805", "0.5258051", "0.5237158", "0.5210581", "0.52068865", "0.5089592", "0.50649077", "0.50563955", "0.5038952", "0.49194244", "0.48399246", "0.48336083", "0.48249227", "0.48226076", "0.48137185", "0.47765005", "0.47...
0.8255487
0
Restore creates a topic with an existing wal
Restore создаёт тему с существующим wal
func Restore(name string, walDir string) (*WALTopic, error) { w, err := walFactory.Open(nil, nil, walDir) if err != nil { return nil, errors.Wrapf(err, "Could no open wal for topic %s", name) } m := make(map[int]uint64) return &WALTopic{name: name, walDir: walDir, wal: w, firstIndexInSegment: m}, nil }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (c *Cluster) RestoreTopic(toml []byte) error {\n\treturn c.createTopic(toml, true)\n}", "func (ctl Controller) Restore(name string) *pitr.Error {\n\terr := ctl.cluster.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = ctl.cluster.Clear()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tstdout, stder...
[ "0.7388679", "0.5776889", "0.54517996", "0.5324671", "0.52316856", "0.52075505", "0.5200593", "0.5074295", "0.50688195", "0.5018047", "0.49563769", "0.49482065", "0.49438968", "0.49104205", "0.49067542", "0.4878728", "0.48616022", "0.48592317", "0.48512042", "0.48401818", "0....
0.8242817
0
Append appends to the wal of this topic
Append добавляет в файл журнала (wal) этого топика
func (t *WALTopic) Append(data Data) error { var buf bytes.Buffer _ = gob.NewEncoder(&buf).Encode(data) if err := t.wal.Log(buf.Bytes()); err != nil { return errors.Wrapf(err, "Error appending to wal for topic: %s", t.name) } for _, a := range t.readerAlerts { if a.waiting { a.appendC <- true } } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (t *Topic) Append(msg schema.Message) {\n\tt.lock.Lock()\n\tdefer t.lock.Unlock()\n\tt.Depth++\n\tmsg.Offset = t.Depth\n\tt.Channel <- msg\n\tt.buffer.Put(msg)\n}", "func (l *Log) Append(ctx context.Context, msg Message) error {\n\tdata, err := json.Marshal(msg)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t...
[ "0.7172584", "0.6377327", "0.57611495", "0.5748846", "0.5728976", "0.5707987", "0.56621695", "0.5645391", "0.55513144", "0.55505306", "0.5547055", "0.55321455", "0.5517304", "0.5488533", "0.54715824", "0.5470633", "0.5447862", "0.5418506", "0.5404934", "0.5399982", "0.5397534...
0.7302169
0
User will inject the databaseTx in the `User` schema
Пользователь введет databaseTx в схему `User`
func (gtx *GuardTx) User(user *schema.User) *schema.User { if user == nil { user = &schema.User{ Entity: schema.Entity{DBContract: gtx.dbTx}, } } else { user.DBContract = gtx.dbTx } user.SetValidator(gtx.validator.User) return user }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func User(user tables.Person) error {\n\tfmt.Println(\"preparing\")\n\tstmt, err := mysqlBus.DB.Prepare(\"INSERT INTO Person VALUES(?, ?, ?, ?, ?, ?)\")\n\tfmt.Println(\"prepared\")\n\tfmt.Println(err)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfmt.Println(\"executing\")\n\t_, err = stmt.Exec(user.Username, user.H...
[ "0.6224481", "0.58505857", "0.58417505", "0.5826436", "0.5734593", "0.5690672", "0.5690672", "0.568731", "0.5683977", "0.56832737", "0.5665492", "0.5661991", "0.56523687", "0.5643033", "0.5639015", "0.56369126", "0.56279415", "0.56095916", "0.56004083", "0.5600074", "0.559548...
0.71175754
0
mark HTML as Output type
Отметить HTML как тип вывода
func (*HTML) isOutput() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (this *Tidy) OutputHtml(val bool) (bool, error) {\n\treturn this.optSetBool(C.TidyHtmlOut, cBool(val))\n}", "func (this *Tidy) OutputXhtml(val bool) (bool, error) {\n\treturn this.optSetBool(C.TidyXhtmlOut, cBool(val))\n}", "func htmlFmt(w io.Writer, x interface{}, format string) {\n\twriteAny(w, x, true)...
[ "0.6400135", "0.6055975", "0.6011148", "0.58667994", "0.5687668", "0.561943", "0.55879533", "0.55276394", "0.5470911", "0.5454469", "0.545375", "0.5367108", "0.53660023", "0.536108", "0.5316962", "0.5314116", "0.5296099", "0.5273366", "0.52713025", "0.5254828", "0.5251903", ...
0.70670927
0
Update is for component to have itself rerendered.
Обновление предназначено для того, чтобы компонент перерисовался снова.
func (s *State) Update() { // fmt.Println("update") s.render() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (r *renderer) Update(_ tea.Msg, _ *list.Model) tea.Cmd { return nil }", "func (component *Component) Update() {\n\tcomponent.WarnError(component.UpdateWithError())\n}", "func (c *PureComponent) HasUpdated() bool { return false }", "func (v *Component) ComponentDidUpdate(prevProps *Map, prevState *Map) {...
[ "0.739471", "0.7180391", "0.7151857", "0.6852027", "0.67297417", "0.6516826", "0.6448432", "0.6317419", "0.6290429", "0.6266985", "0.6240016", "0.6225204", "0.6130606", "0.6125892", "0.6121056", "0.61098975", "0.6102079", "0.6094033", "0.6089738", "0.60849196", "0.60818887", ...
0.73830247
1
/ NewComboBoxSelector :initializer of combo box selector
/ NewComboBoxSelector : инициализатор комбобокса выбора
func NewComboBoxSelector(label string, list []string) *ComboBoxSelector { obj := new(ComboBoxSelector) obj.SelectedItem = list[0] // initialize widgets obj.Cell = widgets.NewQWidget(nil, 0) obj.box = widgets.NewQComboBox(obj.Cell) obj.box.AddItems(list) obj.textLabel = widgets.NewQLabel2(label, obj.Cell, 0) /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCombobox() *Combobox {\n\tc := new(Combobox)\n\n\tc.c = C.uiNewCombobox()\n\n\tC.pkguiComboboxOnSelected(c.c)\n\n\tc.ControlBase = NewControlBase(c, uintptr(unsafe.Pointer(c.c)))\n\treturn c\n}", "func (app *controlsTestApplication) ForComboBox() *controls.ComboBoxBuilder {\n\treturn controls.NewComboBox...
[ "0.6398603", "0.60383093", "0.54640085", "0.5442935", "0.5414595", "0.52587616", "0.5221845", "0.519968", "0.5109608", "0.50104415", "0.49778694", "0.49130982", "0.49013048", "0.47839087", "0.47829998", "0.47143096", "0.47012314", "0.4693571", "0.4685004", "0.46644437", "0.46...
0.8261668
0
branchName takes the root directory and relative path to the directory and returns the branch name
branchName принимает корневую директорию и относительный путь к директории и возвращает имя ветки
func branchName(root, dirRelPath, openAPIFileName string) string { name := filepath.Base(dirRelPath) _, err := os.Stat(filepath.Join(root, dirRelPath, openAPIFileName)) if !os.IsNotExist(err) { // add Pkg: prefix indicating that it is a separate package as it has // openAPIFile return fmt.Sprintf("Pkg: %s", na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (g *github) GetBranchName() string { return g.branchName }", "func (o FunctionBuildConfigSourceRepoSourceOutput) BranchName() pulumi.StringPtrOutput {\n\treturn o.ApplyT(func(v FunctionBuildConfigSourceRepoSource) *string { return v.BranchName }).(pulumi.StringPtrOutput)\n}", "func (ref RefName) BranchNam...
[ "0.68889207", "0.6779807", "0.67637867", "0.6708616", "0.66863376", "0.6600948", "0.6599172", "0.656859", "0.65478766", "0.6514856", "0.6429341", "0.63615274", "0.6339297", "0.628713", "0.6250935", "0.6203753", "0.61460423", "0.61223817", "0.60922194", "0.60919046", "0.607967...
0.75781703
0
graphStructure writes the tree using owners for structure
graphStructure записывает дерево с использованием владельцев для структуры
func (p TreeWriter) graphStructure(nodes []*yaml.RNode) error { resourceToOwner := map[string]*node{} root := &node{} // index each of the nodes by their owner for _, n := range nodes { ownerVal, err := ownerToString(n) if err != nil { return err } var owner *node if ownerVal == "" { // no owner -- ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (q *Qualifier) Graph(w io.Writer) {\n\tfmt.Fprintf(w, \"digraph {\\n\")\n\tq.root.Graph(w, 0, \"[root]\")\n\tfmt.Fprintf(w, \"}\\n\")\n}", "func WriteTree(writer io.Writer, hierarchy *Hierarchy, includeEmpty bool) {\n\ttree := assembleTree(hierarchy)\n\tkeys := make([]string, len(tree))\n\ti := 0\n\tfor k :...
[ "0.6092704", "0.586756", "0.58613664", "0.57382333", "0.5712016", "0.56290585", "0.5610613", "0.5602439", "0.55215484", "0.54591393", "0.5436809", "0.5413327", "0.53986627", "0.5312661", "0.5216152", "0.51965225", "0.514187", "0.5128386", "0.5080789", "0.5075414", "0.5053383"...
0.7600591
0
ownerToString generate a string to identify the owner matches nodeToString format
ownerToString генерирует строку для идентификации владельца, соответствующую формату nodeToString
func ownerToString(node *yaml.RNode) (string, error) { meta, err := node.GetMeta() if err != nil { return "", err } namespace := meta.Namespace owners, err := node.Pipe(yaml.Lookup("metadata", "ownerReferences")) if err != nil { return "", err } if owners == nil { return "", nil } elements, err := own...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o RepositoryAssociationRepositoryBitbucketOutput) Owner() pulumi.StringOutput {\n\treturn o.ApplyT(func(v RepositoryAssociationRepositoryBitbucket) string { return v.Owner }).(pulumi.StringOutput)\n}", "func (o BucketReplicationConfigurationRuleDestinationAccessControlTranslationOutput) Owner() pulumi.Stri...
[ "0.70522296", "0.6943506", "0.69375956", "0.688022", "0.6856853", "0.6838874", "0.68302846", "0.67942965", "0.6789248", "0.67787945", "0.6762392", "0.6750272", "0.6650149", "0.6641561", "0.65653723", "0.65565586", "0.6555649", "0.6503313", "0.6494172", "0.6487006", "0.6482137...
0.8615006
0
index indexes the Resources by their package
index индексирует Resources по их пакету
func (p TreeWriter) index(nodes []*yaml.RNode) map[string][]*yaml.RNode { // index the ResourceNodes by package indexByPackage := map[string][]*yaml.RNode{} for i := range nodes { meta, err := nodes[i].GetMeta() if err != nil || meta.Kind == "" { // not a resource continue } pkg := filepath.Dir(meta.An...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (pi *PackageIndexer) Index(pack *Package) string {\n\tpi.mutex.Lock() \n\tdefer pi.mutex.Unlock()\n\t// foreach loop over the package's dependencies \n\tfor _, dep := range pack.deps {\n\t\t// query for each dependency\n\t\tif dep.name != \"\" && pi.Query(dep.name) == FAIL {\n\t\t\t// dependency not installed...
[ "0.59473515", "0.5910294", "0.5895813", "0.5877585", "0.58192575", "0.5749591", "0.57174927", "0.5698926", "0.56244725", "0.5540453", "0.5508983", "0.54928124", "0.54442203", "0.5425963", "0.54177755", "0.53597957", "0.5350733", "0.53459483", "0.5278293", "0.5273926", "0.5261...
0.72815484
0
sort sorts the Resources in the index in display order and returns the ordered keys for the index Packages are sorted by package name Resources within a package are sorted by: [filename, namespace, name, kind, apiVersion]
sort сортирует Resources в индексе в порядке отображения и возвращает упорядоченные ключи для индекса. Пакеты сортируются по имени пакета. Resources внутри пакета сортируются по: [filename, namespace, name, kind, apiVersion]
func (p TreeWriter) sort(indexByPackage map[string][]*yaml.RNode) []string { var keys []string for k := range indexByPackage { pkgNodes := indexByPackage[k] sort.Slice(pkgNodes, func(i, j int) bool { return compareNodes(pkgNodes[i], pkgNodes[j]) }) keys = append(keys, k) } // return the package names sorted ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func sortResources(resources []astmodel.InternalTypeName) []astmodel.InternalTypeName {\n\tsort.Slice(resources, func(i, j int) bool {\n\t\tiVal := resources[i]\n\t\tjVal := resources[j]\n\n\t\treturn iVal.PackageReference().PackageName() < jVal.PackageReference().PackageName() ||\n\t\t\tiVal.PackageReference().Pa...
[ "0.7373579", "0.67436945", "0.66443646", "0.63406587", "0.6209258", "0.605762", "0.6039649", "0.5944665", "0.5886248", "0.5750245", "0.56788707", "0.5572973", "0.55383927", "0.552214", "0.5503361", "0.55031127", "0.5499262", "0.5477553", "0.5433216", "0.53902084", "0.535577",...
0.7210953
1
getFields looks up p.Fields from leaf and structures them into treeFields. TODO(pwittrock): simplify this function
getFields ищет p.Fields из листа и структурирует их в treeFields. TODO(pwittrock): упростить эту функцию
func (p TreeWriter) getFields(leaf *yaml.RNode) (treeFields, error) { fieldsByName := map[string]*treeField{} // index nested and non-nested fields for i := range p.Fields { f := p.Fields[i] seq, err := leaf.Pipe(&f) if err != nil { return nil, err } if seq == nil { continue } if fieldsByName[f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func getParentTreeFields(treePath string) (treeNames, treePaths []string) {\n\tif treePath == \"\" {\n\t\treturn treeNames, treePaths\n\t}\n\n\ttreeNames = strings.Split(treePath, \"/\")\n\ttreePaths = make([]string, len(treeNames))\n\tfor i := range treeNames {\n\t\ttreePaths[i] = strings.Join(treeNames[:i+1], \"...
[ "0.61212295", "0.5837798", "0.5814727", "0.57181865", "0.56932044", "0.5691752", "0.56457984", "0.56295365", "0.5619157", "0.56047153", "0.55527204", "0.5524664", "0.5486085", "0.5475357", "0.5453594", "0.5439258", "0.5431331", "0.54223394", "0.54207104", "0.54119086", "0.536...
0.79517883
0
NewCopyRecipeToMyRecipesWithChangesParams creates a new CopyRecipeToMyRecipesWithChangesParams object with the default values initialized.
NewCopyRecipeToMyRecipesWithChangesParams создает новый объект CopyRecipeToMyRecipesWithChangesParams с инициализацией значений по умолчанию.
func NewCopyRecipeToMyRecipesWithChangesParams() *CopyRecipeToMyRecipesWithChangesParams { var () return &CopyRecipeToMyRecipesWithChangesParams{ timeout: cr.DefaultTimeout, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCopyRecipeToMyRecipesWithChangesParamsWithHTTPClient(client *http.Client) *CopyRecipeToMyRecipesWithChangesParams {\n\tvar ()\n\treturn &CopyRecipeToMyRecipesWithChangesParams{\n\t\tHTTPClient: client,\n\t}\n}", "func NewCopyRecipeToMyRecipesWithChangesParamsWithTimeout(timeout time.Duration) *CopyRecipe...
[ "0.7398709", "0.7115698", "0.6506534", "0.5838536", "0.575506", "0.55052036", "0.54349566", "0.54136103", "0.5332016", "0.5116452", "0.50422174", "0.48769543", "0.48056495", "0.47824895", "0.47173387", "0.470763", "0.4704235", "0.46622336", "0.46519724", "0.45844418", "0.4572...
0.83219415
0
NewCopyRecipeToMyRecipesWithChangesParamsWithTimeout creates a new CopyRecipeToMyRecipesWithChangesParams object with the default values initialized, and the ability to set a timeout on a request
NewCopyRecipeToMyRecipesWithChangesParamsWithTimeout создает новый объект CopyRecipeToMyRecipesWithChangesParams с инициализированными значениями по умолчанию, а также возможность установить таймаут на запрос
func NewCopyRecipeToMyRecipesWithChangesParamsWithTimeout(timeout time.Duration) *CopyRecipeToMyRecipesWithChangesParams { var () return &CopyRecipeToMyRecipesWithChangesParams{ timeout: timeout, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) WithTimeout(timeout time.Duration) *CopyRecipeToMyRecipesWithChangesParams {\n\to.SetTimeout(timeout)\n\treturn o\n}", "func (o *CopyRecipeToMyRecipesWithChangesParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func NewCopyRecipeToMyRecipe...
[ "0.7334397", "0.6605116", "0.63352853", "0.5800872", "0.56409484", "0.5607914", "0.54550415", "0.5356853", "0.5310841", "0.53100616", "0.5263849", "0.5247955", "0.52475536", "0.5226695", "0.52168256", "0.5173177", "0.5161624", "0.5160964", "0.5154121", "0.5137564", "0.5129438...
0.7710058
0
NewCopyRecipeToMyRecipesWithChangesParamsWithContext creates a new CopyRecipeToMyRecipesWithChangesParams object with the default values initialized, and the ability to set a context for a request
NewCopyRecipeToMyRecipesWithChangesParamsWithContext создает новый объект CopyRecipeToMyRecipesWithChangesParams с инициализацией значений по умолчанию, а также возможность установки контекста для запроса
func NewCopyRecipeToMyRecipesWithChangesParamsWithContext(ctx context.Context) *CopyRecipeToMyRecipesWithChangesParams { var () return &CopyRecipeToMyRecipesWithChangesParams{ Context: ctx, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func NewCopyRecipeToMyRecipesWithChangesParams() *CopyRecipeToMyRecipesWithChangesParams {\n\tvar ()\n\treturn &CopyRecipeToMyRecipesWithChangesParams{\n\n\t\ttimeout: cr.DefaultTimeout,\n\t}\n}", "func (o *CopyRecipeToMyRecipesWithChangesParams) WithContext(ctx context.Context) *CopyRecipeToMyRecipesWithChanges...
[ "0.7866671", "0.78459364", "0.7305147", "0.65556616", "0.59407496", "0.5868117", "0.5521566", "0.50582105", "0.48954266", "0.4673309", "0.44319955", "0.43159604", "0.4264343", "0.42311433", "0.40826327", "0.40715033", "0.4071279", "0.40607655", "0.39594117", "0.38937762", "0....
0.83000755
0
NewCopyRecipeToMyRecipesWithChangesParamsWithHTTPClient creates a new CopyRecipeToMyRecipesWithChangesParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
NewCopyRecipeToMyRecipesWithChangesParamsWithHTTPClient создает новый объект CopyRecipeToMyRecipesWithChangesParams с инициализацией значений по умолчанию, а также возможность установить пользовательский HTTPClient для запроса
func NewCopyRecipeToMyRecipesWithChangesParamsWithHTTPClient(client *http.Client) *CopyRecipeToMyRecipesWithChangesParams { var () return &CopyRecipeToMyRecipesWithChangesParams{ HTTPClient: client, } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) WithHTTPClient(client *http.Client) *CopyRecipeToMyRecipesWithChangesParams {\n\to.SetHTTPClient(client)\n\treturn o\n}", "func (o *CopyRecipeToMyRecipesWithChangesParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *GetPublicsRec...
[ "0.7614183", "0.7191112", "0.60642815", "0.6035904", "0.6035271", "0.601885", "0.596128", "0.5958554", "0.5913607", "0.5900584", "0.58948666", "0.5868178", "0.5853816", "0.5807214", "0.5771283", "0.5759591", "0.5750537", "0.57373995", "0.5735678", "0.57353026", "0.5731023", ...
0.746175
1
WithTimeout adds the timeout to the copy recipe to my recipes with changes params
WithTimeout добавляет таймаут в рецепт копирования в мои рецепты с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) WithTimeout(timeout time.Duration) *CopyRecipeToMyRecipesWithChangesParams { o.SetTimeout(timeout) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func (o *GetPublicsRecipeParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func NewCopyRecipeToMyRecipesWithChangesParamsWithTimeout(timeout time.Duration) *CopyRecipeToMyRec...
[ "0.6520962", "0.5858076", "0.57581943", "0.5501371", "0.52934045", "0.5210673", "0.52082425", "0.5182034", "0.5154618", "0.508878", "0.50811505", "0.5077336", "0.50460726", "0.50446784", "0.5041395", "0.5041395", "0.5026333", "0.50209403", "0.49826825", "0.49667513", "0.49350...
0.7105756
0
SetTimeout adds the timeout to the copy recipe to my recipes with changes params
SetTimeout добавляет таймаут в копию рецепта в мои рецепты с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) WithTimeout(timeout time.Duration) *CopyRecipeToMyRecipesWithChangesParams {\n\to.SetTimeout(timeout)\n\treturn o\n}", "func (o *GetPublicsRecipeParams) SetTimeout(timeout time.Duration) {\n\to.timeout = timeout\n}", "func (o *GetIngredientVersionRevisionParams)...
[ "0.6950563", "0.6872008", "0.63673514", "0.63112706", "0.62673944", "0.6094319", "0.6092785", "0.6001111", "0.59669495", "0.59356844", "0.5930924", "0.59246594", "0.5920255", "0.58911455", "0.58869755", "0.58824813", "0.5843332", "0.58411634", "0.5800582", "0.5796857", "0.579...
0.74348015
0
WithHTTPClient adds the HTTPClient to the copy recipe to my recipes with changes params
WithHTTPClient добавляет HTTPClient в копию рецепта в мои рецепты с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) WithHTTPClient(client *http.Client) *CopyRecipeToMyRecipesWithChangesParams { o.SetHTTPClient(client) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *GetPublicsRecipeParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *AddItemParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", ...
[ "0.68199915", "0.6054078", "0.59095484", "0.58934873", "0.58423924", "0.5841846", "0.5841459", "0.58388424", "0.5804307", "0.5749258", "0.5740945", "0.57321674", "0.57095027", "0.5701237", "0.5682556", "0.56596583", "0.5657443", "0.5632348", "0.5626681", "0.5624085", "0.56233...
0.7069977
0
SetHTTPClient adds the HTTPClient to the copy recipe to my recipes with changes params
SetHTTPClient добавляет HTTPClient в копию рецепта в мои рецепты с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *GetPublicsRecipeParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *RevertProductSnapshotRequestUsingPOSTParams) SetHTTPClient(client *http.Client) {\n\to.HTTPClient = client\n}", "func (o *CopyRecipeToMyRecipesWithChangesParams) WithHTTPClient(client *http.Client) *Co...
[ "0.7151808", "0.7038088", "0.6908971", "0.6900971", "0.68990266", "0.6891095", "0.6878877", "0.68639123", "0.68540007", "0.6851541", "0.68416125", "0.6839482", "0.68369865", "0.68172693", "0.67863685", "0.67825335", "0.6768729", "0.67661315", "0.67284036", "0.669015", "0.6666...
0.7771742
0
WithJSONBody adds the jSONBody to the copy recipe to my recipes with changes params
WithJSONBody добавляет jSONBody в копию рецепта к моим рецептам с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) WithJSONBody(jSONBody *models.Recipe) *CopyRecipeToMyRecipesWithChangesParams { o.SetJSONBody(jSONBody) return o }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) SetJSONBody(jSONBody *models.Recipe) {\n\to.JSONBody = jSONBody\n}", "func (a *API) JSONBody(ctx *fasthttp.RequestCtx, model interface{}) {\n\tr := bytes.NewReader(ctx.PostBody())\n\tjson.NewDecoder(r).Decode(&model)\n}", "func (c *RBController) RecipeJSONAdvanc...
[ "0.63932765", "0.5612401", "0.5401041", "0.53624415", "0.528843", "0.51485735", "0.51017815", "0.5067448", "0.5022532", "0.49914533", "0.49796784", "0.4972427", "0.4907961", "0.48759767", "0.48699957", "0.48650312", "0.48458964", "0.48397836", "0.48314732", "0.48046854", "0.4...
0.7077129
0
SetJSONBody adds the jsonBody to the copy recipe to my recipes with changes params
SetJSONBody добавляет jsonBody в копию рецепта в мои рецепты с изменениями параметров
func (o *CopyRecipeToMyRecipesWithChangesParams) SetJSONBody(jSONBody *models.Recipe) { o.JSONBody = jSONBody }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (o *CopyRecipeToMyRecipesWithChangesParams) WithJSONBody(jSONBody *models.Recipe) *CopyRecipeToMyRecipesWithChangesParams {\n\to.SetJSONBody(jSONBody)\n\treturn o\n}", "func (r *Request) SetJSONBody(val interface{}) error {\n\tbuf := bytes.NewBuffer(nil)\n\tenc := json.NewEncoder(buf)\n\tif err := enc.Encod...
[ "0.68018734", "0.65308696", "0.5895473", "0.58617973", "0.5805046", "0.57633257", "0.56163126", "0.55379707", "0.544437", "0.543002", "0.5392192", "0.53760797", "0.53396225", "0.5332443", "0.52658796", "0.5227039", "0.5201621", "0.51650983", "0.5164823", "0.5163957", "0.51321...
0.7069762
0
To reduce request to GKE metadata server, the base token source is reused across syncers. Note: Initialization is deferred because there are possible to use serviceAccountSecretRef with no available default token source.
Чтобы сократить запросы к серверу метаданных GKE, базовый источник токенов переиспользуется между синхронизаторами. Примечание: инициализация откладывается, так как возможно использование serviceAccountSecretRef без доступного по умолчанию источника токенов.
func initializedBaseTokenSource() (oauth2.TokenSource, error) { baseTokenSourceOnce.Do(func() { baseTokenSource, baseTokenSourceErr = google.DefaultTokenSource(context.Background(), cloudPlatformScope) }) return baseTokenSource, baseTokenSourceErr }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func tokenSource(ctx context.Context) (oauth2.TokenSource, error) {\n\tok, err := credsFile.Exists()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar bootstrapToken *oauth2.Token\n\tif !ok {\n\t\ttok, err := authenticate()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tbootstrapToken = tok\n\t}\n\tretu...
[ "0.6248717", "0.59793735", "0.5819379", "0.5771171", "0.5746096", "0.57363856", "0.5698077", "0.56682885", "0.56210387", "0.560057", "0.55441684", "0.55334824", "0.5487145", "0.5487065", "0.545568", "0.5444413", "0.540357", "0.536407", "0.5363666", "0.5356209", "0.5340606", ...
0.7220189
0
TokenSource create oauth2.TokenSource for Credentials. Note: We can specify scopes needed for spannerautoscaler but it does increase maintenance cost. We should already use least privileged Google Service Accounts so it use cloudPlatformScope.
TokenSource создает oauth2.TokenSource для Credentials. Примечание: Мы можем указать необходимые scopes для spannerautoscaler, но это увеличивает стоимость обслуживания. Мы уже должны использовать Google Service Accounts с минимальными привилегиями, поэтому используйте cloudPlatformScope.
func (c *Credentials) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { switch c.Type { case CredentialsTypeADC: return initializedBaseTokenSource() case CredentialsTypeServiceAccountJSON: cred, err := google.CredentialsFromJSON(ctx, c.ServiceAccountJSON, cloudPlatformScope) if err != nil { ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func tokenSource(ctx context.Context, accessToken, credentials string) (oauth2.TokenSource, error) {\n\t// Try access token first\n\tif accessToken != \"\" {\n\t\tlog.Printf(\"[INFO] authenticating via access_token\")\n\n\t\tcontents, _, err := pathorcontents.Read(accessToken)\n\t\tif err != nil {\n\t\t\treturn ni...
[ "0.74979717", "0.7401055", "0.70478684", "0.70462215", "0.7018204", "0.7013672", "0.6994854", "0.69563544", "0.6934276", "0.68950164", "0.6852529", "0.6838926", "0.6566733", "0.6493974", "0.64755976", "0.64075357", "0.63987464", "0.63816744", "0.6311301", "0.6255845", "0.6236...
0.7532123
0
UpdateTarget updates target and returns wether did update or not.
UpdateTarget обновляет целевой объект и возвращает, было ли обновление выполнено.
func (s *syncer) UpdateTarget(projectID, instanceID string, credentials *Credentials) bool { updated := false if s.projectID != projectID { updated = true s.projectID = projectID } if s.instanceID != instanceID { updated = true s.instanceID = instanceID } // TODO: Consider deepCopy if !reflect.DeepEqu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (mr *ClientMockRecorder) UpdateTarget(arg0, arg1, arg2 interface{}) *gomock.Call {\n\tmr.mock.ctrl.T.Helper()\n\treturn mr.mock.ctrl.RecordCallWithMethodType(mr.mock, \"UpdateTarget\", reflect.TypeOf((*Client)(nil).UpdateTarget), arg0, arg1, arg2)\n}", "func (m *Client) UpdateTarget(arg0 context.Context, ar...
[ "0.6614034", "0.64920354", "0.6105699", "0.60342765", "0.6030683", "0.59310377", "0.5721925", "0.56897306", "0.56685436", "0.5625591", "0.5597833", "0.55948585", "0.55275893", "0.5479221", "0.5437466", "0.5431092", "0.5352646", "0.53513056", "0.5247706", "0.52319986", "0.5218...
0.73240125
0
Start spins up a goroutine that continously polls given API endpoint at interval Poller.Interval
Start запускает го-рутину, которая непрерывно опрашивает заданный API-конечный пункт с интервалом Poller.Interval
func (p *Poller) Start() { go func(url string, interval time.Duration, out chan<- PollMsg, shutdown <-chan *sync.WaitGroup) { wg := &sync.WaitGroup{} defer func() { wg.Done() }() ticker := time.NewTicker(interval) msg := PollMsg{} resp, err := http.Get(url) if err != nil { msg.Error = append(msg.E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "func (s *AutoScaler) Run() {\n\tticker := s.clock.NewTicker(s.pollPeriod)\n\ts.readyCh <- struct{}{} // For testing.\n\n\t// Don't wait for ticker and execute pollAPIServer() for the first time.\n\ts.pollAPIServer()\n\n\tfor {\n\t\tselect {\n\t\tcase <-ticker.C():\n\t\t\ts.pollAPIServer()\n\t\tcase <-s.stopCh:\n\t...
[ "0.6498689", "0.64851135", "0.64312106", "0.6397514", "0.63825715", "0.6344594", "0.6055021", "0.59994274", "0.59954834", "0.5936349", "0.5913254", "0.59047526", "0.5847434", "0.5748641", "0.56952643", "0.5693969", "0.5684528", "0.56824774", "0.5681835", "0.5674555", "0.56715...
0.7321983
0