text
stringlengths
11
6.3k
embedding
listlengths
768
768
func TestBatchOnStarting(t *testing.T) { sw := &mocks.SavingWriter{} batch := Batch{sw} err := batch.OnStarting("download") if err != nil { t.Fatal(err) } if len(sw.Data) != 1 { t.Fatal("invalid length") } var event struct { Key string `json:"key"` Value struct { Subtest string `json:"subtest"` }...
[ 0.8390700221061707, -0.3956083655357361, 0.6017082929611206, 0.47039830684661865, 0.3688107132911682, 0.8564791083335876, -0.5498546957969666, 0.5856813788414001, -0.28057077527046204, 0.010788369923830032, -1.0716732740402222, 0.17418895661830902, -0.08573807030916214, 0.5516711473464966,...
func TestBatchOnStartingFailure(t *testing.T) { batch := Batch{&mocks.FailingWriter{}} err := batch.OnStarting("download") if err != mocks.ErrMocked { t.Fatal("Not the error we expected") } }
[ 0.6890128254890442, -0.7281815409660339, 0.3023315370082855, 0.8671196699142456, 0.7688034176826477, 0.6741639971733093, -0.3974779546260834, 0.8945695757865906, -0.3320620656013489, -0.21375946700572968, -0.9495479464530945, 0.23438158631324768, -0.3345206677913666, 0.6166648268699646, ...
func TestBatchOnConnected(t *testing.T) { sw := &mocks.SavingWriter{} batch := Batch{sw} err := batch.OnConnected("download", "FQDN") if err != nil { t.Fatal(err) } if len(sw.Data) != 1 { t.Fatal("invalid length") } var event struct { Key string `json:"key"` Value struct { Server string `json:"ser...
[ 0.5469982624053955, -0.29853561520576477, 0.6509802937507629, 0.05524764582514763, 0.31518909335136414, 0.8281614184379578, -0.7380632162094116, 0.2272842824459076, -0.7223188877105713, -0.11734682321548462, -1.0580025911331177, -0.16935430467128754, -0.2088768631219864, 0.4317162930965423...
func TestBatchOnConnectedFailure(t *testing.T) { batch := Batch{&mocks.FailingWriter{}} err := batch.OnConnected("download", "FQDN") if err != mocks.ErrMocked { t.Fatal("Not the error we expected") } }
[ 0.6380400061607361, -0.5949918627738953, 0.2967778742313385, 0.3004254102706909, 0.8431709408760071, 0.7291054725646973, -0.9372568726539612, 0.4656660556793213, -0.5788412094116211, -0.3333585560321808, -0.8207012414932251, -0.40238824486732483, -0.371872216463089, 0.31103354692459106, ...
func TestBatchOnDownloadEvent(t *testing.T) { sw := &mocks.SavingWriter{} batch := Batch{sw} err := batch.OnDownloadEvent(&spec.Measurement{ BBRInfo: spec.BBRInfo{ MaxBandwidth: 6400000, MinRTT: 71, }, Direction: "download", Elapsed: 4, Origin: "server", TCPInfo: spec.TCPInfo{ RTTVar:...
[ 0.6343953609466553, -0.24837379157543182, 0.8268620371818542, -0.5432028770446777, 0.5256031155586243, 0.6089279055595398, -0.1679479032754898, 0.015441308729350567, -0.5789573788642883, -0.5733731389045715, -0.5029705762863159, -0.10422229021787643, -0.02376917004585266, 0.669864952564239...
func TestBatchOnDownloadEventFailure(t *testing.T) { batch := Batch{&mocks.FailingWriter{}} err := batch.OnDownloadEvent(&spec.Measurement{}) if err != mocks.ErrMocked { t.Fatal("Not the error we expected") } }
[ 0.9328066110610962, -0.2675052583217621, 0.43556809425354004, 0.642869234085083, 0.9323119521141052, 0.8681976199150085, -0.19289250671863556, 0.5476870536804199, -0.513399600982666, -0.5274015069007874, -0.44567766785621643, -0.35624709725379944, -0.37036606669425964, 1.0215917825698853, ...
func TestBatchOnUploadEvent(t *testing.T) { sw := &mocks.SavingWriter{} batch := Batch{sw} err := batch.OnUploadEvent(&spec.Measurement{ AppInfo: spec.AppInfo{ NumBytes: 100000000, }, Direction: "upload", Elapsed: 3.0, Origin: "client", }) if err != nil { t.Fatal(err) } if len(sw.Data) != 1 {...
[ 0.6738124489784241, 0.0808471068739891, 0.8617899417877197, -0.16480956971645355, 0.579200029373169, 0.8154521584510803, -0.16085006296634674, 0.35826244950294495, -0.5333669781684875, -0.1811404824256897, -0.866371750831604, -0.46660929918289185, 0.05009910836815834, 0.652534544467926, ...
func TestBatchOnUploadEventFailure(t *testing.T) { batch := Batch{&mocks.FailingWriter{}} err := batch.OnUploadEvent(&spec.Measurement{ Elapsed: 1.0, }) if err != mocks.ErrMocked { t.Fatal("Not the error we expected") } }
[ 0.6192453503608704, -0.022828958928585052, 0.5632319450378418, 0.5994574427604675, 1.134021282196045, 0.9832982420921326, -0.22848030924797058, 0.5387620329856873, -0.6286730170249939, -0.17165040969848633, -0.6751800179481506, -0.4971308410167694, -0.2729327976703644, 1.245473027229309, ...
func TestBatchOnComplete(t *testing.T) { sw := &mocks.SavingWriter{} batch := Batch{sw} err := batch.OnComplete("download") if err != nil { t.Fatal(err) } if len(sw.Data) != 1 { t.Fatal("invalid length") } var event struct { Key string `json:"key"` Value struct { Subtest string `json:"subtest"` }...
[ 0.7616968750953674, -0.03274938836693764, 0.7373812198638916, 0.15201151371002197, 0.43546581268310547, 0.6338309049606323, -0.16148588061332703, 0.27489396929740906, -0.5100395679473877, 0.17602823674678802, -1.1766072511672974, -0.5894488096237183, -0.13083483278751373, 0.731526494026184...
func TestBatchOnCompleteFailure(t *testing.T) { batch := Batch{&mocks.FailingWriter{}} err := batch.OnComplete("download") if err != mocks.ErrMocked { t.Fatal("Not the error we expected") } }
[ 0.6693897843360901, -0.3682126998901367, 0.4054814875125885, 0.542548418045044, 0.8063836097717285, 0.4923955500125885, -0.012127968482673168, 0.41288498044013977, -0.5385847091674805, 0.18597832322120667, -0.8626439571380615, -0.6296097040176392, -0.32726019620895386, 0.8572201728820801, ...
func TestNewBatchConstructor(t *testing.T) { batch := NewBatch() if batch.Writer != os.Stdout { t.Fatal("Batch is not using stdout") } }
[ 1.0090612173080444, -0.9038001298904419, 0.25672703981399536, 1.3238009214401245, 0.38366439938545227, 0.33638426661491394, 0.2577613294124603, -0.3174058198928833, -0.6730878949165344, -1.1550692319869995, 0.15758220851421356, -0.20089811086654663, 0.11279972642660141, 1.379554271697998, ...
func TestEmitInterfaceFailure(t *testing.T) { batch := NewBatch() // See https://stackoverflow.com/a/48901259 x := map[string]interface{}{ "foo": make(chan int), } err := batch.emitInterface(x) switch err.(type) { case *json.UnsupportedTypeError: // nothing default: t.Fatal("Expected a json.UnsupportedTyp...
[ -0.7948094606399536, 0.6707381010055542, 0.7019057273864746, -0.2539563775062561, 0.19909346103668213, 0.998953104019165, -0.25377050042152405, -0.5654162168502808, -0.02438749000430107, 0.23494355380535126, -1.1732497215270996, 0.00014637410640716553, -1.1158725023269653, 0.28423458337783...
func GoTo(nextScene string) func() (nextScene string, result *Result) { return func() (string, *Result) { return nextScene, nil } }
[ 0.1631244271993637, 0.7269439697265625, 0.20157422125339508, 0.05996323749423027, -0.4758863151073456, -0.8258282542228699, 0.14392460882663727, -0.30216413736343384, -0.28286367654800415, -0.22326809167861938, -1.0339211225509644, 0.2208036333322525, 0.7206016182899475, -0.712985992431640...
func GoToPtr(nextScene *string) func() (nextScene string, result *Result) { return func() (string, *Result) { if nextScene == nil { dlog.Error(oakerr.NilInput{InputName: "nextScene"}.Error()) return "", nil } return *nextScene, nil } }
[ -0.6996262073516846, 0.2459760308265686, 0.4992325007915497, -0.5674469470977783, -0.9701569080352783, -0.2735961675643921, 0.4571852684020996, -1.249383807182312, 0.09679395705461502, 0.5814053416252136, 0.2702176868915558, -0.18782885372638702, 0.35388466715812683, -0.44227543473243713, ...
func (r *registryReconcilerFactory) ReconcilerForSource(source *v1alpha1.CatalogSource) RegistryReconciler { // TODO: add memoization by source type switch source.Spec.SourceType { case v1alpha1.SourceTypeInternal, v1alpha1.SourceTypeConfigmap: return &ConfigMapRegistryReconciler{ now: r.now, Lister: ...
[ -0.6671811938285828, -0.16745059192180634, 0.2507829964160919, -0.7285423278808594, 0.27158844470977783, -0.9012278914451599, 0.40371647477149963, 0.7611151337623596, 0.1265418529510498, -0.19270004332065582, -0.18691208958625793, 0.19786688685417175, 0.056571491062641144, 0.91140484809875...
func NewRegistryReconcilerFactory(lister operatorlister.OperatorLister, opClient operatorclient.ClientInterface, configMapServerImage string, now nowFunc) RegistryReconcilerFactory { return &registryReconcilerFactory{ now: now, Lister: lister, OpClient: opClient, Conf...
[ -0.6617592573165894, -0.4250383675098419, 0.266286700963974, -0.9661032557487488, -0.0895581766963005, -0.7441338300704956, 0.9554784297943115, 1.2905526161193848, -0.2846522033214569, -0.3278222680091858, -0.27584707736968994, 0.12377912551164627, -0.6248044967651367, 0.25935855507850647,...
func hdelCommand(c Context) { var ns string if len(c.args) < 1 { c.WriteError("HDEL command requires at least two arguments: HDEL <hashmap> [<key1> <key2> ...]") return } ns = c.args[0] keys := c.args[1:] if len(keys) > 0 { for i, k := range keys { keys[i] = ns + "/{HASH}/" + k } } else { prefix ...
[ -0.24663913249969482, 0.13470640778541565, 0.7126386761665344, -0.0800190344452858, 0.44852298498153687, 0.3078671395778656, -0.14138343930244446, 0.30276086926460266, 0.006391583941876888, -0.09948062151670456, 0.3023856580257416, 0.4946964681148529, -0.21562574803829193, 0.31988683342933...
func hmsetCommand(c Context) { var ns string if len(c.args) < 3 { c.WriteError("HMSET command requires at least three arguments: HMSET <hashmap> <key1> <val1> [<key2> <val2> ...]") return } ns = c.args[0] args := c.args[1:] currentCount := len(args) if len(args)%2 != 0 { c.WriteError(fmt.Sprintf("HMSET ...
[ -0.6975851058959961, 0.18103031814098358, 0.933373212814331, -0.1415548324584961, 1.125321865081787, 0.37250420451164246, 0.36461085081100464, -0.14353738725185394, -0.804040253162384, -0.05095307528972626, -0.3289773464202881, 0.4734165370464325, -0.617980420589447, 1.0174260139465332, ...
func (m *Config) GetNameServers() []*net.Endpoint { if m != nil { return m.NameServers } return nil }
[ -0.7235872745513916, 0.47843819856643677, 0.47653597593307495, 0.7816373705863953, 0.13717269897460938, 0.17281436920166016, -0.3794204592704773, -1.4874906539916992, 0.8936171531677246, 0.2554704248905182, -1.659051775932312, -0.3357163369655609, -1.2211551666259766, 0.3924683630466461, ...
func (m *Config) GetHosts() map[string]*net.IPOrDomain { if m != nil { return m.Hosts } return nil }
[ -0.2858142852783203, 0.9726411700248718, 0.22439312934875488, 0.282838374376297, 0.7132753133773804, -0.2878236472606659, 0.17946185171604156, -0.17400434613227844, 0.3054158091545105, -0.9271378517150879, -0.009846375323832035, -0.46185779571533203, -0.7588736414909363, 0.1136284098029136...
func LoadBalancerName() reference.ExtractValueFn { return func(mg resource.Managed) string { lb, ok := mg.(*elbv2.LoadBalancer) if !ok { return "" } return aws.StringValue(lb.Status.AtProvider.LoadBalancerName) } }
[ -0.10291115194559097, -0.48538610339164734, 0.4868236482143402, 0.005630552768707275, -0.9298526644706726, -0.0019711381755769253, -1.4221669435501099, -0.373013436794281, 0.3872850239276886, 1.0902575254440308, 0.04240192100405693, 0.0551907904446125, 0.13666801154613495, 0.72399371862411...
func SetBufferedOutputManager(u User) { bufferedOutputManager = u }
[ 0.2666812241077423, -0.7212505340576172, 0.37758368253707886, -0.041366904973983765, -0.8665717840194702, 0.3994736075401306, 1.1016426086425781, -0.7598885297775269, -0.1704609990119934, -1.3845725059509277, -1.2748808860778809, 0.8087543845176697, 0.06851860880851746, 1.163344144821167, ...
func (bw *bufferedResponseWriter) Disable() { bw.disabled = true }
[ 0.6650038957595825, -0.44491538405418396, 0.33419013023376465, 0.31354808807373047, 0.5989131927490234, 0.2650396227836609, 1.331642746925354, 0.8395708203315735, 0.16430139541625977, -1.076175570487976, -0.9897149205207825, -0.4528115689754486, -1.804857611656189, 0.3717916011810303, 0....
func (bw *bufferedResponseWriter) OutputBuffer() *bytes.Buffer { return bw.buf }
[ -0.5584285259246826, -0.37219735980033875, 0.432258278131485, -0.16502799093723297, -0.007766255177557468, 0.061636511236429214, 1.424330234527588, -0.6429807543754578, 0.9359944462776184, -1.5021883249282837, 0.21606041491031647, 0.4479576349258423, -1.351886510848999, 0.05571950227022171...
func (bw *defaultBufferedOutputManager) Use(next http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { // Setup the output buffer outBuf := buf2.GetBuffer() bw := &bufferedResponseWriter{w, outBuf, 0, false} ctx := r.Context() ctx = context.WithValue(ctx, goradd.BufferContext, bw...
[ -0.2505801022052765, -0.4376877546310425, 1.1520843505859375, -0.2799680531024933, 0.052560895681381226, -0.585872232913971, 0.7106930613517761, -1.08405339717865, -0.28885456919670105, -0.8796984553337097, 0.47834983468055725, 0.5001229047775269, -0.843136727809906, 0.2995359003543854, ...
func (s *EventSubscriber) Notify(ctx context.Context, event flamingo.Event) { // we want to start an Indexing Process for every routed AreaRoutedEvent if e, ok := event.(*web.AreaRoutedEvent); ok { s.logger.WithContext(ctx).Info("AreaRoutedEvent for Area:" + e.ConfigArea.Name) injector, err := e.ConfigArea.GetIni...
[ 0.3633697032928467, -0.1712670773267746, 0.48464158177375793, -0.01461508497595787, 0.5790056586265564, -0.6048914194107056, 0.7469298839569092, 0.6179654002189636, 0.39766329526901245, -0.05227268487215042, -0.5080153346061707, 1.025862216949463, 0.4855208694934845, 0.6903002262115479, ...
func (m *Module) Depends() []dingo.Module { return []dingo.Module{ new(commerceProduct.Module), } }
[ -1.358568787574768, -1.0462251901626587, 0.44624918699264526, -0.06912146508693695, 1.0141910314559937, 0.9145832061767578, 0.04785905033349991, -1.003533124923706, 0.4048278033733368, -0.1732611507177353, -1.6788883209228516, 1.3751699924468994, 0.43850740790367126, 0.48832300305366516, ...
func (*Module) CueConfig() string { return ` flamingoCommerceAdapterStandalone: { commercesearch: { enableIndexing: bool | *true repositoryAdapter: "bleve" | *"inmemory" bleveAdapter: { productsToParentCategories: bool | *true enableCategoryFacet: bool | *false facetConfig: [...{attributeCode: string, ...
[ 0.29218578338623047, -0.2608800232410431, 0.6180463433265686, -0.7622529864311218, -0.4232800006866455, 0.2717880308628082, 0.07940825819969177, 0.19352254271507263, -0.07327602058649063, 1.4070080518722534, -0.49839743971824646, 0.7667979598045349, 0.18636438250541687, 0.9601126909255981,...
func NewPublishService(pub *rabbitmq.Publisher) *PublishService { return &PublishService{ Publisher: pub, } }
[ -0.14953137934207916, -0.6870042681694031, -0.0923534706234932, 0.1184481605887413, -0.47637152671813965, -0.35984012484550476, -1.7366453409194946, -0.6988201141357422, 0.0569487027823925, 0.08336871862411499, 0.11631917208433151, 0.7929588556289673, -1.1328389644622803, 0.745644032955169...
func (fi bindataFileInfo) Name() string { return fi.name }
[ 0.08166918903589249, -1.4572765827178955, 0.4833078384399414, 0.14237014949321747, -0.3545391261577606, 0.8819460272789001, 0.010945647954940796, -0.2467803955078125, -1.2708252668380737, -0.10601194947957993, -0.3917791545391083, -0.41195377707481384, 0.39125633239746094, 0.16644497215747...
func (fi bindataFileInfo) Size() int64 { return fi.size }
[ 0.16575103998184204, -0.1223422959446907, 0.17271094024181366, -0.07949239760637283, 0.3543928861618042, 0.7548951506614685, 0.5927076935768127, 0.07495921850204468, -1.0578577518463135, -1.1731369495391846, -0.10568573325872421, -0.17690835893154144, -0.33118754625320435, 0.30395281314849...
func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode }
[ -0.41162919998168945, -0.9577594995498657, 0.44155263900756836, -0.13144180178642273, 0.5922524929046631, 1.610377311706543, 0.009310288354754448, 0.2884019613265991, -1.065315842628479, -1.1910521984100342, 0.4981614947319031, -0.2990283668041229, -0.17645005881786346, 0.4694020748138428,...
func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime }
[ -0.2685695290565491, -0.8271465301513672, 0.35384321212768555, -0.4112885892391205, 0.37963899970054626, 0.6579224467277527, -0.6294410824775696, 0.37015482783317566, -0.2557626962661743, 0.014167135581374168, 0.4302074909210205, -0.03708653151988983, -0.8495825529098511, 0.746182441711425...
func (fi bindataFileInfo) IsDir() bool { return fi.mode&os.ModeDir != 0 }
[ 0.10024337470531464, -1.1714235544204712, 0.4835644066333771, 1.0096218585968018, 0.10103324800729752, 1.1084051132202148, 0.2600550055503845, 0.2042960673570633, -0.43129751086235046, -1.1601366996765137, 0.3743494749069214, 0.08362120389938354, -0.2748109698295593, 0.8501272797584534, ...
func (fi bindataFileInfo) Sys() interface{} { return nil }
[ -0.18937675654888153, -0.91487056016922, 0.4192674458026886, 0.23279045522212982, 0.01389834750443697, -0.11405561864376068, 0.5312886238098145, -0.4064529240131378, -0.1416921764612198, -1.7679998874664307, -0.9565558433532715, 0.39589381217956543, 0.34836944937705994, 0.461544007062912, ...
func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) } return a.bytes, nil } return nil, fmt.Errorf("Asset %s not foun...
[ -0.7961483001708984, -1.2313168048858643, 0.633165180683136, -0.6093899011611938, -1.546921730041504, -0.11101024597883224, 0.12971386313438416, -1.3390334844589233, -1.1358720064163208, 0.4855233430862427, 0.3090141713619232, 0.32495471835136414, -0.6009681224822998, -0.44264674186706543,...
func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } return a }
[ -0.012778956443071365, 0.11985661834478378, 0.4091298282146454, -0.5268413424491882, -0.8276715278625488, 0.4719155430793762, -0.8186293840408325, -1.5736604928970337, 0.16388541460037231, 0.6357062458992004, -0.5354578495025635, 0.35693347454071045, 0.0057142809964716434, -0.0248885955661...
func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) } return a.info, nil } return nil, fmt.Errorf("Asset...
[ 0.371969997882843, -1.1052993535995483, 0.5630446076393127, -0.922572672367096, -1.356387734413147, 0.0033556853886693716, 0.6777529716491699, -0.8006685972213745, -1.2748286724090576, 0.3115358352661133, 0.2636086046695709, 0.26388120651245117, 0.0635773167014122, -0.3988074064254761, 0...
func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { names = append(names, name) } return names }
[ -0.7293784618377686, -0.8460342288017273, 0.7321816682815552, -0.39323121309280396, -0.48951536417007446, 0.7661203145980835, -0.5028699636459351, -0.8655748963356018, -0.4145073890686035, 0.8099913597106934, 0.16903363168239594, 1.163049578666687, -0.028152840211987495, 0.0342608317732811...
func RestoreAsset(dir, name string) error { data, err := Asset(name) if err != nil { return err } info, err := AssetInfo(name) if err != nil { return err } err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) if err != nil { return err } err = ioutil.WriteFile(_filePath(dir, name), d...
[ 0.3437124192714691, -0.3622540235519409, 0.6770355701446533, -1.2592030763626099, -0.006139514967799187, -0.04453148692846298, -0.0072639440186321735, -0.43950510025024414, -0.20619122684001923, -0.2510169744491577, 0.1784360408782959, 0.13568510115146637, -0.23627112805843353, -0.56985116...
func RestoreAssets(dir, name string) error { children, err := AssetDir(name) // File if err != nil { return RestoreAsset(dir, name) } // Dir for _, child := range children { err = RestoreAssets(dir, filepath.Join(name, child)) if err != nil { return err } } return nil }
[ 0.42261892557144165, 0.30020031332969666, 0.5813396573066711, -0.20641657710075378, -0.23828908801078796, -0.24414615333080292, 0.5739709138870239, -0.029911456629633904, 0.06188219040632248, -0.43923482298851013, 0.5113736987113953, 0.3275970220565796, -0.6125145554542542, 0.0351656526327...
func assertFn(fnv reflect.Value) { if fnv.Kind() != reflect.Func { panic(fmt.Sprintf("The argument, fn should be a function, but %v", fnv.Kind().String())) } }
[ 0.14187389612197876, 0.1433863788843155, 0.1905534565448761, 0.649282693862915, 0.6286577582359314, 0.006654044147580862, 0.1388380378484726, -0.4579737186431885, 0.5771554112434387, -0.43837565183639526, 0.44367995858192444, 1.1710091829299927, 0.11561968922615051, 0.843641459941864, 0....
func assertFnIn(fnv reflect.Value, inTypes []reflect.Type) { if fnv.Type().NumIn() != len(inTypes) { panic(fmt.Sprintf("The number of arguments of fn should be %v, but %v", len(inTypes), fnv.Type().NumIn())) } for i := 0; i < fnv.Type().NumIn(); i++ { if fnv.Type().In(i) != inTypes[i] { panic(fmt.Sprintf("Th...
[ -0.6704411506652832, -0.16956645250320435, 0.7758272290229797, 0.1528223156929016, 0.8048160672187805, 0.3569757342338562, -0.46216681599617004, -0.6339409947395325, -0.3176339864730835, -0.08823955804109573, 0.21652457118034363, 0.7339897155761719, -0.9220994710922241, 0.2604939937591553,...
func assertFnOut(fnv reflect.Value, outTypes []reflect.Type) { if fnv.Type().NumOut() != len(outTypes) { panic(fmt.Sprintf("The number of arguments of fn should be %v, but %v", len(outTypes), fnv.Type().NumOut())) } for i := 0; i < fnv.Type().NumOut(); i++ { if fnv.Type().Out(i) != outTypes[i] { panic(fmt.Sp...
[ -0.7775538563728333, 0.09673423320055008, 0.5112968683242798, -0.033140651881694794, 0.27835336327552795, -0.13761524856090546, 0.32642412185668945, -0.4704817235469818, -0.3314078450202942, -0.42092540860176086, 0.2397433966398239, 0.049241479486227036, -0.7156347632408142, 0.467675000429...
func assertFnAndFnIn(fnv reflect.Value, inTypes []reflect.Type) { assertFn(fnv) assertFnIn(fnv, inTypes) }
[ -1.2821162939071655, -0.259366899728775, 0.5085939168930054, 0.3701116442680359, 0.4622367322444916, 0.026589512825012207, 0.1682475209236145, -0.382588267326355, -0.25790321826934814, -1.0113105773925781, -0.17946763336658478, 0.5578942894935608, -0.44459110498428345, 1.1644037961959839, ...
func assertFnAndFnOut(fnv reflect.Value, outTypes []reflect.Type) { assertFn(fnv) assertFnOut(fnv, outTypes) }
[ -1.3406600952148438, 0.010882331058382988, 0.2169766128063202, 0.08161155134439468, 0.14382489025592804, -0.15685901045799255, 0.8454779386520386, -0.2260259985923767, -0.6781436204910278, -1.124151587486267, 0.14481523633003235, 0.3018074333667755, 0.22328698635101318, 1.3710479736328125,...
func assertFnAndFnInAndFnOut(fnv reflect.Value, inTypes []reflect.Type, outTypes []reflect.Type) { assertFn(fnv) assertFnIn(fnv, inTypes) assertFnOut(fnv, outTypes) }
[ -1.3464953899383545, -0.46972984075546265, 0.3732715845108032, -0.23047921061515808, 0.10656473785638809, -0.18319769203662872, 0.6832860112190247, -0.07273546606302261, -0.8121384978294373, -0.9154977798461914, -0.31782570481300354, 0.2930981516838074, -0.4151635468006134, 1.0722733736038...
func NewRouter(nodeAddress string) *mux.Router { controller := NewController(nodeAddress) routes := getRoutes(&controller) router := mux.NewRouter().StrictSlash(true) // create Genesis block controller.blockchain.CreateNewBlock(100, "0", "0") for _, route := range routes { var handler http.Handler handler =...
[ -0.02215869352221489, 0.26161614060401917, 0.6731836199760437, 0.05709126964211464, -0.3561488687992096, 0.02414611540734768, 0.009831064380705357, 0.03756324201822281, 0.11271603405475616, -0.5184953212738037, 0.1207052692770958, 0.512444794178009, 0.40738222002983093, 0.7248247861862183,...
func wrap(msg string) { fmt.Fprint(os.Stderr, wordutils.Wrap(msg, 80)) fmt.Fprintln(os.Stderr) }
[ -0.36867380142211914, 0.20423570275306702, 0.544797956943512, -1.1425132751464844, -0.68011474609375, 0.8246725797653198, -0.21719366312026978, -0.17484043538570404, -0.2910076677799225, 0.21117965877056122, 2.105836868286133, 1.9260103702545166, 0.9591547846794128, 0.641106903553009, 0....
func setupValidQueueNames() { for _, jType := range models.ValidJobTypes { var jt = string(jType) validQueues[jt] = true validQueueList = append(validQueueList, jt) } }
[ -0.24240830540657043, -0.734347939491272, 0.37957635521888733, -0.7605768442153931, -0.2427574247121811, 0.20652009546756744, -1.297191858291626, -0.0302298441529274, 0.23613524436950684, 0.35272088646888733, -0.7128069996833801, -0.03447048366069794, -0.12277491390705109, 0.63381552696228...
func runAllQueues(conf *config.Config) { waitFor( func() { watchPageReview(conf) }, func() { watchDigitizedScans(conf) }, func() { // Jobs which are exclusively disk IO are in the first runner to avoid // too much FS stuff hapenning concurrently watchJobTypes(conf, models.JobTypeArchiveBackups, ...
[ 0.28029152750968933, -0.4577347934246063, 0.5646645426750183, 0.1803961992263794, -0.10554275661706924, -0.47728532552719116, 0.4382779896259308, -0.6772949695587158, 0.1884274184703827, -0.8296349048614502, -0.9261277914047241, -0.03747362270951271, 0.5371315479278564, 0.6905052661895752,...
func waitFor(fns ...func()) { var wg sync.WaitGroup for _, fn1 := range fns { wg.Add(1) go func(fn2 func()) { fn2() wg.Done() }(fn1) } wg.Wait() }
[ -0.5055130124092102, 1.3372572660446167, 0.5229301452636719, 0.006894805934280157, 1.0897225141525269, 0.03645703196525574, -0.3265847861766815, -0.23314641416072845, -1.9854055643081665, -1.161903738975525, -0.4380244314670563, 0.13177388906478882, 0.478302925825119, 0.6478106379508972, ...
func ProcessCheckout(checkoutPath string, productsPath string) (int, error) { // get checkout line arr and products map checkoutLines, err := DecodeCheckoutData(checkoutPath) if err != nil { return 0, err } products, err := DecodeProductData(productsPath) if err != nil { return 0, err } checkoutPrice, err...
[ -0.4456169605255127, -0.24707874655723572, 0.7738611102104187, 0.11494452506303787, 0.20753945410251617, -0.04282192513346672, 0.2132098376750946, 0.6475170254707336, -0.43741416931152344, 0.7751158475875854, -0.008937806822359562, -0.5426475405693054, -0.19334790110588074, 0.4025432765483...
func (cL CheckoutLine) GetCheckoutLinePrice(products map[string]Product) (int, error) { lineTotal := 0 // check for invalid checkout quantity. if cL.Quantity < 0 { return 0, errors.New("checkout line quantity cannot be negative") } // check prod key in products map, if not return err else continue if prod, o...
[ -0.766686737537384, -0.18854407966136932, 0.9350627660751343, -0.16889001429080963, -0.026306727901101112, 0.2009163796901703, -0.5044829249382019, 0.4864458441734314, 0.04098714888095856, 0.8078771829605103, -0.23043812811374664, -0.5840924978256226, -0.4374160170555115, 0.305159032344818...
func GetCheckoutPrice(cLSlice []CheckoutLine, products map[string]Product) (int, error) { checkoutTotal := 0 // loop over checkout lines, get their price and add it to the total checkout price for _, cL := range cLSlice { cLPrice, err := cL.GetCheckoutLinePrice(products) if err != nil { return 0, err } ...
[ -0.687961220741272, -0.03200728818774223, 0.78492671251297, 0.5035257339477539, 0.6879277229309082, 0.0070001850835978985, -0.24086344242095947, 0.5752947330474854, -0.1566416472196579, 1.5805747509002686, -0.026475578546524048, -1.055738091468811, 0.05750103294849396, 0.46963202953338623,...
func NewBuffer(capacity int) Buffer { return Buffer{ capacity: capacity, currentSize: 0, contents: map[entity.Key]inventoryapi.PostDeltaBody{}, } }
[ -0.19264931976795197, -0.7533189654350281, 0.21954038739204407, 0.1237378790974617, -0.5631974935531616, 0.2813418507575989, -0.21297958493232727, -0.3692146837711334, -0.3357312083244324, -0.704997718334198, 0.11279100179672241, 0.2967086732387543, -0.06536734104156494, 0.1353942155838012...
func (b *Buffer) Add(ent entity.Key, body inventoryapi.PostDeltaBody) error { if _, ok := b.contents[ent]; ok { return fmt.Errorf("entity already added: %q", ent) } bodySize, err := sizeOf(&body) if err != nil { return err } if b.currentSize+bodySize > b.capacity { return fmt.Errorf("delta for entity %q doe...
[ -0.582054078578949, -0.4217694401741028, 0.9847022891044617, -0.5436093807220459, -0.006155454553663731, 1.1895495653152466, -0.3519151508808136, -0.6780169606208801, 0.2542864680290222, -0.7572795152664185, -0.055564362555742264, 0.2589433193206787, -0.7659633159637451, 0.8613516092300415...
func (b Buffer) Get(ent entity.Key) *inventoryapi.PostDeltaBody { body, ok := b.contents[ent] if !ok { return nil } return &body }
[ -0.4879591166973114, -0.4676021933555603, 0.5977939367294312, -0.5741421580314636, 0.3302811086177826, 0.18428808450698853, -1.1514956951141357, -1.2176263332366943, -0.25759950280189514, -0.08448711037635803, -0.4783034324645996, 0.46561869978904724, -0.5295910835266113, 0.134817034006118...
func (b *Buffer) Clear() { b.currentSize = 0 b.contents = map[entity.Key]inventoryapi.PostDeltaBody{} }
[ -0.6465217471122742, -0.8204246163368225, 0.3001621663570404, -0.29004672169685364, 0.0342198945581913, 1.2465327978134155, -0.33720332384109497, -1.0222296714782715, -0.581275224685669, -0.45664501190185547, -0.035745345056056976, 0.5396422147750854, -0.32137396931648254, 1.07338309288024...
func (b Buffer) AsSlice() []inventoryapi.PostDeltaBody { postDeltaMap := b.contents contents := make([]inventoryapi.PostDeltaBody, 0, len(postDeltaMap)) for _, postDelta := range postDeltaMap { contents = append(contents, postDelta) } return contents }
[ -0.6023140549659729, -1.47699773311615, 0.47854113578796387, 0.08081585168838501, 0.43253228068351746, -0.11733349412679672, -0.9673775434494019, -0.3495086431503296, -0.6888092160224915, 0.060015108436346054, -0.7098576426506042, -0.004782333038747311, -0.28072303533554077, 0.213298887014...
func (b Buffer) Entries() int { return len(b.contents) }
[ 0.15924787521362305, 0.17626537382602692, 0.18819871544837952, -1.0038646459579468, 0.35913336277008057, -0.03447540104389191, 0.24945351481437683, 0.31256601214408875, -0.030051423236727715, -0.9413775205612183, -0.8021904230117798, 0.2105591893196106, -0.9338483214378357, 0.7384926676750...
func sizeOf(body *inventoryapi.PostDeltaBody) (int, error) { buffer, err := json.Marshal(body) if err != nil { return -1, err } return len(buffer), nil }
[ -0.22407479584217072, 0.36892983317375183, 0.6734839677810669, -1.1859089136123657, -0.2241441011428833, 0.18320125341415405, -0.5398780703544617, -0.5536054372787476, -0.003088231896981597, 0.27317166328430176, -0.7627532482147217, -0.5110827684402466, -0.484956830739975, 0.23751474916934...
func (ti *TravelItineraryAddInfoRQ) AddAgencyInfoAddress(addr Address) { ti.Agency = &AgencyInfo{ Address: addr, } }
[ -0.24756428599357605, -0.5736846327781677, 0.38224077224731445, -0.636040985584259, 0.29467296600341797, 0.5160148739814758, 0.06427189707756042, 0.14938479661941528, 1.073838233947754, -0.03603618964552879, -0.018309151753783226, 0.2967139184474945, 0.385084331035614, 0.11844935268163681,...
func (p *PassengerDetailBody) AddSpecialDetails(spec *SpecialReqDetails) { p.PassengerDetailsRQ.SpecialReq = spec }
[ 0.49061742424964905, 0.08041054010391235, 0.5085629224777222, 0.6680755615234375, -0.311127632856369, 1.5440242290496826, -0.4115718901157379, 0.9560883641242981, 0.39690110087394714, -0.9487314820289612, -0.31002914905548096, 0.6414591670036316, -0.6321961879730225, 0.7243797183036804, ...
func (p *PassengerDetailBody) AddUniqueID(id string) { p.PassengerDetailsRQ.PreProcess.UniqueID = &UniqueID{ID: id} }
[ 0.13204707205295563, -0.2314053773880005, 0.5733864903450012, -0.521030604839325, 0.3398800790309906, 1.146338701248169, -0.24629399180412292, 1.6493605375289917, 0.8864186406135559, -0.22353219985961914, -0.4770174026489258, 0.7589982151985168, -0.6030932664871216, 0.6400091052055359, 0...
func CreatePersonName(firstName, lastName string) PersonName { return PersonName{ NameNumber: "1.1", // sabre example NameReference: "ABC123", // sabre example PassengerType: "ADT", // sabre example First: &GivenName{Val: firstName}, Last: Surname{Val: lastName}, } }
[ 0.14054608345031738, -0.7626780867576599, 0.5068709850311279, -0.6396250128746033, -0.769473671913147, 0.1639663130044937, -1.7088268995285034, 0.5886871814727783, -0.12632954120635986, 0.02131238952279091, -0.2962798774242401, -0.5034511089324951, -0.10025006532669067, 0.6923811435699463,...
func SetPNRDetailBody(phone string, person PersonName) PassengerDetailBody { return PassengerDetailBody{ PassengerDetailsRQ: PassengerDetailsRQ{ XMLNS: "http://services.sabre.com/sp/pd/v3_3", Version: "3.3.0", IgnoreOnError: false, HaltOnError: true, PostProcess: PostProcessing{ Ig...
[ 0.13149981200695038, -0.14161880314350128, 0.8019700646400452, 0.10381806641817093, -0.3560705780982971, 0.8627058267593384, -0.5425518155097961, -0.31510603427886963, 0.3070801794528961, -0.5034528970718384, -0.7968419194221497, -0.18195447325706482, -0.9051631689071655, 0.584556758403778...
func BuildPNRDetailsRequest(c *srvc.SessionConf, binsec string, body PassengerDetailBody) PNRDetailsRequest { return PNRDetailsRequest{ Envelope: srvc.CreateEnvelope(), Header: srvc.SessionHeader{ MessageHeader: srvc.MessageHeader{ MustUnderstand: srvc.SabreMustUnderstand, EbVersion: srvc.SabreEBVe...
[ -0.36252561211586, -0.1874556541442871, 0.8128107190132141, -0.6204538941383362, -0.23317617177963257, 0.3107145130634308, -0.9591405391693115, -0.2127557098865509, 0.36991530656814575, -0.3837949335575104, 0.00978804286569357, 0.9699036478996277, -0.6628051996231079, 0.775985598564148, ...
func CallPNRDetail(serviceURL string, req PNRDetailsRequest) (PNRDetailsResponse, error) { pnrResp := PNRDetailsResponse{} byteReq, _ := xml.Marshal(req) srvc.LogSoap.Printf("CallPNRDetail-REQUEST\n\n %s\n\n", byteReq) //post payload resp, err := http.Post(serviceURL, "text/xml", bytes.NewBuffer(byteReq)) if err...
[ 0.22420762479305267, 0.03390519693493843, 1.1470975875854492, -0.8546542525291443, -0.38753941655158997, 0.43177372217178345, -1.1642379760742188, -0.620536208152771, 0.7661489248275757, 0.08121365308761597, -0.25305649638175964, 0.08519323915243149, -1.0024067163467407, 0.7950026988983154...
func (r *RegressionDetectionRequest) Query() string { if r.query != "" { return r.query } if r.Alert != nil { return r.Alert.Query } return "" }
[ 0.8845736980438232, -0.1375950425863266, 0.20677734911441803, 0.5179504156112671, 0.4416600465774536, 0.09499917924404144, -0.32639792561531067, -0.8717127442359924, 1.008861780166626, -0.21173524856567383, 1.4806780815124512, 0.7796386480331421, -0.913666844367981, 0.6403133869171143, -...
func (r *RegressionDetectionRequest) SetQuery(q string) { r.query = q }
[ 0.4182266891002655, 0.21275180578231812, -0.008410736918449402, 0.47777220606803894, 0.6852275133132935, 0.6188884377479553, -0.1420571208000183, -0.593615710735321, 0.8956761360168457, -0.7745389342308044, 0.028203047811985016, 0.10957898199558258, -0.5286391377449036, 0.8219302296638489,...
func NewRegressionDetectionRequest() *RegressionDetectionRequest { return &RegressionDetectionRequest{ Progress: progress.New(), } }
[ -0.2844763994216919, -0.21516600251197815, 0.22369332611560822, 0.6361094117164612, 0.20629511773586273, -0.9182329177856445, 0.6289810538291931, -0.3831396996974945, 0.28741398453712463, -0.874816358089447, -0.18195156753063202, 0.2896593511104584, -0.18628661334514618, 0.8111648559570312...
func ProcessRegressions(ctx context.Context, req *RegressionDetectionRequest, detectorResponseProcessor DetectorResponseProcessor, perfGit *perfgit.Git, shortcutStore shortcut.Store, dfBuilder dataframe.DataFrameBuilder, ps paramtools.ReadOnlyParamSet, expandBaseRequest BaseAlertHandling, iteration Iteration, ...
[ -0.40671029686927795, 0.9251253604888916, 0.5695508122444153, 0.11998483538627625, 0.2668752074241638, -0.6138381958007812, 0.632973313331604, -0.5855808854103088, -0.17315854132175446, -0.7820024490356445, 1.0199586153030396, 0.005638438742607832, -0.29671862721443176, 0.5634598731994629,...
func allRequestsFromBaseRequest(req *RegressionDetectionRequest, ps paramtools.ReadOnlyParamSet, expandBaseRequest BaseAlertHandling) []*RegressionDetectionRequest { ret := []*RegressionDetectionRequest{} if req.Alert.GroupBy == "" || expandBaseRequest == DoNotExpandBaseAlertByGroupBy { ret = append(ret, req) } e...
[ -0.10145878046751022, -0.19619785249233246, 0.38221606612205505, 1.1353963613510132, 0.3516349196434021, -0.09016773849725723, -0.2295166552066803, -1.0529955625534058, 0.27811354398727417, -0.2251313030719757, 1.2303657531738281, 0.9783648252487183, -0.47029322385787964, 0.689031779766082...
func (p *regressionDetectionProcess) progress(step, totalSteps int) { p.request.Progress.Message("Querying", fmt.Sprintf("%d%%", int(float32(100.0)*float32(step)/float32(totalSteps)))) }
[ 0.3556392192840576, 0.6349841356277466, 0.46331867575645447, -0.3349074125289917, 0.47120216488838196, 0.11392031610012054, 0.7149114608764648, -0.9158831238746643, -0.5008932948112488, -0.730351984500885, 0.7163195610046387, -0.34712687134742737, -0.6730390191078186, 0.9739667177200317, ...
func (p *regressionDetectionProcess) detectionProgress(totalError float64) { p.request.Progress.Message("Regression Total Error", fmt.Sprintf("%0.2f", totalError)) }
[ 0.7157967686653137, -0.6153503656387329, 0.6460347175598145, -0.07668793946504593, 0.6020523905754089, 0.041458699852228165, 0.8443813920021057, -0.5423769950866699, -0.05433393642306328, -0.2882508337497711, 0.29198384284973145, -0.39873889088630676, -0.09583974629640579, 0.67324155569076...
func missing(tr types.Trace) bool { count := 0 for _, x := range tr { if x == vec32.MissingDataSentinel { count++ } } return (100*count)/len(tr) > 50 }
[ 0.018326042219996452, 0.834850549697876, 0.3570931851863861, 0.26691561937332153, -0.602783203125, 0.9094873666763306, 0.2307869791984558, -0.6030886173248291, 0.9073911309242249, 0.039332639425992966, 0.15817934274673462, -0.11685887724161148, 0.47527801990509033, 0.8936507105827332, -0...
func tooMuchMissingData(tr types.Trace) bool { if len(tr) < 3 { return false } n := len(tr) / 2 if tr[n] == vec32.MissingDataSentinel { return true } return missing(tr[:n]) || missing(tr[len(tr)-n:]) }
[ -0.48516330122947693, 1.4108481407165527, 0.451296865940094, -0.1332634687423706, -0.20654650032520294, 0.7528400421142578, -0.011097672395408154, -0.6237117648124695, 0.7866979241371155, 0.21601729094982147, -0.26931899785995483, -0.1742246448993683, 0.5903868079185486, 0.6421468257904053...
func (p *regressionDetectionProcess) shortcutFromKeys(summary *clustering2.ClusterSummaries) error { var err error for _, cs := range summary.Clusters { if cs.Shortcut, err = p.shortcutStore.InsertShortcut(context.Background(), &shortcut.Shortcut{Keys: cs.Keys}); err != nil { return err } } return nil }
[ -0.17524006962776184, -0.15235649049282074, 0.09185242652893066, 0.2668210566043854, 0.7043241858482361, -0.22748936712741852, 0.34811070561408997, 0.02018110267817974, 0.5015759468078613, 0.5486822128295898, -0.1374322772026062, 0.013861228711903095, -0.2519223690032959, 0.038618274033069...
func (p *regressionDetectionProcess) run(ctx context.Context) error { ctx, span := trace.StartSpan(ctx, "regressionDetectionProcess.run") defer span.End() if p.request.Alert.Algo == "" { p.request.Alert.Algo = types.KMeansGrouping } for p.iter.Next() { df, err := p.iter.Value(ctx) if err != nil { return ...
[ 0.5736624002456665, 0.6944325566291809, 0.6874818801879883, 0.036900829523801804, 0.33303993940353394, -0.01623079553246498, 1.023147463798523, -0.37885725498199463, -0.224762961268425, 0.33008071780204773, 0.6441358923912048, 0.9579629898071289, -0.5441955924034119, 0.6179966926574707, ...
func (self *Merchant) OrderTableContent() (tableContent string) { var customerName string for _, order := range self.History.Orders { customerName = order.Customer.FullName if order.Customer.IsBusiness() { customerName += ` representative for ` + order.Customer.Business } tableContent += `<tr> <td style="...
[ 0.21160352230072021, -0.28441673517227173, 0.866995632648468, -0.3351651132106781, -0.7358874678611755, -0.16096004843711853, -0.08370307087898254, -0.8813005089759827, -0.9333907961845398, 0.8388898372650146, 0.7370002269744873, -0.19295454025268555, 0.2481955885887146, 0.0415386892855167...
func NewParserXZ(p GenomeParser) GenomeParser { return NewParserCmd(p, "xz", "-c", "-d", "{}") }
[ 0.8345313668251038, -1.026781439781189, 0.06418512761592865, 0.3099709451198578, -1.2236416339874268, -0.40219593048095703, -0.280199259519577, 0.6951788663864136, -0.3003406226634979, -0.8141067028045654, -0.38292351365089417, 0.5079123973846436, -0.3079947233200073, 0.8890247344970703, ...
func NewUser(repository UserRepository) *User { return &User{repository} }
[ -0.24031962454319, -0.16453540325164795, -0.22092893719673157, 0.7143526077270508, -0.6400003433227539, -0.16677911579608917, -0.5186978578567505, -0.4159192740917206, 0.7407895922660828, -0.5782356262207031, -0.30664852261543274, 0.14517296850681305, 0.5440251231193542, 0.0035511581227183...
func (h *messageHandler) HandleMessage(m *nsq.Message) error { //Process the Message var request Message if err := json.Unmarshal(m.Body, &request); err != nil { log.Println("Error when Unmarshaling the message body, Err : ", err) // Returning a non-nil error will automatically send a REQ command to NSQ to re-qu...
[ -0.49253275990486145, -0.31273332238197327, 0.8381474614143372, -0.04230804741382599, 0.6733227968215942, -0.0011952791828662157, -0.00002455896174069494, -0.5366789698600769, -0.7312410473823547, 0.03917446359992027, 0.7590410113334656, 0.2115509808063507, -0.868451714515686, 1.4283456802...
func (s *Service) Calendar(c context.Context, p *model.ParamFilter) (rs []*model.Calendar, err error) { var fc map[string]int64 before3 := time.Now().AddDate(0, 0, -_caleDay).Format("2006-01-02") after3 := time.Now().AddDate(0, 0, _caleDay).Format("2006-01-02") todayAll := p.Mid == 0 && p.Gid == 0 && p.Tid == 0 && ...
[ -1.0959235429763794, 0.10397618263959885, 0.7622632384300232, 0.7406593561172485, -0.29339906573295593, 0.579025149345398, 0.23137623071670532, -0.1158127412199974, 0.15718083083629608, 0.36042025685310364, 0.6193611025810242, -0.0871567502617836, -0.41389763355255127, 1.0832058191299438, ...
func (s *Service) ContestInfo(c context.Context, cids []int64, cData []*model.Contest, teams, seasons []*model.Filter, mid int64) (rs []*model.Contest) { var ( mapTeam, mapSeason map[int64]*model.Filter ) mapTeam = make(map[int64]*model.Filter, len(teams)) for _, team := range teams { mapTeam[team.ID] = team }...
[ -0.2971493899822235, -0.22165058553218842, 0.7405542731285095, -0.13462015986442566, -0.5373131632804871, 0.2508692741394043, 0.0066114384680986404, -0.37318092584609985, -0.1886172890663147, 0.839659571647644, -0.14233186841011047, -0.0008793487795628607, 0.7805562615394592, 0.01780237443...
func (s *Service) AppSeason(c context.Context, p *model.ParamSeason) (rs []*model.Season, count int, err error) { var ( seasons []*model.Season start = (p.Pn - 1) * p.Ps end = start + p.Ps - 1 ) if rs, count, err = s.dao.SeasonMCache(c, start, end); err != nil || len(rs) == 0 { err = nil if seasons, ...
[ -0.40953943133354187, -0.27271535992622375, 0.9362961053848267, 0.41471001505851746, -0.5248103737831116, 0.3138093054294586, -0.23851467669010162, -0.6189453601837158, 0.19950956106185913, 0.933506965637207, 0.14295148849487305, 0.9081592559814453, 0.1279786229133606, 0.7039468288421631, ...
func (rs Reservations) GoogleEventIDs() (googleEventIDs []string) { for _, r := range rs { googleEventIDs = append(googleEventIDs, r.GoogleEventID) } return googleEventIDs }
[ -0.3948265314102173, -0.5707043409347534, 0.38049644231796265, -0.587139368057251, 0.025543667376041412, 0.7736319303512573, -0.7215944528579712, 0.8424100875854492, 0.6854380965232849, 1.171493649482727, -0.28626465797424316, 1.6790883541107178, -0.5474096536636353, 0.9309450387954712, ...
func (rs Reservations) FindReservationIDAndDuration() (result []ReservationIDAndDuration) { for _, r := range rs { reservation := ReservationIDAndDuration{ ID: r.ID, Start: r.Start, End: r.End, } result = append(result, reservation) } return result }
[ -0.5703559517860413, -0.7347054481506348, 0.3033754825592041, 0.2811301350593567, -0.06504643708467484, 0.06611069291830063, -0.5408543944358826, -0.6151516437530518, -0.15488074719905853, 1.5809611082077026, -0.26452767848968506, -0.05951991677284241, -0.6559185981750488, 1.03197598457336...
func (rs Reservations) MakeDurations() (ds Durations) { for _, r := range rs { duration := Duration{ Start: r.Start, End: r.End, } ds = append(ds, duration) } return ds }
[ -1.0082731246948242, 1.0867829322814941, 0.2248111367225647, -0.7032331824302673, -0.17857100069522858, 0.27194350957870483, -0.15650396049022675, 0.41122832894325256, 0.18233518302440643, 0.7235168814659119, -0.174042746424675, -0.40245023369789124, 0.639642059803009, -0.10736143589019775...
func (rs Reservations) findIDsByUserID(userID ID) (ids []ID) { for _, r := range rs { if r.UserID == userID { ids = append(ids, r.ID) } } return ids }
[ -0.3191753625869751, -0.0036290171556174755, 0.020027171820402145, 0.31199535727500916, -0.0104352543130517, -0.135557621717453, -0.106614850461483, -0.15041053295135498, -0.02476189099252224, 1.2556434869766235, -0.16191604733467102, 0.5201700329780579, -1.0401817560195923, 1.371514558792...
func (rs Reservations) FindEventSlotIDsByUserID(userID ID) (eventSlotIDs []ID) { reservationIDs := rs.findIDsByUserID(userID) for _, r := range rs { for _, rid := range reservationIDs { if rid == r.ID { eventSlotIDs = append(eventSlotIDs, r.findEventSlotIDsByReservation()...) } } } return eventSlotIDs...
[ 1.062744140625, -0.4674694836139679, 0.4000658690929413, 0.4733843505382538, -1.3991608619689941, -0.017606133595108986, 0.3864269554615021, 0.5368977785110474, -0.28851020336151123, 0.8031029105186462, 0.26953941583633423, 0.6418559551239014, -0.4153258800506592, 1.7771801948547363, -0....
func (rs Reservations) IsReservable(duration Duration) bool { for _, r := range rs { if (duration.Start.Equal(r.Start) || (duration.Start.After(r.Start) && duration.Start.Before(r.End))) || (duration.End.Equal(r.End) || (duration.End.Before(r.End) && duration.End.After(r.Start))) { return false } } return ...
[ -1.010042428970337, 0.18903407454490662, 1.0467917919158936, -0.09045273065567017, -0.19778797030448914, 0.3316558599472046, -0.537520706653595, 0.5822203159332275, 0.02993115223944187, 0.7825409770011902, -0.5375530123710632, -0.22615523636341095, -0.7017778754234314, -0.19924771785736084...
func (c *Client) GetConnections(parentID string) ([]ConnectionEntity, error) { log.Info("Inside client.go, in GetConnections FUNCTION") var entity ConnectionsEntity if err := c.getDeepConnections(parentID, &entity); err != nil { return nil, err } return entity.Connections, nil }
[ -0.8998950719833374, 0.2883991599082947, 0.6805248856544495, 0.6068896055221558, 1.1210049390792847, -0.5979405045509338, 0.00154632527846843, -0.6041434407234192, 0.009927635081112385, -0.2652585208415985, -0.378984659910202, 0.07774987071752548, -0.8004117608070374, 1.1158065795898438, ...
func (c *Client) GetDeepProcessGroups(parentID string) ([]ProcessGroupEntity, error) { log.Info("Inside client.go, in GetDeepProcessGroups FUNCTION") var entity ProcessGroupsEntity if err := c.getDeepProcessGroups(parentID, &entity); err != nil { return nil, err } return entity.ProcessGroups, nil }
[ -1.5590554475784302, 0.7972832322120667, 0.7930713891983032, -0.4520203173160553, 0.22290334105491638, -0.10690204054117203, -0.6283246874809265, -0.7585818767547607, -0.5807608962059021, -0.0004232241481076926, -0.2053985595703125, 1.1806694269180298, -0.9642825722694397, 1.12751805782318...
func (e fileError) Position() text.Position { return e.position }
[ -0.07742970436811447, -1.408376932144165, 0.12190037220716476, -0.1738869547843933, 0.3815004825592041, 0.3624512553215027, 0.4519052505493164, 0.8721539378166199, -0.004199710674583912, -0.24160297214984894, 0.5454077124595642, -0.8999271392822266, -0.08450052887201309, 0.0137932868674397...
func (u UUID) Validate() error { if u.ID == "" { return errors.New("UUID.ID is required") } if u.Origin == "" { return errors.New("UUID.Origin is required") } if u.Tick == 0 { return errors.New("UUID.Tick can not be zero") } switch u.Type { case LAMPORTTICK, UNIXTICK: return nil } return errors.Ne...
[ -0.27499592304229736, 0.22659462690353394, 0.5388371348381042, 0.16693246364593506, 0.00756699126213789, 0.6979736089706421, 0.08798009902238846, 0.585800051689148, -0.11770271509885788, -0.37365785241127014, 0.5150196552276611, 0.21177805960178375, -0.5407022833824158, 0.30749982595443726...
func (u UUID) GreaterThan(n UUID) bool { if u.Equal(n) { return u.Tick > n.Tick } return false }
[ -0.339679092168808, 0.9177854657173157, 0.4440115988254547, 0.012864409945905209, 0.12594427168369293, 0.6135262250900269, -0.00924208015203476, -0.88397216796875, -0.3483830690383911, -0.2710931897163391, -0.7385776042938232, -0.32350096106529236, -0.23769226670265198, 0.3119010031223297,...
func (u UUID) LessThan(n UUID) bool { if u.Equal(n) { return u.Tick < n.Tick } return false }
[ 0.20628532767295837, 0.0995338037610054, 0.24207600951194763, -0.8153333067893982, -0.14713150262832642, 0.37067824602127075, 0.0393412709236145, -0.900975227355957, 0.12021779268980026, -0.5837768316268921, -1.1411595344543457, -0.0989377424120903, -0.8860780000686646, 0.6155344843864441,...
func (u UUID) ExactEqual(n UUID) bool { if u.Equal(n) { return u.Tick == n.Tick } return false }
[ -0.6075543761253357, 0.6146059632301331, 0.1582200676202774, 0.4653256833553314, 0.35758447647094727, 0.8095033168792725, -0.160627081990242, -0.4560304284095764, -0.7222561240196228, 1.2406303882598877, -1.135617733001709, -0.2288098931312561, -0.7870107889175415, 0.2299509346485138, -0...