text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (b *Buffer) Reset() { b.B = b.B[:0] }
[ -0.05991530045866966, -0.14964500069618225, 0.19543714821338654, 0.7250478863716125, 1.1850008964538574, 0.5320106148719788, 0.48279452323913574, -0.4100005328655243, -0.6129339337348938, -0.3680877685546875, -0.7586487531661987, 1.2304208278656006, -1.556603193283081, -0.40947410464286804...
func (b *Buffer) Grow(s int) { if s < 0 { panic("cannot grow to negative value") } n := len(b.B) + s for cap(b.B) < n { b.B = append(b.B, 0) } b.B = b.B[:n] }
[ -0.1555977314710617, 0.630099356174469, 0.7273780703544617, 1.0820332765579224, 0.2095545530319214, 1.056243658065796, -0.08399737626314163, -0.5786663293838501, 0.5408501029014587, -1.2075889110565186, -0.8106275200843811, 0.49019718170166016, -0.37002748250961304, 0.22149261832237244, ...
func Acquire() *Buffer { v := pool.Get() if v == nil { return &Buffer{ B: make([]byte, 0, defaultByteBufferSize), } } return v.(*Buffer) }
[ 0.6549645662307739, -0.5675297975540161, 0.5090182423591614, 0.19144326448440552, 1.3777674436569214, -0.37609294056892395, -0.15845957398414612, -1.055206298828125, 0.8093670606613159, -2.338686466217041, -0.1335229128599167, 1.185654878616333, -1.063391923904419, 0.6102403998374939, 0....
func Release(b *Buffer) { b.B = b.B[:0] pool.Put(b) }
[ -0.5710737705230713, 0.4897361993789673, 0.4189295768737793, -0.2997475266456604, 0.48909658193588257, 0.5120371580123901, 0.5498422980308533, -0.5772889256477356, 0.2944759428501129, -0.37399765849113464, -0.7625434398651123, 1.151090145111084, -1.9453226327896118, 0.14626143872737885, ...
func (e *With32FieldsFeatureTransformer) Fit(s []With32Fields) { if e == nil || len(s) == 0 { return } dataNum := make([]float64, len(s)) for i, v := range s { dataNum[i] = float64(v.Name1) } e.Name1.Fit(dataNum) for i, v := range s { dataNum[i] = float64(v.Name2) } e.Name2.Fit(dataNum) for i, v :...
[ -0.2034263163805008, -0.15034516155719757, 0.8859503269195557, -0.5729619264602661, -0.4297367334365845, -0.08905113488435745, 0.5190683603286743, 0.4802464246749878, -0.3933052122592926, -0.044069498777389526, -1.3208930492401123, -0.11404004693031311, 0.3459250032901764, 0.35866707563400...
func (e *With32FieldsFeatureTransformer) Transform(s *With32Fields) []float64 { if s == nil || e == nil { return nil } features := make([]float64, e.NumFeatures()) e.TransformInplace(features, s) return features }
[ -0.669646143913269, 0.6342664361000061, 0.4654037654399872, -0.06360489130020142, 0.7135726809501648, -1.0471471548080444, 0.5382879972457886, 0.5191269516944885, 0.3047099709510803, -0.32710886001586914, -1.9410152435302734, -0.33139097690582275, 0.17096580564975739, 0.4152478873729706, ...
func (e *With32FieldsFeatureTransformer) TransformInplace(dst []float64, s *With32Fields) { if s == nil || e == nil || len(dst) != e.NumFeatures() { return } idx := 0 dst[idx] = e.Name1.Transform(float64(s.Name1)) idx++ dst[idx] = e.Name2.Transform(float64(s.Name2)) idx++ dst[idx] = e.Name3.Transform(float...
[ -0.4909623861312866, 0.20924396812915802, 0.8517135977745056, -1.4525234699249268, -0.4131760597229004, -0.27501535415649414, 0.47118496894836426, 0.6801295876502991, 0.1031249612569809, 0.7202580571174622, -1.3271899223327637, -0.26473191380500793, 0.38997912406921387, 0.2670438289642334,...
func (e *With32FieldsFeatureTransformer) TransformAll(s []With32Fields) []float64 { if e == nil { return nil } features := make([]float64, len(s)*e.NumFeatures()) e.TransformAllInplace(features, s) return features }
[ 0.561866283416748, 0.5001295804977417, 0.6299651265144348, 0.10485807061195374, 0.3139806389808655, -0.20880210399627686, -0.05729500204324722, 0.8341383934020996, 0.4417933225631714, -0.2197118103504181, -1.0631179809570312, 0.15545324981212616, -0.009865975938737392, 0.914198100566864, ...
func (e *With32FieldsFeatureTransformer) TransformAllInplace(dst []float64, s []With32Fields) { if e == nil { return } n := e.NumFeatures() if len(dst) != n*len(s) { return } for i := range s { e.TransformInplace(dst[i*n:(i+1)*n], &s[i]) } }
[ 0.2377983182668686, 0.5264236330986023, 0.6136080026626587, -0.23241448402404785, -0.23702332377433777, -0.052680984139442444, 0.003400981891900301, 0.9518567323684692, 0.2158188819885254, 0.06246968358755112, -0.872246503829956, 0.3056936264038086, -0.043282002210617065, 0.661524116992950...
func (e *With32FieldsFeatureTransformer) TransformAllParallel(s []With32Fields, nworkers uint) []float64 { if e == nil { return nil } features := make([]float64, len(s)*e.NumFeatures()) e.TransformAllInplaceParallel(features, s, nworkers) return features }
[ 0.6230775117874146, 0.7024264335632324, 0.5934094786643982, 0.25801026821136475, -0.3454882502555847, -0.07403861731290817, 0.2798260748386383, 1.214611291885376, 0.8196672797203064, -0.22251027822494507, -0.9544985294342041, 0.17249776422977448, -0.7779490351676941, 0.633019208908081, -...
func (e *With32FieldsFeatureTransformer) TransformAllInplaceParallel(dst []float64, s []With32Fields, nworkers uint) { if e == nil || nworkers == 0 { return } ns := uint(len(s)) nf := uint(e.NumFeatures()) if uint(len(dst)) != nf*ns { return } nbatch := ns / nworkers var wg sync.WaitGroup for i := uint(0...
[ 0.20267097651958466, 1.0181281566619873, 0.6486902236938477, -0.2960180938243866, -0.5982661843299866, 0.03155387565493584, 0.4430488646030426, 0.7368078231811523, 0.15288600325584412, 0.08755801618099213, -0.40481290221214294, 0.16226214170455933, -0.9550901651382446, 0.5719638466835022, ...
func (e *With32FieldsFeatureTransformer) NumFeatures() int { if e == nil { return 0 } count := 31 return count }
[ 0.1833489090204239, 0.5888541340827942, 0.3691515326499939, -0.0948980376124382, 0.4870426654815674, -0.03918934985995293, 0.8380326628684998, 0.3294943869113922, 0.8226214051246643, -0.7482077479362488, -1.7195979356765747, -1.0787888765335083, -0.31360316276550293, 0.5175223350524902, ...
func (e *With32FieldsFeatureTransformer) FeatureNames() []string { if e == nil { return nil } idx := 0 names := make([]string, e.NumFeatures()) names[idx] = "Name1" idx++ names[idx] = "Name2" idx++ names[idx] = "Name3" idx++ names[idx] = "Name4" idx++ names[idx] = "Name5" idx++ names[idx] = "Nam...
[ -0.24806968867778778, 0.12121818214654922, 0.72042316198349, -1.1064649820327759, -0.3324528932571411, -0.062423981726169586, 0.3019944429397583, 0.1393793374300003, -0.016994725912809372, 0.4613916873931885, -1.0583150386810303, -0.4360043704509735, 0.05425437167286873, 0.2744383215904236...
func newSignalFxExporter( config *Config, logger *zap.Logger, ) (component.MetricsExporter, error) { if config == nil { return nil, errors.New("nil config") } options, err := config.getOptionsFromConfig() if err != nil { return nil, fmt.Errorf("failed to process %q config: %v", config.Name(), err) } h...
[ 1.270471215248108, 0.15074655413627625, 0.6892021894454956, 0.550751268863678, -1.1059149503707886, -0.3994072675704956, -0.11089674383401871, -0.7439671754837036, -0.11842483282089233, 0.16777001321315765, -0.14829464256763458, -0.04388293996453285, -0.1265564262866974, 0.8514685034751892...
func GetConformationCode() string { rand.Seed(time.Now().UTC().UnixNano()) code := strconv.Itoa(rand.Intn(100)) + strconv.Itoa(rand.Intn(1000)) return code }
[ -0.5219643115997314, -0.6400291323661804, 0.5995047688484192, -0.658414363861084, 0.49879488348960876, -0.20027251541614532, 0.5134062170982361, 0.64085453748703, 0.17409296333789825, -0.054636240005493164, 0.4687405824661255, -0.11575353145599365, 0.4412343204021454, 0.9792512059211731, ...
func GetIP() string { ifaces, _ := net.Interfaces() // handle err for _, i := range ifaces { addrs, _ := i.Addrs() for _, addr := range addrs { switch v := addr.(type) { case *net.IPNet: return v.IP.String() case *net.IPAddr: return v.IP.String() } } } return "" }
[ -0.6939560174942017, 0.3184657394886017, 0.7963874936103821, 0.7798281908035278, -0.6283630728721619, 0.1530899703502655, 0.032024964690208435, 0.013476924039423466, 0.16248007118701935, 0.023247575387358665, 0.9683704972267151, -0.6859418749809265, 0.3220078647136688, -0.6970077753067017,...
func NewUpdateTimezoneSettingsParams() *UpdateTimezoneSettingsParams { var () return &UpdateTimezoneSettingsParams{ timeout: cr.DefaultTimeout, } }
[ -1.2456539869308472, 0.18520019948482513, -0.13506250083446503, 1.0259428024291992, -0.9371622800827026, -0.12988337874412537, 0.7097642421722412, 0.4354076385498047, -0.5666528344154358, 1.4601154327392578, -0.5015933513641357, -0.3592193126678467, -0.8665328025817871, 0.36491507291793823...
func NewUpdateTimezoneSettingsParamsWithTimeout(timeout time.Duration) *UpdateTimezoneSettingsParams { var () return &UpdateTimezoneSettingsParams{ timeout: timeout, } }
[ -0.47710585594177246, 0.03644810989499092, 0.14760205149650574, 0.9343850016593933, -0.8898190259933472, 0.6632043123245239, -0.16706305742263794, 0.14877229928970337, -0.6019455194473267, 2.1239893436431885, -0.2245633751153946, 0.07087399810552597, -0.6655187010765076, 0.2491080760955810...
func NewUpdateTimezoneSettingsParamsWithContext(ctx context.Context) *UpdateTimezoneSettingsParams { var () return &UpdateTimezoneSettingsParams{ Context: ctx, } }
[ -0.9409866333007812, 0.00949085969477892, 0.44877228140830994, 0.47525522112846375, -0.8202950954437256, 0.6241368651390076, -0.2779964506626129, -0.5804027318954468, -0.3887506127357483, 1.8092455863952637, -0.5042341351509094, -0.1569422334432602, -0.6368523240089417, -0.3040397465229034...
func NewUpdateTimezoneSettingsParamsWithHTTPClient(client *http.Client) *UpdateTimezoneSettingsParams { var () return &UpdateTimezoneSettingsParams{ HTTPClient: client, } }
[ -1.2750331163406372, 0.03789832442998886, 0.1691075712442398, 0.6698055863380432, -0.6169576048851013, 0.3582780659198761, 0.6962611675262451, -0.011874891817569733, -0.8626046180725098, 1.2712761163711548, -0.5016899704933167, -0.41123300790786743, -0.5009051561355591, -0.1188763901591301...
func (o *UpdateTimezoneSettingsParams) WithTimeout(timeout time.Duration) *UpdateTimezoneSettingsParams { o.SetTimeout(timeout) return o }
[ -0.6615204811096191, 0.4719160497188568, 0.17331849038600922, 0.277417927980423, -0.9879060387611389, 0.11995669454336166, 0.333812415599823, -0.1414213478565216, 0.35273733735084534, 1.9936274290084839, -0.037356384098529816, -0.40592437982559204, -0.4658246636390686, 0.17393575608730316,...
func (o *UpdateTimezoneSettingsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ -1.314530372619629, 0.6271411776542664, 0.10789729654788971, 0.5438886880874634, -0.5471705794334412, 0.6239783763885498, 0.5215084552764893, 0.12253876030445099, -0.02257457748055458, 2.071404457092285, -0.32307568192481995, -0.4317709803581238, -1.0769866704940796, 0.3791147470474243, ...
func (o *UpdateTimezoneSettingsParams) WithContext(ctx context.Context) *UpdateTimezoneSettingsParams { o.SetContext(ctx) return o }
[ -1.5648568868637085, 0.49220767617225647, 0.3830606937408447, 0.05896596238017082, -0.9574409127235413, 0.007348896469920874, -0.07730522006750107, -0.9778497219085693, 0.623670220375061, 1.8063238859176636, -0.2531091272830963, -0.747105598449707, -0.9930911660194397, -0.3943660259246826,...
func (o *UpdateTimezoneSettingsParams) SetContext(ctx context.Context) { o.Context = ctx }
[ -1.9886248111724854, 0.6771461367607117, 0.16921192407608032, 0.5391178131103516, -0.2977096736431122, 0.30401426553726196, 0.24049389362335205, -0.6119293570518494, 0.7545676231384277, 1.752231240272522, -0.5102846622467041, -0.6100815534591675, -1.2631570100784302, -0.0003904315526597202...
func (o *UpdateTimezoneSettingsParams) WithHTTPClient(client *http.Client) *UpdateTimezoneSettingsParams { o.SetHTTPClient(client) return o }
[ -1.2694264650344849, -0.3697144687175751, 0.23284706473350525, -0.0066392445005476475, -0.7166956663131714, -0.09914959222078323, 0.7782043814659119, -0.7095603942871094, -0.28418630361557007, 1.1757659912109375, -0.28229188919067383, -0.6060031056404114, -0.33980634808540344, -0.386843293...
func (o *UpdateTimezoneSettingsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ -1.321610927581787, 0.07420768588781357, 0.21356454491615295, -0.24254928529262543, -0.9543519616127014, -0.0895916000008583, 0.9795799255371094, -0.5040103197097778, -0.6379557251930237, 1.3440102338790894, -0.8599169850349426, -0.22716312110424042, -1.0845929384231567, -0.326663523912429...
func (o *UpdateTimezoneSettingsParams) WithTimezoneSettings(timezoneSettings *models.TimezoneRegionTimezone) *UpdateTimezoneSettingsParams { o.SetTimezoneSettings(timezoneSettings) return o }
[ -0.9156116247177124, 0.12985795736312866, 0.09026288241147995, 0.3163389563560486, -0.9857378602027893, -0.6999237537384033, 0.4413755536079407, -0.7411094307899475, 1.0648949146270752, 1.474001169204712, -0.21086238324642181, -1.5548593997955322, -1.1190677881240845, -0.38200587034225464,...
func (o *UpdateTimezoneSettingsParams) SetTimezoneSettings(timezoneSettings *models.TimezoneRegionTimezone) { o.TimezoneSettings = timezoneSettings }
[ -1.4363294839859009, 0.10242854803800583, 0.11622920632362366, 0.17329354584217072, -0.8251633048057556, -0.2878161668777466, 0.6118677854537964, -0.5541009902954102, 0.6892861723899841, 1.7089084386825562, -0.7676979899406433, -1.1318014860153198, -1.5165011882781982, -0.2087469846010208,...
func (o *UpdateTimezoneSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.TimezoneSettings != nil { if err := r.SetBodyParam(o.TimezoneSettings); err != nil { return err } } if len(res) ...
[ -1.7827534675598145, 0.23601356148719788, 0.6182295083999634, -0.0918065533041954, 0.5779709815979004, -0.16077911853790283, 1.0699033737182617, -0.12982375919818878, -0.3219045102596283, 1.3059866428375244, 0.22716091573238373, -0.041405871510505676, -1.0835195779800415, -0.02382631227374...
func main() { //simple from string t, err := template.New("foo").Parse(` {{define "T"}} {{.}} <a title='{{.}}'> <a href="/{{.}}"> <a href="?q={{.}}"> <a on='f("{{.}}")'> <a on='f({{.}})'> <a on='pattern = /{{.}}/;'> {{end}} `) // now try to bypass our template with wimple injection: err = t.ExecuteTemplate(os.Stdo...
[ 0.7815163135528564, -0.20347973704338074, 0.9557451605796814, 0.10952888429164886, -0.29339829087257385, -0.15822866559028625, -0.2527027726173401, 0.16897231340408325, -0.4485761225223541, 0.0256799329072237, -0.7428248524665833, 0.6670321822166443, -0.18088683485984802, -0.47357603907585...
func ProcessRecords(records [][]string, headers []string, headerMap map[string]int) (Result, error) { result := Result{} field := models.Fields{} validRecords := [][]string{} inValidRecords := [][]string{} emailMap := map[string]string{} for _, record := range records { err := field.FormData(record, headerMap) ...
[ -0.548427164554596, -0.16748809814453125, 1.0009816884994507, -0.6901542544364929, 0.2067338228225708, 0.05277866870164871, 0.007713952101767063, 0.20821034908294678, -0.38348105549812317, 0.5119537711143494, 0.0523897185921669, -0.537777304649353, -1.074720025062561, -0.004387073218822479...
func TestFlip(t *testing.T) { testCases := []struct { input, expected string }{ {"GO je úžasné!", "!énsažú ej OG"}, {"golang", "gnalog"}, {"", ""}, {"x", "x"}, } for _, test := range testCases { observed := Flip(test.input) if strings.Compare(test.expected, observed) != 0 { t.Errorf("for input '%s'...
[ -0.6086958050727844, 0.4910050928592682, 0.4832465648651123, -0.3433462977409363, -0.26746922731399536, 1.1362971067428589, 0.5510115027427673, 0.5487152934074402, -0.3047431409358978, -0.5588881373405457, -0.01644006557762623, 0.34887656569480896, 0.20163047313690186, 0.7020394206047058, ...
func BenchmarkFlip(b *testing.B) { for i := 0; i <= b.N; i++ { _ = Flip("GO je úžasné!") } }
[ -0.6520808339118958, 1.1575790643692017, 0.3435882329940796, 0.22485993802547455, 0.37469854950904846, -0.020937733352184296, 1.16423761844635, 0.14804673194885254, -0.7677655816078186, 0.3170035779476166, -0.10165910422801971, 0.3864501118659973, -0.08436252921819687, 0.8247017860412598, ...
func TestPigLatin(t *testing.T) { testCases := []struct { input, expected string err error }{ {"pig", "igpay", nil}, {"banana", "ananabay", nil}, {"duck", "uckday", nil}, {"adi", "adiway", nil}, {"", "", errors.New("cannot translate an empty string")}, } for _, test := range testCases { ...
[ 0.513396143913269, 0.35356804728507996, 0.37537068128585815, -1.0420185327529907, 0.417275995016098, 0.5166311264038086, 0.014649731107056141, 0.26317402720451355, -0.0929422527551651, -0.5407007932662964, -0.5596871376037598, 0.22548042237758636, -0.6213087439537048, -0.24239487946033478,...
func BenchmarkPigLatin(b *testing.B) { for i := 0; i < b.N; i++ { PigLatin("duck") } }
[ 0.22674955427646637, 0.5776835083961487, 0.2127857357263565, -1.1585097312927246, 0.8190309405326843, 0.11586272716522217, -0.06353826820850372, 0.2626834511756897, -0.7686579823493958, 0.35178452730178833, -0.613121747970581, 0.30057886242866516, -0.32839202880859375, 0.1996878981590271, ...
func convert_seccompProfile(profiles []string) uint8 { // upstream: check_seccompProfile // baseline: // allows(1.0) (annotation values): // 'runtime/default' // 'docker/default' // 'localhost/*' // undefined // allows(1.19) (field values - type): // RuntimeDefault // Local...
[ 0.39531317353248596, -0.1372857540845871, 0.7816857099533081, 0.4048634469509125, 0.09189388155937195, 0.0022248108871281147, 0.3448478579521179, -0.3929576277732849, 0.34252503514289856, 0.1225501149892807, -0.5371065139770508, -0.15224529802799225, -1.5333614349365234, 0.0851629003882408...
func parseFile(path string) ([]Hday, error) { // load file content c, err := ioutil.ReadFile(path) if err != nil { return nil, err } var data []Hday s := bufio.NewScanner(bytes.NewReader(c)) for s.Scan() { h, err := NewHday(s.Text()) if err != nil { return nil, err } data = append(data, h) } retu...
[ 0.12121564149856567, 0.6532160043716431, 0.6255828738212585, 0.07095445692539215, -0.2010289877653122, 0.6514741778373718, -0.561163067817688, -0.24504142999649048, -1.0189858675003052, -0.2066284716129303, -0.2638482451438904, -0.024074029177427292, 0.04353120177984238, 0.7879737019538879...
func InsertRemind(userID string, content string) (Remind, error) { insertSQLStatement := ` INSERT INTO reminds (content, user_id) VALUES ($1, $2) RETURNING remind_id;` var remind Remind row := db.QueryRow(insertSQLStatement, content, userID) err := row.Scan(&remind.RemindID) if err != nil { return remin...
[ -0.5360350012779236, -0.3322699964046478, 0.4255465567111969, -0.6554381251335144, -0.3547518253326416, 0.6511912941932678, -0.2823506295681, -0.08815004676580429, -0.2728949189186096, 0.2623468041419983, -0.6372782588005066, 0.24828016757965088, -1.9265998601913452, 0.259324848651886, 0...
func GetUserLastRemind(userID string) (Remind, error) { selectSQL := ` SELECT remind_id, content FROM reminds WHERE user_id=$1 ORDER BY remind_id DESC LIMIT 1;` var remind Remind row := db.QueryRow(selectSQL, userID) err := row.Scan(&remind.RemindID, &remind.Content) if err != nil { if remind.Conte...
[ 0.025990165770053864, -0.3369523584842682, 0.6399309635162354, -0.5056960582733154, -0.11593249440193176, -0.1691933572292328, -0.2991698980331421, -0.5962074398994446, 0.8637779355049133, 0.6624963283538818, -0.6905952095985413, 0.3499322235584259, -0.7900022864341736, 0.3314741253852844,...
func GetUserReminds(ctx context.Context, userID string) ([]Remind, error) { selectSQL := ` SELECT remind_id, content FROM reminds WHERE user_id=$1 ORDER BY remind_id ASC;` var reminds []Remind rows, err := db.QueryContext(ctx, selectSQL, userID) if err != nil { return reminds, err } for rows.Next() ...
[ -0.4050637185573578, -0.26631805300712585, 0.42684200406074524, 0.27706480026245117, -0.05395939573645592, -0.09271503984928131, -0.5038095116615295, -0.7293908596038818, 0.6073126792907715, 0.3574528098106384, -0.8061937093734741, 0.8697420954704285, -0.5497887134552002, 1.180594205856323...
func DeleteRemind(ctx context.Context, remindID string, userID string) error { deleteSQL := ` DELETE FROM reminds WHERE remind_id = $1 AND user_id = $2;` _, err := db.QueryContext(ctx, deleteSQL, remindID, userID) if err != nil { return err } return nil }
[ -0.0015496801352128386, -0.3934248089790344, 0.41903725266456604, -0.25916776061058044, 0.0005911385524086654, 0.756768524646759, -0.7305788397789001, 0.4548139274120331, 0.16333439946174622, 0.16166475415229797, 0.1414783000946045, 1.64349365234375, -0.7218549251556396, 0.9691625237464905...
func DeserializePropertiesFromBytes(rawResponse []byte, resMap map[string][]interface{}) (err error) { var metaResponse GList if len(rawResponse) == 0 { return } dec := json.NewDecoder(bytes.NewReader(rawResponse)) dec.DisallowUnknownFields() if err = dec.Decode(&metaResponse); err != nil { return } if met...
[ -0.10588794946670532, -1.0449930429458618, 0.6286281943321228, -0.5686309337615967, -0.5727239847183228, -0.24228763580322266, -0.07484588027000427, 0.1438758820295334, 0.9025284051895142, 0.4308900237083435, -0.7038441300392151, -0.7237952947616577, -0.2605436146259308, -0.830690026283264...
func DeserializeStringListFromBytes(rawResponse []byte) (vals []string, err error) { var metaResponse GList if len(rawResponse) == 0 { err = errors.New("DeserializeStringListFromBytes: nothing to decode") return } dec := json.NewDecoder(bytes.NewReader(rawResponse)) dec.DisallowUnknownFields() if err = dec.De...
[ -0.645767331123352, -0.8475322723388672, 0.5518803596496582, -0.7716851830482483, -0.5707235336303711, -0.6448550820350647, -0.7941339612007141, 0.36960095167160034, 0.7963866591453552, 0.4683467745780945, -0.6166520714759827, -0.8141307234764099, 0.0058729867450892925, 0.37138935923576355...
func DeserializeSingleFromBytes(rawResponse []byte) (gV GenericValue, err error) { var metaResponse GList if len(rawResponse) == 0 { err = errors.New("DeserializeSingleFromBytes: nothing to decode") return } dec := json.NewDecoder(bytes.NewReader(rawResponse)) dec.DisallowUnknownFields() if err = dec.Decode(&...
[ -0.3254092037677765, -0.025248292833566666, 0.7518830895423889, -0.4416492283344269, -0.6100054979324341, -0.14241331815719604, 0.1598743051290512, 0.607356607913971, 0.5759865641593933, -0.1306138038635254, -0.449856698513031, -0.15263788402080536, -0.11050654947757721, 0.1905688792467117...
func DeserializeNumber(rawResponse []byte) (count int64, err error) { var genVal GenericValue if genVal, err = DeserializeSingleFromBytes(rawResponse); err != nil { return } if genVal.Type != "g:Int64" { err = errors.New("DeserializeNumber: Expected `g:Int64` type") return } count = int64(genVal.Value.(flo...
[ -0.17084833979606628, 0.11688695847988129, 0.7763327360153198, 0.35028648376464844, -0.17686252295970917, -0.8110499978065491, 0.7042534351348877, 0.7576150298118591, 0.05840298533439636, -0.6904721856117249, -0.3768356740474701, -0.8116065263748169, -0.157642662525177, 0.38173824548721313...
func (k ConfigKey) String() string { return string(k) }
[ -0.5307745337486267, -0.4804740846157074, -0.2651386559009552, 0.08728747814893723, -0.7498769760131836, 0.8363469243049622, 0.1450124979019165, -0.28909194469451904, -0.6068500876426697, 1.2780712842941284, -0.3512689769268036, -0.14753614366054535, -0.40639519691467285, 0.180184766650199...
func getSolveOpt(buildOptions *types.BuildOptions) (*client.SolveOpt, error) { var localDirs map[string]string var frontendAttrs map[string]string if uri, err := url.ParseRequestURI(buildOptions.Path); err != nil || (uri != nil && (uri.Scheme == "" || uri.Host == "")) { if buildOptions.File == "" { buildOptio...
[ -0.29159000515937805, -0.49506211280822754, 0.9650221467018127, 0.31638485193252563, 0.20643503963947296, -0.03410818800330162, 0.6748811602592468, -0.8810099959373474, 0.07118979096412659, -0.019883595407009125, 0.005347443278878927, 0.5720939040184021, -0.11175090819597244, 0.18634261190...
func Mode(e *editarea.EditArea) string { switch e.Mode { case editarea.ModeNormal: return "Normal" case editarea.ModeInsert: return "Insert" default: return "Error: unimplemented" } }
[ -1.68840491771698, -0.18735292553901672, 0.5572218298912048, -0.8977833390235901, -0.19141505658626556, 1.0745580196380615, 0.21610027551651, 0.1474050134420395, -0.06471516191959381, 1.3785666227340698, 0.560779333114624, -0.7406530976295471, 0.4479774534702301, 0.9369059205055237, 0.78...
func Filename(e *editarea.EditArea) string { _, fn := filepath.Split(e.Filename) if e.Saved() { return fn } return fn + " *" }
[ -0.4799829125404358, -0.8490374684333801, 0.5650547742843628, 0.1949060559272766, -0.12219984084367752, -0.3498571217060089, 0.9973381161689758, 1.2395524978637695, 0.12339664995670319, 0.696750283241272, 0.4551559090614319, -0.38415271043777466, 0.6601942777633667, 0.25808581709861755, ...
func GitBranch(e *editarea.EditArea) string { cmdOut, err := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD").Output() if err != nil { return "" } return string(cmdOut) }
[ 0.4256628751754761, -0.37496742606163025, 0.7759807705879211, -0.32475921511650085, 0.1352718621492386, 1.0537017583847046, -0.11359036713838577, -0.6712111234664917, -0.37950319051742554, 0.2701449990272522, 0.31958529353141785, 0.7164304256439209, -0.3607367277145386, 0.7423431873321533,...
func DiskFreeSpace(path string) uint64 { fs := syscall.Statfs_t{} err := syscall.Statfs(path, &fs) if err != nil { return 0 } return fs.Bfree * uint64(fs.Bsize) }
[ 0.01965952292084694, 0.6540021300315857, 0.5908032655715942, 0.3317784368991852, -0.23490877449512482, -0.899578332901001, 0.6658483743667603, -0.2716413736343384, 0.6304935812950134, -0.6104487776756287, -0.040794868022203445, -0.29663658142089844, -0.042144887149333954, 1.184006571769714...
func DecodeStore(cdc *codec.Codec, kvA, kvB kv.Pair) string { switch { case bytes.HasPrefix(kvA.Key, types.ProfileStorePrefix): var profileA, profileB types.Profile cdc.MustUnmarshalBinaryBare(kvA.Value, &profileA) cdc.MustUnmarshalBinaryBare(kvB.Value, &profileB) return fmt.Sprintf("ProfileA: %s\nProfileB: %...
[ -0.1075044497847557, -0.47647595405578613, 0.5583447217941284, -0.6360421180725098, -0.8333204984664917, -0.30038413405418396, 0.1322384625673294, -0.5704657435417175, -0.016739990562200546, -0.4470885694026947, 0.5579267144203186, -0.15620146691799164, -0.2250790297985077, 0.0629938915371...
func (s *Support) Execute(args []string) error { return createSwagger(s) }
[ 0.016451217234134674, 0.3837694525718689, 0.39296382665634155, 1.0482265949249268, 0.5662946701049805, 0.4926060438156128, -0.7347006797790527, 0.408145934343338, -0.0536307618021965, 0.4287325441837311, -0.9291085600852966, -0.9684813618659973, -0.9894869923591614, 0.15203087031841278, ...
func getSinceTime(path string) time.Time { if _, err := os.Stat(path); err == nil { sinceTime, err := ioutil.ReadFile(path) if err != nil { log.Println("read sinceTime error:", err) } return time.Unix(BytesToInt64(sinceTime), 0) } return time.Now() }
[ 0.12500113248825073, -0.139328271150589, 1.106722116470337, -0.03819384053349495, -0.6873989105224609, 0.22029434144496918, 0.019168449565768242, 0.3560437858104706, -0.6126506328582764, 0.2756609618663788, -0.14192664623260498, -0.019166696816682816, -0.8915753364562988, 0.415169894695282...
func (p *Listener) Accept() (net.Conn, error) { p.initOnce.Do(p.init) // Get the underlying connection rawc, err := p.Listener.Accept() if err != nil { return nil, err } go func() { c, err := newConn(rawc) if err != nil { p.connc <- err } else { p.connc <- c } }() v := <-p.connc if c, ok := v.(...
[ -0.24264183640480042, -0.7648724913597107, 0.8139631152153015, -0.24889902770519257, 0.11816468089818954, -0.009637313894927502, 0.011245655827224255, 0.3613710105419159, -0.8489933013916016, -0.1610487699508667, 0.3237951993942261, -0.1792697310447693, -0.10969851166009903, 0.933737277984...
func (p *Listener) Close() error { return p.Listener.Close() }
[ 0.47176098823547363, -0.9318240880966187, 0.10927414149045944, -0.3773079216480255, -0.30314213037490845, 1.5550308227539062, -0.4716542661190033, -0.7545067071914673, -0.7273495197296143, -0.40851202607154846, 0.8304920196533203, -0.33479955792427063, -1.2406384944915771, 0.64730000495910...
func (p *Listener) Addr() net.Addr { return p.Listener.Addr() }
[ 0.7159044146537781, -1.1443856954574585, 0.21535716950893402, 0.21141421794891357, -0.5222411155700684, 1.3597773313522339, -0.15010027587413788, 0.08454716205596924, 0.5807258486747742, -0.8510845303535461, 1.4075415134429932, 0.042099084705114365, 0.05238642171025276, 0.4517999291419983,...
func (p *conn) Read(b []byte) (int, error) { var err error p.once.Do(func() { err = p.checkPrefix() }) if err != nil { return 0, err } return p.bufReader.Read(b) }
[ -0.27217787504196167, 0.10659368336200714, 0.6771776080131531, 0.2170189768075943, 0.18883591890335083, -0.09666041284799576, 0.41031414270401, 0.30306950211524963, -0.26658895611763, -0.37340110540390015, -0.1543721705675125, 0.20688453316688538, -1.4904388189315796, 0.08813328295946121, ...
func (p *conn) RemoteAddr() net.Addr { if p.srcAddr != nil { return p.srcAddr } return p.conn.RemoteAddr() }
[ 0.5540903210639954, -0.7400914430618286, 0.46474897861480713, -0.32008063793182373, -0.7457848787307739, 0.6548725962638855, -0.6067253947257996, 0.44300419092178345, 0.9813554883003235, -0.3191142976284027, 0.5495696663856506, 0.6329760551452637, -0.9153360724449158, 0.3406687378883362, ...
func IsSupportTLS() bool { return atomic.LoadUint32(&isDisableClientSideTLS) == 0 }
[ 0.25927475094795227, 0.9295287728309631, 0.31517061591148376, -0.43922120332717896, -1.304344654083252, 0.7110324501991272, -0.6112492680549622, 0.3850094974040985, 0.04561211168766022, 0.4814895689487457, -1.038008213043213, -0.6564254760742188, -0.9766966700553894, 0.21942363679409027, ...
func setup(slot int, capacity int, fpr float64) { saltfilter = NewBloomRing(slot, capacity, fpr) }
[ 0.4668198227882385, 0.11679442226886749, 0.23926739394664764, -0.6916595697402954, -0.2904251515865326, -0.09799646586179733, 0.5308374762535095, -0.41293370723724365, -0.7525317072868347, 0.11902976036071777, -0.10251568257808685, 0.7634607553482056, -0.3250783085823059, -0.13140666484832...
func TestSalt(b []byte) bool { // If nil means feature disabled, return false to bypass salt repeat detection if saltfilter == nil { return false } return saltfilter.Test(b) }
[ -0.1992204785346985, 0.5363372564315796, 0.5181013941764832, 0.048660218715667725, -0.3709530532360077, 0.6356598734855652, 0.08013912290334702, 0.3169790208339691, 1.1637035608291626, -0.33426550030708313, -0.647106945514679, -0.30246055126190186, -1.2137514352798462, 0.5855953097343445, ...
func AddSalt(b []byte) { // If nil means feature disabled if saltfilter == nil { return } saltfilter.Add(b) }
[ 0.31281590461730957, 0.7004579901695251, 0.4638960063457489, 0.5273885726928711, -0.0877053290605545, 0.9614850282669067, -0.919388473033905, 0.5106189250946045, 1.5609631538391113, -0.735907256603241, -0.3884443938732147, 0.3854624629020691, -0.9518019556999207, 0.8311840891838074, -0.1...
func (cs *ConsensusSet) checkCurrentPath() error { // Check is too slow to be done on a full node. if build.Release == "standard" { return nil } currentNode := cs.currentProcessedBlock() for i := cs.height(); i != 0; i-- { // The block should be in the block map. exists := cs.db.inBlockMap(currentNode.Block...
[ 0.1264692097902298, -0.6905494332313538, 0.5761488080024719, 0.5247828960418701, 0.06202705204486847, 0.002701616147533059, 0.6591659188270569, -0.15481826663017273, -1.1202634572982788, 0.7004037499427795, 0.35160112380981445, -0.013767961412668228, -0.8815691471099854, 0.7439839839935303...
func (cs *ConsensusSet) checkDelayedSiacoinOutputMaps() error { expected := uint64(0) for i := cs.height() + 1; i <= cs.height()+types.MaturityDelay; i++ { if !(i > types.MaturityDelay) { continue } exists := cs.db.inDelayedSiacoinOutputs(i) if !exists { return errors.New("delayed siacoin outputs are in...
[ -0.06466737389564514, -0.744347870349884, 0.5891457796096802, 0.13648180663585663, 0.08724475651979446, -0.2774820923805237, 1.1682816743850708, 0.10336673259735107, -0.45044708251953125, -0.9746934175491333, 0.7215935587882996, -1.2142494916915894, -0.21165664494037628, 0.1761646419763565...
func (cs *ConsensusSet) checkSiacoins() error { // Calculate the number of expected coins in constant time. deflationBlocks := types.InitialCoinbase - types.MinimumCoinbase expectedSiacoins := types.CalculateCoinbase(0).Add(types.CalculateCoinbase(cs.height())).Div(types.NewCurrency64(2)) if cs.height() < types.Blo...
[ -0.15021342039108276, 0.10645124316215515, 0.5725017786026001, -0.050772860646247864, -0.08559931814670563, -1.3946235179901123, 1.012967586517334, 0.14163151383399963, 0.2827082872390747, 0.8899763822555542, 0.14862193167209625, -0.2948850095272064, -0.002699345350265503, 0.13276965916156...
func (cs *ConsensusSet) checkSiafunds() error { totalSiafunds := types.ZeroCurrency cs.db.forEachSiafundOutputs(func(sfoid types.SiafundOutputID, sfo types.SiafundOutput) { totalSiafunds = totalSiafunds.Add(sfo.Value) }) if totalSiafunds.Cmp(types.SiafundCount) != 0 { return errSiafundMiscount } return nil }
[ 0.7665992975234985, -0.585233747959137, 0.4058471620082855, 0.19845664501190186, 0.17377090454101562, -1.1800339221954346, 0.831174910068512, 0.4718626141548157, 1.0687651634216309, -0.0024519390426576138, 0.9190510511398315, -1.027071237564087, -0.36669373512268066, 0.8718999028205872, ...
func (cs *ConsensusSet) consensusSetHash() crypto.Hash { // Check is too slow to be done on a full node. if build.Release == "standard" { return crypto.Hash{} } // Items of interest: // 1. genesis block // 3. current height // 4. current target // 5. current depth // 6. current path + diffs // (7) earliest...
[ 0.9954785704612732, -0.10753940045833588, 0.6104776859283447, 0.13773706555366516, -0.18904180824756622, -0.5364171862602234, 0.6510653495788574, -0.1481029987335205, -0.7241310477256775, 0.1441708207130432, 0.01991802267730236, 0.05847014859318733, 0.010874868370592594, 0.2001665085554123...
func (cs *ConsensusSet) checkRewindApply() error { // Do nothing if the DEBUG flag is not set. if !build.DEBUG { return nil } // Rewind a block, check that the consensus set hash after rewiding is the // same as it was before the current block was added, then reapply the // block and check that the new consens...
[ 0.5294999480247498, -0.07833722978830338, 0.5971089601516724, 0.03969213366508484, -0.02131159044802189, -0.3989824950695038, 0.3864861726760864, -0.10657311230897903, -0.029780950397253036, -0.04261433705687523, 0.3655134439468384, 0.9095237851142883, -0.8661884665489197, 1.11386001110076...
func (cs *ConsensusSet) checkConsistency() error { err := cs.checkCurrentPath() if err != nil { return err } err = cs.checkDelayedSiacoinOutputMaps() if err != nil { return err } err = cs.checkSiacoins() if err != nil { return err } err = cs.checkSiafunds() if err != nil { return err } err = cs.che...
[ -0.41378527879714966, -0.588800311088562, 0.7213051915168762, 0.6801081895828247, 0.8365681171417236, -0.18989938497543335, 0.8028528094291687, 0.5590821504592896, -0.4779651165008545, 0.4037586748600006, 1.0878393650054932, -0.9116398096084595, -0.4145706593990326, 0.8435385823249817, 1...
func (mock *SubscriberMock) OnHealthUpdateCalls() []struct { Status string } { var calls []struct { Status string } lockSubscriberMockOnHealthUpdate.RLock() calls = mock.calls.OnHealthUpdate lockSubscriberMockOnHealthUpdate.RUnlock() return calls }
[ 0.39086079597473145, -0.7994830012321472, 0.5010182857513428, 0.7972692251205444, -0.1332554668188095, 0.013940513134002686, -1.4244986772537231, -0.8330754637718201, 0.7495632767677307, -0.08614867925643921, 0.013425339013338089, -0.09239010512828827, -0.9179165363311768, 0.75146561861038...
func LivenessWebService() *restful.WebService { ws := new(restful.WebService) ws. Path("/liveness") ws.Route(ws.GET("/").To(checkHealth)) return ws }
[ 0.6770979166030884, -0.7653875350952148, 0.4825732111930847, 0.38990843296051025, 0.09348300099372864, 0.683159589767456, -0.679591715335846, -0.23690171539783478, 0.3886474668979645, -0.5654850602149963, -0.128856360912323, 0.5696825981140137, -0.8152568936347961, 0.9134244322776794, -1...
func ReadinessWebService() *restful.WebService { ws := new(restful.WebService) ws. Path("/readiness") ws.Route(ws.GET("/").To(checkHealth)) return ws }
[ 0.22421637177467346, -0.3021686375141144, 0.3943217396736145, 0.0857551246881485, 0.10562322288751602, 0.0829608216881752, -0.27272289991378784, -0.3267853260040283, -0.17164970934391022, -0.15332624316215515, -0.2857092320919037, 0.7462522387504578, -0.5135409235954285, 1.0280373096466064...
func (co *CreateOptionsService) Show(hostID int) (*ServerCreateOptions, error) { hostIDStr := strconv.Itoa(hostID) req, err := co.client.NewRequest("GET", "/hosts-create-options/"+hostIDStr, nil) if err != nil { return nil, err } s := ServerCreateOptions{} if err := co.client.DoRequest(req, &s); err != nil { ...
[ -0.5421258211135864, 1.389439344406128, 0.23667995631694794, -1.0791267156600952, 0.4439975321292877, -0.22752271592617035, -0.2249092310667038, -0.7620329856872559, -0.46660909056663513, 0.8747314214706421, -0.7079095244407654, 1.2949479818344116, -0.7797921895980835, 0.7711081504821777, ...
func polynomialFunction(a ...float64) Y { return func(x ...float64) float64 { var y float64 for i, aa := range a { y += aa * math.Pow(x[0], float64(i)) } return y } }
[ 0.828167200088501, -0.15733373165130615, 0.507961094379425, 0.07947680354118347, -0.09071910381317139, -0.3364362418651581, 0.13287803530693054, 0.17618201673030853, 0.3992868959903717, -0.3892614245414734, -0.30628010630607605, 0.43413907289505005, 0.35748645663261414, -1.1654940843582153...
func exponentialFunction(a float64) Y { return func(x ...float64) float64 { return a * math.Exp(x[0]) } }
[ 0.6278404593467712, -0.26499077677726746, 0.37105903029441833, -0.23342329263687134, 0.11915220320224762, -0.5017287731170654, 0.2718517780303955, 0.9066100120544434, 0.394612193107605, 0.18337516486644745, -0.12793658673763275, 0.3821524977684021, 1.011508822441101, -0.3101089298725128, ...
func (g *F) Call(p ...float64) []float64 { coords := make([]float64, len(p)) for i := 0; i < len(p); i++ { coords[i] = g.f[i](p...) } return coords }
[ -0.9015129208564758, 0.8011231422424316, 0.696342945098877, 0.7630146145820618, 0.515251874923706, 1.003736138343811, -0.48934680223464966, -0.14571964740753174, -1.1640121936798096, -0.08374769985675812, 0.5947088599205017, -0.13905687630176544, -0.235255628824234, 0.4215073585510254, -...
func (g Euclidean) Num(num int) model.Collection { l := model.NewSeries(label.Num("x"), label.Num("f(x)")) for i := 0; i < num; i++ { if x, ok, n := g.Next(); ok { p := g.Call(x.Coords[0], 0) l.Add(model.NewVector([]string{"f", fmt.Sprintf("%d", i)}, p...)) if !n { log.Printf("could not generate mor...
[ -0.7236180901527405, 1.352401614189148, 0.590959906578064, -0.30994778871536255, 0.307644248008728, -0.3920294940471649, 0.3267468512058258, -0.7352347373962402, 0.16507463157176971, -0.5317140817642212, -0.29358190298080444, 0.04583386704325676, 0.7654306888580322, 0.04544861614704132, ...
func (g Euclidean) Lim(limit float64) model.Collection { l := model.NewSeries(label.Num("x"), label.Num("f(x)")) i := 0 for { if x, ok, n := g.Next(); ok { p := g.Call(x.Coords[0], 0) l.Add(model.NewVector([]string{"f", fmt.Sprintf("%d", i)}, p...)) if !n { log.Printf("cannot not generate more elem...
[ -0.48390090465545654, 0.4230356514453888, 0.6685092449188232, -0.54096519947052, -0.1077851727604866, 0.09135440737009048, -0.16709686815738678, -0.5416063070297241, 0.17695170640945435, 0.022987686097621918, 0.20515847206115723, 0.31283876299858093, 0.30942466855049133, 0.2213435769081115...
func New() *Fast { // default client defaultRq := rq.Get(endpoint) defaultRq.Set("User-Agent", userAgent) return &Fast{ client: client.New(&client.Option{ DefaultRq: defaultRq, }), } }
[ 0.4467468857765198, -0.05681759864091873, 0.2722860276699066, 0.534662663936615, -0.0762253850698471, -0.8171124458312988, -0.2918488681316376, -0.6371110081672668, -0.41354161500930786, -0.6845012903213501, 0.3395772874355316, -0.22957758605480194, -0.25608426332473755, 0.1485984176397323...
func (f *Fast) Init() (err error) { data, err := getJSFile(f.client) if err != nil { return } url, err := getAPIEndpoint(data) if err != nil { return } f.url = "https://" + url token, err := getToken(data) if err != nil { return } f.token = token urlCount, err := getURLCount(data) if err != nil { ...
[ 0.09446079283952713, -0.15100950002670288, 0.41969558596611023, -0.769101083278656, 0.17384019494056702, -0.16884250938892365, -0.10620371252298355, 0.4431907832622528, -1.4849168062210083, -0.9392975568771362, -0.05990661680698395, 0.6698111891746521, 0.7066606879234314, 0.714352190494537...
func (f *Fast) GetUrls() (urls []string, err error) { r := rq.Get(f.url) r.Qs("https", "true") r.Qs("token", f.token) r.Qs("urlCount", strconv.Itoa(f.urlCount)) _, res, err := f.client.Send(r, false) if err != nil { err = errInternet return } defer res.Body.Close() urls = pickjson.PickString(res.Body, "u...
[ -0.3588496744632721, 0.69554603099823, 0.4592803418636322, -0.40487074851989746, 0.5403187870979309, -0.5537312030792236, -0.5870212316513062, -0.6663313508033752, -0.22679203748703003, -0.018342439085245132, -0.4908679723739624, 0.23772934079170227, -0.40567976236343384, 0.440836250782012...
func (f *Fast) download(url string, byteLenChan chan<- int64, done <-chan struct{}) (err error) { r := rq.Get(url) _, res, err := f.client.Send(r, false) if err != nil { err = errInternet return } defer res.Body.Close() buf := make([]byte, bufferSize) var length int // read res.Body loop // loop till <-d...
[ 0.2769124209880829, -0.18353606760501862, 0.8877406716346741, -0.8763887286186218, 0.19065231084823608, 0.10286635905504227, 0.1399184763431549, -0.9155482649803162, -0.11147160083055496, -0.09204044938087463, -0.18883948028087616, 0.5747900605201721, -0.8192024827003479, 0.311695694923400...
func (f *Fast) Measure(urls []string, KbpsChan chan<- float64) (err error) { done := make(chan struct{}) byteLenChan := make(chan int64) // measure per second ticker := time.NewTicker(1 * time.Second) // stop func // should clean all before stop #Measure stop := func() { ticker.Stop() close(done) // clo...
[ -0.1897554099559784, 0.29739058017730713, 1.056626558303833, 0.5467405915260315, -0.4385879635810852, -0.22043892741203308, 0.1367945373058319, 0.13647153973579407, -0.043974168598651886, 0.6963480710983276, -0.2360663115978241, 0.007241625338792801, -0.305677592754364, 1.48802649974823, ...
func NewGenericSanitizer(policy *bluemonday.Policy) GenericSanitizer { return genericSanitizer{ policy: policy, } }
[ -0.9088883996009827, -1.062437891960144, 0.10707937926054001, -0.3844287097454071, -0.9403970837593079, 0.6813061237335205, -1.7071517705917358, -1.049639105796814, -0.32835960388183594, -0.8662800192832947, -0.528532862663269, 0.21883362531661987, -0.6053084135055542, 0.37653884291648865,...
func NewBatchMixSanitizer(policy *bluemonday.Policy) BatchMixSanitizer { return batchMixSanitizer{ sanitizer: mixStatusSanitizer{ policy: policy, }, } }
[ 0.27328312397003174, -1.8604258298873901, 0.26488080620765686, 0.06988232582807541, -0.6442509889602661, 0.24827226996421814, -1.289950966835022, 0.3271961212158203, 0.3310011327266693, -0.9916658401489258, -1.0725282430648804, 0.598009467124939, -0.4747862219810486, 0.6789506077766418, ...
func NewBatchGatewaySanitizer(policy *bluemonday.Policy) BatchGatewaySanitizer { return batchGatewaySanitizer{ sanitizer: gatewayStatusSanitizer{ policy: policy, }, } }
[ 0.41546693444252014, -1.5424095392227173, 0.10850430279970169, 0.12354490906000137, -1.1299182176589966, 0.3901204466819763, -1.1722743511199951, 0.6250786185264587, -0.2353067398071289, -0.09870512783527374, -1.2631579637527466, 1.0954084396362305, -0.38205209374427795, 1.130818486213684,...
func NewMixStatusSanitizer(policy *bluemonday.Policy) MixStatusSanitizer { return mixStatusSanitizer{ policy: policy, } }
[ -0.42134198546409607, -1.7064310312271118, 0.19181692600250244, 0.18837952613830566, -1.16176438331604, 0.31095361709594727, -0.8834916949272156, -0.02512883022427559, 0.6960388422012329, -1.2479606866836548, -0.84367436170578, 0.2744668424129486, -0.5848652124404907, 0.7471886277198792, ...
func NewGatewayStatusSanitizer(policy *bluemonday.Policy) GatewayStatusSanitizer { return gatewayStatusSanitizer{ policy: policy, } }
[ -0.23389017581939697, -1.1222225427627563, -0.07003190368413925, -0.3653937876224518, -1.4091027975082397, 0.720443844795227, -0.8285028338432312, 0.13713285326957703, 0.023692220449447632, -0.16610562801361084, -0.4527896046638489, 0.4263544976711273, -0.5622566342353821, 0.85394567251205...
func Parse(ingress *networking.Ingress) *Dependencies { secrets := extractSecrets(ingress) secrets = append(secrets, secretsFromAnnotations(ingress)...) return &Dependencies{ Services: extractServices(ingress), Endpoints: extractServices(ingress), Secrets: secrets, Configmaps: configmapsFromAnnota...
[ -0.28385496139526367, -0.14232036471366882, 0.28875449299812317, 0.14338581264019012, 0.0043679047375917435, 0.03935445472598076, -0.6873036026954651, -0.2400539517402649, 0.23960520327091217, -0.6743937134742737, -0.45361822843551636, -0.42829862236976624, 0.20099098980426788, 0.126330927...
func configmapsFromAnnotations(ingress *networking.Ingress) []types.NamespacedName { configmaps := make([]types.NamespacedName, 0) for name := range ingress.GetAnnotations() { if configmapAnnotations.Has(name) { configmaps = append(configmaps, types.NamespacedName{Namespace: ingress.Namespace, Name: name}) } ...
[ -0.7168397307395935, -0.9152236580848694, 0.2634390890598297, 0.530900776386261, 0.012880044057965279, 0.3639672100543976, -0.5669677257537842, -0.3762010335922241, 1.1085401773452759, 0.8720008134841919, -0.20578958094120026, -0.7472765445709229, 0.6725895404815674, 0.7850446701049805, ...
func secretsFromAnnotations(ingress *networking.Ingress) []types.NamespacedName { secrets := make([]types.NamespacedName, 0) for name := range ingress.GetAnnotations() { if secretsAnnotations.Has(name) { secrets = append(secrets, types.NamespacedName{Namespace: ingress.Namespace, Name: name}) } } return sec...
[ -0.2477026730775833, -0.8735150098800659, 0.3234594762325287, 0.052171047776937485, 0.19274993240833282, 0.20263685286045074, -1.005741834640503, -0.9205672740936279, 0.6172552108764648, 0.7660425901412964, -0.5647025108337402, 0.017943300306797028, 0.4499228894710541, 0.7665619254112244, ...
func NewCommandExecutor() CommandExecutor { return &commandExecutor{} }
[ 1.0420033931732178, -0.7531946897506714, -0.11777251958847046, 0.49961405992507935, -0.40278804302215576, -0.16342408955097198, -1.131225347518921, 0.8999789953231812, 0.11479136347770691, -0.8478396534919739, 0.02648318000137806, 0.2645544409751892, 0.30865269899368286, 0.9491344094276428...
func NewConstants(address common.Address, backend bind.ContractBackend) (*Constants, error) { contract, err := bindConstants(address, backend, backend, backend) if err != nil { return nil, err } return &Constants{ConstantsCaller: ConstantsCaller{contract: contract}, ConstantsTransactor: ConstantsTransactor{contra...
[ -0.02562965266406536, 0.1357916295528412, 0.34787124395370483, 0.24608798325061798, -1.0820555686950684, -0.5968847274780273, -0.33181849122047424, 0.06974376738071442, 0.26987600326538086, 0.9700499773025513, 0.10047725588083267, 0.21830391883850098, -0.5471645593643188, 0.001225824118591...
func NewConstantsCaller(address common.Address, caller bind.ContractCaller) (*ConstantsCaller, error) { contract, err := bindConstants(address, caller, nil, nil) if err != nil { return nil, err } return &ConstantsCaller{contract: contract}, nil }
[ -0.3981705605983734, -0.00496316934004426, 0.32619643211364746, 0.19368116557598114, -1.1365422010421753, 0.3795757293701172, -1.1626317501068115, -0.4379543960094452, 0.17606377601623535, 0.5571321249008179, -0.9499107599258423, -0.4228370785713196, -0.38156458735466003, 1.296101570129394...
func NewConstantsTransactor(address common.Address, transactor bind.ContractTransactor) (*ConstantsTransactor, error) { contract, err := bindConstants(address, nil, transactor, nil) if err != nil { return nil, err } return &ConstantsTransactor{contract: contract}, nil }
[ -0.3547220230102539, 0.024876004084944725, 0.18674015998840332, -0.28182512521743774, -1.7361533641815186, -0.3444310426712036, -0.40944522619247437, 0.0945463702082634, 0.40613365173339844, 0.7523084282875061, -1.4493131637573242, 0.03640228509902954, -0.022251572459936142, 0.155590698122...
func NewConstantsFilterer(address common.Address, filterer bind.ContractFilterer) (*ConstantsFilterer, error) { contract, err := bindConstants(address, nil, nil, filterer) if err != nil { return nil, err } return &ConstantsFilterer{contract: contract}, nil }
[ -0.42638155817985535, 0.23532244563102722, 0.25558051466941833, 0.04269601032137871, -1.2390241622924805, -0.08197585493326187, -0.5894330739974976, -0.2614367604255676, -0.29574844241142273, 0.44401443004608154, -0.44169366359710693, 0.4849399924278259, -0.3070974349975586, 0.840837001800...
func bindConstants(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { parsed, err := abi.JSON(strings.NewReader(ConstantsABI)) if err != nil { return nil, err } return bind.NewBoundContract(address, parsed, caller,...
[ -0.5790839791297913, 0.2068040370941162, 0.507994532585144, -0.36241739988327026, -1.1613349914550781, -0.06105509027838707, -0.690779983997345, 0.27033814787864685, 0.38268280029296875, 0.392522394657135, 0.04981746897101402, 0.4529103934764862, -0.586726725101471, -0.007078143768012524, ...
func (_Constants *ConstantsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Constants.Contract.ConstantsCaller.contract.Call(opts, result, method, params...) }
[ -1.0296299457550049, 0.37958332896232605, 0.5932781100273132, 0.7813644409179688, -0.8688298463821411, 0.6528144478797913, -0.6817721724510193, -0.5978810787200928, 0.2739868462085724, 0.6453826427459717, 0.0508294478058815, -0.04024394229054451, -0.4997641146183014, 0.26758894324302673, ...
func (_Constants *ConstantsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { return _Constants.Contract.ConstantsTransactor.contract.Transfer(opts) }
[ -0.5753232836723328, 0.0036873097997158766, 0.3796772062778473, 0.27811384201049805, -0.43638259172439575, 0.5738871693611145, 0.2820793092250824, -0.13485141098499298, 0.569680392742157, 0.1527368277311325, -0.21998059749603271, 0.415190726518631, -0.5085223913192749, -0.8133938908576965,...