text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (h LogPriorityQueue) Len() int { return len(h) } | [
0.24043402075767517,
-0.7898438572883606,
0.16905593872070312,
-0.7589476704597473,
0.18275931477546692,
-0.34171733260154724,
-0.3386281132698059,
0.8854978084564209,
0.1850149929523468,
-0.5911253094673157,
-1.0916235446929932,
0.650488555431366,
-0.009574055671691895,
0.2612866461277008... |
func (c *changeCache) RemoveSkipped(x uint64) error {
err := c.skippedSeqs.Remove(x)
c.db.DbStats.Cache().SkippedSeqLen.Set(int64(c.skippedSeqs.skippedList.Len()))
return err
} | [
-1.039978265762329,
0.7485007643699646,
0.3142372965812683,
-0.3131335973739624,
-1.4599735736846924,
0.15587906539440155,
0.7485377788543701,
0.452890545129776,
1.4053837060928345,
0.694032609462738,
-1.6286760568618774,
-0.004421825520694256,
-0.14425736665725708,
0.8148080706596375,
0... |
func (c *changeCache) RemoveSkippedSequences(ctx context.Context, sequences []uint64) (removedCount int64) {
numRemoved := c.skippedSeqs.RemoveSequences(ctx, sequences)
c.db.DbStats.Cache().SkippedSeqLen.Set(int64(c.skippedSeqs.skippedList.Len()))
return numRemoved
} | [
-1.5096697807312012,
0.1750132441520691,
0.47571027278900146,
-0.35697051882743835,
-1.6493600606918335,
-0.40455129742622375,
0.8933314681053162,
0.4027191400527954,
1.9881305694580078,
0.7176032662391663,
-1.119187593460083,
-0.6013184785842896,
-1.1738380193710327,
0.9079844951629639,
... |
func (c *changeCache) waitForSequence(ctx context.Context, sequence uint64, maxWaitTime time.Duration) error {
startTime := time.Now()
worker := func() (bool, error, interface{}) {
if c.getNextSequence() >= sequence+1 {
base.DebugfCtx(ctx, base.KeyCache, "waitForSequence(%d) took %v", sequence, time.Since(start... | [
-1.3441041707992554,
0.9521996378898621,
0.4853783845901489,
-0.40554898977279663,
-0.8052487373352051,
-0.548336386680603,
-0.31093379855155945,
-0.09617797285318375,
-0.3247568607330322,
0.47449836134910583,
-0.9981318712234497,
-0.3369568884372711,
0.04472406953573227,
0.476671636104583... |
func (c *changeCache) waitForSequenceNotSkipped(ctx context.Context, sequence uint64, maxWaitTime time.Duration) error {
startTime := time.Now()
worker := func() (bool, error, interface{}) {
if c.getNextSequence() >= sequence+1 {
foundInMissing := c.skippedSeqs.Contains(sequence)
if !foundInMissing {
bas... | [
-1.057754635810852,
0.4575831890106201,
0.4894600510597229,
-0.7653533220291138,
-0.9681339263916016,
0.14348599314689636,
-0.29636991024017334,
-0.15955060720443726,
0.08271384239196777,
0.33880507946014404,
-0.7012836337089539,
-0.3805137872695923,
0.1868501901626587,
0.701002836227417,
... |
func (l *SkippedSequenceList) getOldest() (oldestSkippedSeq uint64) {
l.lock.RLock()
if firstElement := l.skippedList.Front(); firstElement != nil {
value := firstElement.Value.(*SkippedSequence)
oldestSkippedSeq = value.seq
}
l.lock.RUnlock()
return oldestSkippedSeq
} | [
-0.3640085458755493,
0.2389126569032669,
0.6730278730392456,
0.10588449984788895,
-0.2507016658782959,
-0.2747364044189453,
0.16441501677036285,
0.035860996693372726,
0.3821115493774414,
0.23866820335388184,
-0.8134825229644775,
0.03142862766981125,
-0.7217661738395691,
1.1561853885650635,... |
func (l *SkippedSequenceList) Remove(x uint64) error {
l.lock.Lock()
err := l._remove(x)
l.lock.Unlock()
return err
} | [
-1.164850115776062,
0.848805844783783,
0.25178655982017517,
0.0951131284236908,
-1.715724229812622,
-0.08943945914506912,
0.571999728679657,
0.5391444563865662,
1.369430661201477,
0.646885097026825,
-1.936205506324768,
-0.7075121998786926,
-1.0258219242095947,
0.5687134861946106,
0.02773... |
func (l *SkippedSequenceList) _remove(x uint64) error {
if listElement, ok := l.skippedMap[x]; ok {
l.skippedList.Remove(listElement)
delete(l.skippedMap, x)
return nil
} else {
return errors.New("Value not found")
}
} | [
-1.119822382926941,
0.4278154671192169,
0.5477562546730042,
-0.489298552274704,
-1.5925253629684448,
-0.23333825170993805,
0.5108436346054077,
0.8274728059768677,
1.2028034925460815,
0.6008327603340149,
-1.024103045463562,
-0.7158291339874268,
0.21521276235580444,
0.584344208240509,
0.66... |
func (l *SkippedSequenceList) Contains(x uint64) bool {
l.lock.RLock()
_, ok := l.skippedMap[x]
l.lock.RUnlock()
return ok
} | [
-1.2230459451675415,
0.1842089593410492,
0.42156079411506653,
-0.30145254731178284,
-1.3271442651748657,
0.6862499117851257,
0.24806280434131622,
-0.33519816398620605,
0.8092405200004578,
-0.23706713318824768,
-1.3094310760498047,
0.20688635110855103,
-0.4132189452648163,
0.767128705978393... |
func (l *SkippedSequenceList) Push(x *SkippedSequence) (err error) {
l.lock.Lock()
validPush := false
lastElement := l.skippedList.Back()
if lastElement == nil {
validPush = true
} else {
lastSkipped, _ := lastElement.Value.(*SkippedSequence)
if lastSkipped.seq < x.seq {
validPush = true
}
}
if vali... | [
-0.7869249582290649,
0.8519532084465027,
0.6557106375694275,
0.13294880092144012,
-0.5239505767822266,
0.5202574133872986,
-0.2814910411834717,
0.03268687427043915,
0.8208330273628235,
0.974943220615387,
-0.8817510008811951,
0.15960484743118286,
-0.3793860971927643,
0.2505112290382385,
1... |
func (l *SkippedSequenceList) getOlderThan(skippedExpiry time.Duration) []uint64 {
l.lock.RLock()
oldSequences := make([]uint64, 0)
for e := l.skippedList.Front(); e != nil; e = e.Next() {
skippedSeq := e.Value.(*SkippedSequence)
if time.Since(skippedSeq.timeAdded) > skippedExpiry {
oldSequences = append(old... | [
-0.5767197608947754,
-0.572966992855072,
0.8844568133354187,
-0.1956496387720108,
-0.45422592759132385,
0.09632401168346405,
-0.4906064569950104,
-0.23631542921066284,
0.31688496470451355,
0.32771551609039307,
-0.2562344968318939,
0.36931154131889343,
-0.5633084774017334,
1.240161776542663... |
func parseCPUConstraint(cpus string) (interface{}, error) {
switch {
case strings.Contains(cpus, ":"):
split := strings.Split(cpus, ":")
qualifier, value := split[0], split[1]
switch qualifier {
case "cpuset":
return parseCpuset(cpus, value)
case "quantity":
return parseCPUQuantity(cpus, value)
c... | [
-0.352847695350647,
-0.5014253258705139,
0.5665265321731567,
-0.22330346703529358,
-1.3873463869094849,
-0.5136856436729431,
0.016276927664875984,
0.47187569737434387,
-0.21304193139076233,
0.6115932464599609,
-0.18616533279418945,
0.06919191032648087,
-0.4610080122947693,
-0.9289582371711... |
func (c *ConstraintSet) Set(value string) error {
for _, constraint := range strings.Split(value, ",") {
if err := (*c).setConstraint(constraint); err != nil {
return policyError("invalid constraint: %v", err)
}
}
return nil
} | [
-0.7502726912498474,
-0.28313499689102173,
0.3516726493835449,
-0.16335438191890717,
-0.02392459474503994,
0.015035355463624,
-0.060182880610227585,
-0.6710662245750427,
-0.3841826915740967,
0.7896835207939148,
-0.15294449031352997,
0.04224955663084984,
-0.4255635440349579,
0.0207992326468... |
func (c ConstraintSet) setConstraint(constraint string) error {
var err error
var domain, value string
domval := strings.Split(constraint, "=")
if len(domval) != 2 {
return policyError("invalid constraint '%s' (not of form: domain=value)", constraint)
}
domain, value = domval[0], domval[1]
switch domain {
... | [
-0.47310173511505127,
-0.15569959580898285,
0.3667846620082855,
-0.36556756496429443,
-0.23611041903495789,
-0.09242676943540573,
0.2590775191783905,
-0.49930331110954285,
-0.21027517318725586,
-0.12580935657024384,
0.1451403647661209,
1.1461007595062256,
0.1130894273519516,
0.248649820685... |
func (m *TrafficDefinition) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateLength(formats); err != nil {
res = append(res, err)
}
if err := m.validatePacket(formats); err != nil {
res = append(res, err)
}
if err := m.validateSignature(formats); err != nil {
res = append(res... | [
0.4730769097805023,
0.3285870850086212,
0.03948970511555672,
-0.5920413136482239,
0.34636688232421875,
-0.09573124349117279,
0.17120273411273956,
-0.16364608705043793,
-0.558854877948761,
0.34116411209106445,
-0.5420019030570984,
-0.2123066782951355,
-0.8307782411575317,
0.9452201128005981... |
func (m *TrafficDefinition) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateLength(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidatePacket(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.context... | [
0.31664708256721497,
0.15766873955726624,
0.24783843755722046,
-0.31739160418510437,
-0.18548177182674408,
0.07751694321632385,
-0.134443461894989,
0.07664479315280914,
0.3758121430873871,
0.7321733832359314,
-0.22482724487781525,
0.3696907162666321,
-0.9004124999046326,
0.6305205821990967... |
func (u RemovePods) Reconcile(r *FoundationDBClusterReconciler, context ctx.Context, cluster *fdbtypes.FoundationDBCluster) (bool, error) {
if len(cluster.Spec.PendingRemovals) == 0 {
return true, nil
}
r.Recorder.Event(cluster, "Normal", "RemovingProcesses", fmt.Sprintf("Removing pods: %v", cluster.Spec.PendingRe... | [
-0.20354063808918,
0.18803177773952484,
0.9488732814788818,
-0.5190626978874207,
0.509913980960846,
-0.5131925940513611,
-0.42290475964546204,
0.3915606439113617,
-1.0359004735946655,
-0.033882178366184235,
-0.048464085906744,
-1.3081194162368774,
-1.064909815788269,
0.6679019927978516,
... |
func (u RemovePods) RequeueAfter() time.Duration {
return 0
} | [
0.302739679813385,
-0.9914531707763672,
0.3365934193134308,
0.538878858089447,
0.33746129274368286,
-0.16052530705928802,
-0.7790475487709045,
0.08009327948093414,
-0.653792142868042,
-0.22672326862812042,
-0.7001975178718567,
-0.2182856798171997,
-0.5085070729255676,
0.6348240375518799,
... |
func SetLibbpfgoCallbacks() {
libbpfgo.SetLoggerCbs(libbpfgo.Callbacks{
Log: func(libLevel int, msg string) {
// Output a formatted eBPF program loading failure only via stderr,
// leaving the previous output "BPF program load failed:" to the logger, which is
// sufficient for the log consumer to identify t... | [
0.5971727967262268,
-0.3392585813999176,
0.8809875845909119,
-0.27622190117836,
-0.3626105487346649,
0.24912729859352112,
0.4475124776363373,
-0.29778972268104553,
-0.5045188069343567,
-0.24189543724060059,
-0.13641321659088135,
0.15404678881168365,
-0.6020978689193726,
1.0797767639160156,... |
func TestState_CheckPrevoteCondition_Satisfy(t *testing.T) {
// 6 rep
satisfyPrevoteConditionState := setUpState()
satisfyPrevoteConditionState.PrevoteMsgPool = NewPrevoteMsgPool()
for i := 0; i < 4; i++ {
msg := PrevoteMsg{
MsgID: "msg" + strconv.Itoa(i),
StateID: StateID{"state1"},
SenderID: "us... | [
0.10386614501476288,
0.5637147426605225,
0.6380366086959839,
0.08465119451284409,
0.4135206639766693,
-0.03278297930955887,
0.1808624267578125,
0.15499697625637054,
-0.33607417345046997,
0.6194976568222046,
-1.398762583732605,
-0.3501877188682556,
-0.9221668839454651,
0.05940411239862442,
... |
func TestState_CheckPrevoteCondition_UnSatisfy(t *testing.T) {
unSatisfyPrevoteConditionState := setUpState()
unSatisfyPrevoteConditionState.PrevoteMsgPool = NewPrevoteMsgPool()
for i := 0; i < 2; i++ {
msg := PrevoteMsg{
MsgID: "msg" + strconv.Itoa(i),
StateID: StateID{"state1"},
SenderID: "user" ... | [
-0.4235336482524872,
0.16987982392311096,
0.5454744100570679,
-0.19566501677036285,
0.2238350808620453,
0.22959598898887634,
0.15024003386497498,
0.44093361496925354,
-0.8554993271827698,
0.5798587203025818,
-1.2442573308944702,
-0.19391360878944397,
-0.5424830317497253,
0.4051721692085266... |
func TestState_CheckPreCommitCondition_Satisfy(t *testing.T) {
satisfyPrecommitConditionState := setUpState()
satisfyPrecommitConditionState.PreCommitMsgPool = NewPreCommitMsgPool()
for i := 0; i < 4; i++ {
msg := PreCommitMsg{
MsgID: "msg" + strconv.Itoa(i),
StateID: StateID{"state1"},
SenderID: "use... | [
0.31283578276634216,
0.31321072578430176,
0.585116446018219,
-0.38730329275131226,
0.7392061948776245,
0.02559651806950569,
0.8312438726425171,
-0.17427211999893188,
-0.6912865042686462,
0.22996222972869873,
-0.8822883367538452,
-0.19995377957820892,
-1.2307207584381104,
0.4426092505455017... |
func TestState_CheckPreCommitCondition_UnSatisfy(t *testing.T) {
unSatisfyPrecommitConditionState := setUpState()
unSatisfyPrecommitConditionState.PreCommitMsgPool = NewPreCommitMsgPool()
for i := 0; i < 2; i++ {
msg := PreCommitMsg{
MsgID: "msg" + strconv.Itoa(i),
StateID: StateID{"state1"},
SenderID... | [
-0.20471183955669403,
0.08285664021968842,
0.5387577414512634,
-0.674249529838562,
0.5245745778083801,
0.013295267708599567,
0.9744870066642761,
0.08286494761705399,
-0.9615588784217834,
0.12806597352027893,
-0.6746515035629272,
-0.1117812767624855,
-0.7722976803779602,
0.7337952852249146,... |
func New(sess *session.Session) CloudFormation {
return CloudFormation{
client: cloudformation.New(sess),
box: templates.Box(),
}
} | [
0.022362710908055305,
-0.4807227849960327,
0.189521923661232,
-0.8971296548843384,
-1.0300651788711548,
-0.9815283417701721,
0.338651180267334,
-0.8564068675041199,
0.3327648341655731,
-0.9451168179512024,
-1.2118580341339111,
0.07834004610776901,
1.3199117183685303,
1.1782373189926147,
... |
func (cf CloudFormation) DeployEnvironment(env *deploy.CreateEnvironmentInput) error {
return cf.deploy(newEnvStackConfig(env, cf.box))
} | [
-1.438043236732483,
0.1969689279794693,
0.2880442440509796,
0.0438600517809391,
1.0130832195281982,
0.2608983516693115,
1.0721850395202637,
-0.35695767402648926,
-0.9151256084442139,
0.5168850421905518,
-0.9064228534698486,
-0.5104992389678955,
0.058787330985069275,
1.0881298780441284,
-... |
func (cf CloudFormation) WaitForEnvironmentCreation(env *deploy.CreateEnvironmentInput) (*archer.Environment, error) {
cfEnv := newEnvStackConfig(env, cf.box)
deployedStack, err := cf.waitForStackCreation(cfEnv)
if err != nil {
return nil, err
}
return cfEnv.ToEnv(deployedStack)
} | [
-0.28792300820350647,
0.5476710200309753,
0.2598883807659149,
-0.3821371793746948,
0.6539819836616516,
0.14057648181915283,
0.5906615257263184,
-1.1237921714782715,
-1.0980262756347656,
-0.49660277366638184,
-0.13739119470119476,
-0.9249117970466614,
0.8060475587844849,
0.9583670496940613,... |
func stackExists(err error) bool {
currentErr := err
for {
if currentErr == nil {
break
}
if aerr, ok := currentErr.(awserr.Error); ok {
switch aerr.Code() {
case "ValidationError":
// A ValidationError occurs if we tried to create the stack with a change set.
if strings.Contains(aerr.Message()... | [
-0.6720670461654663,
0.0962393507361412,
0.3557705283164978,
-0.06404582411050797,
0.8882429003715515,
-0.5756176114082336,
-0.25419288873672485,
-0.6085608601570129,
-0.32586535811424255,
0.5620899200439453,
-0.025947246700525284,
-0.21143758296966553,
0.07701091468334198,
0.9964569807052... |
func (db *MongoDb) Setup(indexes []mgo.Index) error {
// Copy mongo session (thread safe) and close after function
conn := db.Conn.Copy()
defer conn.Close()
// Ensure indexes
col := conn.DB(db.Name).C(db.Collection)
for _, i := range indexes {
if err := col.EnsureIndex(i); err != nil {
return err
}
}
... | [
-0.4933278560638428,
0.144954651594162,
0.5515176057815552,
0.6249586939811707,
0.3813634216785431,
0.16001246869564056,
0.39528968930244446,
-0.16585741937160492,
0.19221147894859314,
0.9690161943435669,
-0.32100462913513184,
-0.29844361543655396,
-0.3524058163166046,
0.0857221856713295,
... |
func (in *AtlasCluster) DeepCopyInto(out *AtlasCluster) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.7148330807685852,
-0.3603632152080536,
0.2681521475315094,
-0.021170824766159058,
0.26089832186698914,
0.3438747525215149,
-0.03257974237203598,
0.7296158671379089,
-1.2301193475723267,
-0.31163451075553894,
-0.28084248304367065,
1.4833972454071045,
0.22894537448883057,
-0.94259899854660... |
func (in *AtlasCluster) DeepCopy() *AtlasCluster {
if in == nil {
return nil
}
out := new(AtlasCluster)
in.DeepCopyInto(out)
return out
} | [
0.599299967288971,
0.4263242483139038,
-0.15311455726623535,
0.3607907295227051,
0.7209232449531555,
0.0798143520951271,
-0.36604979634284973,
0.1931277960538864,
-0.2676395773887634,
-0.30097466707229614,
0.22157537937164307,
0.8956438899040222,
0.03190109506249428,
-1.2787340879440308,
... |
func (in *AtlasCluster) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.0166719201952219,
-0.054383862763643265,
0.4181448519229889,
0.37261077761650085,
0.2240728735923767,
0.49994802474975586,
0.7537078857421875,
0.23988421261310577,
-0.7782325744628906,
-0.5794762969017029,
0.010373611934483051,
0.116585873067379,
0.14011551439762115,
-1.067901611328125,... |
func (in *AtlasClusterList) DeepCopyInto(out *AtlasClusterList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AtlasCluster, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
0.03612525761127472,
0.17517827451229095,
0.4680715501308441,
0.3251374065876007,
0.3175542652606964,
0.23054097592830658,
-0.0027282817754894495,
0.506061851978302,
-0.9650505185127258,
0.3699514865875244,
-0.48952019214630127,
0.4654195010662079,
0.012474968098104,
-1.0353248119354248,
... |
func (in *AtlasClusterList) DeepCopy() *AtlasClusterList {
if in == nil {
return nil
}
out := new(AtlasClusterList)
in.DeepCopyInto(out)
return out
} | [
-0.4759391248226166,
0.3786046802997589,
-0.050811901688575745,
0.5496596693992615,
0.44680753350257874,
0.18607933819293976,
-0.18183062970638275,
-0.3794701099395752,
-0.46356722712516785,
0.5393983125686646,
-0.27240145206451416,
-0.011691738851368427,
0.3011181056499481,
-0.87025004625... |
func (in *AtlasClusterList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.5136431455612183,
-0.04406168311834335,
0.43729734420776367,
0.5804107189178467,
0.2872331142425537,
0.4843333959579468,
0.8016353845596313,
0.05836017057299614,
-0.6110051870346069,
-0.10825105011463165,
-0.36327648162841797,
-0.13782383501529694,
0.11873552203178406,
-0.75023210048675... |
func (in *AtlasClusterSpec) DeepCopyInto(out *AtlasClusterSpec) {
*out = *in
out.Project = in.Project
if in.AutoScaling != nil {
in, out := &in.AutoScaling, &out.AutoScaling
*out = new(AutoScalingSpec)
(*in).DeepCopyInto(*out)
}
if in.BIConnector != nil {
in, out := &in.BIConnector, &out.BIConnector
*out... | [
0.3492920696735382,
-0.16576312482357025,
0.596958577632904,
-0.35564175248146057,
-0.06406784057617188,
-0.23385190963745117,
0.061355601996183395,
0.10042376071214676,
-0.7453497648239136,
0.20635883510112762,
-0.25910818576812744,
1.1069793701171875,
0.22453029453754425,
-0.765342712402... |
func (in *AtlasClusterSpec) DeepCopy() *AtlasClusterSpec {
if in == nil {
return nil
}
out := new(AtlasClusterSpec)
in.DeepCopyInto(out)
return out
} | [
0.30277734994888306,
0.4465187191963196,
-0.41002291440963745,
-0.3169664740562439,
0.2745426893234253,
0.16074390709400177,
-0.2450942099094391,
-0.28606778383255005,
-0.7875609397888184,
0.6814349889755249,
0.3681504726409912,
0.4894598126411438,
0.9431228637695312,
-1.2317911386489868,
... |
func (in *AtlasDatabaseUser) DeepCopyInto(out *AtlasDatabaseUser) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.845194399356842,
0.14397455751895905,
0.41499823331832886,
0.3699398636817932,
-0.5057554841041565,
0.338276743888855,
0.4634697139263153,
0.5685518383979797,
-1.062636137008667,
-0.19864293932914734,
-0.8371051549911499,
1.0490823984146118,
-0.004406601190567017,
-0.7369487881660461,
... |
func (in *AtlasDatabaseUser) DeepCopy() *AtlasDatabaseUser {
if in == nil {
return nil
}
out := new(AtlasDatabaseUser)
in.DeepCopyInto(out)
return out
} | [
0.07029449194669724,
0.8909046649932861,
-0.41290342807769775,
0.3908347189426422,
0.19450236856937408,
-0.23465584218502045,
0.41323885321617126,
0.21395748853683472,
-0.289463073015213,
0.0555276945233345,
-0.533478856086731,
0.18444524705410004,
-0.07989991456270218,
-1.1189146041870117... |
func (in *AtlasDatabaseUser) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
0.08795759081840515,
0.363414466381073,
0.5177732706069946,
0.8309005498886108,
-0.42724210023880005,
0.3818296790122986,
1.1771652698516846,
0.3147599697113037,
-0.6294230222702026,
-0.5263081192970276,
-0.5254185199737549,
-0.12274184823036194,
-0.10987498611211777,
-0.976127028465271,
... |
func (in *AtlasDatabaseUserList) DeepCopyInto(out *AtlasDatabaseUserList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AtlasDatabaseUser, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
... | [
0.4188040792942047,
0.5158284902572632,
0.34344804286956787,
0.42193928360939026,
-0.2446640431880951,
0.20432449877262115,
0.15584057569503784,
1.0578804016113281,
-0.7845097184181213,
0.5821558833122253,
-0.9312852025032043,
0.5853928923606873,
-0.1365038901567459,
-0.7350767254829407,
... |
func (in *AtlasDatabaseUserList) DeepCopy() *AtlasDatabaseUserList {
if in == nil {
return nil
}
out := new(AtlasDatabaseUserList)
in.DeepCopyInto(out)
return out
} | [
-0.1704125702381134,
0.6161810159683228,
-0.47664251923561096,
0.42830705642700195,
0.08537883311510086,
-0.07797444611787796,
0.10238786786794662,
0.5861526131629944,
0.004938492551445961,
0.7392382621765137,
-0.949873685836792,
0.014397787861526012,
0.20795057713985443,
-1.00569677352905... |
func (in *AtlasDatabaseUserList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.23101498186588287,
0.3256845772266388,
0.5045244693756104,
0.7008065581321716,
-0.17156283557415009,
0.4321253299713135,
1.158842921257019,
0.6962664723396301,
-0.47229960560798645,
0.10372377932071686,
-0.9115419983863831,
-0.1451055258512497,
-0.09848041832447052,
-0.5068421363830566,... |
func (in *AtlasDatabaseUserSpec) DeepCopyInto(out *AtlasDatabaseUserSpec) {
*out = *in
out.Project = in.Project
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make([]LabelSpec, len(*in))
copy(*out, *in)
}
if in.Roles != nil {
in, out := &in.Roles, &out.Roles
*out = make([]RoleSpec, len(*... | [
0.9130502343177795,
0.08683951199054718,
0.5604082345962524,
-0.6135232448577881,
-0.28420841693878174,
0.4001130163669586,
-0.06739548593759537,
0.60028076171875,
-1.1555215120315552,
0.2706453502178192,
-0.584363579750061,
0.9061392545700073,
0.22921225428581238,
-0.6955317258834839,
0... |
func (in *AtlasDatabaseUserSpec) DeepCopy() *AtlasDatabaseUserSpec {
if in == nil {
return nil
}
out := new(AtlasDatabaseUserSpec)
in.DeepCopyInto(out)
return out
} | [
0.6947095990180969,
0.6331979036331177,
-0.41181617975234985,
-0.061618171632289886,
0.008837075904011726,
0.2735598087310791,
0.052152156829833984,
0.6100575923919678,
-0.4258081912994385,
0.5836061239242554,
-0.34026825428009033,
0.29297375679016113,
0.7940948009490967,
-1.23278653621673... |
func (in *AtlasProject) DeepCopyInto(out *AtlasProject) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
} | [
0.8080956339836121,
-0.1876334398984909,
0.27532586455345154,
0.21550890803337097,
-0.11447310447692871,
0.6466776728630066,
-0.021298445761203766,
0.7925756573677063,
-1.3443858623504639,
-0.24465273320674896,
-0.04061831161379814,
1.158929705619812,
-0.03362983465194702,
-0.8700301647186... |
func (in *AtlasProject) DeepCopy() *AtlasProject {
if in == nil {
return nil
}
out := new(AtlasProject)
in.DeepCopyInto(out)
return out
} | [
0.4021401107311249,
0.7104415893554688,
-0.30422553420066833,
1.172053575515747,
0.29141178727149963,
0.1587066352367401,
-0.3760536313056946,
0.06342711299657822,
-0.42791736125946045,
-0.04564192518591881,
0.6430280804634094,
0.2847464680671692,
-0.5709495544433594,
-1.6044176816940308,
... |
func (in *AtlasProject) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
0.13230568170547485,
0.13964387774467468,
0.40942317247390747,
0.5734013915061951,
-0.037906259298324585,
0.6532089710235596,
0.6389181613922119,
0.45290273427963257,
-0.8745004534721375,
-0.6911813020706177,
0.10740530490875244,
-0.04210416600108147,
-0.09136848896741867,
-0.9368688464164... |
func (in *AtlasProjectList) DeepCopyInto(out *AtlasProjectList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AtlasProject, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
} | [
0.13562780618667603,
0.42485472559928894,
0.48184072971343994,
0.24002929031848907,
-0.1896393895149231,
0.6815446019172668,
-0.23501056432724,
0.9140305519104004,
-0.8945396542549133,
0.4540763795375824,
-0.5372506380081177,
0.45523324608802795,
-0.045917440205812454,
-0.7873964309692383,... |
func (in *AtlasProjectList) DeepCopy() *AtlasProjectList {
if in == nil {
return nil
}
out := new(AtlasProjectList)
in.DeepCopyInto(out)
return out
} | [
-0.13863106071949005,
0.6990852952003479,
-0.0795491635799408,
0.5371631979942322,
-0.07435664534568787,
0.4170573055744171,
-0.5213640332221985,
0.26039713621139526,
-0.11863205581903458,
0.5872997045516968,
-0.4223541021347046,
-0.3945266902446747,
0.3882378935813904,
-0.9987386465072632... |
func (in *AtlasProjectList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
} | [
-0.32126185297966003,
0.3583970367908478,
0.46224600076675415,
0.496491402387619,
-0.10353485494852066,
0.8182659149169922,
0.47665297985076904,
0.5064818263053894,
-0.6139829754829407,
-0.34022998809814453,
-0.545966625213623,
-0.45965930819511414,
-0.1016782596707344,
-0.5802416801452637... |
func (in *AtlasProjectSpec) DeepCopyInto(out *AtlasProjectSpec) {
*out = *in
if in.ConnectionSecret != nil {
in, out := &in.ConnectionSecret, &out.ConnectionSecret
*out = new(ResourceRef)
**out = **in
}
if in.ProjectIPAccessList != nil {
in, out := &in.ProjectIPAccessList, &out.ProjectIPAccessList
*out = ... | [
0.4162710905075073,
0.023761088028550148,
0.41702979803085327,
-0.476492315530777,
0.042230550199747086,
0.5959556102752686,
-0.4418790340423584,
0.5324178338050842,
-1.4171607494354248,
0.1033775731921196,
-0.15231801569461823,
0.6150256991386414,
0.28131306171417236,
-0.9594817161560059,... |
func (in *AtlasProjectSpec) DeepCopy() *AtlasProjectSpec {
if in == nil {
return nil
}
out := new(AtlasProjectSpec)
in.DeepCopyInto(out)
return out
} | [
0.6142749190330505,
0.6375568509101868,
-0.1770157665014267,
-0.18990467488765717,
0.3471536636352539,
0.712645947933197,
-0.413800984621048,
0.16950294375419617,
-0.8676555156707764,
0.7237182855606079,
-0.14354903995990753,
0.01455643679946661,
0.6483610272407532,
-1.562531590461731,
0... |
func (in *AutoScalingSpec) DeepCopyInto(out *AutoScalingSpec) {
*out = *in
if in.AutoIndexingEnabled != nil {
in, out := &in.AutoIndexingEnabled, &out.AutoIndexingEnabled
*out = new(bool)
**out = **in
}
if in.DiskGBEnabled != nil {
in, out := &in.DiskGBEnabled, &out.DiskGBEnabled
*out = new(bool)
**out ... | [
0.2928211987018585,
0.4373359680175781,
0.590469241142273,
-0.00443043140694499,
-0.452674001455307,
-0.05495801195502281,
-0.18264062702655792,
0.29271093010902405,
-1.6550886631011963,
0.3708433508872986,
-0.6580016016960144,
1.2017618417739868,
0.2604982852935791,
-0.05197003483772278,
... |
func (in *AutoScalingSpec) DeepCopy() *AutoScalingSpec {
if in == nil {
return nil
}
out := new(AutoScalingSpec)
in.DeepCopyInto(out)
return out
} | [
-0.3149421215057373,
0.2837165892124176,
0.07466490566730499,
0.3685382902622223,
-0.564888596534729,
0.22977100312709808,
0.31775087118148804,
-0.11624621599912643,
-0.6504687070846558,
0.7945150136947632,
-0.4925726056098938,
0.8854874968528748,
0.25647854804992676,
-0.3206145167350769,
... |
func (in *BiConnectorSpec) DeepCopyInto(out *BiConnectorSpec) {
*out = *in
if in.Enabled != nil {
in, out := &in.Enabled, &out.Enabled
*out = new(bool)
**out = **in
}
} | [
0.8251765370368958,
-0.04629423841834068,
0.5457624197006226,
-0.7661118507385254,
-0.22553478181362152,
-0.2676260769367218,
-0.18064182996749878,
1.542198896408081,
-0.9718089699745178,
0.35402679443359375,
-0.7683061957359314,
1.240996241569519,
-0.0019384671468287706,
-0.47447359561920... |
func (in *BiConnectorSpec) DeepCopy() *BiConnectorSpec {
if in == nil {
return nil
}
out := new(BiConnectorSpec)
in.DeepCopyInto(out)
return out
} | [
-0.29056882858276367,
-0.4490349292755127,
0.2190912961959839,
-0.6831979155540466,
0.15649080276489258,
-0.5629470944404602,
0.27909472584724426,
0.6046733260154724,
-0.16402943432331085,
0.42415130138397217,
-0.400508850812912,
0.5461136698722839,
0.2873922884464264,
-0.2594338059425354,... |
func (in *ComputeSpec) DeepCopyInto(out *ComputeSpec) {
*out = *in
if in.Enabled != nil {
in, out := &in.Enabled, &out.Enabled
*out = new(bool)
**out = **in
}
if in.ScaleDownEnabled != nil {
in, out := &in.ScaleDownEnabled, &out.ScaleDownEnabled
*out = new(bool)
**out = **in
}
} | [
0.5934263467788696,
0.3252069056034088,
0.6815653443336487,
-0.33751100301742554,
-0.5793569684028625,
0.3931259512901306,
-0.2986583709716797,
0.8977765440940857,
-1.5979788303375244,
0.26242735981941223,
-0.9306049942970276,
1.0990360975265503,
0.17102937400341034,
-0.20070867240428925,
... |
func (in *ComputeSpec) DeepCopy() *ComputeSpec {
if in == nil {
return nil
}
out := new(ComputeSpec)
in.DeepCopyInto(out)
return out
} | [
-0.005478112958371639,
0.5587597489356995,
0.32586538791656494,
0.3084605634212494,
-0.2525671720504761,
0.6692419052124023,
-0.10452225059270859,
-0.18730886280536652,
-0.9359097480773926,
0.08104780316352844,
-0.5777105689048767,
0.4325036108493805,
0.11812907457351685,
-0.76987946033477... |
func (in *LabelSpec) DeepCopyInto(out *LabelSpec) {
*out = *in
} | [
0.5232069492340088,
-0.4458724558353424,
0.5201992392539978,
-0.7941339015960693,
-0.787296712398529,
1.1212997436523438,
-0.3294512629508972,
0.5520004034042358,
-1.544419527053833,
-0.10046758502721786,
-0.5107753276824951,
1.5088245868682861,
0.765888512134552,
-0.5140932202339172,
-0... |
func (in *LabelSpec) DeepCopy() *LabelSpec {
if in == nil {
return nil
}
out := new(LabelSpec)
in.DeepCopyInto(out)
return out
} | [
0.13041318953037262,
-0.11877967417240143,
0.23783235251903534,
-0.4623132348060608,
-0.6912607550621033,
0.8147073984146118,
-0.5272889137268066,
-0.29674744606018066,
-0.6540685892105103,
0.22186866402626038,
-0.07591641694307327,
0.9186893105506897,
0.42501920461654663,
-0.6265918016433... |
func (in *ProviderSettingsSpec) DeepCopyInto(out *ProviderSettingsSpec) {
*out = *in
if in.DiskIOPS != nil {
in, out := &in.DiskIOPS, &out.DiskIOPS
*out = new(int64)
**out = **in
}
if in.EncryptEBSVolume != nil {
in, out := &in.EncryptEBSVolume, &out.EncryptEBSVolume
*out = new(bool)
**out = **in
}
if... | [
-0.33917558193206787,
0.45412424206733704,
0.4651920795440674,
0.05658741295337677,
-0.1202104240655899,
0.07512775808572769,
-0.2375618815422058,
-0.2205505520105362,
-1.2298171520233154,
0.5798227787017822,
-0.14605306088924408,
0.9987586736679077,
0.047709643840789795,
-0.23956046998500... |
func (in *ProviderSettingsSpec) DeepCopy() *ProviderSettingsSpec {
if in == nil {
return nil
}
out := new(ProviderSettingsSpec)
in.DeepCopyInto(out)
return out
} | [
-1.2598356008529663,
0.3895512521266937,
0.25898781418800354,
0.4060836434364319,
-0.35467490553855896,
0.6766932010650635,
0.6030545234680176,
-0.2735726833343506,
-0.186179980635643,
0.8965857625007629,
0.45331907272338867,
0.7056631445884705,
0.23303036391735077,
-0.6534767150878906,
... |
func (in *RegionsConfig) DeepCopyInto(out *RegionsConfig) {
*out = *in
if in.AnalyticsNodes != nil {
in, out := &in.AnalyticsNodes, &out.AnalyticsNodes
*out = new(int64)
**out = **in
}
if in.ElectableNodes != nil {
in, out := &in.ElectableNodes, &out.ElectableNodes
*out = new(int64)
**out = **in
}
if ... | [
0.23319633305072784,
-0.28050199151039124,
0.413307785987854,
-0.8431286215782166,
-0.2644782066345215,
-0.28148260712623596,
-0.35686689615249634,
0.13442371785640717,
-1.1504660844802856,
-0.15560612082481384,
-0.3755515217781067,
0.5936949253082275,
0.30422690510749817,
-0.0219377577304... |
func (in *RegionsConfig) DeepCopy() *RegionsConfig {
if in == nil {
return nil
}
out := new(RegionsConfig)
in.DeepCopyInto(out)
return out
} | [
0.023298829793930054,
-0.04768599942326546,
-0.19725948572158813,
-0.06547263264656067,
-0.306683748960495,
-0.44536083936691284,
-0.7950849533081055,
-0.19685852527618408,
-0.37461403012275696,
0.15658190846443176,
-0.4489309787750244,
-0.34847521781921387,
0.03722541034221649,
-0.0534446... |
func (in *ReplicationSpec) DeepCopyInto(out *ReplicationSpec) {
*out = *in
if in.NumShards != nil {
in, out := &in.NumShards, &out.NumShards
*out = new(int64)
**out = **in
}
if in.RegionsConfig != nil {
in, out := &in.RegionsConfig, &out.RegionsConfig
*out = make(map[string]RegionsConfig, len(*in))
for ... | [
0.588350772857666,
-0.04994441941380501,
0.5180158615112305,
-0.6170473694801331,
-0.6925014853477478,
0.08593951910734177,
-0.23320266604423523,
0.8868333101272583,
-1.3131109476089478,
0.16935546696186066,
-0.7503886222839355,
0.824149489402771,
0.4634499251842499,
-0.6642640233039856,
... |
func (in *ReplicationSpec) DeepCopy() *ReplicationSpec {
if in == nil {
return nil
}
out := new(ReplicationSpec)
in.DeepCopyInto(out)
return out
} | [
0.5206098556518555,
0.37060028314590454,
0.19925592839717865,
-0.06006813421845436,
-0.7563287615776062,
0.5726789832115173,
0.16034427285194397,
0.6440704464912415,
-0.5715379118919373,
0.348425954580307,
-0.7736721038818359,
0.27837616205215454,
0.07273810356855392,
-0.8863873481750488,
... |
func (in *ResourceRef) DeepCopyInto(out *ResourceRef) {
*out = *in
} | [
0.7647653818130493,
-0.4315115213394165,
0.4197640120983124,
-0.670255720615387,
-0.8090519309043884,
0.5649267435073853,
0.2107875645160675,
0.7414262294769287,
-1.2337925434112549,
-0.4527372717857361,
-0.7110500931739807,
0.7688104510307312,
0.008341333828866482,
-0.8243322968482971,
... |
func (in *ResourceRef) DeepCopy() *ResourceRef {
if in == nil {
return nil
}
out := new(ResourceRef)
in.DeepCopyInto(out)
return out
} | [
0.27692675590515137,
-0.04017046093940735,
-0.12018870562314987,
0.014813827350735664,
-0.3851582705974579,
-0.05520648881793022,
0.5637524724006653,
0.24932774901390076,
-0.3692801594734192,
0.06087880954146385,
-0.38464656472206116,
-0.13408252596855164,
-0.9019235968589783,
-0.950830519... |
func (in *ResourceRefNamespaced) DeepCopyInto(out *ResourceRefNamespaced) {
*out = *in
} | [
1.034408688545227,
-0.11308571696281433,
0.25245964527130127,
-0.8673639893531799,
-0.9214283227920532,
0.7602883577346802,
-0.41756290197372437,
0.2066168338060379,
-0.7691172957420349,
-0.7260480523109436,
-0.4784594178199768,
1.0578943490982056,
-0.0712059959769249,
0.20158539712429047,... |
func (in *ResourceRefNamespaced) DeepCopy() *ResourceRefNamespaced {
if in == nil {
return nil
}
out := new(ResourceRefNamespaced)
in.DeepCopyInto(out)
return out
} | [
0.5004821419715881,
0.11400928348302841,
-0.3304239809513092,
-0.46298733353614807,
-0.3608151972293854,
0.48982587456703186,
-0.2801135182380676,
-0.26883435249328613,
0.2940167188644409,
-0.44105449318885803,
-0.22206227481365204,
0.2466588169336319,
-0.7502229809761047,
0.59560328722000... |
func (in *RoleSpec) DeepCopyInto(out *RoleSpec) {
*out = *in
} | [
0.7141574621200562,
-0.4274436831474304,
0.506181001663208,
-0.9516575336456299,
-0.39830830693244934,
0.8319817781448364,
-0.36324822902679443,
0.9058037400245667,
-1.0954910516738892,
0.11846447736024857,
-0.4999409317970276,
1.5611153841018677,
0.5915724039077759,
-0.6442879438400269,
... |
func (in *RoleSpec) DeepCopy() *RoleSpec {
if in == nil {
return nil
}
out := new(RoleSpec)
in.DeepCopyInto(out)
return out
} | [
0.3373965322971344,
-0.15005186200141907,
0.26798054575920105,
-0.41055622696876526,
-0.11908061802387238,
0.7228041887283325,
-0.1350332498550415,
0.33016374707221985,
-0.10011598467826843,
0.3913353681564331,
-0.06015244126319885,
0.9547537565231323,
0.021302664652466774,
-0.645857334136... |
func (in *ScopeSpec) DeepCopyInto(out *ScopeSpec) {
*out = *in
} | [
0.473636269569397,
-0.028287701308727264,
0.3361755609512329,
-0.5165243148803711,
-0.6227988004684448,
0.778729259967804,
-0.1041584312915802,
0.6271623969078064,
-0.8692581057548523,
0.4177020788192749,
-1.1270344257354736,
1.6236340999603271,
0.6983271837234497,
-0.4430382251739502,
-... |
func (in *ScopeSpec) DeepCopy() *ScopeSpec {
if in == nil {
return nil
}
out := new(ScopeSpec)
in.DeepCopyInto(out)
return out
} | [
-0.08690493553876877,
0.31612661480903625,
-0.0441846139729023,
-0.09960609674453735,
-0.3357115685939789,
0.5238159894943237,
-0.23002798855304718,
-0.2208423763513565,
0.0730014219880104,
1.0261458158493042,
-0.7739658355712891,
0.79449462890625,
-0.05638495460152626,
-0.5996042490005493... |
func badpattern() {
files, error := filepath.Glob("[")
if error != nil && error == filepath.ErrBadPattern {
fmt.Println(error)
return
}
fmt.Println("matched files", files)
} | [
0.9076818823814392,
-0.6495487689971924,
0.7409413456916809,
0.058233220130205154,
1.1517610549926758,
0.629968523979187,
0.21612615883350372,
0.6366902589797974,
0.18772241473197937,
0.09178949892520905,
-0.03505865857005119,
1.4490330219268799,
-0.06294552236795425,
0.9226112365722656,
... |
func Decode(msg []byte) (Message, error) {
var m Message
l := len(msg)
// trim trailing carriage return if present
if l > 0 && msg[l-1] == '\r' {
l--
msg = msg[:l]
}
if l < 2 {
return m, errors.New("Decode: message too short")
}
m.typ = codeToMsg[string(msg[:2])]
if m.typ == MsgUnknown {
return m, ... | [
0.042206380516290665,
0.6270301342010498,
0.7965423464775085,
-0.6426815390586853,
-0.5806984901428223,
-0.581632137298584,
-0.11370006948709488,
-0.23875431716442108,
-0.5871992707252502,
-0.25019726157188416,
-0.976806104183197,
-0.11852582544088364,
-0.2861391007900238,
0.47650682926177... |
func NewCurrentWeatherData(unit string, lang string) currentWeatherData {
data := currentWeatherData{}
data.Key = apiKey
data.Lang = lang
data.Unit = unit
data.baseURL = "http://api.openweathermap.org/data/2.5/weather/?q="
return data
} | [
-1.2230303287506104,
-1.4384180307388306,
0.04222473129630089,
-0.23568075895309448,
-1.3331387042999268,
1.1563053131103516,
-0.8790833353996277,
0.06395826488733292,
-0.9996181726455688,
-0.5170803070068359,
-0.49752646684646606,
1.3889474868774414,
-0.8896501660346985,
0.493259519338607... |
func (ng NGram) Key() string {
// n-grams always have at least 1 element, thus this should always work
key := ng[0]
for i := 1; i < len(ng); i++ {
key += " " + ng[i]
}
return key
} | [
-0.49765241146087646,
0.1378496140241623,
0.3842424750328064,
0.07046385854482651,
0.6579926013946533,
0.5903435349464417,
-0.6576431393623352,
-0.500259280204773,
-0.4820418655872345,
1.436847448348999,
0.08709035068750381,
-0.23074309527873993,
-1.0129977464675903,
-0.1960839182138443,
... |
func (ng NGram) IsDistinctive(distinctWords map[string]int, threshold int) bool {
distinctive := true
for _, word := range ng {
if distinctWords[strings.ToLower(word)] < threshold {
return false
}
}
return distinctive
} | [
0.35910266637802124,
-0.5850919485092163,
0.39700761437416077,
-0.20630155503749847,
-0.3192661702632904,
0.19543229043483734,
-0.7880746722221375,
0.26635000109672546,
-0.37054356932640076,
-0.150634765625,
-0.14757242798805237,
0.2455814927816391,
-0.46383559703826904,
0.1688192635774612... |
func createNGrams(words []string, n int) ([]NGram, error) {
if n < 0 {
return nil, errors.New("n of n-gram needs to be > 0")
}
// n reduces total number of n-grams but even if n equals the number of
// words, one n-gram is created.
numberOfNGrams := len(words) - (n - 1)
nGramList := make([]NGram, numberOfNGrams... | [
-0.44371336698532104,
0.9706697463989258,
0.5171397924423218,
0.5525920391082764,
0.02656870149075985,
-0.2772182524204254,
-0.32520556449890137,
-1.1517689228057861,
0.13801881670951843,
0.7959176301956177,
-0.5639088153839111,
0.017564723268151283,
-1.0863988399505615,
1.4652323722839355... |
func (nGramMap NGramMap) addDistinctiveNGrams(words []string, n int,
distinctiveWords map[string]int, threshold int) error {
nGrams, err := createNGrams(words, n)
if err != nil {
return err
}
for _, gram := range nGrams {
if gram.IsDistinctive(distinctiveWords, threshold) {
nGramMap[gram.Key()]++
}
}
re... | [
0.13729363679885864,
0.5715429782867432,
0.5027676820755005,
0.5698426961898804,
0.00795187707990408,
0.43413570523262024,
-0.24210986495018005,
0.10550267994403839,
-0.18091967701911926,
-0.122163787484169,
-0.6135473251342773,
0.24118611216545105,
-0.7701461315155029,
0.7549228668212891,... |
func (nGramMap NGramMap) CombineDistinctiveNGrams(words []string, maxN int,
distinctiveWords map[string]int, threshold int) error {
for i := 2; i <= maxN; i++ {
err := nGramMap.addDistinctiveNGrams(words, i, distinctiveWords, threshold)
if err != nil {
return err
}
}
return nil
} | [
-0.020343301817774773,
0.13503193855285645,
0.47656941413879395,
1.0758363008499146,
0.42674720287323,
0.19208118319511414,
-0.0971500352025032,
0.20449115335941315,
-0.21730326116085052,
-0.5666157007217407,
-0.16644346714019775,
0.2301492542028427,
-0.6680117845535278,
0.4497714638710022... |
func (s *SampleStore) Channels(teamId string) ([]model.Channel, error) {
var channels []model.Channel
for _, channel := range s.channels {
if channel.TeamId == teamId {
channels = append(channels, *channel)
}
}
return channels, nil
} | [
-0.140488401055336,
-0.35328954458236694,
-0.2305731624364853,
-0.8377848863601685,
0.4774948060512543,
-0.032031331211328506,
-0.9154645800590515,
-1.0578925609588623,
0.722761869430542,
0.18546892702579498,
0.16229480504989624,
0.7975225448608398,
-0.021442610770463943,
0.218884527683258... |
func (s *SampleStore) SetRoles(roles []*model.Role) error {
s.roles = make(map[string]*model.Role)
for _, role := range roles {
s.roles[role.Id] = role
}
return nil
} | [
-0.6788069605827332,
0.3324970006942749,
0.11447542905807495,
-0.04705164581537247,
0.12323693186044693,
0.31622549891471863,
-0.31190967559814453,
-0.08663396537303925,
0.5245500206947327,
-0.13329820334911346,
-0.46940985321998596,
-0.3346441984176636,
-0.0521240159869194,
0.794684529304... |
func (s *SampleStore) Roles() ([]model.Role, error) {
roles := make([]model.Role, len(s.roles))
i := 0
for _, role := range s.roles {
roles[i] = *role
i++
}
return roles, nil
} | [
-0.6507819890975952,
0.03141917660832405,
0.03195325657725334,
-0.2497100830078125,
0.2655663788318634,
-0.004970510024577379,
-0.28217825293540955,
0.14014160633087158,
0.9435723423957825,
-0.1735842227935791,
-0.21709078550338745,
-0.1489415168762207,
0.023044414818286896,
0.084606505930... |
func (s *SampleStore) RandomChannel(teamId string) (model.Channel, error) {
return model.Channel{}, nil
} | [
-0.31540077924728394,
0.08368051052093506,
0.00874919444322586,
-0.5147573351860046,
-0.10259386152029037,
0.3329184651374817,
0.06566226482391357,
-1.172162652015686,
0.5947899222373962,
-0.7146704792976379,
0.11073272675275803,
0.4078996479511261,
-0.5196036100387573,
0.5848451256752014,... |
func (s *SampleStore) RandomTeam() (model.Team, error) {
return model.Team{}, nil
} | [
0.21082858741283417,
0.2777055501937866,
0.127609521150589,
0.6649411916732788,
-0.09541426599025726,
0.5766888856887817,
0.07703382521867752,
-0.61125248670578,
0.2573516368865967,
-1.285980224609375,
-0.5055910348892212,
0.20513808727264404,
-0.2039014995098114,
-0.25694066286087036,
-... |
func (s *SampleStore) RandomUser() (model.User, error) {
return model.User{}, nil
} | [
-0.17798428237438202,
0.16194942593574524,
0.07847750931978226,
0.8093742728233337,
-0.6347967386245728,
0.1480964720249176,
0.7518830299377441,
-0.3391987681388855,
0.7300196290016174,
-1.49098539352417,
-0.6938872337341309,
-0.35234084725379944,
-0.5987521409988403,
0.2236575186252594,
... |
func (s *SampleStore) RandomUsers(n int) ([]model.User, error) {
return []model.User{}, nil
} | [
-1.4782581329345703,
0.49589961767196655,
0.09968814253807068,
0.44004276394844055,
-0.4328252673149109,
0.19437895715236664,
0.1787266880273819,
-0.6300766468048096,
0.8637335896492004,
-0.4121740162372589,
-0.6985586285591125,
-0.23749834299087524,
-1.1424195766448975,
0.6468366384506226... |
func (s *SampleStore) RandomPost() (model.Post, error) {
return model.Post{}, nil
} | [
0.515373706817627,
-0.1430855691432953,
0.0883801057934761,
0.7513148188591003,
-0.6228906512260437,
-0.07182591408491135,
-0.40851759910583496,
-0.23047785460948944,
0.9097792506217957,
-1.030164122581482,
-0.7338569760322571,
-0.8636379837989807,
-0.6345077157020569,
-0.16336442530155182... |
func (s *SampleStore) RandomEmoji() (model.Emoji, error) {
return model.Emoji{}, nil
} | [
-0.14976471662521362,
0.2702343463897705,
0.06053118780255318,
0.35905352234840393,
-1.0043811798095703,
-0.1658022105693817,
0.09615015983581543,
-0.15451526641845703,
0.14716820418834686,
-0.27423450350761414,
-1.418559193611145,
-0.26935097575187683,
-0.5911420583724976,
0.4597174823284... |
func (s *SampleStore) RandomChannelMember(channelId string) (model.ChannelMember, error) {
return model.ChannelMember{}, nil
} | [
-0.11572475731372833,
-0.4614330232143402,
-0.005679572932422161,
-0.7936141490936279,
-0.5227418541908264,
0.08014727383852005,
-0.5013840794563293,
-0.9043229222297668,
0.8133630156517029,
-0.34850335121154785,
-0.8252543210983276,
0.1127278059720993,
-0.7990398406982422,
0.7106851339340... |
func (s *SampleStore) RandomTeamMember(teamId string) (model.TeamMember, error) {
return model.TeamMember{}, nil
} | [
-0.11149844527244568,
0.15263301134109497,
-0.1175738126039505,
-0.49115538597106934,
-0.6974755525588989,
0.5779472589492798,
-0.13905109465122223,
-1.0372146368026733,
0.5216444134712219,
-0.2333250343799591,
-1.0507022142410278,
-0.21353618800640106,
-0.49701163172721863,
0.016407879069... |
func (s *SampleStore) SetLicense(license map[string]string) error {
return nil
} | [
-0.10460174083709717,
-0.7296208739280701,
0.18821194767951965,
0.8599181175231934,
-0.5228843092918396,
-0.7260183691978455,
-0.08682048320770264,
0.8391215205192566,
0.9944448471069336,
-0.5458734035491943,
-0.7636132836341858,
0.5262300968170166,
-0.8232060074806213,
0.7387698292732239,... |
func (s *SampleStore) SetChannelMembers(channelMembers *model.ChannelMembers) error {
return errors.New("not implemented")
} | [
-0.643950343132019,
-0.7103325128555298,
0.1595333069562912,
0.10335171967744827,
0.15806300938129425,
0.5367248058319092,
0.05180453136563301,
0.14704066514968872,
0.43400266766548157,
-0.18448840081691742,
-0.8558487892150879,
1.2755966186523438,
-0.8679212331771851,
0.5509701371192932,
... |
func submitEntryToAnchorChain(aRecord *AnchorRecord) error {
//Marshal aRecord into json
jsonARecord, err := json.Marshal(aRecord)
anchorLog.Debug("submitEntryToAnchorChain - jsonARecord: ", string(jsonARecord))
if err != nil {
return err
}
bufARecord := new(bytes.Buffer)
bufARecord.Write(jsonARecord)
//Sign... | [
0.33652767539024353,
-0.6308556199073792,
0.9647192358970642,
-0.25719600915908813,
-0.031358979642391205,
0.12433470040559769,
0.26817092299461365,
-0.8843197226524353,
-0.1719692498445511,
0.3387230336666107,
-0.46785300970077515,
0.9567219614982605,
-0.4799586832523346,
0.66052311658859... |
func milliTime() (r []byte) {
buf := new(bytes.Buffer)
t := time.Now().UnixNano()
m := t / 1e6
binary.Write(buf, binary.BigEndian, m)
return buf.Bytes()[2:]
} | [
0.3169548511505127,
-0.602894127368927,
0.6697686314582825,
0.0012425918830558658,
-0.29589322209358215,
-0.2582665979862213,
-0.9727346301078796,
-0.3344786465167999,
0.29815930128097534,
1.1935101747512817,
-0.8607661724090576,
-0.1457446664571762,
-1.2885546684265137,
0.4925244450569153... |
func Register(name string, srv *grpc.Server) {
server := health.NewServer()
grpc_health_v1.RegisterHealthServer(srv, server)
server.SetServingStatus(name, grpc_health_v1.HealthCheckResponse_SERVING)
} | [
-1.1941572427749634,
-0.14306969940662384,
0.6280633211135864,
-0.13858740031719208,
0.9116875529289246,
0.6713309288024902,
-0.6869330406188965,
0.19075706601142883,
-0.4026526212692261,
0.06688044220209122,
-0.9438501000404358,
1.0346401929855347,
-0.37006768584251404,
1.004407286643982,... |
func makeRouteHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":
handleGetRequest(w, r)
case "POST":
handlePostRequest(w, r)
case "PUT":
handlePutRequest(w, r)
default:
fmt.Fprint(w, "Invalid request")
}
}
} | [
-0.16117364168167114,
-0.3568951487541199,
0.5425180196762085,
0.15883469581604004,
-0.4907209873199463,
0.9310857653617859,
0.14948740601539612,
-0.40186068415641785,
-0.1373196393251419,
-0.12665142118930817,
0.5850448608398438,
-0.518415093421936,
0.13583561778068542,
-0.742879509925842... |
func handleGetRequest(w http.ResponseWriter, r *http.Request) {
apiPrefix := "/api/"
menuID := r.URL.Path[len(apiPrefix):]
if menuID == "" {
handleGetAllMenus(w, r)
} else {
handleGetMenu(w, r, menuID)
}
} | [
-1.1476067304611206,
-0.2814188301563263,
0.45704686641693115,
0.6096662282943726,
0.8600965738296509,
-0.6416584253311157,
-0.39397963881492615,
0.3035147786140442,
0.6108773946762085,
-0.4579605162143707,
0.7027751803398132,
-0.3209233582019806,
-0.512584924697876,
0.9213948845863342,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.