text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (nt *Time) Scan(value interface{}) error { var valid bool nt.Time, valid = value.(time.Time) if !valid { nt.Time = time.Time{} } return nil }
[ -0.7288045883178711, 1.0788697004318237, 0.4389891028404236, 0.6450850963592529, -0.7292340397834778, 0.4041158854961395, -0.29373809695243835, -1.0226322412490845, 0.45102760195732117, 0.2910953462123871, -0.5651851296424866, -0.17730440199375153, -0.3669641613960266, 1.4202044010162354, ...
func (nt Time) Value() (driver.Value, error) { if !nt.Valid() { return nil, nil } return nt.Time, nil }
[ -0.4961882531642914, 0.3305201232433319, 0.4129134714603424, 0.5510446429252625, 0.4921959936618805, 0.2879941165447235, -0.11098523437976837, -1.0481361150741577, 0.47251245379447937, 1.0150232315063477, 0.24332650005817413, -0.14434495568275452, -0.43291178345680237, 0.9319084286689758, ...
func (nt Time) MarshalJSON() ([]byte, error) { if !nt.Valid() { return json.Marshal(nil) } return json.Marshal(nt.Time) }
[ -0.05797227472066879, -0.10493892431259155, 0.31644654273986816, -0.0408066026866436, -0.37086182832717896, -0.25251924991607666, -1.0400704145431519, -0.46790778636932373, 0.9982262849807739, 0.31469377875328064, -1.0476276874542236, 0.32825127243995667, -0.3117142617702484, 1.72742724418...
func (nt *Time) UnmarshalJSON(data []byte) error { var t time.Time if data != nil { if err := json.Unmarshal(data, &t); err != nil { return err } } nt.Time = t return nil }
[ -0.4811631143093109, 0.6008095145225525, 0.5076532363891602, -1.2231881618499756, -0.24472759664058685, -0.031131615862250328, -0.30999818444252014, -0.17263352870941162, 0.13606904447078705, 1.1231786012649536, -0.8268718123435974, -0.3826482594013214, -0.5884533524513245, 1.2934169769287...
func (nt Time) Add(d time.Duration) Time { return NewTime(nt.Time.Add(d)) }
[ -1.006266474723816, 0.6850033402442932, 0.41719236969947815, -0.2600563168525696, -0.415584921836853, 1.2016406059265137, -1.2788759469985962, -0.7367149591445923, 0.7291623950004578, 0.3090851306915283, 0.2887458801269531, 0.4699859023094177, 0.48787662386894226, 1.0286129713058472, -0....
func (nt Time) UTC() Time { return NewTime(nt.Time.UTC()) }
[ -0.032014500349760056, -0.9818865060806274, 0.20709535479545593, -0.7963292002677917, 0.2725897431373596, 0.6727012991905212, -0.3320116400718689, 0.039213985204696655, 0.4606913924217224, -0.2137511670589447, -0.17573773860931396, 0.027260547503829002, 0.8531770706176758, 0.18251727521419...
func (nt Time) AddDate(years int, months int, days int) Time { return NewTime(nt.Time.AddDate(years, months, days)) }
[ 0.2593095004558563, 0.9460655450820923, 0.503781795501709, -0.09882903844118118, -0.40473654866218567, 0.7094050049781799, -2.1114258766174316, -0.5910386443138123, 0.041002172976732254, -1.0744441747665405, 0.3583003878593445, -0.39377766847610474, -0.31929096579551697, 0.8343287706375122...
func (nt Time) In(loc *time.Location) Time { return NewTime(nt.Time.In(loc)) }
[ -0.0048892684280872345, -0.6744767427444458, 0.3240258991718292, -0.8245111703872681, -0.8706477880477905, 0.6007829904556274, -0.5832744240760803, 0.3073413670063019, -0.28397759795188904, 0.6581044793128967, -0.8819974660873413, 0.6307955980300903, 0.43724939227104187, 0.4564827680587768...
func (nt Time) Local(d time.Duration) Time { return NewTime(nt.Time.Local()) }
[ -0.5151832699775696, -0.0966162160038948, 0.1792931854724884, -0.725024402141571, -1.029946208000183, 0.22223497927188873, -0.18291927874088287, -0.6447405815124512, -0.10535870492458344, 0.7462044358253479, -0.6112945675849915, 0.5688414573669434, 1.1626248359680176, 0.5342893600463867, ...
func (nt Time) Round(d time.Duration) Time { return NewTime(nt.Time.Round(d)) }
[ -0.1993342489004135, 0.8843057751655579, 0.3347927927970886, -1.2398868799209595, -0.3416813910007477, 0.8271493315696716, -0.33271417021751404, -1.738651156425476, -0.18089908361434937, 0.42314034700393677, 0.6254848837852478, 1.278708577156067, 0.6883744597434998, 1.4596314430236816, -...
func (nt Time) Truncate(d time.Duration) Time { return NewTime(nt.Time.Truncate(d)) }
[ -0.13217715919017792, 1.5642774105072021, 0.4267314672470093, -0.025537651032209396, -0.18212053179740906, 0.19933420419692993, -0.8194231986999512, -1.148168683052063, 0.2459239512681961, 0.5291038155555725, -0.029639482498168945, 0.2531154453754425, 0.21407240629196167, 0.399439692497253...
func (c *MockConnectionsLookup) GetConnectionIDByDIDs(myDID, theirDID string) (string, error) { switch { case c.ConnIDByDIDsErr != nil: return "", c.ConnIDByDIDsErr case c.ConnIDByDIDs != "": return c.ConnIDByDIDs, nil } return "", errors.New("invalid test setup - need either connID or error") }
[ -0.5778511762619019, -0.8356386423110962, 0.4561275839805603, 0.13151244819164276, -0.15823134779930115, -0.4942391514778137, 0.49565571546554565, -0.4549078345298767, 0.3717535734176636, 0.6721434593200684, 0.9093509912490845, -0.35651326179504395, -0.9834242463111877, 0.650562047958374, ...
func (c *MockConnectionsLookup) GetConnectionRecord(id string) (*connection.Record, error) { switch { case c.ConnRecordErr != nil: return nil, c.ConnRecordErr case c.ConnRecord != nil: return c.ConnRecord, nil } return nil, errors.New("invalid test setup - need either connRecord or error") }
[ 0.32861173152923584, -0.19237811863422394, 0.5136243104934692, 0.24236345291137695, 0.10504654049873352, -0.10975479334592819, 0.596707820892334, 0.20416325330734253, 0.45157015323638916, 0.1352371871471405, 0.48161882162094116, -0.9812499284744263, -1.0839554071426392, 0.9550209641456604,...
func (drawShape DrawShape) drawshape(x[5] float32, y[5] float32) { fmt.Println("Drawing Shape") }
[ -0.2349744737148285, 0.10043041408061981, 0.5360262393951416, 0.26006224751472473, 0.46512481570243835, 1.3725264072418213, -0.21001024544239044, -0.5123804211616516, -0.19849097728729248, -0.5828547477722168, -0.2833930253982544, 0.8177300095558167, 0.035368721932172775, -0.27843698859214...
func (contour DrawContour) drawContour(x[5] float32, y[5] float32) { fmt.Println("Drawing Contour") contour.shape.drawshape(contour.x, contour.y) }
[ -0.62945955991745, 0.10138887166976929, 0.2558532953262329, 0.45448845624923706, 0.17792361974716187, 1.2883495092391968, -0.24743708968162537, 0.6689869165420532, 0.15425625443458557, -0.044640712440013885, -0.7891000509262085, 0.06376795470714569, 0.5919619202613831, -0.3073265254497528,...
func NewIPManager(settings *IPManagerSettings) (*IPManager, error) { ipm := &IPManager{ limiter: settings.Limiter, config: settings.Config, recordQueue: make(chan cloudflare.DNSRecord, settings.BackPressureLimit), logger: settings.Logger, } var err error ipm.client, err = settings.Config.NewClient...
[ -0.9890801310539246, 0.14435842633247375, 0.5343189239501953, -0.8241390585899353, -0.25628310441970825, -0.3943089544773102, -0.37849849462509155, 0.28036144375801086, -0.1895015388727188, 0.03842829912900925, -0.42018070816993713, -0.11710038781166077, -0.4824199080467224, 0.307164520025...
func (ipm *IPManager) updateRunner() { go func() { for { ipm.updateReceiver(<-ipm.ipQueue) } }() }
[ -1.6214888095855713, -0.569477915763855, 0.4400334656238556, -0.6401717662811279, -0.6543222665786743, -0.11429815739393234, -0.3313819468021393, 0.1436234712600708, -0.46915683150291443, 0.3979262411594391, -0.29230156540870667, 0.14873680472373962, -0.7775238156318665, 0.1516243368387222...
func (ipm *IPManager) updateReceiver(payload IP) { for idx := range ipm.config.Records { if payload.IsIPv6Available() && ipm.config.Records[idx].Type == "AAAA" { ipm.updateAAAARecord(payload.IPv6, ipm.config.Records[idx]) } if ipm.config.Records[idx].Type == "A" { ipm.updateARecord(payload.IPv4, ipm.config...
[ -1.3186016082763672, -0.736919105052948, 0.5921606421470642, -0.9656201004981995, -0.6073253750801086, -0.49591854214668274, -0.4087759852409363, 0.9672128558158875, 0.1606595367193222, 0.7903321385383606, 0.03249261900782585, -0.5164887309074402, -0.6476390361785889, 0.22361233830451965, ...
func (g *Goal) Remove(ecs.BasicEntity) { g.Drawable.Close() }
[ -0.9424732327461243, 0.5387700796127319, 0.37065908312797546, -0.11710990965366364, -1.05391263961792, 1.163390040397644, 0.43895331025123596, -0.5353724360466003, -0.723553478717804, 0.157703697681427, -0.062197815626859665, -0.6828117370605469, 0.3516094386577606, 0.6787444949150085, -...
func (*ReorderSupergroupActiveUsernamesRequest) TypeID() uint32 { return ReorderSupergroupActiveUsernamesRequestTypeID }
[ 0.5184996128082275, -0.6523312330245972, 0.39078667759895325, 0.5946221351623535, -0.3442884087562561, 0.5663382411003113, 0.8657122254371643, -0.26245763897895813, 0.36644476652145386, 0.05443920940160751, -0.7919102907180786, 0.7263713479042053, -0.9773759245872498, 0.3780577778816223, ...
func (*ReorderSupergroupActiveUsernamesRequest) TypeName() string { return "reorderSupergroupActiveUsernames" }
[ 0.2795506715774536, -0.667646050453186, 0.41741135716438293, 0.6250973343849182, -0.2816081941127777, -0.22588835656642914, 1.1689131259918213, 0.21600773930549622, -0.11194703727960587, 0.31058967113494873, -0.9450780749320984, 0.17113812267780304, -0.25526490807533264, -0.732259452342987...
func (r *ReorderSupergroupActiveUsernamesRequest) TypeInfo() tdp.Type { typ := tdp.Type{ Name: "reorderSupergroupActiveUsernames", ID: ReorderSupergroupActiveUsernamesRequestTypeID, } if r == nil { typ.Null = true return typ } typ.Fields = []tdp.Field{ { Name: "SupergroupID", SchemaName: "s...
[ 0.7457065582275391, 0.023434938862919807, 0.3849155008792877, -0.385088711977005, 0.006453113164752722, 0.21435095369815826, 0.8684594631195068, -0.40081214904785156, -0.5423978567123413, 0.3180024027824402, -0.8366358876228333, -0.1114845797419548, -0.3374233543872833, -0.2141596078872680...
func (r *ReorderSupergroupActiveUsernamesRequest) GetSupergroupID() (value int64) { if r == nil { return } return r.SupergroupID }
[ 1.4492008686065674, 0.6263694167137146, 0.03837455064058304, 0.9860239028930664, -0.5795692801475525, 0.4848743975162506, 0.5266497731208801, 0.7497972846031189, 0.38841837644577026, -0.6243723630905151, -0.642879843711853, 0.5137364864349365, -0.7427552938461304, 0.7664483189582825, 0.0...
func (r *ReorderSupergroupActiveUsernamesRequest) GetUsernames() (value []string) { if r == nil { return } return r.Usernames }
[ -0.03248526155948639, 0.6902090907096863, -0.03095545619726181, 1.1679112911224365, -0.07157763093709946, -0.051519595086574554, 0.37642189860343933, -0.5602574348449707, 0.3545491099357605, -0.23964767158031464, -0.42222699522972107, 0.0908079445362091, -0.8840920329093933, 0.477733194828...
func (c *Client) ReorderSupergroupActiveUsernames(ctx context.Context, request *ReorderSupergroupActiveUsernamesRequest) error { var ok Ok if err := c.rpc.Invoke(ctx, request, &ok); err != nil { return err } return nil }
[ -0.06410320103168488, -0.2888532280921936, 0.18450456857681274, 0.8803014755249023, -0.177603617310524, -0.09930926561355591, 0.9629378318786621, -0.36679187417030334, -0.5657666921615601, 0.6233722567558289, -1.3048697710037231, 1.0980619192123413, -0.946372389793396, -0.33848997950553894...
func Random8() uint8 { rand16seed = (rand16seed * rand2053) + rand13849 // return the sum of the high and low bytes, for better // mixing and non-sequential correlation. return uint8(uint8(rand16seed&0xFF) + uint8(rand16seed>>8)) }
[ -0.14726902544498444, 0.26054561138153076, 0.19442348182201385, 0.2357911765575409, 0.28590092062950134, 0.5468670725822449, 0.3864208161830902, 0.4032486379146576, 1.2105660438537598, -0.7279708385467529, 0.31470853090286255, 0.4850344955921173, -1.0482287406921387, -0.2978951036930084, ...
func Random16() uint16 { rand16seed = (rand16seed * rand2053) + rand13849 return rand16seed }
[ 0.7804745435714722, 0.4703960418701172, 0.41173437237739563, -0.3402797281742096, 0.33828282356262207, 0.12126276642084122, 0.2736515402793884, 0.15459997951984406, 1.264415979385376, -0.8896408081054688, -0.09333691745996475, 0.7240341901779175, -0.03431813791394234, -0.3990897536277771, ...
func Random8Limit(lim uint8) uint8 { if lim == 0 { return 0 } r := Random8() r = uint8((uint16(r) * uint16(lim)) >> 8) return r }
[ 0.20386910438537598, 0.19286233186721802, 0.33610767126083374, -0.547455370426178, -0.7824587225914001, 0.570084273815155, -0.802112340927124, -0.11821485310792923, 1.3533216714859009, 0.16850546002388, -0.6703165769577026, 0.809689462184906, -1.0326457023620605, -0.3388621211051941, 0.3...
func Random8Range(min, lim uint8) uint8 { if min > lim { return lim } delta := lim - min r := Random8Limit(delta) + min return r }
[ -0.47454532980918884, -0.2354259341955185, 0.12658090889453888, -0.2959963381290436, -1.0401298999786377, 0.6085789203643799, -0.8625971078872681, -0.32506611943244934, 0.8505368828773499, -0.4978286921977997, -0.2989744246006012, 0.6701159477233887, -1.225103497505188, -0.5216803550720215...
func Random16Limit(lim uint16) uint16 { if lim == 0 { return 0 } r := Random16() p := uint32(lim) * uint32(r) r = uint16(p >> 16) return uint16(r) }
[ 0.9371293187141418, 0.39341315627098083, 0.4658364951610565, -0.5887649059295654, -0.49288222193717957, 0.6000876426696777, -1.0277384519577026, -0.008992894552648067, 0.45343711972236633, -0.6674944758415222, -0.5750287175178528, 0.2139883041381836, -0.7251753211021423, -0.514186620712280...
func Random16Range(min, lim uint16) uint16 { delta := lim - min r := Random16Limit(delta) + min return r }
[ 0.8953906297683716, -0.11065700650215149, 0.15121936798095703, 0.1306959092617035, -0.7156866788864136, 0.4225086271762848, -1.3634130954742432, 0.14747382700443268, -0.5112900137901306, -1.220995545387268, -0.13513709604740143, 0.052641093730926514, -0.6408145427703857, -0.850254356861114...
func Random16SetSeed(seed uint16) { rand16seed = seed }
[ 1.0348135232925415, -0.5770450830459595, 0.27707439661026, -0.6087645888328552, -0.651335597038269, 0.8117457032203674, -0.12882889807224274, -0.09491550177335739, 0.7294637560844421, -1.3094369173049927, -0.2168838381767273, 0.6402369141578674, 0.16464842855930328, 0.06799003481864929, ...
func Random16GetSeed() uint16 { return rand16seed }
[ 1.1277008056640625, -0.06626217812299728, 0.40235140919685364, -0.261844664812088, 0.10068163275718689, 0.20101048052310944, -0.17834435403347015, -0.3106468617916107, 0.7018269896507263, -1.586846947669983, 0.042874958366155624, 0.770216166973114, -0.2784404158592224, -0.08946822583675385...
func Random16AddEntropy(entropy uint16) { rand16seed += entropy }
[ -0.10949137061834335, -0.33720076084136963, 0.3707280457019806, -0.7130967974662781, -0.03456027805805206, 0.5716971755027771, -0.6331381797790527, -0.15382973849773407, 0.4199150800704956, -0.17668679356575012, 0.038973357528448105, -0.04005282744765282, -0.40178340673446655, -1.108487844...
func (team *Team) Serialize() common.JSON { return common.JSON{ "id": team.ID, "name": team.Name, "description": team.Description, "level": team.Level, "code": team.Code, "city_id": team.CityID, "ward_id": team.WardID, "district_id": team.DistrictID, "since": ...
[ -0.5356544852256775, -0.251453161239624, 0.656272828578949, -0.863243818283081, -0.008091774769127369, -0.21922588348388672, -0.35256344079971313, -1.171327829360962, -0.48018914461135864, 0.11628664284944534, -1.2225714921951294, 0.5574521422386169, -0.058559052646160126, 0.10954324156045...
func New() (Repo, error) { // Open the my.db data file in your current directory. // It will be created if it doesn't exist. logrus.Infof("Using database file %s\n", conf.Options.DB.ConnectString) db, err := bolt.Open(conf.Options.DB.ConnectString, 0600, &bolt.Options{Timeout: 1 * time.Second}) if err != nil { r...
[ 0.3339487612247467, 0.17367786169052124, 0.7421502470970154, -0.7441909909248352, -0.3744313418865204, -0.6322647929191589, -0.03721493482589722, 0.09689715504646301, -0.5570793151855469, 0.5841030478477478, 0.032057348638772964, -0.23934294283390045, 0.47655126452445984, -0.34395566582679...
func (r *repo) cleanOAuthState() { ticker := time.NewTicker(1 * time.Hour) defer ticker.Stop() for { select { case <-r.stop: break case <-ticker.C: err := r.db.Batch(func(tx *bolt.Tx) error { c := tx.Bucket([]byte("oauth")).Cursor() for k, v := c.First(); k != nil; k, v = c.Next() { var sta...
[ -0.11622718721628189, -0.12353260815143585, 0.5897252559661865, -0.28714239597320557, -0.6512548327445984, -0.33914580941200256, 0.07558678835630417, -0.9355795383453369, 0.41511085629463196, 1.2887970209121704, 0.26694807410240173, -0.13224123418331146, -0.2240866720676422, -0.02177017368...
func (r *repo) OpenTeams(includeMine bool) ([]domain.TeamBot, error) { var teams []domain.TeamBot if !includeMine { return teams, nil } err := r.db.View(func(tx *bolt.Tx) error { c := tx.Bucket([]byte("teams")).Cursor() for k, v := c.First(); k != nil; k, v = c.Next() { var t domain.Team err := json.Unm...
[ -0.3734987676143646, 0.8160624504089355, 0.5463886857032776, -0.6797912120819092, -0.8562203049659729, 0.49096065759658813, -0.011055911891162395, 0.15911372005939484, -0.2393600344657898, 0.022534653544425964, 0.15772752463817596, 0.21261660754680634, -0.5662067532539368, -0.2220713943243...
func NewServer(config *viper.Viper) *Server { // Set environment from config environment, err := appconfig.NewEnvironment(config.GetString(appconfig.EnvironmentKey)) if err != nil { log.Fatalf("Unable to set environment: %v", err) } zapLogger, err := zap.NewProduction() if err != nil { log.Fatalf("Failed to...
[ 0.09382152557373047, -0.9562257528305054, 0.5006421804428101, -0.031108282506465912, -0.26786309480667114, 0.2736102044582367, 0.3173864483833313, 0.38368552923202515, 0.32167959213256836, 0.6028406620025635, -0.19805657863616943, 0.6954233050346375, -0.7098469138145447, 0.4452755451202392...
func Serve(config *viper.Viper) { s := NewServer(config) useTLS := config.GetBool("USE_TLS") if useTLS { serverCert, err := tls.X509KeyPair([]byte(config.GetString("SERVER_CERT")), []byte(config.GetString("SERVER_KEY"))) if err != nil { s.logger.Fatal("Failed to parse key pair", zap.Error(err)) } /* #nos...
[ 0.1631184220314026, -0.14711248874664307, 0.7072811126708984, 0.6786543726921082, 0.25969740748405457, 0.3097509443759918, 0.37876033782958984, 0.22382880747318268, -0.5232685804367065, 0.3313431143760681, -0.47603538632392883, 0.24124810099601746, 0.14651741087436676, 0.6154510974884033, ...
func (l *lexer) nextItem() item { return <-l.items }
[ 0.2114233374595642, 0.025506405159831047, 0.14779044687747955, 0.22192037105560303, -0.4485619366168976, 0.7413133382797241, -1.0053154230117798, 0.07423647493124008, -0.5841915011405945, -0.7746374011039734, 0.1372070461511612, 0.11308059096336365, -0.2699740529060364, 0.01377263944596052...
func (l *lexer) drain() { for range l.items { } }
[ -0.9966737627983093, -0.45849886536598206, 0.1571630984544754, -1.6178934574127197, 0.5953620076179504, 0.6065537333488464, -0.48796215653419495, -0.05922335013747215, -0.7037158608436584, -1.0673669576644897, -0.005208979826420546, 0.45342230796813965, -0.5786530375480652, 0.7074224352836...
func (l *lexer) backup() { l.pos -= l.width }
[ -0.23667772114276886, -0.34855175018310547, 0.37226617336273193, -0.839096188545227, -0.4359641671180725, 0.4367980360984802, 0.256801038980484, 0.455432653427124, -0.03265273571014404, 0.3860871195793152, 0.04851235821843147, -0.3792530596256256, -0.5442819595336914, 0.04849392920732498, ...
func lexField(l *lexer) stateFunc { l.skipSpace() for { if s, ok := l.nextTermWithDot(); s != "" && ok { if agg, ok := AggragationToType[s]; ok { l.emit(agg) l.skipSpace() if !l.accept(MarkLeftParen) { return l.errorf("syntax error: aggragation error, %q", l.input[l.pos:]) } l.emit(itemL...
[ 0.046609893441200256, 0.0811825767159462, 0.676175057888031, -0.05147942900657654, -0.5531076192855835, 0.1640130877494812, 0.1479061245918274, -0.39600685238838196, 0.11762401461601257, 0.3632861375808716, -0.029145047068595886, -0.06404665857553482, -0.4103122651576996, 0.167399629950523...
func (frc *FeedRoomConnector) taskFilterDuplicateStatus(debugname string, statusPassedFilter chan<- *mastodon.Status, statusOut chan<- *mastodon.Status) (statusInRv chan<- *mastodon.Status, markStatusSeenRv chan<- mastodon.ID) { statusIn := make(chan *mastodon.Status, 42) markStatusSeen := make(chan mastodon.ID, 42) ...
[ -0.44718077778816223, -0.6577454209327698, 0.7130929231643677, 0.14743837714195251, -0.2483629435300827, -0.5268882513046265, 0.7716048955917358, -0.1303681880235672, 0.06792665272951126, 0.08782383799552917, -0.6069279313087463, 0.7221752405166626, 0.6461995840072632, 1.3616931438446045, ...
func (rf *Raft) resetElectionTimeout() time.Duration { rand.Seed(time.Now().UTC().UnixNano()) rf.randomizedElectionTimeout = rf.electionTimeout + time.Duration(rand.Int63n(rf.electionTimeout.Nanoseconds())) return rf.randomizedElectionTimeout }
[ -0.31114768981933594, -0.2315879762172699, 0.3642628490924835, -0.3880253732204437, -0.1478949338197708, -0.17917494475841522, 0.3264080882072449, 0.7914085388183594, 0.45410650968551636, 0.7212974429130554, -0.5913448333740234, 0.49228209257125854, -0.7011954188346863, -0.1936715990304947...
func New(dir string, valueDir string) (Backend, error) { opts := badger.DefaultOptions opts.Dir = dir opts.ValueDir = valueDir db, err := badger.Open(opts) return Backend{db}, err }
[ -0.09290409088134766, -0.5822253227233887, 0.41610682010650635, 0.023182397708296776, 0.2636965215206146, -0.23329859972000122, -0.4393762946128845, 0.3720841407775879, -0.8095421195030212, -0.12806297838687897, -0.03209210932254791, 0.783072829246521, -0.033453673124313354, 0.165762245655...
func (b *Backend) Save(root internal.Root) ([]internal.Game, error) { var gameJSON []byte var games []internal.Game err := b.DB.Update(func(txn *badger.Txn) error { var err error for _, date := range root.Dates { dateString := date.DateString for _, game := range date.Games { key := fmt.Sprintf("%s:%d:...
[ -1.056546688079834, 0.05913291499018669, 1.056994080543518, -0.28529179096221924, 0.2798762917518616, -0.28840509057044983, -0.6947755813598633, -0.8791854381561279, -1.1305359601974487, 1.2172200679779053, -0.765584409236908, -0.41519367694854736, -0.6709615588188171, -0.01713379472494125...
func (b *Backend) Results(prefix []byte) ([]internal.Game, error) { var games []internal.Game err := b.DB.View(func(txn *badger.Txn) error { it := txn.NewIterator(badger.DefaultIteratorOptions) for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() { item := it.Item() v, err := item.Value() if err !=...
[ -1.150391936302185, 0.5131769180297852, 0.5952661037445068, -0.9404671788215637, 0.46213042736053467, -0.8617913722991943, -1.0529118776321411, -0.7931076884269714, -0.33789336681365967, 0.5442473292350769, -0.0524924099445343, -0.5018484592437744, -0.3097732961177826, -0.22282806038856506...
func (b *Backend) GetCounter() (counter int, err error) { err = b.DB.View(func(txn *badger.Txn) error { counterItem, err := txn.Get([]byte("counter")) if err != nil { if err != badger.ErrKeyNotFound { return err } counter = 0 return nil } counterValue, _ := counterItem.Value() counter, _ = ...
[ 0.0036898681428283453, -0.22614634037017822, 0.6809614896774292, 0.4537765085697174, 0.07063861936330795, -0.6290367245674133, 0.40904319286346436, 0.5390307903289795, -0.7278939485549927, -0.38203194737434387, -0.10678735375404358, -0.7038783431053162, -0.7062755227088928, 0.7645075321197...
func (b *Backend) SetCounter(val int) (err error) { c := []byte(strconv.Itoa(val)) b.DB.Update(func(txn *badger.Txn) error { txn.Set([]byte("counter"), c) return nil }) return }
[ -0.20882661640644073, 0.047904808074235916, 0.5711627006530762, 0.13287940621376038, -0.11158378422260284, 0.9344513416290283, 0.026824118569493294, 0.12198127061128616, -0.7384337186813354, 0.006034205202013254, -0.7782081365585327, -1.0320130586624146, -0.7912474274635315, 1.220669865608...
func (s *State) Update(next State, f func() error) error { type checkFunc func() error m := map[State]checkFunc{ StateOpened: s.toOpened, StateClosed: s.toClosed, StateRunning: s.toRunning, } err := m[next]() if err != nil { return err } err = f() if err == nil { *s = next } return err }
[ -0.7561755180358887, 0.026617318391799927, 0.4124283492565155, 0.050928886979818344, -0.9664965867996216, -0.40166860818862915, -0.07370264828205109, 0.03688506409525871, -0.04365279898047447, 0.19106407463550568, 0.12500806152820587, 0.10350935161113739, 0.5114753246307373, -0.31995803117...
func findTerraformExecPath(ctx context.Context, path, ver string) (string, func(), error) { cleanup := func() {} i := hcinstall.NewInstaller() var execPath string var err error if path != "" { execPath, err = i.Ensure(context.Background(), []src.Source{ &fs.AnyVersion{ ExactBinPath: path, }, }) } e...
[ -0.023658007383346558, -0.8555638194084167, 0.4240363538265228, 0.3406791687011719, 0.2342887669801712, -0.0813433900475502, 0.8958999514579773, -0.34587445855140686, -0.985554039478302, 1.1633265018463135, -0.25197696685791016, -0.6829239726066589, -0.4025590121746063, 1.2486432790756226,...
func terraformVersionString(ctx context.Context, execPath string) (string, error) { tmpDir, err := os.MkdirTemp("", "tfversion") if err != nil { return "", err } defer os.RemoveAll(tmpDir) tf, err := tfexec.NewTerraform(tmpDir, execPath) if err != nil { return "", err } version, _, err := tf.Version(contex...
[ 0.06063595786690712, -0.6258376240730286, 0.0931721031665802, -0.30968019366264343, 0.21389654278755188, 0.7220811247825623, 0.5882818698883057, -0.9818490147590637, -0.973848283290863, 1.032896876335144, 0.27733397483825684, -0.41850361227989197, -0.5058563351631165, 0.2081277221441269, ...
func ConfigureJobManager(man *cereal.Manager, config *config.EventFeed) error { // Migrate default policy values from the config. The default policies are // only persisted the first time the workflow is created, after which only // new default policies are added and/or existing policies indices are // updated in ...
[ -0.07383590191602707, 0.23752886056900024, 0.7504878044128418, 0.1754985749721527, 0.2980400621891022, -0.2108466923236847, -0.7253141403198242, -0.008917556144297123, 0.232291117310524, 0.11207424104213715, -0.01701510138809681, -0.5492419600486755, -0.19065706431865692, 0.790061056613922...
func NewDynamicGroupsClient(client Pusher, http integration.HTTPClient, user models.UserSitesPersistence) *Client { return &Client{ userRepo: user, client: client, httpClient: http, } }
[ -0.48246005177497864, 0.19197876751422882, -0.02566404454410076, 0.20672276616096497, -0.33282342553138733, -0.16773360967636108, 0.40202394127845764, -0.6657719612121582, -1.1510775089263916, 0.01720833219587803, -0.42077234387397766, 0.39125022292137146, -0.5062760710716248, -0.383483618...
func (c *Client) GetEndpointsByGroupIDs(ctx context.Context, targetIDs []string, createdBy, partnerID string, hasNOCAccess bool) (ids []gocql.UUID, err error) { var ( userSites entities.UserSites payload []dgResponse wg sync.WaitGroup userSitesMap = make(map[string]struct{}) errChan = ...
[ -1.0257512331008911, 0.47973451018333435, 0.8020216226577759, 0.25029921531677246, 0.17022933065891266, -0.48008108139038086, 0.687941312789917, -0.7755577564239502, -0.43056222796440125, 0.7530876994132996, 0.7368727326393127, 1.1305510997772217, -0.7821292877197266, 0.05561155825853348, ...
func (c *Client) StartMonitoringGroups(ctx context.Context, partnerID string, groupIDs []string, taskID gocql.UUID) error { for _, id := range groupIDs { payload := m.MonitoringDG{ PartnerID: partnerID, DynamicGroupID: id, ServiceID: TaskingServiceIDPrefix + taskID.String(), Operation: Mes...
[ -0.9084134697914124, 1.100815773010254, 0.4374837577342987, 0.9971709251403809, 0.4552817642688751, -0.3723865747451782, 0.2835193872451782, -0.5235682129859924, -1.0733119249343872, 0.48097243905067444, -0.14356765151023865, 0.6944791674613953, -0.6646406054496765, 1.209359884262085, -0...
func (c *Client) StopGroupsMonitoring(ctx context.Context, partnerID string, groupIDs []string, taskID gocql.UUID) error { for _, id := range groupIDs { payload := m.MonitoringDG{ PartnerID: partnerID, DynamicGroupID: id, ServiceID: TaskingServiceIDPrefix + taskID.String(), Operation: Mess...
[ -1.7602773904800415, 0.5081559419631958, 0.2269018590450287, 0.2821767330169678, 0.5336897373199463, -0.2692773640155792, 0.2524055242538452, -0.2721184194087982, -1.514062762260437, 0.4513303339481354, -0.35611385107040405, -0.6094300150871277, -0.9263839721679688, 0.4226377010345459, -...
func (c *ServiceController) AddController(router *mux.Router, s *Server) { c.Srv = s router.Methods("POST", "GET").Path("/service/get"). Handler(Logger(c, http.HandlerFunc(c.handleGet))) router.Methods("POST").Path("/service/add"). Handler(Logger(c, http.HandlerFunc(c.handleAdd))) router.Methods("DELETE").Path(...
[ -0.17042091488838196, 0.41366061568260193, 0.7752685546875, 0.22410328686237335, 0.3397408425807953, 0.10618404299020767, 0.44031447172164917, -0.06443393230438232, 0.3161468207836151, -1.3290069103240967, 0.07974929362535477, 0.05438295379281044, 0.21877403557300568, 1.4631215333938599, ...
func (c *ServiceController) LogInfo(v ...interface{}) { a := fmt.Sprint(v) logger.Info("ServiceController: [Inf] ", a[1:len(a)-1]) }
[ 0.15066459774971008, 0.12138299643993378, 0.5622607469558716, 0.022937927395105362, 0.8885397911071777, 0.08902546018362045, -0.6217917203903198, -0.2527005672454834, -0.524671196937561, -0.5778870582580566, -0.835976243019104, 0.5289198160171509, -0.12732790410518646, 0.9694387912750244, ...
func (kvstore *KVStore) init_db() { /* difference between make and new? 1. make(T) always return type T; new(T) returns type *T 2. new works for all types, and dynamically allocates space for a variable of that type, initialized to the zero value of that type, and returns a pointer to it; make works as a ki...
[ -0.5927166938781738, -0.010929147712886333, 0.5657267570495605, 0.08234197646379471, -0.7276827692985535, -0.18308234214782715, -0.3912926912307739, -0.2793901264667511, 0.1591949760913849, -0.22254474461078644, -0.4486337900161743, 0.06847450882196426, -0.49034246802330017, 0.804724097251...
func (kvstore *KVStore) put(key string, value []byte) { /* kvstore is a pointer, can it be used in this way? yes*/ kvstore.kvstore[key] = value }
[ 0.17200163006782532, 0.5938585996627808, 0.35688328742980957, -0.4903393089771271, -1.0590330362319946, 0.47582340240478516, -0.7287939190864563, 0.6875928044319153, 0.5350081324577332, -0.0002107576874550432, -0.3662080466747284, 0.02444843389093876, -1.1302330493927002, -0.04076822474598...
func (kvstore *KVStore) get(key string) []byte { v, _ := kvstore.kvstore[key] return v }
[ -0.45819273591041565, 0.13497309386730194, 0.235350102186203, -0.18964536488056183, -0.6257882118225098, -0.42869943380355835, -1.3800501823425293, -0.14234043657779694, 0.3180801570415497, 0.28602370619773865, -0.6257745027542114, 0.3713281452655792, -0.26716136932373047, 0.10601869225502...
func detectPossibleSteamRoots() []string { home := os.Getenv("HOME") locations := []string{ home + "/.steam/steam", // Thanks to dmitmel for this: Mac OS X location home + "/Library/Application Support/Steam", } // Windows users may have a home drive from A to Z. // A and B are historically floppy disk drive...
[ -0.2604639530181885, -1.0657200813293457, 0.7074981331825256, 0.3568517863750458, 0.10369318723678589, 0.058456871658563614, 0.6331315636634827, -0.18405646085739136, 0.20834335684776306, 0.500740110874176, -0.016012614592909813, 0.26770246028900146, 0.37266549468040466, 0.3142252862453460...
func appendHarvestFromSteamLibraryFolders(locations []string, data []byte, where string) []string { if !utf8.Valid(data) { // Not strictly sure how Go would take this; avoid having to answer the question for now fmt.Printf(" invalid: not UTF-8\n") return locations } tkns, err := kvkv.InTokenize(string(data), t...
[ -0.06377150118350983, -0.523232102394104, 0.7493717074394226, 0.5763164758682251, -0.24595320224761963, 0.1346399039030075, -0.1673060804605484, 0.3676398992538452, 0.03870132938027382, -0.5865367650985718, 0.6524404883384705, -0.7997098565101624, -0.5264718532562256, 0.30352240800857544, ...
func detectSteamLeaves() []string { locations := detectPossibleSteamRoots() for _, v := range locations { path := v + "/steamapps/libraryfolders.vdf" file, err := os.Open(path) if err == nil { fmt.Printf("Steam root: " + v + " is valid & has library folders index...\n") bytes, err := ioutil.ReadAll(file) ...
[ 0.5589461326599121, -1.1214344501495361, 0.7477460503578186, 0.8980399966239929, 0.5246132016181946, 0.6343768835067749, 0.26677605509757996, -0.15156950056552887, 0.05940118059515953, 0.21748289465904236, 0.3225158154964447, -0.29133355617523193, 0.1652437299489975, 0.5698660612106323, ...
func detectPossibleGameLocations() []string { locations := []string{} for _, v := range detectSteamLeaves() { // Thanks to dmitmel for the Mac OS X location locations = append(locations, v + "/steamapps/common/CrossCode", v + "/steamapps/common/CrossCode/CrossCode.app/Contents/Resources/app.nw") } return locati...
[ -0.21933896839618683, -0.4168001711368561, 0.6555253863334656, 1.072605848312378, 0.5177737474441528, 0.7036828398704529, -0.09415280073881149, 0.3519275486469269, -0.08670308440923691, 0.66911381483078, -0.13291986286640167, -0.4468877613544464, 0.4764193594455719, 1.096205711364746, -0...
func CheckGameLocation(dir string) GameLocation { // Only try if the location is actually real. if BrowserVFSLocationReal(dir) { gameInstance := ccmodupdater.NewGameInstance(dir) plugins, err := local.AllLocalPackagePlugins(gameInstance) if err == nil { gameInstance.LocalPlugins = plugins ccDetails, hasCC...
[ -0.519615888595581, -0.6992126107215881, 0.670389711856842, 0.395124226808548, -0.11868344247341156, -0.402138888835907, 0.3167891204357147, 0.05201736092567444, 0.7171472907066345, 1.1488392353057861, -0.13182030618190765, -0.3090707063674927, 0.00557991536334157, 0.1713162511587143, -0...
func AutodetectGameLocations() []GameLocation { possibilities := detectPossibleGameLocations() locations := []GameLocation{} for _, v := range possibilities { loc := CheckGameLocation(v) if loc.Valid { locations = append(locations, loc) } } return locations }
[ -0.7479438781738281, -0.9631016254425049, 0.7226019501686096, 1.2655819654464722, 0.4361266493797302, 0.15087705850601196, 0.33609333634376526, 0.25555163621902466, -0.18712405860424042, -0.2931499779224396, -0.26265767216682434, -0.3019810914993286, 0.09280159324407578, 0.3229146301746368...
func isAlienDictionary(words []string, order string) bool { //create a int list to have the ASCII value of the Alien Dictionary listAlien := make([]int, 26) for i, v := range order { listAlien[v - 'a'] = i } //Iterate through the list of words and have two pointers to compare each word for i := 0; i < len(wo...
[ 0.09511811286211014, -1.1817591190338135, 0.9758545756340027, -1.0468717813491821, -0.9439176917076111, 0.03708340972661972, -0.6794063448905945, 0.40628647804260254, 0.14700128138065338, 1.056237816810608, 0.08936136215925217, 0.533501923084259, -0.9048954844474792, 0.6999616622924805, ...
func (cg *colorChartController) setEnv(linearMatDataPath, dataPath, deviceQEDataPath string, ill models.IlluminationCode) { // initalize response controller cg.resController = NewResponseController() // light source setup cg.lithSource = ill // read Linear Matrix elements cg.linearMatrixElm = cg.readLinearMatEl...
[ 0.6257114410400391, -0.7294645309448242, 0.41653546690940857, -0.6741242408752441, 0.35112160444259644, 0.8664624691009521, 0.8494679927825928, -0.11343473196029663, 0.11916991323232651, -0.7071736454963684, -0.16798798739910126, 0.22674962878227234, 0.2246190756559372, -0.0260329674929380...
func (cg *colorChartController) GenerateColorPatchImage(data []models.ColorCode, filesavepath, dirname string, width, height int) bool { // initialize image controller imgcontroller := NewImageController() // initialize directory handler dirhandler := util.NewDirectoryHandler() dirhandler.MakeDirectory(filesavep...
[ -0.7029134035110474, 0.3603091239929199, 0.8306531310081482, -0.4673631489276886, -0.1532021015882492, 0.9476029872894287, 0.5892302393913269, 0.2445131093263626, -0.32859471440315247, -0.2974402904510498, -0.5340210199356079, -0.5331476330757141, -0.25844141840934753, 0.7211742401123047, ...
func (cg *colorChartController) Generate24MacbethColorChart(dev bool, filesavepath string) bool { imageContrller := NewImageController() var fileName string if dev { fileName = dev24ColorChartName } else { fileName = std24ColorChartName } // create 24 Macbeth Chart image if !imageContrller.Create24MacbethCh...
[ -0.47592732310295105, -0.3151211142539978, 0.6811351180076599, -0.32542893290519714, -0.058134522289037704, 0.695710301399231, 0.43393510580062866, -0.5412883758544922, -0.438160240650177, -0.7466045618057251, -0.24990639090538025, 0.05473499745130539, -0.24807782471179962, 1.1508313417434...
func (cg *colorChartController) RunStandad(filepath string) []models.ColorCode { return models.ReadColorCode(filepath) }
[ -0.8782673478126526, -1.4034724235534668, 0.4100629389286041, 0.30062904953956604, 0.10324561595916748, 0.42213523387908936, 0.06767622381448746, 0.07002810388803482, -0.31173941493034363, -0.3843233585357666, -0.3783639669418335, 0.6525111198425293, 0.3115025758743286, 0.6945461630821228,...
func (cg *colorChartController) SaveColorPatchCSVData(data []models.ColorCode, savepath, filename string) bool { // data stcoker dataArray := make([][]string, 0) // serialize data for _, rawdata := range data { str := rawdata.SerializeData() dataArray = append(dataArray, str) } // save file as CSV file ioh...
[ -1.0827735662460327, -0.42538967728614807, 0.7122717499732971, -0.05946097522974014, -0.09523686021566391, 0.5720252394676208, -0.22887678444385529, 0.09676351398229599, 0.11365397274494171, 0.14011429250240326, -0.5890288352966309, -0.2948167026042938, -0.400746613740921, 0.16036671400070...
func makeHandler(fn func(http.ResponseWriter, *http.Request, *Server), s *Server) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, r *http.Request) { fn(w, r, s) } }
[ 0.0265050008893013, -0.3057287037372589, 0.5106199979782104, 0.024634603410959244, -0.7734999656677246, 0.6175863146781921, 0.27847346663475037, 0.3745599091053009, 0.12285410612821579, -0.653672993183136, 0.20949946343898773, -0.45808887481689453, 0.497252881526947, -1.1260836124420166, ...
func indexHandler(w http.ResponseWriter, r *http.Request, s *Server) { if r.Method == "GET" { //create the source upload page with available languages and metrics page := &Page{Config: s.Config, Extensions: s.Analyzer.Extensions(), Metrics: s.Analyzer.Metrics, Languages: s.Analyzer.Languages} //display the sour...
[ 0.7544083595275879, 0.5127980709075928, 0.4078228175640106, -0.43635910749435425, -0.11263273656368256, 0.38993027806282043, 1.0227998495101929, 0.5624436736106873, 0.023148853331804276, 0.5706067681312561, 0.6111423969268799, -0.3760104477405548, -0.38762158155441284, 0.0892288014292717, ...
func metricsHandler(w http.ResponseWriter, r *http.Request, s *Server) { if r.Method == "POST" { //parse the parameters and file sent in the post request r.ParseMultipartForm(32 << 20) file, _, err := r.FormFile("uploadfile") if err != nil { log.Println(err) return } defer file.Close() buff := byt...
[ 0.6748693585395813, 0.7271676659584045, 0.7375172972679138, 0.1530136615037918, 0.021332303062081337, 0.17648832499980927, 0.48262080550193787, -0.026889052242040634, -1.0212926864624023, -0.20723964273929596, 0.7004555463790894, -0.5496330857276917, -0.17260873317718506, 0.957833588123321...
func Atbash(in string) string { var out strings.Builder var i int var enc byte for _, ch := range in { lower := ch | 0b0100000 switch { case lower > '0' && lower < '9': enc = byte(lower) case lower >= 'a' && lower <= 'z': enc = byte('z'-lower) + 'a' default: continue } if i > 0 && i%5 == 0...
[ 0.7949637770652771, -0.3510094881057739, 0.7445233464241028, -0.7580515742301941, -0.5024307370185852, 0.17561742663383484, 0.6902702450752258, -0.9522402882575989, -0.1269950419664383, 0.1238403469324112, -0.4757193922996521, 0.6117461323738098, 0.09778360277414322, -0.08448118716478348, ...
func NewGetSsoParams() *GetSsoParams { var () return &GetSsoParams{ timeout: cr.DefaultTimeout, } }
[ 0.15239472687244415, 0.39797693490982056, 0.1271849423646927, 1.338175892829895, -0.7017454504966736, -0.5809309482574463, -0.3261353075504303, 0.2822050452232361, -0.43944820761680603, 0.2884328067302704, -0.3272687494754791, 0.2946814000606537, -0.8058077096939087, 0.5484147667884827, ...
func NewGetSsoParamsWithTimeout(timeout time.Duration) *GetSsoParams { var () return &GetSsoParams{ timeout: timeout, } }
[ 0.5081276893615723, -0.13365048170089722, 0.28508055210113525, 1.2798893451690674, -0.883810818195343, 0.15937387943267822, -1.1789593696594238, -0.08898268640041351, -0.5614023804664612, 1.1067864894866943, -0.12912413477897644, 0.4816231429576874, -0.2379240095615387, 0.7470747232437134,...
func NewGetSsoParamsWithContext(ctx context.Context) *GetSsoParams { var () return &GetSsoParams{ Context: ctx, } }
[ 0.0767153948545456, 0.044850703328847885, 0.36582571268081665, 0.8426732420921326, -0.8988617062568665, 0.21885667741298676, -1.0377415418624878, -0.8745304942131042, -0.011431122198700905, 0.46758365631103516, -0.1905612051486969, 0.15544849634170532, -0.2158236801624298, 0.48246335983276...
func NewGetSsoParamsWithHTTPClient(client *http.Client) *GetSsoParams { var () return &GetSsoParams{ HTTPClient: client, } }
[ 0.2239440232515335, 0.0048652165569365025, 0.38824164867401123, 0.870764970779419, -0.43119993805885315, 0.411437064409256, -0.26797059178352356, 0.20881575345993042, -0.6500373482704163, 0.35950663685798645, -0.3884620666503906, 0.21669642627239227, -0.3345983326435089, 0.2827283143997192...
func (o *GetSsoParams) WithTimeout(timeout time.Duration) *GetSsoParams { o.SetTimeout(timeout) return o }
[ 0.0004407826345413923, 0.841180682182312, 0.36978667974472046, 0.49503618478775024, -0.7355469465255737, 0.19090628623962402, -0.7450276613235474, 0.12660641968250275, 0.10361956059932709, 1.055045247077942, 0.0845736488699913, -0.05594918131828308, 0.5506908893585205, 0.345770001411438, ...
func (o *GetSsoParams) SetTimeout(timeout time.Duration) { o.timeout = timeout }
[ -0.41663190722465515, 0.9267087578773499, 0.22291459143161774, 0.695543110370636, -0.252129465341568, 0.4362088739871979, -0.3801729381084442, 0.2214350700378418, -0.2562633752822876, 0.7200552821159363, 0.05458374693989754, 0.2002965360879898, -0.050012413412332535, 0.39489996433258057, ...
func (o *GetSsoParams) WithContext(ctx context.Context) *GetSsoParams { o.SetContext(ctx) return o }
[ -0.6610767245292664, 0.9081806540489197, 0.5735787153244019, 0.46550750732421875, -0.8301317095756531, 0.23418916761875153, -0.7927978038787842, -0.6014208197593689, 0.48045724630355835, 0.37777432799339294, 0.08874142915010452, 0.029376551508903503, -0.14152273535728455, -0.20103056728839...
func (o *GetSsoParams) SetContext(ctx context.Context) { o.Context = ctx }
[ -1.0093634128570557, 0.8354204297065735, 0.34520211815834045, 0.7569034695625305, -0.35561972856521606, 0.31952735781669617, -0.6210996508598328, -0.34928613901138306, 0.5979746580123901, 0.20942160487174988, -0.09912280738353729, 0.23024682700634003, -0.6065990328788757, 0.037612225860357...
func (o *GetSsoParams) WithHTTPClient(client *http.Client) *GetSsoParams { o.SetHTTPClient(client) return o }
[ -0.19227451086044312, -0.019208582118153572, 0.5223186016082764, 0.2928617298603058, -0.6946445107460022, -0.12042861431837082, -0.094065360724926, -0.21833695471286774, -0.3607920706272125, 0.1832629293203354, -0.002355393022298813, -0.25609007477760315, 0.22431860864162445, -0.5986701250...
func (o *GetSsoParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client }
[ -0.043526966124773026, 0.12824010848999023, 0.3620402216911316, -0.1478232741355896, -0.8474547863006592, -0.15026243031024933, 0.10177427530288696, -0.20112386345863342, -0.6597725749015808, 0.12422399967908859, -0.2635616660118103, 0.15443222224712372, -0.3418289124965668, -0.63009780645...
func (o *GetSsoParams) WithCode(code string) *GetSsoParams { o.SetCode(code) return o }
[ -0.6574810743331909, 0.8998860120773315, 0.22594186663627625, 0.7473337054252625, -0.3084385395050049, 0.07814957946538925, -0.3301900029182434, 0.07575394958257675, 0.2167784869670868, 0.6845029592514038, 0.5312135219573975, -0.6375877857208252, 0.4019331932067871, 0.1599474847316742, -...
func (o *GetSsoParams) SetCode(code string) { o.Code = code }
[ -0.9621673226356506, 0.8993771076202393, 0.16222292184829712, 0.9278008937835693, -0.14714743196964264, -0.045566871762275696, -0.3838149905204773, 0.5479094386100769, 0.031049903482198715, 0.5218088626861572, 0.34530362486839294, -0.3664826452732086, -0.29668349027633667, 0.68372547626495...
func (o *GetSsoParams) WithResourceID(resourceID string) *GetSsoParams { o.SetResourceID(resourceID) return o }
[ 0.05331803485751152, -0.33133479952812195, 0.2507450580596924, 0.37305375933647156, -0.7560874819755554, 0.42372599244117737, -0.2871737480163574, 0.1104125902056694, 0.9631107449531555, 1.1765612363815308, 0.7425296306610107, -0.9913555383682251, 0.3883862793445587, 0.8185793161392212, ...
func (o *GetSsoParams) SetResourceID(resourceID string) { o.ResourceID = resourceID }
[ -0.4311158359050751, -0.42121824622154236, 0.2543979585170746, 0.354272723197937, -0.3647238612174988, 0.5943162441253662, 0.21583744883537292, 0.41648349165916443, 0.6350259184837341, 0.9741203188896179, 0.549115777015686, -0.12392591685056686, -0.43489882349967957, 1.2105087041854858, ...
func (o *GetSsoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // query param code qrCode := o.Code qCode := qrCode if qCode != "" { if err := r.SetQueryParam("code", qCode); err != nil { return err...
[ -1.0146528482437134, -0.03522232919931412, 0.889800488948822, -0.7460425496101379, 0.45689454674720764, -0.15235744416713715, 0.5800201892852783, 0.07507719099521637, -0.20315152406692505, 0.27122050523757935, 0.3206799328327179, 0.16674037277698517, -0.4236578941345215, -0.056526627391576...
func (d *Dao) Archives(c context.Context, aids []int64, ip string) (a map[int64]*api.Arc, err error) { var arg = &archive.ArgAids2{Aids: aids, RealIP: ip} if a, err = d.arc.Archives3(c, arg); err != nil { log.Error("rpc archive (%v) error(%v)", aids, err) err = ecode.CreativeArcServiceErr } return }
[ -0.9067150950431824, -0.32040345668792725, 0.3432980179786682, -0.4592590034008026, -0.18205386400222778, -0.12987951934337616, -0.19860833883285522, -0.22340084612369537, -0.07173514366149902, 0.02744879573583603, 0.29859817028045654, 0.7302036881446838, -0.24596408009529114, -0.078574471...
func (d *Dao) Stats(c context.Context, aids []int64, ip string) (a map[int64]*api.Stat, err error) { var arg = &archive.ArgAids2{Aids: aids, RealIP: ip} if a, err = d.arc.Stats3(c, arg); err != nil { log.Error("rpc Stats (%v) error(%v)", aids, err) err = ecode.CreativeArcServiceErr } return }
[ -0.5861640572547913, 0.023229818791151047, 0.32973265647888184, -0.8528634309768677, 0.2925596833229065, -0.3269753158092499, 0.14774592220783234, -0.7030949592590332, 0.35237357020378113, -0.062749944627285, 0.5084655284881592, 0.4788120687007904, 0.16435909271240234, -0.3260754346847534,...
func (d *Dao) UpCount(c context.Context, mid int64) (count int, err error) { var arg = &archive.ArgUpCount2{Mid: mid} if count, err = d.arc.UpCount2(c, arg); err != nil { log.Error("rpc UpCount2 (%v) error(%v)", mid, err) err = ecode.CreativeArcServiceErr } return }
[ -0.30393344163894653, 0.01216411404311657, 0.7536032795906067, -0.32589831948280334, -0.3269174098968506, -0.798348069190979, 0.7329481840133667, 0.05056694895029068, 0.21372367441654205, 0.696443498134613, -0.08442523330450058, 0.3453180491924286, -0.14428892731666565, 0.00430985633283853...
func Test(t *testing.T) { check.TestingT(t) }
[ 0.7916223406791687, 0.6248916387557983, 0.31418490409851074, 0.42968806624412537, 0.6187688708305359, 0.9380013346672058, 1.2121306657791138, -0.08558916300535202, -0.5670956969261169, 0.055333029478788376, -0.1507783979177475, -0.16721071302890778, -0.19589032232761383, 0.2281821370124817...
func New(addr, user, pass string) (*Client, error) { _, err := urlx.Parse(addr) if err != nil { return nil, err } if user == "" { return nil, errors.New("username is empty") } if pass == "" { return nil, errors.New("password is empty") } return &Client{ addr: addr, user: user, pass: pass, }, nil }
[ 0.5039163827896118, -0.8639152646064758, 0.514900803565979, 0.1954483687877655, -1.116453766822815, 0.25083452463150024, -0.31238070130348206, 0.3646974265575409, -0.7379171848297119, -0.5157314538955688, 0.39327239990234375, 0.8341327905654907, 0.23919525742530823, -0.3519357442855835, ...