query_docstring stringlengths 24 20.8k | positive_code stringlengths 17 325k | hard_negative_code stringlengths 17 325k | similarity_score float64 0.3 1 | query_repo stringclasses 407
values | query_path stringlengths 5 170 | hn_repo stringclasses 400
values | hn_path stringlengths 5 170 | hn_license stringclasses 4
values | language stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|
Get returns the home directory of the current user with the help of
environment variables depending on the target operating system.
Returned path should be used with "path/filepath" to form new paths.
On non-Windows platforms, it falls back to nss lookups, if the home
directory cannot be obtained from environment-vari... | func Get() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | func Get() string {
homedir, _ := unshare.HomeDir()
return homedir
} | 0.975752 | containers/podman-tui | vendor/github.com/docker/docker/pkg/homedir/homedir.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/homedir/homedir_unix.go | Apache-2.0 | go |
Get returns the home directory of the current user with the help of
environment variables depending on the target operating system.
Returned path should be used with "path/filepath" to form new paths.
On non-Windows platforms, it falls back to nss lookups, if the home
directory cannot be obtained from environment-vari... | func Get() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | func getHomeDir() string {
homeDir := os.Getenv("HOME")
if homeDir != "" {
return homeDir
}
if u, err := user.Current(); err == nil {
return u.HomeDir
}
return "/"
} | 0.938938 | containers/podman-tui | vendor/github.com/docker/docker/pkg/homedir/homedir.go | Mirantis/cri-dockerd | vendor/github.com/godbus/dbus/v5/homedir.go | Apache-2.0 | go |
Get returns the home directory of the current user with the help of
environment variables depending on the target operating system.
Returned path should be used with "path/filepath" to form new paths.
On non-Windows platforms, it falls back to nss lookups, if the home
directory cannot be obtained from environment-vari... | func Get() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | func Get() string {
home := os.Getenv(Key())
if home != "" {
return home
}
home, _ = os.UserHomeDir()
return home
} | 0.901978 | containers/podman-tui | vendor/github.com/docker/docker/pkg/homedir/homedir.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/homedir/homedir_windows.go | Apache-2.0 | go |
Get returns the home directory of the current user with the help of
environment variables depending on the target operating system.
Returned path should be used with "path/filepath" to form new paths.
On non-Windows platforms, it falls back to nss lookups, if the home
directory cannot be obtained from environment-vari... | func Get() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | func getHomeDir() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | 0.830466 | containers/podman-tui | vendor/github.com/docker/docker/pkg/homedir/homedir.go | moby/buildkit | vendor/github.com/docker/cli/cli/config/config.go | Apache-2.0 | go |
Get returns the home directory of the current user with the help of
environment variables depending on the target operating system.
Returned path should be used with "path/filepath" to form new paths.
On non-Windows platforms, it falls back to nss lookups, if the home
directory cannot be obtained from environment-vari... | func Get() string {
home, _ := os.UserHomeDir()
if home == "" && runtime.GOOS != "windows" {
if u, err := user.Current(); err == nil {
return u.HomeDir
}
}
return home
} | func Dir() (string, error) {
if !DisableCache {
cacheLock.RLock()
cached := homedirCache
cacheLock.RUnlock()
if cached != "" {
return cached, nil
}
}
cacheLock.Lock()
defer cacheLock.Unlock()
var result string
var err error
if runtime.GOOS == "windows" {
result, err = dirWindows()
} else {
//... | 0.770265 | containers/podman-tui | vendor/github.com/docker/docker/pkg/homedir/homedir.go | tektoncd/cli | vendor/github.com/mitchellh/go-homedir/homedir.go | Apache-2.0 | go |
GetAwsNetworkPerformanceDataPagesWithContext same as GetAwsNetworkPerformanceDataPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-context... | func (c *EC2) GetAwsNetworkPerformanceDataPagesWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetAwsNetworkPerformance... | func (c *EC2) GetAwsNetworkPerformanceDataWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, opts ...request.Option) (*GetAwsNetworkPerformanceDataOutput, error) {
req, out := c.GetAwsNetworkPerformanceDataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | 0.915439 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
GetAwsNetworkPerformanceDataPagesWithContext same as GetAwsNetworkPerformanceDataPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-context... | func (c *EC2) GetAwsNetworkPerformanceDataPagesWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetAwsNetworkPerformance... | func (c *EC2) GetAwsNetworkPerformanceData(input *GetAwsNetworkPerformanceDataInput) (*GetAwsNetworkPerformanceDataOutput, error) {
req, out := c.GetAwsNetworkPerformanceDataRequest(input)
return out, req.Send()
} | 0.831906 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
GetAwsNetworkPerformanceDataPagesWithContext same as GetAwsNetworkPerformanceDataPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-context... | func (c *EC2) GetAwsNetworkPerformanceDataPagesWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetAwsNetworkPerformance... | func (c *EC2) GetAwsNetworkPerformanceDataRequest(input *GetAwsNetworkPerformanceDataInput) (req *request.Request, output *GetAwsNetworkPerformanceDataOutput) {
op := &request.Operation{
Name: opGetAwsNetworkPerformanceData,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputToke... | 0.813943 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
GetAwsNetworkPerformanceDataPagesWithContext same as GetAwsNetworkPerformanceDataPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-context... | func (c *EC2) GetAwsNetworkPerformanceDataPagesWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetAwsNetworkPerformance... | func (c *EC2) GetAwsNetworkPerformanceDataPages(input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool) error {
return c.GetAwsNetworkPerformanceDataPagesWithContext(aws.BackgroundContext(), input, fn)
} | 0.797332 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
GetAwsNetworkPerformanceDataPagesWithContext same as GetAwsNetworkPerformanceDataPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-context... | func (c *EC2) GetAwsNetworkPerformanceDataPagesWithContext(ctx aws.Context, input *GetAwsNetworkPerformanceDataInput, fn func(*GetAwsNetworkPerformanceDataOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetAwsNetworkPerformance... | func (c *EC2) DescribeAwsNetworkPerformanceMetricSubscriptionsPagesWithContext(ctx aws.Context, input *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, fn func(*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*requ... | 0.726242 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
CreateVerifiedAccessGroup API operation for Amazon Elastic Compute Cloud.
An Amazon Web Services Verified Access group is a collection of Amazon Web
Services Verified Access endpoints who's associated applications have similar
security requirements. Each instance within a Verified Access group shares
an Verified Acces... | func (c *EC2) CreateVerifiedAccessGroup(input *CreateVerifiedAccessGroupInput) (*CreateVerifiedAccessGroupOutput, error) {
req, out := c.CreateVerifiedAccessGroupRequest(input)
return out, req.Send()
} | func (c *EC2) ModifyVerifiedAccessGroup(input *ModifyVerifiedAccessGroupInput) (*ModifyVerifiedAccessGroupOutput, error) {
req, out := c.ModifyVerifiedAccessGroupRequest(input)
return out, req.Send()
} | 0.893534 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
CreateVerifiedAccessGroup API operation for Amazon Elastic Compute Cloud.
An Amazon Web Services Verified Access group is a collection of Amazon Web
Services Verified Access endpoints who's associated applications have similar
security requirements. Each instance within a Verified Access group shares
an Verified Acces... | func (c *EC2) CreateVerifiedAccessGroup(input *CreateVerifiedAccessGroupInput) (*CreateVerifiedAccessGroupOutput, error) {
req, out := c.CreateVerifiedAccessGroupRequest(input)
return out, req.Send()
} | func (c *EC2) DeleteVerifiedAccessGroup(input *DeleteVerifiedAccessGroupInput) (*DeleteVerifiedAccessGroupOutput, error) {
req, out := c.DeleteVerifiedAccessGroupRequest(input)
return out, req.Send()
} | 0.865543 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
CreateVerifiedAccessGroup API operation for Amazon Elastic Compute Cloud.
An Amazon Web Services Verified Access group is a collection of Amazon Web
Services Verified Access endpoints who's associated applications have similar
security requirements. Each instance within a Verified Access group shares
an Verified Acces... | func (c *EC2) CreateVerifiedAccessGroup(input *CreateVerifiedAccessGroupInput) (*CreateVerifiedAccessGroupOutput, error) {
req, out := c.CreateVerifiedAccessGroupRequest(input)
return out, req.Send()
} | func (c *EC2) ModifyVerifiedAccessGroupPolicy(input *ModifyVerifiedAccessGroupPolicyInput) (*ModifyVerifiedAccessGroupPolicyOutput, error) {
req, out := c.ModifyVerifiedAccessGroupPolicyRequest(input)
return out, req.Send()
} | 0.841176 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
CreateVerifiedAccessGroup API operation for Amazon Elastic Compute Cloud.
An Amazon Web Services Verified Access group is a collection of Amazon Web
Services Verified Access endpoints who's associated applications have similar
security requirements. Each instance within a Verified Access group shares
an Verified Acces... | func (c *EC2) CreateVerifiedAccessGroup(input *CreateVerifiedAccessGroupInput) (*CreateVerifiedAccessGroupOutput, error) {
req, out := c.CreateVerifiedAccessGroupRequest(input)
return out, req.Send()
} | func (c *EC2) DescribeVerifiedAccessGroups(input *DescribeVerifiedAccessGroupsInput) (*DescribeVerifiedAccessGroupsOutput, error) {
req, out := c.DescribeVerifiedAccessGroupsRequest(input)
return out, req.Send()
} | 0.839433 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
CreateVerifiedAccessGroup API operation for Amazon Elastic Compute Cloud.
An Amazon Web Services Verified Access group is a collection of Amazon Web
Services Verified Access endpoints who's associated applications have similar
security requirements. Each instance within a Verified Access group shares
an Verified Acces... | func (c *EC2) CreateVerifiedAccessGroup(input *CreateVerifiedAccessGroupInput) (*CreateVerifiedAccessGroupOutput, error) {
req, out := c.CreateVerifiedAccessGroupRequest(input)
return out, req.Send()
} | func (c *EC2) CreateVerifiedAccessGroupRequest(input *CreateVerifiedAccessGroupInput) (req *request.Request, output *CreateVerifiedAccessGroupOutput) {
op := &request.Operation{
Name: opCreateVerifiedAccessGroup,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateVerifiedAccessGro... | 0.826022 | aws/aws-sdk-go | service/ec2/api.go | aws/aws-sdk-go | service/ec2/api.go | Apache-2.0 | go |
Close frees resources associated with the layer reader. It will return an
error if there was an error while reading the layer or of the layer was not
completely read. | func (r *FilterLayerReader) Close() (err error) {
if r.context != 0 {
err = exportLayerEnd(r.context)
if err != nil {
err = hcserror.New(err, "ExportLayerEnd", "")
}
r.context = 0
}
return
} | func (rp *ResourcePool) Close() {
if rp.idleTimer != nil {
rp.idleTimer.Stop()
}
_ = rp.SetCapacity(0)
} | 0.640176 | genuinetools/binctr | vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go | tektoncd/cli | vendor/github.com/thales-e-security/pool/resource_pool.go | Apache-2.0 | go |
Close frees resources associated with the layer reader. It will return an
error if there was an error while reading the layer or of the layer was not
completely read. | func (r *FilterLayerReader) Close() (err error) {
if r.context != 0 {
err = exportLayerEnd(r.context)
if err != nil {
err = hcserror.New(err, "ExportLayerEnd", "")
}
r.context = 0
}
return
} | func (cr *chunkReader) Close() error {
if cr.state != newRow {
return fmt.Errorf("invalid state for end of stream %q", cr.state)
}
return nil
} | 0.640044 | genuinetools/binctr | vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go | googleapis/google-cloud-go | bigtable/reader.go | Apache-2.0 | go |
Close frees resources associated with the layer reader. It will return an
error if there was an error while reading the layer or of the layer was not
completely read. | func (r *FilterLayerReader) Close() (err error) {
if r.context != 0 {
err = exportLayerEnd(r.context)
if err != nil {
err = hcserror.New(err, "ExportLayerEnd", "")
}
r.context = 0
}
return
} | func (mr *ManualReader) Shutdown(context.Context) error {
err := ErrReaderShutdown
mr.shutdownOnce.Do(func() {
// Any future call to Collect will now return ErrReaderShutdown.
mr.sdkProducer.Store(produceHolder{
produce: shutdownProducer{}.produce,
})
mr.mu.Lock()
defer mr.mu.Unlock()
mr.isShutdown = t... | 0.625025 | genuinetools/binctr | vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go | tektoncd/cli | vendor/go.opentelemetry.io/otel/sdk/metric/manual_reader.go | Apache-2.0 | go |
Close frees resources associated with the layer reader. It will return an
error if there was an error while reading the layer or of the layer was not
completely read. | func (r *FilterLayerReader) Close() (err error) {
if r.context != 0 {
err = exportLayerEnd(r.context)
if err != nil {
err = hcserror.New(err, "ExportLayerEnd", "")
}
r.context = 0
}
return
} | func (c *Client) Close() error {
pubErr := c.pubc.Close()
subErr := c.subc.Close()
if pubErr != nil {
return fmt.Errorf("pubsub publisher closing error: %w", pubErr)
}
if subErr != nil {
// Suppress client connection closing errors. This will only happen
// when using the client in conjunction with the Pub/S... | 0.615686 | genuinetools/binctr | vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go | go-graphite/go-carbon | vendor/cloud.google.com/go/pubsub/pubsub.go | MIT | go |
Close frees resources associated with the layer reader. It will return an
error if there was an error while reading the layer or of the layer was not
completely read. | func (r *FilterLayerReader) Close() (err error) {
if r.context != 0 {
err = exportLayerEnd(r.context)
if err != nil {
err = hcserror.New(err, "ExportLayerEnd", "")
}
r.context = 0
}
return
} | func (h *Handle) Delete() {
h.Close()
} | 0.609388 | genuinetools/binctr | vendor/github.com/Microsoft/hcsshim/internal/wclayer/exportlayer.go | Mirantis/cri-dockerd | vendor/github.com/vishvananda/netlink/handle_linux.go | Apache-2.0 | go |
NewProgressMeter returns a progress meter that can be used to show
progress to a TTY periodically, including an increasing int64
value. | func NewProgressMeter(w io.Writer, period time.Duration) Progress {
return &progressMeter{
w: w,
period: period,
}
} | func NewMeter() Meter {
return &worker{
measures: make(map[string]*measureRef),
views: make(map[string]*viewInternal),
viewStartTimes: make(map[*viewInternal]time.Time),
timer: time.NewTicker(defaultReportingDuration),
c: make(chan command, 1024),
quit: make(c... | 0.640433 | github/git-sizer | meter/meter.go | config-syncer/config-syncer | vendor/go.opencensus.io/stats/view/worker.go | Apache-2.0 | go |
NewProgressMeter returns a progress meter that can be used to show
progress to a TTY periodically, including an increasing int64
value. | func NewProgressMeter(w io.Writer, period time.Duration) Progress {
return &progressMeter{
w: w,
period: period,
}
} | func (cpb *ProgressBar) TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) io.ReadCloser {
cpb.lock.Lock()
defer cpb.lock.Unlock()
newPb := pb.New64(totalSize)
newPb.Set("prefix", fmt.Sprintf("%s ", filepath.Base(src)))
newPb.SetCurrent(currentSize)
newPb.Start()
reader := newPb.NewPr... | 0.566949 | github/git-sizer | meter/meter.go | okteto/okteto | cmd/utils/progress.go | Apache-2.0 | go |
NewProgressMeter returns a progress meter that can be used to show
progress to a TTY periodically, including an increasing int64
value. | func NewProgressMeter(w io.Writer, period time.Duration) Progress {
return &progressMeter{
w: w,
period: period,
}
} | func NewRegisteredMeter(name string, r Registry) Meter {
c := NewMeter()
if nil == r {
r = DefaultRegistry
}
r.Register(name, c)
return c
} | 0.556872 | github/git-sizer | meter/meter.go | tektoncd/cli | vendor/github.com/rcrowley/go-metrics/meter.go | Apache-2.0 | go |
NewProgressMeter returns a progress meter that can be used to show
progress to a TTY periodically, including an increasing int64
value. | func NewProgressMeter(w io.Writer, period time.Duration) Progress {
return &progressMeter{
w: w,
period: period,
}
} | func NewMeter(parent ...tree.Node) *Meter { return tree.New[Meter](parent...) } | 0.554086 | github/git-sizer | meter/meter.go | cogentcore/core | core/typegen.go | BSD-3-Clause | go |
NewProgressMeter returns a progress meter that can be used to show
progress to a TTY periodically, including an increasing int64
value. | func NewProgressMeter(w io.Writer, period time.Duration) Progress {
return &progressMeter{
w: w,
period: period,
}
} | func NewRegisteredTimer(name string, r Registry) Timer {
c := NewTimer()
if nil == r {
r = DefaultRegistry
}
r.Register(name, c)
return c
} | 0.546799 | github/git-sizer | meter/meter.go | tektoncd/cli | vendor/github.com/rcrowley/go-metrics/timer.go | Apache-2.0 | go |
CreateUsageProfileRequest generates a "aws/request.Request" representing the
client's request for the CreateUsageProfile operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the serv... | func (c *Glue) CreateUsageProfileRequest(input *CreateUsageProfileInput) (req *request.Request, output *CreateUsageProfileOutput) {
op := &request.Operation{
Name: opCreateUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateUsageProfileInput{}
}
output = &CreateUsa... | func (c *Glue) GetUsageProfileRequest(input *GetUsageProfileInput) (req *request.Request, output *GetUsageProfileOutput) {
op := &request.Operation{
Name: opGetUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetUsageProfileInput{}
}
output = &GetUsageProfileOutput{}
... | 0.915321 | aws/aws-sdk-go | service/glue/api.go | aws/aws-sdk-go | service/glue/api.go | Apache-2.0 | go |
CreateUsageProfileRequest generates a "aws/request.Request" representing the
client's request for the CreateUsageProfile operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the serv... | func (c *Glue) CreateUsageProfileRequest(input *CreateUsageProfileInput) (req *request.Request, output *CreateUsageProfileOutput) {
op := &request.Operation{
Name: opCreateUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateUsageProfileInput{}
}
output = &CreateUsa... | func (c *Glue) DeleteUsageProfileRequest(input *DeleteUsageProfileInput) (req *request.Request, output *DeleteUsageProfileOutput) {
op := &request.Operation{
Name: opDeleteUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteUsageProfileInput{}
}
output = &DeleteUsa... | 0.887672 | aws/aws-sdk-go | service/glue/api.go | aws/aws-sdk-go | service/glue/api.go | Apache-2.0 | go |
CreateUsageProfileRequest generates a "aws/request.Request" representing the
client's request for the CreateUsageProfile operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the serv... | func (c *Glue) CreateUsageProfileRequest(input *CreateUsageProfileInput) (req *request.Request, output *CreateUsageProfileOutput) {
op := &request.Operation{
Name: opCreateUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateUsageProfileInput{}
}
output = &CreateUsa... | func (c *B2bi) CreateProfileRequest(input *CreateProfileInput) (req *request.Request, output *CreateProfileOutput) {
op := &request.Operation{
Name: opCreateProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateProfileInput{}
}
output = &CreateProfileOutput{}
req = c.new... | 0.875469 | aws/aws-sdk-go | service/glue/api.go | aws/aws-sdk-go | service/b2bi/api.go | Apache-2.0 | go |
CreateUsageProfileRequest generates a "aws/request.Request" representing the
client's request for the CreateUsageProfile operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the serv... | func (c *Glue) CreateUsageProfileRequest(input *CreateUsageProfileInput) (req *request.Request, output *CreateUsageProfileOutput) {
op := &request.Operation{
Name: opCreateUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateUsageProfileInput{}
}
output = &CreateUsa... | func (c *WellArchitected) CreateProfileRequest(input *CreateProfileInput) (req *request.Request, output *CreateProfileOutput) {
op := &request.Operation{
Name: opCreateProfile,
HTTPMethod: "POST",
HTTPPath: "/profiles",
}
if input == nil {
input = &CreateProfileInput{}
}
output = &CreateProfileOu... | 0.869217 | aws/aws-sdk-go | service/glue/api.go | aws/aws-sdk-go | service/wellarchitected/api.go | Apache-2.0 | go |
CreateUsageProfileRequest generates a "aws/request.Request" representing the
client's request for the CreateUsageProfile operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the serv... | func (c *Glue) CreateUsageProfileRequest(input *CreateUsageProfileInput) (req *request.Request, output *CreateUsageProfileOutput) {
op := &request.Operation{
Name: opCreateUsageProfile,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateUsageProfileInput{}
}
output = &CreateUsa... | func (c *CustomerProfiles) CreateProfileRequest(input *CreateProfileInput) (req *request.Request, output *CreateProfileOutput) {
op := &request.Operation{
Name: opCreateProfile,
HTTPMethod: "POST",
HTTPPath: "/domains/{DomainName}/profiles",
}
if input == nil {
input = &CreateProfileInput{}
}
out... | 0.865245 | aws/aws-sdk-go | service/glue/api.go | aws/aws-sdk-go | service/customerprofiles/api.go | Apache-2.0 | go |
WithBaseLevelSize sets the maximum size target for the base level.
The default value is 10MB. | func (opt Options) WithBaseLevelSize(val int64) Options {
opt.BaseLevelSize = val
return opt
} | func WithWindowSize(n int) EOption {
return func(o *encoderOptions) error {
switch {
case n < MinWindowSize:
return fmt.Errorf("window size must be at least %d", MinWindowSize)
case n > MaxWindowSize:
return fmt.Errorf("window size must be at most %d", MaxWindowSize)
case (n & (n - 1)) != 0:
return er... | 0.685525 | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | umputun/tg-spam | vendor/github.com/klauspost/compress/zstd/encoder_options.go | MIT | go |
WithBaseLevelSize sets the maximum size target for the base level.
The default value is 10MB. | func (opt Options) WithBaseLevelSize(val int64) Options {
opt.BaseLevelSize = val
return opt
} | func (opt Options) WithBaseTableSize(val int64) Options {
opt.BaseTableSize = val
return opt
} | 0.673239 | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | Apache-2.0 | go |
WithBaseLevelSize sets the maximum size target for the base level.
The default value is 10MB. | func (opt Options) WithBaseLevelSize(val int64) Options {
opt.BaseLevelSize = val
return opt
} | func (opt Options) WithLevelSizeMultiplier(val int) Options {
opt.LevelSizeMultiplier = val
return opt
} | 0.665562 | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | Apache-2.0 | go |
WithBaseLevelSize sets the maximum size target for the base level.
The default value is 10MB. | func (opt Options) WithBaseLevelSize(val int64) Options {
opt.BaseLevelSize = val
return opt
} | func WithWindowSize(n int) EOption {
return func(o *encoderOptions) error {
switch {
case n < MinWindowSize:
return fmt.Errorf("window size must be at least %d", MinWindowSize)
case n > MaxWindowSize:
return fmt.Errorf("window size must be at most %d", MaxWindowSize)
case (n & (n - 1)) != 0:
return er... | 0.639202 | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | qiniu/logkit | vendor/github.com/klauspost/compress/zstd/encoder_options.go | Apache-2.0 | go |
WithBaseLevelSize sets the maximum size target for the base level.
The default value is 10MB. | func (opt Options) WithBaseLevelSize(val int64) Options {
opt.BaseLevelSize = val
return opt
} | func WithDecoderMaxWindow(size uint64) DOption {
return func(o *decoderOptions) error {
if size < MinWindowSize {
return errors.New("WithMaxWindowSize must be at least 1KB, 1024 bytes")
}
if size > (1<<41)+7*(1<<38) {
return errors.New("WithMaxWindowSize must be less than (1<<41) + 7*(1<<38) ~ 3.75TB")
}... | 0.607022 | loggie-io/loggie | vendor/github.com/dgraph-io/badger/v3/options.go | umputun/tg-spam | vendor/github.com/klauspost/compress/zstd/decoder_options.go | MIT | go |
SetDefaultMessageTypeWithContext is the same as SetDefaultMessageType with the addition of
the ability to pass a context and additional request options.
See SetDefaultMessageType for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If
the context is nil ... | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeWithContext(ctx aws.Context, input *SetDefaultMessageTypeInput, opts ...request.Option) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | func (c *PinpointSMSVoiceV2) DeleteDefaultMessageTypeWithContext(ctx aws.Context, input *DeleteDefaultMessageTypeInput, opts ...request.Option) (*DeleteDefaultMessageTypeOutput, error) {
req, out := c.DeleteDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | 0.826565 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
SetDefaultMessageTypeWithContext is the same as SetDefaultMessageType with the addition of
the ability to pass a context and additional request options.
See SetDefaultMessageType for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If
the context is nil ... | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeWithContext(ctx aws.Context, input *SetDefaultMessageTypeInput, opts ...request.Option) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeRequest(input *SetDefaultMessageTypeInput) (req *request.Request, output *SetDefaultMessageTypeOutput) {
op := &request.Operation{
Name: opSetDefaultMessageType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetDefaultMessageTypeInp... | 0.726447 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
SetDefaultMessageTypeWithContext is the same as SetDefaultMessageType with the addition of
the ability to pass a context and additional request options.
See SetDefaultMessageType for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If
the context is nil ... | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeWithContext(ctx aws.Context, input *SetDefaultMessageTypeInput, opts ...request.Option) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | func (c *PinpointSMSVoiceV2) SetDefaultMessageType(input *SetDefaultMessageTypeInput) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
return out, req.Send()
} | 0.654531 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
SetDefaultMessageTypeWithContext is the same as SetDefaultMessageType with the addition of
the ability to pass a context and additional request options.
See SetDefaultMessageType for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If
the context is nil ... | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeWithContext(ctx aws.Context, input *SetDefaultMessageTypeInput, opts ...request.Option) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | func (c *PinpointSMSVoiceV2) SetDefaultSenderIdWithContext(ctx aws.Context, input *SetDefaultSenderIdInput, opts ...request.Option) (*SetDefaultSenderIdOutput, error) {
req, out := c.SetDefaultSenderIdRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | 0.633054 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
SetDefaultMessageTypeWithContext is the same as SetDefaultMessageType with the addition of
the ability to pass a context and additional request options.
See SetDefaultMessageType for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If
the context is nil ... | func (c *PinpointSMSVoiceV2) SetDefaultMessageTypeWithContext(ctx aws.Context, input *SetDefaultMessageTypeInput, opts ...request.Option) (*SetDefaultMessageTypeOutput, error) {
req, out := c.SetDefaultMessageTypeRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | func (c *PinpointSMSVoiceV2) DeleteDefaultMessageTypeRequest(input *DeleteDefaultMessageTypeInput) (req *request.Request, output *DeleteDefaultMessageTypeOutput) {
op := &request.Operation{
Name: opDeleteDefaultMessageType,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteDefaul... | 0.601211 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
ListServiceNetworkServiceAssociationsPages iterates over the pages of a ListServiceNetworkServiceAssociations operation,
calling the "fn" function with the response data for each page. To stop
iterating, return false from the fn function.
See ListServiceNetworkServiceAssociations method for more information on how to ... | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPages(input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkServiceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | func (c *VPCLattice) ListServiceNetworkServiceAssociationsRequest(input *ListServiceNetworkServiceAssociationsInput) (req *request.Request, output *ListServiceNetworkServiceAssociationsOutput) {
op := &request.Operation{
Name: opListServiceNetworkServiceAssociations,
HTTPMethod: "GET",
HTTPPath: "/servic... | 0.928105 | aws/aws-sdk-go | service/vpclattice/api.go | aws/aws-sdk-go | service/vpclattice/api.go | Apache-2.0 | go |
ListServiceNetworkServiceAssociationsPages iterates over the pages of a ListServiceNetworkServiceAssociations operation,
calling the "fn" function with the response data for each page. To stop
iterating, return false from the fn function.
See ListServiceNetworkServiceAssociations method for more information on how to ... | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPages(input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkServiceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | func (c *VPCLattice) ListServiceNetworkVpcAssociationsPages(input *ListServiceNetworkVpcAssociationsInput, fn func(*ListServiceNetworkVpcAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkVpcAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | 0.912475 | aws/aws-sdk-go | service/vpclattice/api.go | aws/aws-sdk-go | service/vpclattice/api.go | Apache-2.0 | go |
ListServiceNetworkServiceAssociationsPages iterates over the pages of a ListServiceNetworkServiceAssociations operation,
calling the "fn" function with the response data for each page. To stop
iterating, return false from the fn function.
See ListServiceNetworkServiceAssociations method for more information on how to ... | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPages(input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkServiceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPagesWithContext(ctx aws.Context, input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
v... | 0.912066 | aws/aws-sdk-go | service/vpclattice/api.go | aws/aws-sdk-go | service/vpclattice/api.go | Apache-2.0 | go |
ListServiceNetworkServiceAssociationsPages iterates over the pages of a ListServiceNetworkServiceAssociations operation,
calling the "fn" function with the response data for each page. To stop
iterating, return false from the fn function.
See ListServiceNetworkServiceAssociations method for more information on how to ... | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPages(input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkServiceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | func (c *VPCLattice) ListServiceNetworkVpcAssociationsPagesWithContext(ctx aws.Context, input *ListServiceNetworkVpcAssociationsInput, fn func(*ListServiceNetworkVpcAssociationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *Li... | 0.831815 | aws/aws-sdk-go | service/vpclattice/api.go | aws/aws-sdk-go | service/vpclattice/api.go | Apache-2.0 | go |
ListServiceNetworkServiceAssociationsPages iterates over the pages of a ListServiceNetworkServiceAssociations operation,
calling the "fn" function with the response data for each page. To stop
iterating, return false from the fn function.
See ListServiceNetworkServiceAssociations method for more information on how to ... | func (c *VPCLattice) ListServiceNetworkServiceAssociationsPages(input *ListServiceNetworkServiceAssociationsInput, fn func(*ListServiceNetworkServiceAssociationsOutput, bool) bool) error {
return c.ListServiceNetworkServiceAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | func (c *VPCLattice) ListServiceNetworkVpcAssociationsRequest(input *ListServiceNetworkVpcAssociationsInput) (req *request.Request, output *ListServiceNetworkVpcAssociationsOutput) {
op := &request.Operation{
Name: opListServiceNetworkVpcAssociations,
HTTPMethod: "GET",
HTTPPath: "/servicenetworkvpcassoc... | 0.829148 | aws/aws-sdk-go | service/vpclattice/api.go | aws/aws-sdk-go | service/vpclattice/api.go | Apache-2.0 | go |
ListPermissionVersionsPagesWithContext same as ListPermissionVersionsPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-contexts for http.R... | func (c *RAM) ListPermissionVersionsPagesWithContext(ctx aws.Context, input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionVersionsInput
if input !=... | func (c *RAM) ListPermissionVersionsWithContext(ctx aws.Context, input *ListPermissionVersionsInput, opts ...request.Option) (*ListPermissionVersionsOutput, error) {
req, out := c.ListPermissionVersionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | 0.919855 | aws/aws-sdk-go | service/ram/api.go | aws/aws-sdk-go | service/ram/api.go | Apache-2.0 | go |
ListPermissionVersionsPagesWithContext same as ListPermissionVersionsPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-contexts for http.R... | func (c *RAM) ListPermissionVersionsPagesWithContext(ctx aws.Context, input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionVersionsInput
if input !=... | func (c *FinSpaceData) ListPermissionGroupsPagesWithContext(ctx aws.Context, input *ListPermissionGroupsInput, fn func(*ListPermissionGroupsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionGroupsInput
if input !... | 0.846627 | aws/aws-sdk-go | service/ram/api.go | aws/aws-sdk-go | service/finspacedata/api.go | Apache-2.0 | go |
ListPermissionVersionsPagesWithContext same as ListPermissionVersionsPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-contexts for http.R... | func (c *RAM) ListPermissionVersionsPagesWithContext(ctx aws.Context, input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionVersionsInput
if input !=... | func (c *ManagedGrafana) ListPermissionsPagesWithContext(ctx aws.Context, input *ListPermissionsInput, fn func(*ListPermissionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionsInput
if input != nil {
tmp :=... | 0.831663 | aws/aws-sdk-go | service/ram/api.go | aws/aws-sdk-go | service/managedgrafana/api.go | Apache-2.0 | go |
ListPermissionVersionsPagesWithContext same as ListPermissionVersionsPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-contexts for http.R... | func (c *RAM) ListPermissionVersionsPagesWithContext(ctx aws.Context, input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionVersionsInput
if input !=... | func (c *RAM) ListPermissionAssociationsPagesWithContext(ctx aws.Context, input *ListPermissionAssociationsInput, fn func(*ListPermissionAssociationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionAssociationsInpu... | 0.816849 | aws/aws-sdk-go | service/ram/api.go | aws/aws-sdk-go | service/ram/api.go | Apache-2.0 | go |
ListPermissionVersionsPagesWithContext same as ListPermissionVersionsPages except
it takes a Context and allows setting request options on the pages.
The context must be non-nil and will be used for request cancellation. If
the context is nil a panic will occur. In the future the SDK may create
sub-contexts for http.R... | func (c *RAM) ListPermissionVersionsPagesWithContext(ctx aws.Context, input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListPermissionVersionsInput
if input !=... | func (c *RAM) ListPermissionVersionsPages(input *ListPermissionVersionsInput, fn func(*ListPermissionVersionsOutput, bool) bool) error {
return c.ListPermissionVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
} | 0.8095 | aws/aws-sdk-go | service/ram/api.go | aws/aws-sdk-go | service/ram/api.go | Apache-2.0 | go |
OldCreatedAt returns the old "created_at" field's value of the AddonRateCard entity.
If the AddonRateCard object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails. | func (m *AddonRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}... | func (m *PlanRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}
... | 0.970663 | openmeterio/openmeter | openmeter/ent/db/mutation.go | openmeterio/openmeter | openmeter/ent/db/mutation.go | Apache-2.0 | go |
OldCreatedAt returns the old "created_at" field's value of the AddonRateCard entity.
If the AddonRateCard object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails. | func (m *AddonRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}... | func (m *AddonRateCardMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldUpdatedAt requires an ID field in the mutation")
}... | 0.898945 | openmeterio/openmeter | openmeter/ent/db/mutation.go | openmeterio/openmeter | openmeter/ent/db/mutation.go | Apache-2.0 | go |
OldCreatedAt returns the old "created_at" field's value of the AddonRateCard entity.
If the AddonRateCard object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails. | func (m *AddonRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}... | func (m *AddonMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}
oldVal... | 0.890877 | openmeterio/openmeter | openmeter/ent/db/mutation.go | openmeterio/openmeter | openmeter/ent/db/mutation.go | Apache-2.0 | go |
OldCreatedAt returns the old "created_at" field's value of the AddonRateCard entity.
If the AddonRateCard object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails. | func (m *AddonRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}... | func (m *ProductMutation) OldCreatedAt(ctx context.Context) (v types.UnixTimestamp, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation"... | 0.879461 | openmeterio/openmeter | openmeter/ent/db/mutation.go | OldSmokeGun/go-scaffold | internal/pkg/ent/ent/mutation.go | MIT | go |
OldCreatedAt returns the old "created_at" field's value of the AddonRateCard entity.
If the AddonRateCard object wasn't provided to the builder, the object is fetched from the database.
An error is returned if the mutation operation is not UpdateOne, or the database query fails. | func (m *AddonRateCardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
}... | func (m *BalanceSnapshotMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) {
if !m.op.Is(OpUpdateOne) {
return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, errors.New("OldCreatedAt requires an ID field in the mutation")
... | 0.877956 | openmeterio/openmeter | openmeter/ent/db/mutation.go | openmeterio/openmeter | openmeter/ent/db/mutation.go | Apache-2.0 | go |
SetLessThan returns a new value that represents the range of possible
values in v that are less than to the highest in o.
o must be of type *EnumValue. | func (v *EnumValue) SetLessThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | func (v *EnumValue) SetGreaterThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetGreaterThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | 0.933242 | google/agi | gapil/analysis/enum_value.go | google/agi | gapil/analysis/enum_value.go | Apache-2.0 | go |
SetLessThan returns a new value that represents the range of possible
values in v that are less than to the highest in o.
o must be of type *EnumValue. | func (v *EnumValue) SetLessThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | func (v *EnumValue) SetGreaterEqual(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetGreaterEqual(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | 0.894673 | google/agi | gapil/analysis/enum_value.go | google/agi | gapil/analysis/enum_value.go | Apache-2.0 | go |
SetLessThan returns a new value that represents the range of possible
values in v that are less than to the highest in o.
o must be of type *EnumValue. | func (v *EnumValue) SetLessThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | func (v *UintValue) SetLessThan(o Value) Value {
b := o.(*UintValue).span()
out := v.Clone().(*UintValue)
interval.Remove(&out.Ranges, interval.U64Span{Start: b.End - 1, End: ^uint64(0)})
return out
} | 0.890452 | google/agi | gapil/analysis/enum_value.go | google/agi | gapil/analysis/uint_value.go | Apache-2.0 | go |
SetLessThan returns a new value that represents the range of possible
values in v that are less than to the highest in o.
o must be of type *EnumValue. | func (v *EnumValue) SetLessThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | func (v *EnumValue) SetLessEqual(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessEqual(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | 0.881267 | google/agi | gapil/analysis/enum_value.go | google/agi | gapil/analysis/enum_value.go | Apache-2.0 | go |
SetLessThan returns a new value that represents the range of possible
values in v that are less than to the highest in o.
o must be of type *EnumValue. | func (v *EnumValue) SetLessThan(o Value) Value {
a, b := v, o.(*EnumValue)
return &EnumValue{
Ty: a.Ty,
Numbers: a.Numbers.SetLessThan(b.Numbers).(*UintValue),
Labels: a.joinLabels(b),
}
} | func (v *UintValue) SetGreaterThan(o Value) Value {
b := o.(*UintValue).span()
out := v.Clone().(*UintValue)
interval.Remove(&out.Ranges, interval.U64Span{Start: 0, End: b.Start + 1})
return out
} | 0.805283 | google/agi | gapil/analysis/enum_value.go | google/agi | gapil/analysis/uint_value.go | Apache-2.0 | go |
DescribeSenderIdsRequest generates a "aws/request.Request" representing the
client's request for the DescribeSenderIds operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the servic... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsRequest(input *DescribeSenderIdsInput) (req *request.Request, output *DescribeSenderIdsOutput) {
op := &request.Operation{
Name: opDescribeSenderIds,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"}... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsPages(input *DescribeSenderIdsInput, fn func(*DescribeSenderIdsOutput, bool) bool) error {
return c.DescribeSenderIdsPagesWithContext(aws.BackgroundContext(), input, fn)
} | 0.865284 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
DescribeSenderIdsRequest generates a "aws/request.Request" representing the
client's request for the DescribeSenderIds operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the servic... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsRequest(input *DescribeSenderIdsInput) (req *request.Request, output *DescribeSenderIdsOutput) {
op := &request.Operation{
Name: opDescribeSenderIds,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"}... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsWithContext(ctx aws.Context, input *DescribeSenderIdsInput, opts ...request.Option) (*DescribeSenderIdsOutput, error) {
req, out := c.DescribeSenderIdsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
} | 0.837259 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
DescribeSenderIdsRequest generates a "aws/request.Request" representing the
client's request for the DescribeSenderIds operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the servic... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsRequest(input *DescribeSenderIdsInput) (req *request.Request, output *DescribeSenderIdsOutput) {
op := &request.Operation{
Name: opDescribeSenderIds,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"}... | func (c *PinpointSMSVoiceV2) DescribeSenderIds(input *DescribeSenderIdsInput) (*DescribeSenderIdsOutput, error) {
req, out := c.DescribeSenderIdsRequest(input)
return out, req.Send()
} | 0.828075 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
DescribeSenderIdsRequest generates a "aws/request.Request" representing the
client's request for the DescribeSenderIds operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the servic... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsRequest(input *DescribeSenderIdsInput) (req *request.Request, output *DescribeSenderIdsOutput) {
op := &request.Operation{
Name: opDescribeSenderIds,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"}... | func (c *PinpointSMSVoiceV2) RequestSenderIdRequest(input *RequestSenderIdInput) (req *request.Request, output *RequestSenderIdOutput) {
op := &request.Operation{
Name: opRequestSenderId,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RequestSenderIdInput{}
}
output = &RequestSen... | 0.799061 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
DescribeSenderIdsRequest generates a "aws/request.Request" representing the
client's request for the DescribeSenderIds operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to send the API call to the servic... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsRequest(input *DescribeSenderIdsInput) (req *request.Request, output *DescribeSenderIdsOutput) {
op := &request.Operation{
Name: opDescribeSenderIds,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"}... | func (c *PinpointSMSVoiceV2) DescribeSenderIdsPagesWithContext(ctx aws.Context, input *DescribeSenderIdsInput, fn func(*DescribeSenderIdsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeSenderIdsInput
if input != nil ... | 0.789604 | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | aws/aws-sdk-go | service/pinpointsmsvoicev2/api.go | Apache-2.0 | go |
WithFilteredResourceAttributes determinies which resource attributes to
add to metrics as metric labels. By default, it adds service.name,
service.namespace, and service.instance.id. This is recommended to avoid
writing duplicate timeseries against the same monitored resource. Use
WithFilteredResourceAttributes(NoAttri... | func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
return func(o *options) {
o.resourceAttributeFilter = filter
}
} | func ResourceAttributesToMonitoringMonitoredResource(attrs ReadOnlyAttributes) *monitoredrespb.MonitoredResource {
cloudPlatform, _ := attrs.GetString(string(semconv.CloudPlatformKey))
switch cloudPlatform {
case semconv.CloudPlatformGCPAppEngine.Value.AsString():
return createMonitoredResource(gaeInstance, attrs)... | 0.637572 | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go | Apache-2.0 | go |
WithFilteredResourceAttributes determinies which resource attributes to
add to metrics as metric labels. By default, it adds service.name,
service.namespace, and service.instance.id. This is recommended to avoid
writing duplicate timeseries against the same monitored resource. Use
WithFilteredResourceAttributes(NoAttri... | func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
return func(o *options) {
o.resourceAttributeFilter = filter
}
} | func ResourceAttributesToLoggingMonitoredResource(attrs ReadOnlyAttributes) *monitoredrespb.MonitoredResource {
cloudPlatform, _ := attrs.GetString(string(semconv.CloudPlatformKey))
switch cloudPlatform {
case semconv.CloudPlatformGCPAppEngine.Value.AsString():
return createMonitoredResource(gaeApp, attrs)
defaul... | 0.619658 | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go | Apache-2.0 | go |
WithFilteredResourceAttributes determinies which resource attributes to
add to metrics as metric labels. By default, it adds service.name,
service.namespace, and service.instance.id. This is recommended to avoid
writing duplicate timeseries against the same monitored resource. Use
WithFilteredResourceAttributes(NoAttri... | func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
return func(o *options) {
o.resourceAttributeFilter = filter
}
} | func (w *worker) SetResource(r *resource.Resource) {
w.r = r
} | 0.589867 | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | config-syncer/config-syncer | vendor/go.opencensus.io/stats/view/worker.go | Apache-2.0 | go |
WithFilteredResourceAttributes determinies which resource attributes to
add to metrics as metric labels. By default, it adds service.name,
service.namespace, and service.instance.id. This is recommended to avoid
writing duplicate timeseries against the same monitored resource. Use
WithFilteredResourceAttributes(NoAttri... | func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
return func(o *options) {
o.resourceAttributeFilter = filter
}
} | func WithMonitoredResourceDescription(mrType string, mrLabels []string) func(o *options) {
return func(o *options) {
mrLabelSet := make(map[string]struct{})
for _, label := range mrLabels {
mrLabelSet[label] = struct{}{}
}
o.monitoredResourceDescription = MonitoredResourceDescription{
mrType: mrType,
... | 0.58541 | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | Apache-2.0 | go |
WithFilteredResourceAttributes determinies which resource attributes to
add to metrics as metric labels. By default, it adds service.name,
service.namespace, and service.instance.id. This is recommended to avoid
writing duplicate timeseries against the same monitored resource. Use
WithFilteredResourceAttributes(NoAttri... | func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
return func(o *options) {
o.resourceAttributeFilter = filter
}
} | func NewWithAttributes(schemaURL string, attrs ...attribute.KeyValue) *Resource {
resource := NewSchemaless(attrs...)
resource.schemaURL = schemaURL
return resource
} | 0.577641 | tektoncd/cli | vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go | Mirantis/cri-dockerd | vendor/go.opentelemetry.io/otel/sdk/resource/resource.go | Apache-2.0 | go |
AESCBCContentCipherBuilder returns a new encryption only AES/CBC mode structure using the provided padder. The provided cipher data generator
will be used to provide keys for content encryption.
Deprecated: This feature is in maintenance mode, no new updates will be released. Please see https://docs.aws.amazon.com/gen... | func AESCBCContentCipherBuilder(generator CipherDataGenerator, padder Padder) ContentCipherBuilder {
return cbcContentCipherBuilder{generator: generator, padder: padder}
} | func AESGCMContentCipherBuilder(generator CipherDataGenerator) ContentCipherBuilder {
return gcmContentCipherBuilder{generator}
} | 0.824651 | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | aws/aws-sdk-go | service/s3/s3crypto/aes_gcm_content_cipher.go | Apache-2.0 | go |
AESCBCContentCipherBuilder returns a new encryption only AES/CBC mode structure using the provided padder. The provided cipher data generator
will be used to provide keys for content encryption.
Deprecated: This feature is in maintenance mode, no new updates will be released. Please see https://docs.aws.amazon.com/gen... | func AESCBCContentCipherBuilder(generator CipherDataGenerator, padder Padder) ContentCipherBuilder {
return cbcContentCipherBuilder{generator: generator, padder: padder}
} | func AESGCMContentCipherBuilderV2(generator CipherDataGeneratorWithCEKAlg) ContentCipherBuilder {
return gcmContentCipherBuilderV2{generator}
} | 0.714829 | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | aws/aws-sdk-go | service/s3/s3crypto/aes_gcm_content_cipher.go | Apache-2.0 | go |
AESCBCContentCipherBuilder returns a new encryption only AES/CBC mode structure using the provided padder. The provided cipher data generator
will be used to provide keys for content encryption.
Deprecated: This feature is in maintenance mode, no new updates will be released. Please see https://docs.aws.amazon.com/gen... | func AESCBCContentCipherBuilder(generator CipherDataGenerator, padder Padder) ContentCipherBuilder {
return cbcContentCipherBuilder{generator: generator, padder: padder}
} | func RegisterAESCBCContentCipher(registry *CryptoRegistry, padder Padder) error {
if registry == nil {
return errNilCryptoRegistry
}
name := AESCBC + "/" + padder.Name()
err := registry.AddCEK(name, newAESCBCContentCipher)
if err != nil {
return err
}
if err := registry.AddPadder(name, padder); err != nil {
... | 0.700707 | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | Apache-2.0 | go |
AESCBCContentCipherBuilder returns a new encryption only AES/CBC mode structure using the provided padder. The provided cipher data generator
will be used to provide keys for content encryption.
Deprecated: This feature is in maintenance mode, no new updates will be released. Please see https://docs.aws.amazon.com/gen... | func AESCBCContentCipherBuilder(generator CipherDataGenerator, padder Padder) ContentCipherBuilder {
return cbcContentCipherBuilder{generator: generator, padder: padder}
} | func (key *SecretKey) NewCBC(paddingMode PaddingMode) (cipher.AEAD, error) {
var pkcsMech uint
switch paddingMode {
case PaddingNone:
pkcsMech = key.Cipher.CBCMech
case PaddingPKCS:
pkcsMech = key.Cipher.CBCPKCSMech
default:
return nil, errors.New("unrecognized padding mode")
}
g := genericAead{
key: ... | 0.685048 | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | tektoncd/cli | vendor/github.com/ThalesIgnite/crypto11/aead.go | Apache-2.0 | go |
AESCBCContentCipherBuilder returns a new encryption only AES/CBC mode structure using the provided padder. The provided cipher data generator
will be used to provide keys for content encryption.
Deprecated: This feature is in maintenance mode, no new updates will be released. Please see https://docs.aws.amazon.com/gen... | func AESCBCContentCipherBuilder(generator CipherDataGenerator, padder Padder) ContentCipherBuilder {
return cbcContentCipherBuilder{generator: generator, padder: padder}
} | func NewPKCS7Padder(blockSize int) Padder {
return pkcs7Padder{blockSize}
} | 0.639975 | aws/aws-sdk-go | service/s3/s3crypto/aes_cbc_content_cipher.go | aws/aws-sdk-go | service/s3/s3crypto/pkcs7_padder.go | Apache-2.0 | go |
AcyclicTransformer returns a [cmp.Transformer] with a filter applied that ensures
that the transformer cannot be recursively applied upon its own output.
An example use case is a transformer that splits a string by lines:
AcyclicTransformer("SplitLines", func(s string) []string{
return strings.Split(s, "\n")
})
... | func AcyclicTransformer(name string, xformFunc interface{}) cmp.Option {
xf := xformFilter{cmp.Transformer(name, xformFunc)}
return cmp.FilterPath(xf.filter, xf.xform)
} | func Transformer(name string, f interface{}) Option {
v := reflect.ValueOf(f)
if !function.IsType(v.Type(), function.Transformer) || v.IsNil() {
panic(fmt.Sprintf("invalid transformer function: %T", f))
}
if name == "" {
name = function.NameOf(v)
if !identsRx.MatchString(name) {
name = "λ" // Lambda-symbol... | 0.593232 | docker/cli | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | k8snetworkplumbingwg/multus-cni | vendor/github.com/google/go-cmp/cmp/options.go | Apache-2.0 | go |
AcyclicTransformer returns a [cmp.Transformer] with a filter applied that ensures
that the transformer cannot be recursively applied upon its own output.
An example use case is a transformer that splits a string by lines:
AcyclicTransformer("SplitLines", func(s string) []string{
return strings.Split(s, "\n")
})
... | func AcyclicTransformer(name string, xformFunc interface{}) cmp.Option {
xf := xformFilter{cmp.Transformer(name, xformFunc)}
return cmp.FilterPath(xf.filter, xf.xform)
} | func Transformer(name string, f interface{}) Option {
v := reflect.ValueOf(f)
if !function.IsType(v.Type(), function.Transformer) || v.IsNil() {
panic(fmt.Sprintf("invalid transformer function: %T", f))
}
if name == "" {
name = "λ" // Lambda-symbol as place-holder for anonymous transformer
}
if !isValid(name)... | 0.576302 | docker/cli | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | docker/app | vendor/github.com/google/go-cmp/cmp/options.go | Apache-2.0 | go |
AcyclicTransformer returns a [cmp.Transformer] with a filter applied that ensures
that the transformer cannot be recursively applied upon its own output.
An example use case is a transformer that splits a string by lines:
AcyclicTransformer("SplitLines", func(s string) []string{
return strings.Split(s, "\n")
})
... | func AcyclicTransformer(name string, xformFunc interface{}) cmp.Option {
xf := xformFilter{cmp.Transformer(name, xformFunc)}
return cmp.FilterPath(xf.filter, xf.xform)
} | func Map(mapping func(rune) rune) Transformer {
return Transformer{mapper(mapping)}
} | 0.539496 | docker/cli | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | k8snetworkplumbingwg/multus-cni | vendor/golang.org/x/text/runes/runes.go | Apache-2.0 | go |
AcyclicTransformer returns a [cmp.Transformer] with a filter applied that ensures
that the transformer cannot be recursively applied upon its own output.
An example use case is a transformer that splits a string by lines:
AcyclicTransformer("SplitLines", func(s string) []string{
return strings.Split(s, "\n")
})
... | func AcyclicTransformer(name string, xformFunc interface{}) cmp.Option {
xf := xformFilter{cmp.Transformer(name, xformFunc)}
return cmp.FilterPath(xf.filter, xf.xform)
} | func SortMaps(lessFunc interface{}) cmp.Option {
vf := reflect.ValueOf(lessFunc)
if !function.IsType(vf.Type(), function.Less) || vf.IsNil() {
panic(fmt.Sprintf("invalid less function: %T", lessFunc))
}
ms := mapSorter{vf.Type().In(0), vf}
return cmp.FilterValues(ms.filter, cmp.Transformer("cmpopts.SortMaps", ms... | 0.501508 | docker/cli | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | loggie-io/loggie | vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go | Apache-2.0 | go |
AcyclicTransformer returns a [cmp.Transformer] with a filter applied that ensures
that the transformer cannot be recursively applied upon its own output.
An example use case is a transformer that splits a string by lines:
AcyclicTransformer("SplitLines", func(s string) []string{
return strings.Split(s, "\n")
})
... | func AcyclicTransformer(name string, xformFunc interface{}) cmp.Option {
xf := xformFilter{cmp.Transformer(name, xformFunc)}
return cmp.FilterPath(xf.filter, xf.xform)
} | func TransformString(f func(s string) string) Transformer {
return func(ans interface{}) interface{} {
// if the answer value passed in is the zero value of the appropriate type
if isZero(reflect.ValueOf(ans)) {
// skip this `Transformer` by returning a zero value of string.
// The original answer will be no... | 0.464598 | docker/cli | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | tektoncd/cli | vendor/github.com/AlecAivazis/survey/v2/transform.go | Apache-2.0 | go |
Connect creates a new Client and then initializes it using the Connect method. This is equivalent to calling
NewClient followed by Client.Connect.
When creating an options.ClientOptions, the order the methods are called matters. Later Set*
methods will overwrite the values from previous Set* method invocations. This i... | func Connect(ctx context.Context, opts ...*options.ClientOptions) (*Client, error) {
c, err := NewClient(opts...)
if err != nil {
return nil, err
}
err = c.Connect(ctx)
if err != nil {
return nil, err
}
return c, nil
} | func NewClient(opts ...*options.ClientOptions) (*Client, error) {
clientOpt := options.MergeClientOptions(opts...)
id, err := uuid.New()
if err != nil {
return nil, err
}
client := &Client{id: id}
// ClusterClock
client.clock = new(session.ClusterClock)
// LocalThreshold
client.localThreshold = defaultLoc... | 0.877992 | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | Apache-2.0 | go |
Connect creates a new Client and then initializes it using the Connect method. This is equivalent to calling
NewClient followed by Client.Connect.
When creating an options.ClientOptions, the order the methods are called matters. Later Set*
methods will overwrite the values from previous Set* method invocations. This i... | func Connect(ctx context.Context, opts ...*options.ClientOptions) (*Client, error) {
c, err := NewClient(opts...)
if err != nil {
return nil, err
}
err = c.Connect(ctx)
if err != nil {
return nil, err
}
return c, nil
} | func MergeClientOptions(opts ...*ClientOptions) *ClientOptions {
c := Client()
for _, opt := range opts {
if opt == nil {
continue
}
if opt.Dialer != nil {
c.Dialer = opt.Dialer
}
if opt.AppName != nil {
c.AppName = opt.AppName
}
if opt.Auth != nil {
c.Auth = opt.Auth
}
if opt.Authenti... | 0.67854 | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/options/clientoptions.go | Apache-2.0 | go |
Connect creates a new Client and then initializes it using the Connect method. This is equivalent to calling
NewClient followed by Client.Connect.
When creating an options.ClientOptions, the order the methods are called matters. Later Set*
methods will overwrite the values from previous Set* method invocations. This i... | func Connect(ctx context.Context, opts ...*options.ClientOptions) (*Client, error) {
c, err := NewClient(opts...)
if err != nil {
return nil, err
}
err = c.Connect(ctx)
if err != nil {
return nil, err
}
return c, nil
} | func (mi *ModuleInstance) NewClient(call goja.ConstructorCall) *goja.Object {
rt := mi.vu.Runtime()
var optionsArg map[string]interface{}
err := rt.ExportTo(call.Arguments[0], &optionsArg)
if err != nil {
common.Throw(rt, errors.New("unable to parse options object"))
}
opts, err := newOptionsFrom(optionsArg)
... | 0.654988 | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | topfreegames/pitaya | xk6-pitaya/module.go | MIT | go |
Connect creates a new Client and then initializes it using the Connect method. This is equivalent to calling
NewClient followed by Client.Connect.
When creating an options.ClientOptions, the order the methods are called matters. Later Set*
methods will overwrite the values from previous Set* method invocations. This i... | func Connect(ctx context.Context, opts ...*options.ClientOptions) (*Client, error) {
c, err := NewClient(opts...)
if err != nil {
return nil, err
}
err = c.Connect(ctx)
if err != nil {
return nil, err
}
return c, nil
} | func NewClient(opts ...Opt) (*Client, error) {
cfg, seeds, compressor, err := validateCfg(opts...)
if err != nil {
return nil, err
}
if cfg.retryTimeout == nil {
cfg.retryTimeout = func(key int16) time.Duration {
switch key {
case ((*kmsg.JoinGroupRequest)(nil)).Key(),
((*kmsg.SyncGroupRequest)(nil))... | 0.636486 | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | loggie-io/loggie | vendor/github.com/twmb/franz-go/pkg/kgo/client.go | Apache-2.0 | go |
Connect creates a new Client and then initializes it using the Connect method. This is equivalent to calling
NewClient followed by Client.Connect.
When creating an options.ClientOptions, the order the methods are called matters. Later Set*
methods will overwrite the values from previous Set* method invocations. This i... | func Connect(ctx context.Context, opts ...*options.ClientOptions) (*Client, error) {
c, err := NewClient(opts...)
if err != nil {
return nil, err
}
err = c.Connect(ctx)
if err != nil {
return nil, err
}
return c, nil
} | func New(options Options, optFns ...func(*Options)) *Client {
options = options.Copy()
resolveDefaultLogger(&options)
setResolvedDefaultsMode(&options)
resolveRetryer(&options)
resolveHTTPClient(&options)
resolveHTTPSignerV4(&options)
resolveEndpointResolverV2(&options)
resolveTracerProvider(&options)
... | 0.607544 | tektoncd/cli | vendor/go.mongodb.org/mongo-driver/mongo/client.go | tektoncd/cli | vendor/github.com/aws/aws-sdk-go-v2/service/ecrpublic/api_client.go | Apache-2.0 | go |
DescribeApplicationAssociationsRequest generates a "aws/request.Request" representing the
client's request for the DescribeApplicationAssociations operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to sen... | func (c *WorkSpaces) DescribeApplicationAssociationsRequest(input *DescribeApplicationAssociationsInput) (req *request.Request, output *DescribeApplicationAssociationsOutput) {
op := &request.Operation{
Name: opDescribeApplicationAssociations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Pagi... | func (c *AppIntegrationsService) ListApplicationAssociationsRequest(input *ListApplicationAssociationsInput) (req *request.Request, output *ListApplicationAssociationsOutput) {
op := &request.Operation{
Name: opListApplicationAssociations,
HTTPMethod: "GET",
HTTPPath: "/applications/{ApplicationIdentifie... | 0.890565 | aws/aws-sdk-go | service/workspaces/api.go | aws/aws-sdk-go | service/appintegrationsservice/api.go | Apache-2.0 | go |
DescribeApplicationAssociationsRequest generates a "aws/request.Request" representing the
client's request for the DescribeApplicationAssociations operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to sen... | func (c *WorkSpaces) DescribeApplicationAssociationsRequest(input *DescribeApplicationAssociationsInput) (req *request.Request, output *DescribeApplicationAssociationsOutput) {
op := &request.Operation{
Name: opDescribeApplicationAssociations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Pagi... | func (c *WorkSpaces) DescribeApplicationAssociationsPages(input *DescribeApplicationAssociationsInput, fn func(*DescribeApplicationAssociationsOutput, bool) bool) error {
return c.DescribeApplicationAssociationsPagesWithContext(aws.BackgroundContext(), input, fn)
} | 0.884164 | aws/aws-sdk-go | service/workspaces/api.go | aws/aws-sdk-go | service/workspaces/api.go | Apache-2.0 | go |
DescribeApplicationAssociationsRequest generates a "aws/request.Request" representing the
client's request for the DescribeApplicationAssociations operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to sen... | func (c *WorkSpaces) DescribeApplicationAssociationsRequest(input *DescribeApplicationAssociationsInput) (req *request.Request, output *DescribeApplicationAssociationsOutput) {
op := &request.Operation{
Name: opDescribeApplicationAssociations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Pagi... | func (c *WorkSpaces) DescribeApplicationAssociationsWithContext(ctx aws.Context, input *DescribeApplicationAssociationsInput, opts ...request.Option) (*DescribeApplicationAssociationsOutput, error) {
req, out := c.DescribeApplicationAssociationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out... | 0.859745 | aws/aws-sdk-go | service/workspaces/api.go | aws/aws-sdk-go | service/workspaces/api.go | Apache-2.0 | go |
DescribeApplicationAssociationsRequest generates a "aws/request.Request" representing the
client's request for the DescribeApplicationAssociations operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to sen... | func (c *WorkSpaces) DescribeApplicationAssociationsRequest(input *DescribeApplicationAssociationsInput) (req *request.Request, output *DescribeApplicationAssociationsOutput) {
op := &request.Operation{
Name: opDescribeApplicationAssociations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Pagi... | func (c *WorkSpaces) DescribeApplicationAssociationsPagesWithContext(ctx aws.Context, input *DescribeApplicationAssociationsInput, fn func(*DescribeApplicationAssociationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *Describe... | 0.824694 | aws/aws-sdk-go | service/workspaces/api.go | aws/aws-sdk-go | service/workspaces/api.go | Apache-2.0 | go |
DescribeApplicationAssociationsRequest generates a "aws/request.Request" representing the
client's request for the DescribeApplicationAssociations operation. The "output" return
value will be populated with the request's response once the request completes
successfully.
Use "Send" method on the returned Request to sen... | func (c *WorkSpaces) DescribeApplicationAssociationsRequest(input *DescribeApplicationAssociationsInput) (req *request.Request, output *DescribeApplicationAssociationsOutput) {
op := &request.Operation{
Name: opDescribeApplicationAssociations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Pagi... | func (c *WorkSpaces) DescribeApplicationAssociations(input *DescribeApplicationAssociationsInput) (*DescribeApplicationAssociationsOutput, error) {
req, out := c.DescribeApplicationAssociationsRequest(input)
return out, req.Send()
} | 0.813884 | aws/aws-sdk-go | service/workspaces/api.go | aws/aws-sdk-go | service/workspaces/api.go | Apache-2.0 | go |
C documentation
/*
** Add a new name/number pair to a VList. This might require that the
** VList object be reallocated, so return the new VList. If an OOM
** error occurs, the original VList returned and the
** db->mallocFailed flag is set.
**
** A VList is really just an array of integers. To destroy a VLi... | func _sqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) (r uintptr) {
var i, nInt int32
var nAlloc Tsqlite3_int64
var pOut, z uintptr
var v1 int64
_, _, _, _, _, _ = i, nAlloc, nInt, pOut, z, v1 /* Index in pIn[] where zName is stored */
nInt = nName/int32(4) + int32(... | func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr {
var nInt int32
var z uintptr
var i int32
nInt = nName/4 + 3
if pIn == uintptr(0) || *(*VList)(unsafe.Pointer(pIn + 1*4))+nInt > *(*VList)(unsafe.Pointer(pIn)) {
var nAlloc Sqlite3_int64 = func() int6... | 0.750306 | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | 42wim/matterbridge | vendor/modernc.org/sqlite/lib/sqlite_openbsd_arm64.go | Apache-2.0 | go |
C documentation
/*
** Add a new name/number pair to a VList. This might require that the
** VList object be reallocated, so return the new VList. If an OOM
** error occurs, the original VList returned and the
** db->mallocFailed flag is set.
**
** A VList is really just an array of integers. To destroy a VLi... | func _sqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) (r uintptr) {
var i, nInt int32
var nAlloc Tsqlite3_int64
var pOut, z uintptr
var v1 int64
_, _, _, _, _, _ = i, nAlloc, nInt, pOut, z, v1 /* Index in pIn[] where zName is stored */
nInt = nName/int32(4) + int32(... | func _sqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) (r uintptr) {
var i, mx int32
_, _ = i, mx
if pIn == uintptr(0) {
return uintptr(0)
}
mx = *(*TVList)(unsafe.Pointer(pIn + 1*4))
i = int32(2)
for cond := true; cond; cond = i < mx {
if *(*TVList)(unsafe.Pointer(pIn + uintptr(i)*4)) == iVal {... | 0.626477 | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | MIT | go |
C documentation
/*
** Add a new name/number pair to a VList. This might require that the
** VList object be reallocated, so return the new VList. If an OOM
** error occurs, the original VList returned and the
** db->mallocFailed flag is set.
**
** A VList is really just an array of integers. To destroy a VLi... | func _sqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) (r uintptr) {
var i, nInt int32
var nAlloc Tsqlite3_int64
var pOut, z uintptr
var v1 int64
_, _, _, _, _, _ = i, nAlloc, nInt, pOut, z, v1 /* Index in pIn[] where zName is stored */
nInt = nName/int32(4) + int32(... | func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r int32) {
bp := tls.Alloc(32)
defer tls.Free(32)
var iTrunk TPgno
var nFree, nLeaf Tu32
var pPage1 uintptr
var v1, v3, v5 int32
var v2, v4, v6 bool
var _ /* pPage at bp+8 */ uintptr
var _ /* pTrunk at bp+0 */ uintptr
var _ /* rc at b... | 0.606416 | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | MIT | go |
C documentation
/*
** Add a new name/number pair to a VList. This might require that the
** VList object be reallocated, so return the new VList. If an OOM
** error occurs, the original VList returned and the
** db->mallocFailed flag is set.
**
** A VList is really just an array of integers. To destroy a VLi... | func _sqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) (r uintptr) {
var i, nInt int32
var nAlloc Tsqlite3_int64
var pOut, z uintptr
var v1 int64
_, _, _, _, _, _ = i, nAlloc, nInt, pOut, z, v1 /* Index in pIn[] where zName is stored */
nInt = nName/int32(4) + int32(... | func _sqlite3VdbeValueListFree(tls *libc.TLS, pToDelete uintptr) {
Xsqlite3_free(tls, pToDelete)
} | 0.604536 | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | MIT | go |
C documentation
/*
** Add a new name/number pair to a VList. This might require that the
** VList object be reallocated, so return the new VList. If an OOM
** error occurs, the original VList returned and the
** db->mallocFailed flag is set.
**
** A VList is really just an array of integers. To destroy a VLi... | func _sqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) (r uintptr) {
var i, nInt int32
var nAlloc Tsqlite3_int64
var pOut, z uintptr
var v1 int64
_, _, _, _, _, _ = i, nAlloc, nInt, pOut, z, v1 /* Index in pIn[] where zName is stored */
nInt = nName/int32(4) + int32(... | func _sqlite3Malloc(tls *libc.TLS, n Tu64) (r uintptr) {
bp := tls.Alloc(16)
defer tls.Free(16)
var _ /* p at bp+0 */ uintptr
if n == uint64(0) || n > uint64(SQLITE_MAX_ALLOCATION_SIZE) {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
} else {
if _sqlite3Config.FbMemstat != 0 {
Xsqlite3_mutex_enter(tls, _mem0... | 0.596705 | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | umputun/spot | vendor/modernc.org/sqlite/lib/sqlite_darwin_arm64.go | MIT | go |
GetLockFile opens a read-write lock file, creating it if necessary. The
*LockFile object may already be locked if the path has already been requested
by the current process. | func GetLockFile(path string) (*LockFile, error) {
return getLockfile(path, false)
} | func GetROLockFile(path string) (*LockFile, error) {
return getLockfile(path, true)
} | 0.917344 | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | Apache-2.0 | go |
GetLockFile opens a read-write lock file, creating it if necessary. The
*LockFile object may already be locked if the path has already been requested
by the current process. | func GetLockFile(path string) (*LockFile, error) {
return getLockfile(path, false)
} | func GetLockfile(path string) (Locker, error) {
return GetLockFile(path)
} | 0.867671 | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | Apache-2.0 | go |
GetLockFile opens a read-write lock file, creating it if necessary. The
*LockFile object may already be locked if the path has already been requested
by the current process. | func GetLockFile(path string) (*LockFile, error) {
return getLockfile(path, false)
} | func getLockfile(path string, ro bool) (*LockFile, error) {
lockFilesLock.Lock()
defer lockFilesLock.Unlock()
if lockFiles == nil {
lockFiles = make(map[string]*LockFile)
}
cleanPath, err := filepath.Abs(path)
if err != nil {
return nil, fmt.Errorf("ensuring that path %q is an absolute path: %w", path, err)
... | 0.826 | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | Apache-2.0 | go |
GetLockFile opens a read-write lock file, creating it if necessary. The
*LockFile object may already be locked if the path has already been requested
by the current process. | func GetLockFile(path string) (*LockFile, error) {
return getLockfile(path, false)
} | func createLockFileForPath(path string, ro bool) (*LockFile, error) {
// Check if we can open the lock.
fd, err := openLock(path, ro)
if err != nil {
return nil, err
}
unlockAndCloseHandle(fd)
lType := writeLock
if ro {
lType = readLock
}
return &LockFile{
file: path,
ro: ro,
rwMutex: &sync.R... | 0.801248 | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | Apache-2.0 | go |
GetLockFile opens a read-write lock file, creating it if necessary. The
*LockFile object may already be locked if the path has already been requested
by the current process. | func GetLockFile(path string) (*LockFile, error) {
return getLockfile(path, false)
} | func GetROLockfile(path string) (Locker, error) {
return GetROLockFile(path)
} | 0.787954 | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | containers/podman-tui | vendor/github.com/containers/storage/pkg/lockfile/lockfile.go | Apache-2.0 | go |
End of preview. Expand in Data Studio
multilingual-codesearch-hard-negativesV2
このデータセットは、多言語コード検索タスク向けに設計された、ハードネガティブペアを提供します。
複数のプログラミング言語から収集した、フィルタ済みのコード/ドックストリング対を基に構成されています。
データセット概要
各サンプルには以下の情報が含まれます。
query_docstring: 関数やメソッドの自然言語による説明positive_code: 対応する正しいコード実装hard_negative_code: 類似しているが意味が異なるコード(FAISSによる近傍検索で選定)similarity_score: クエリとハードネガティブ間のFAISS類似度スコア(内積/コサイン類似度)- 付加情報: リポジトリ、ファイルパス、ライセンス情報、言語
対応言語
- Python
- Java
- JavaScript
- PHP
- Ruby
- Go
- Rust
データセット作成方法
- 3行以上のドックストリングを持つペアのみをフィルタリングし各言語ごとに最大10万件の関数レベルのコードを取得。
- 各クエリに対して、埋め込み空間内で20件の近傍候補をFAISS検索。
- その中から5件のハードネガティブを選択(自身は除外)。
- コード/ドックストリングの埋め込みには
Shuu12121/CodeSearch-ModernBERT-Crow-Plusを使用。 - Pythonコードに対しては、マルチラインドックストリングを削除処理。
想定される用途
- Cross-Encoderモデルのトレーニング(コード検索精度向上目的)
- ハードネガティブマイニングによる検索性能向上
- 多言語対応のコード理解モデルのファインチューニング
- Downloads last month
- 631