text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (in *ServiceAccountRef) DeepCopy() *ServiceAccountRef { if in == nil { return nil } out := new(ServiceAccountRef) in.DeepCopyInto(out) return out }
[ 0.38504859805107117, -0.15267188847064972, -0.20597077906131744, 0.720801055431366, -0.25241994857788086, 0.22570672631263733, 1.1021674871444702, -0.36661452054977417, 0.010693835094571114, 0.14317815005779266, -0.09088929742574692, 1.0256919860839844, -0.8198503851890564, -0.499826520681...
func (in *ServiceRef) DeepCopyInto(out *ServiceRef) { *out = *in }
[ 0.548145055770874, 0.07274782657623291, 0.536861002445221, -0.5990012288093567, -0.947495698928833, 0.6252264976501465, 0.07183476537466049, 0.372469037771225, -1.1287496089935303, -0.39340940117836, -0.385953813791275, 1.3845915794372559, -0.46529969573020935, -0.29413875937461853, -0.7...
func (in *ServiceRef) DeepCopy() *ServiceRef { if in == nil { return nil } out := new(ServiceRef) in.DeepCopyInto(out) return out }
[ 0.061762742698192596, 0.24002934992313385, 0.03529196232557297, 0.40135568380355835, -0.5008095502853394, 0.2126110941171646, 0.7075960040092468, -0.4239073693752289, -0.3890555202960968, 0.08958172053098679, -0.1377602517604828, 0.6697546243667603, -1.6499487161636353, -0.2586234509944916...
func (c Client) Projects() ([]Project, error) { u := mustParseURL(c.baseURL) u.Path += "projects" projects := make([]Project, 0) // if there's more projects than returned by default by the API, links array will // be provided. The object that has the 'rel' field with the value of 'next' will // also contain the...
[ -1.096112608909607, 0.7888914942741394, 0.23468804359436035, -0.00739635294303298, 0.488986998796463, -0.2997973561286926, -0.6983175277709961, -0.21280799806118011, 0.17104390263557434, -0.42390358448028564, 0.17479956150054932, 0.06354811787605286, -0.7147669792175293, 0.0622180439531803...
func Upload(w http.ResponseWriter, r *http.Request) { // Get uploaded file r.ParseMultipartForm(32 << 20) file, _, err := r.FormFile("uploadFile") if err != nil { w.WriteHeader(http.StatusBadRequest) fmt.Println(err) return } defer file.Close() // Get isPublic attribute IsPublicFromValue := r.FormValue("...
[ -1.1333317756652832, 0.582939863204956, 0.9833587408065796, 0.8123164772987366, 0.2559320330619812, 0.2811887860298157, 0.626579999923706, -0.42401358485221863, -0.5894031524658203, -0.12208244949579239, -0.3508685231208801, -0.12135308980941772, 0.505463719367981, 0.30734795331954956, 0...
func ChangePermissions(w http.ResponseWriter, r *http.Request) { // Identify who the user is username := r.Context().Value("username") if username == nil { w.WriteHeader(http.StatusInternalServerError) return } // Get userid for user userID, err := GetUserGUID(username.(string)) if err != nil { w.Write([]...
[ -1.143561601638794, -0.014167841523885727, 0.9598056674003601, 0.6204470992088318, -0.2989561855792999, 0.0854807123541832, 0.7343490123748779, -0.346849650144577, -0.6432684659957886, 0.8996281623840332, 0.22641970217227936, 0.4290502369403839, 0.13430343568325043, 0.4618544578552246, 0...
func Delete(w http.ResponseWriter, r *http.Request) { // get user info username := r.Context().Value("username") if username == nil { w.WriteHeader(http.StatusInternalServerError) return } // retrieve photo id from api call var requestedPhoto Photo err := json.NewDecoder(r.Body).Decode(&requestedPhoto) if ...
[ -0.5062639117240906, -0.38537994027137756, 0.8499263525009155, 0.8058315515518188, 0.13436749577522278, 0.23405314981937408, 0.7885361313819885, -0.1779552847146988, -0.14282287657260895, 0.13687565922737122, 0.13247287273406982, -0.16430345177650452, 0.1460142582654953, 0.2896118462085724...
func firstBadVersion(n int) int { return sort.Search(n, func(version int) bool { return isBadVersion(version) }) }
[ -0.22133024036884308, -0.19649691879749298, 0.49100837111473083, 0.3505185842514038, 0.268530935049057, -0.4627714455127716, -0.4377750754356384, -0.5961253643035889, -0.2626151144504547, -0.4611743688583374, -0.5108352899551392, -0.18280324339866638, -0.3849058151245117, 1.468418598175048...
func NewUsecase(outputPort Outport) Inport { return &showPostBySlugInteractor{ outport: outputPort, } }
[ 0.2665320634841919, -0.23351509869098663, 0.27861717343330383, 0.2723884582519531, -0.9313517212867737, -0.7920789122581482, 0.8666527271270752, -0.11207325756549835, -0.07729969918727875, 0.31831875443458557, 0.3224523961544037, -0.3558047413825989, -0.7047441601753235, -0.396933197975158...
func (r *showPostBySlugInteractor) Execute(ctx context.Context, req InportRequest) (*InportResponse, error) { res := &InportResponse{} err := repository.WithTransaction(ctx, r.outport, func(ctx context.Context) error { postObj, err := r.outport.FindPostBySlug(ctx, req.Slug) if err != nil { return apperror.Ob...
[ 0.005735483951866627, -0.8318197727203369, 0.9646753668785095, -0.5384594798088074, -0.13601252436637878, -0.48440590500831604, -0.04637937247753143, -0.17185014486312866, -0.10683193057775497, 0.1387314647436142, -0.5125738382339478, -0.47250601649284363, -0.8533369302749634, -0.587609350...
func sprintByteHex(b []byte) string { output := "\t" for i, b := range b { output += fmt.Sprintf("%x", b) if (i+1)%16 == 0 { output += "\n\n\t" } else if (i+1)%4 == 0 { output += " " } else { output += " " } } output += "\n" return output }
[ -0.29429149627685547, -0.24307440221309662, 0.8880729675292969, -0.054519012570381165, -0.17751707136631012, 0.7091042399406433, -0.9192951917648315, 0.07969772070646286, -0.10387089848518372, 0.810248851776123, -0.17940475046634674, -0.6401418447494507, -0.12928462028503418, 0.29457896947...
func driverArgsToMap(args []driver.Value) (map[string]interface{}, error) { output := map[string]interface{}{} for _, arg := range args { argBytes, ok := arg.([]byte) if !ok { return nil, errors.New("You must pass only a gob encoded map to the Exec/Query args") } m, err := encoding.Unmarshal(argBytes) i...
[ -1.2598884105682373, -0.23075318336486816, 0.7905969619750977, 0.07274238765239716, 0.17140422761440277, 0.005320291500538588, -0.029623255133628845, 0.47432586550712585, 0.24631600081920624, 1.3828898668289185, 0.17073993384838104, -0.6844233870506287, -0.7017358541488647, 0.2207661122083...
func fetchScheduledGames() []gm.Game { uri := viper.GetString("master_URL") + "/api/games" resp, _ := http.Get(uri) defer closeResponse(resp) body, _ := ioutil.ReadAll(resp.Body) var gms []gm.Game jsonErr := json.Unmarshal(body, &gms) if jsonErr != nil { logger.Error().Msg("could not get schedule game from...
[ -0.402375727891922, -0.2951982021331787, 0.4814613163471222, -0.004790641367435455, -0.1911310851573944, -0.08238563686609268, -2.1367859840393066, -0.14195333421230316, -0.08835730701684952, 0.9947755932807922, -0.23141610622406006, 0.7170168161392212, -0.8239858150482178, 0.1640310883522...
func isInLocalDB(game gm.Game) bool { dbGames := db.GetGames() for _, g := range dbGames { if game.GameID == g.GameID { return true } } return false }
[ 0.43430250883102417, -0.12584109604358673, 0.6062967777252197, -0.10371316969394684, -0.6070533990859985, 0.258287250995636, -1.0492628812789917, 0.22196201980113983, 0.31482890248298645, 1.4448373317718506, -0.4794815182685852, 0.28566986322402954, -1.6689374446868896, 1.356721043586731, ...
func pushToLocalDB(games []gm.Game) { t := time.Now() for _, game := range games { if int64(t.Unix()) < game.AbsStart+int64(game.Duration) { if !isInLocalDB(game) { db.ScheduleGame(game) } } } }
[ -0.4561169743537903, 0.3816896677017212, 0.7653255462646484, 0.15413324534893036, -0.11597315222024918, 0.8281034827232361, -0.7133141160011292, -0.3287881016731262, -0.643175482749939, 2.1958260536193848, 0.07518795877695084, -0.026450270786881447, -0.6914963126182556, 0.5613781213760376,...
func StartSyncLoop() { interval := time.NewTicker(30 * time.Second) quit := make(chan struct{}) go fetchGames(interval, quit) }
[ 0.6940935254096985, 0.4482666850090027, 0.5544204711914062, 0.39945468306541443, 0.25859057903289795, 0.9055752158164978, 0.5848187208175659, -0.9421983957290649, -0.7144289016723633, 0.4914299249649048, -0.008464251644909382, 1.3305234909057617, 0.39264604449272156, -0.045535407960414886,...
func init() { urls = &pluginWebURL{ base: "https://api.github.com", authURL: "/authorizations", assigneeURL: "/repos/%s/%s/issues/%d/assignees", issueURL: "/repos/%s/%s/issues", labelURL: "/repos/%s/%s/issues/%d/labels", repo: "/repos/%s/%s", userRepo: "/user/repos", } info,...
[ 0.2447783201932907, -0.37500280141830444, 0.43701818585395813, -0.9862449765205383, 0.38203686475753784, 0.49272236227989197, -0.9513971209526062, 0.8753653168678284, -0.6680641770362854, -0.3277912139892578, -1.0577952861785889, 0.48999473452568054, -0.28278475999832153, 0.263864070177078...
func (g *GitHubImpl) Default() (defUrl string, err error) { URL := fmt.Sprintf(g.URLNoEsc(g.pluginWebURL.repo), g.org, g.repo) req, _ := http.NewRequest("GET", URL, nil) q := req.URL.Query() q.Add("access_token", g.token) req.URL.RawQuery = q.Encode() body, err := NewPWRequest().Do(req) if err != nil { retu...
[ 0.3994065225124359, 0.8439887166023254, 0.4625933766365051, -0.16009807586669922, 1.0023835897445679, -0.538167417049408, -0.6623714566230774, 0.3063760995864868, -0.5856847167015076, 0.00424471078440547, -0.28009817004203796, 0.4403741955757141, -1.0026789903640747, 0.3570099472999573, ...
func (g *GitHubImpl) SetAssignee(assignee string, issue int) (err error) { URL := fmt.Sprintf(g.URLNoEsc(urls.assigneeURL), g.org, g.repo, issue) jsonBytes, _ := json.Marshal(Assignee{Assignees: []string{assignee}}) req, _ := http.NewRequest("POST", URL, bytes.NewBuffer(jsonBytes)) req.Header.Set("Content-Type", ...
[ -1.257995367050171, -0.5540428161621094, 0.5715352892875671, -0.48587197065353394, -0.25809890031814575, 0.4266549348831177, -0.8833774328231812, 0.1066141128540039, -0.7654171586036682, 0.5335367321968079, -0.5406972169876099, 0.561421811580658, -0.6125865578651428, 0.7821976542472839, ...
func (g *GitHubImpl) Auth(user, pass string) (token string, err error) { perm, err := createGHPermissions() if err != nil { return "", err } req, _ := http.NewRequest("POST", g.URLNoEsc(urls.authURL), bytes.NewBuffer([]byte(perm))) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.SetBas...
[ -0.012441753409802914, -0.027964506298303604, 0.596741795539856, 0.7558261752128601, -0.4490503668785095, 0.4371448755264282, -0.1941431611776352, -0.18661874532699585, -0.3815726637840271, -0.4749974310398102, 0.26989880204200745, 1.4768574237823486, -0.4727330803871155, -0.58271944522857...
func (g *GitHubImpl) CheckAuth() (bool, error) { URL := fmt.Sprintf(g.URLNoEsc(urls.userRepo)) req, _ := http.NewRequest("GET", URL, nil) q := req.URL.Query() q.Add("access_token", g.token) req.URL.RawQuery = q.Encode() client := http.DefaultClient res, err := client.Do(req) if err != nil { return false, e...
[ -0.32714787125587463, 0.08379751443862915, 0.8166669011116028, 0.19870398938655853, 0.3183232843875885, 0.3976454436779022, -0.0821554958820343, 0.34160372614860535, -0.31654906272888184, -0.06698577851057053, 0.3988724946975708, 0.6182530522346497, -0.21151836216449738, -0.207891091704368...
func (u *UserDAO) Get(id int) User { stmt, err := db.Instance().Prepare("select uid, username, password from userinfo where uid=$1") db.CheckErr(err) rows, err := stmt.Query(id) var usr User for rows.Next() { var uid int var username string var password string err = rows.Scan(&uid, &username, &password) ...
[ -0.842277467250824, -0.31612417101860046, 0.46539390087127686, -0.44482001662254333, -0.342555969953537, 0.2458656132221222, -0.6019797921180725, 0.1695799082517624, 0.27968254685401917, -0.908073902130127, -0.3941032290458679, -0.25921308994293213, 0.2389422506093979, -0.04938162118196487...
func (u *UserDAO) GetUserByName(uname string) User { stmt, err := db.Instance().Prepare("select uid, username, password from userinfo where username=$1") db.CheckErr(err) rows, err := stmt.Query(uname) var usr User for rows.Next() { var uid int var username string var password string err = rows.Scan(&uid...
[ -0.4543701708316803, 0.27094781398773193, 0.3353753089904785, 0.014874395914375782, -0.4027738571166992, 0.0030154655687510967, 0.19608445465564728, 0.06133731082081795, -0.13904860615730286, 0.15369759500026703, -0.8590890169143677, -1.2934613227844238, -0.30053630471229553, -0.1040672585...
func OpenPCAP(file string) (*Pcap, error) { handle, err := pcap.OpenOffline(file) if err != nil { return nil, err } return &Pcap{source: gopacket.NewPacketSource(handle, handle.LinkType())}, nil }
[ -0.1312689483165741, -0.14182502031326294, 0.4775712490081787, -0.3973206579685211, -1.1167733669281006, 0.9468653798103333, 0.39940980076789856, 0.8337888717651367, 0.6236735582351685, -0.27382397651672363, -0.19094905257225037, -0.20584918558597565, -0.6162609457969666, 0.182160764932632...
func (p *Pcap) PacketData() chan PacketData { if p.channel == nil { p.channel = make(chan PacketData, 5) go func() { for gp := range p.source.Packets() { p.channel <- PacketData(gp.Data()) } }() } return p.channel }
[ -0.36933162808418274, 0.0014684413326904178, 0.49084609746932983, -1.0860828161239624, 0.24028001725673676, 0.9081777334213257, -0.1944621503353119, -0.32702332735061646, 0.5847095251083374, -1.0549880266189575, -0.12743377685546875, 0.5271283388137817, -0.21372760832309723, 0.667217493057...
func (tickerSet TickerSet) Add(ticker string) { tickerSet[ticker] = true }
[ -0.27236121892929077, 0.2631447911262512, 0.1303882896900177, -0.9744543433189392, -0.4832504391670227, 0.3754308521747589, -0.20639197528362274, -0.6351302862167358, -0.13176800310611725, 0.4899357259273529, -0.5218874216079712, 0.398127019405365, -0.9658341407775879, 1.3119527101516724, ...
func NewTickerSet() TickerSet { return make(TickerSet) }
[ -0.2651708722114563, -0.17789728939533234, -0.017860818654298782, -0.4004131853580475, -0.8981407284736633, -0.6651005148887634, 0.5213735699653625, -1.7387031316757202, -0.9962431192398071, -0.8294357657432556, -0.126705601811409, 0.9105426669120789, -0.8958510756492615, 0.597220361232757...
func (tickerSet TickerSet) ToSlice() []string { tickerSlice := make([]string, 0) for ticker, _ := range tickerSet { tickerSlice = append(tickerSlice, ticker) } return tickerSlice }
[ -0.6695927381515503, -0.20051436126232147, 0.4910796582698822, -0.22848224639892578, 0.6222206950187683, -0.62041175365448, -0.5016622543334961, -1.3656805753707886, -0.018646905198693275, 1.806349754333496, 0.1959415078163147, 0.9861165285110474, -0.9418694972991943, 0.5721358060836792, ...
func readBulk(reader *bufio.Reader, head string) ([]byte, error) { var err error var data []byte if head == "" { head, err = reader.ReadString('\n') if err != nil { return nil, err } } switch head[0] { case ':': data = []byte(strings.TrimSpace(head[1:])) case '$': size, err := strconv.Atoi(strings...
[ -0.06458066403865814, -0.16305628418922424, 0.9962114095687866, 0.3459494709968567, -0.13223886489868164, -0.19286738336086273, -1.3281184434890747, 0.15031291544437408, -0.06272652745246887, 0.1910850703716278, -0.3517165780067444, 1.0083842277526855, -0.08496403694152832, 0.2651235461235...
func (client *Client) OpenConnection() (c net.Conn, err error) { var addr = defaultAddr if client.Addr != "" { addr = client.Addr } c, err = net.Dial("tcp", addr) if err != nil { return } //handle authentication here authored by @shxsun if client.Password != "" { cmd := fmt.Sprintf("AUTH %s\r\n", clien...
[ -0.567936897277832, 0.4283796548843384, 0.6047266125679016, -0.1843070238828659, -0.32471126317977905, -0.20946137607097626, 0.7653529644012451, 0.3221875727176666, -0.0787414014339447, 0.016850514337420464, 0.5089685916900635, -0.6861451864242554, -0.13443228602409363, -0.0371608994901180...
func (client *Client) processCommand(c net.Conn, cmd string, args ...string) (interface{}, error) { var b []byte b = commandBytes(cmd, args...) data, err := client.rawSend(c, b) return data, err }
[ -0.5092126727104187, 0.2867247760295868, 0.7075856328010559, -0.3345972001552582, -0.154296413064003, -0.10996042937040329, -0.4039892852306366, -0.37324056029319763, -0.07799696177244186, -0.029130063951015472, -0.49416863918304443, 0.6685594320297241, -0.8866645097732544, 0.6913309097290...
func (client *Client) InputReader(c net.Conn) { scanner := bufio.NewScanner(os.Stdin) fmt.Print("> ") for scanner.Scan() { args := strings.Split(scanner.Text(), " ") if args[0] == "exit" { os.Exit(0) } response, err := client.processCommand(c, args[0], args[1:]...) parseResponse(response, err, defaultTa...
[ -0.0012650331482291222, -0.1505361944437027, 1.0990651845932007, 0.4048413336277008, -0.13268722593784332, 0.7237120270729065, 0.16521331667900085, 0.3271062970161438, -0.7288203835487366, -0.1379755735397339, 0.3350142240524292, 0.10895286500453949, -0.7064692974090576, 0.5775485038757324...
func (m Metrics) Expose() []*prometheus.CounterVec { var exposed []*prometheus.CounterVec if m.RequestCounter { exposed = append(exposed, httpReqs) } if m.ProxyCounter { exposed = append(exposed, proxyCount) } return exposed }
[ -0.12384068220853806, 0.09075544774532318, 0.5274829864501953, -0.091334767639637, 0.08701462298631668, 0.6564298868179321, 0.2990378439426422, -0.45944100618362427, -0.013723528012633324, 0.04523569718003273, 0.5044480562210083, 0.37644657492637634, -0.2219669222831726, 1.4684641361236572...
func (p Provider) RandProxy() Proxy { s := rand.NewSource(time.Now().Unix()) r := rand.New(s) rand := r.Intn(len(p.Data)) return p.Data[rand].Proxy }
[ -0.5746718645095825, 0.4362652003765106, 0.3683412969112396, -1.4683271646499634, -0.5864925980567932, 0.12000765651464462, -0.5734354257583618, -0.5239763855934143, 1.011796474456787, -0.053224898874759674, -0.342989057302475, 0.0443769134581089, -1.4974603652954102, -0.17414888739585876,...
func (p Provider) NewClient(req *retryablehttp.Request, opts RetryOptions) (*retryablehttp.Client, string, error) { proxy := p.RandProxy() proxyURL, err := url.ParseRequestURI(fmt.Sprintf("http://%s:%s", proxy.IP, proxy.PortNum)) if err != nil { return &retryablehttp.Client{}, "", fmt.Errorf("%v", err) } client...
[ -0.06007378175854683, -0.38108906149864197, 0.8658714294433594, -0.14293508231639862, -0.40133970975875854, -0.10571567714214325, 0.257863312959671, -0.05711718276143074, -0.007004205137491226, 0.2988553047180176, -0.18905818462371826, 0.4877334535121918, -0.19247426092624664, -1.254738211...
func (p Provider) Get(url string, header http.Header, o RetryOptions) (http.Response, error) { req, err := retryablehttp.NewRequest("GET", url, nil) if err != nil { return http.Response{}, err } req.Header = header client, proxyIP, err := p.NewClient(req, o) if err != nil { return http.Response{}, err } ...
[ -0.43070128560066223, 0.22647690773010254, 1.056848168373108, -0.13310867547988892, 0.29686084389686584, -0.5808600187301636, -0.943124532699585, -0.10302897542715073, -0.0034909057430922985, 0.6117110252380371, -0.4723162055015564, 0.6961644291877747, -0.7256878614425659, -1.3213257789611...
func NewProvider(key string) (Provider, error) { if key == "" { return Provider{}, fmt.Errorf("empty API key") } p := Provider{} client := &http.Client{Timeout: 10 * time.Second} r, err := client.Get(ghostAPI + "?key=" + key) if err != nil { return Provider{}, err } defer r.Body.Close() json.NewDecoder(r....
[ -1.0542205572128296, 0.465677410364151, 0.3232274055480957, -0.6666132211685181, -0.8130114078521729, 0.19550389051437378, -0.5712737441062927, 0.21800781786441803, 0.344387412071228, 1.0459315776824951, 0.26554855704307556, 0.059312619268894196, -0.6930369138717651, 0.6656637191772461, ...
func NewConfig(stepSize, beta1, beta2, epsilon float64) Config { if !(beta1 >= 0.0 && beta1 < 1.0) { panic("adam: `beta1` must be in the range [0.0, 1.0)") } if !(beta2 >= 0.0 && beta2 < 1.0) { panic("adam: `beta2` must be in the range [0.0, 1.0)") } return Config{ StepSize: stepSize, Beta1: beta1, Be...
[ 0.2298879623413086, -0.2169768512248993, 0.46636658906936646, 0.4415450096130371, -0.7876716256141663, 0.379618376493454, -0.21929770708084106, -0.24613474309444427, -1.2857526540756226, 0.05505712330341339, -0.22948981821537018, 0.2930542826652527, 0.1590329110622406, 1.1519877910614014, ...
func NewDefaultConfig() Config { return Config{ StepSize: 0.001, Beta1: 0.9, Beta2: 0.999, Epsilon: 1.0e-8, } }
[ 1.0578588247299194, 0.17691388726234436, 0.28670981526374817, 0.3233795166015625, -0.13091178238391876, -0.008696923032402992, -0.34078070521354675, 0.04325529560446739, -0.43884143233299255, -0.07549665123224258, -0.9741434454917908, -0.6375885009765625, 0.15366530418395996, 1.69565379619...
func New[T float.DType](c Config) *RAdam[T] { adam := &RAdam[T]{ Config: c, RoMax: 2.0/(1.0-c.Beta2) - 1.0, TimeStep: 1.0, } return adam }
[ 0.1410161554813385, -0.9144174456596375, 0.2521665692329407, -0.1644309014081955, -0.27049434185028076, 0.29337912797927856, 0.08527982980012894, -0.30526164174079895, -0.5306724905967712, 0.3206445276737213, -0.7298610806465149, 0.32809510827064514, 0.2804092466831207, 0.8734935522079468,...
func (o *RAdam[T]) newState(shape ...int) *State { r, c := shape[0], shape[1] return &State{ M: mat.NewDense[T](mat.WithShape(r, c)), V: mat.NewDense[T](mat.WithShape(r, c)), Buf1: mat.NewDense[T](mat.WithShape(r, c)), Buf2: mat.NewDense[T](mat.WithShape(r, c)), Buf3: mat.NewDense[T](mat.WithShape(r, ...
[ 0.7362036108970642, -0.1607385277748108, 0.6887532472610474, -0.6523603200912476, -0.3703652620315552, 0.18666161596775055, 0.6337187886238098, -0.2547883987426758, 0.37628960609436035, 0.6540725231170654, -0.7162691950798035, -0.27247154712677, 0.5574880242347717, -0.39930883049964905, ...
func (o *RAdam[_]) IncBatch() { o.TimeStep++ }
[ 0.3727741241455078, 0.6051235198974609, 0.3321719169616699, 0.5905866622924805, 0.13778753578662872, 0.788314938545227, 0.09482701867818832, 0.3355183005332947, -0.09189599007368088, -0.41017118096351624, -0.9542557597160339, 0.6991703510284424, 0.3997849225997925, 1.0049169063568115, 0....
func updateM(grads mat.Matrix, state *State, beta1 float64) { state.M.ProdScalarInPlace(beta1) state.Buf1.ProdMatrixScalarInPlace(grads, 1.0-beta1) state.M.AddInPlace(state.Buf1) }
[ -0.45030340552330017, -0.7615047097206116, 0.4966360926628113, -0.16410505771636963, -0.5661026239395142, 1.282942295074463, 0.46906542778015137, -0.2048473060131073, -0.17372778058052063, 0.5698827505111694, -0.36853137612342834, 0.5346355438232422, -0.10704407095909119, 0.213996782898902...
func updateV(grads mat.Matrix, state *State, beta2 float64) { state.V.ProdScalarInPlace(beta2) sqGrad := grads.Prod(grads) state.Buf2.ProdMatrixScalarInPlace(sqGrad, 1.0-beta2) state.V.AddInPlace(state.Buf2) }
[ -0.0514327809214592, -1.0322554111480713, 0.4344440698623657, -0.6241515278816223, -0.409608393907547, 0.5643905997276306, 0.24057210981845856, -0.0042366026900708675, 0.0005080064292997122, 0.6848737001419067, -0.9689429402351379, 1.3232992887496948, 0.40893247723579407, 0.048773221671581...
func GenerateImageMetaData(howMany int) *List { list := &List{} for i := 0; i < howMany; i++ { img := &Image{} img.Name = fmt.Sprintf("IMG_%06d.jpg", i) img.Id = CreateString(16) w, h := Resolution() img.Width = w img.Height = h img.TakenAt = Time(i, 12) img.LastMod = Time(i, 13) img.Sha256 = Create...
[ -1.0708553791046143, 0.008716094307601452, 0.7394890785217285, -0.3752284348011017, 0.4695425033569336, -0.20182140171527863, -0.1778743863105774, -0.16956782341003418, 0.17960835993289948, 0.6581668257713318, -1.3795955181121826, -0.6078469753265381, 0.2600571811199188, 1.045466423034668,...
func (s *Server) Block(ctx context.Context, req *rtypes.BlockRequest) (*rtypes.BlockResponse, *rtypes.Error) { _, _, b, err := s.getBlockByPartialId(ctx, req.BlockIdentifier) if err != nil { return nil, types.DcrdError(err) } var prev *wire.MsgBlock // Fetch the previous block when the current block disapproves...
[ -0.855586588382721, 0.43223169445991516, 0.9480957984924316, 0.2053249329328537, 0.039457470178604126, -0.09961161762475967, 0.7668105363845825, -1.3092032670974731, 0.36001211404800415, 0.3097558915615082, 0.5075399875640869, 0.7812702059745789, -0.8481395244598389, 0.571848452091217, 0...
func (s *Server) BlockTransaction(context.Context, *rtypes.BlockTransactionRequest, ) (*rtypes.BlockTransactionResponse, *rtypes.Error) { return nil, types.ErrUnimplemented.RError() }
[ -0.870962917804718, 0.3074913024902344, 0.6069653630256653, 0.16265423595905304, -0.08950304239988327, 0.22729676961898804, 0.9902660250663757, -1.0598143339157104, 0.5003582239151001, 0.22615870833396912, -1.3602184057235718, 0.6392375826835632, -0.54237961769104, -0.4265115261077881, -...
func (actor Actor) GetOrganizationSpaces(orgGUID string) ([]Space, Warnings, error) { ccv2Spaces, warnings, err := actor.CloudControllerClient.GetSpaces(ccv2.Query{ Filter: ccv2.OrganizationGUIDFilter, Operator: ccv2.EqualOperator, Values: []string{orgGUID}, }) if err != nil { return []Space{}, Warnings(...
[ -0.27602940797805786, 0.3301566243171692, 0.18333935737609863, 0.3923030197620392, -0.013159449212253094, 0.19199499487876892, 0.44209253787994385, -0.5751541256904602, 0.467641681432724, 0.19662773609161377, -0.04877443611621857, 1.0706018209457397, -0.49507632851600647, 1.488861799240112...
func (actor Actor) GetSpaceByOrganizationAndName(orgGUID string, spaceName string) (Space, Warnings, error) { ccv2Spaces, warnings, err := actor.CloudControllerClient.GetSpaces( ccv2.Query{ Filter: ccv2.NameFilter, Operator: ccv2.EqualOperator, Values: []string{spaceName}, }, ccv2.Query{ Filter: ...
[ 0.5709317326545715, -0.6717668175697327, 0.3827749788761139, 0.30095598101615906, -0.17008201777935028, -0.27045318484306335, 0.1356111466884613, -0.6591967940330505, 0.451658695936203, 0.18703410029411316, 0.6483127474784851, 1.315757155418396, -0.1698298156261444, 1.0356533527374268, 0...
func New(t time.Time) *Now { return &Now{t} }
[ -0.10777413100004196, -0.9916325807571411, 0.3252621591091156, 0.20411835610866547, -1.2482755184173584, 0.061425793915987015, -0.4727906584739685, -0.07227560877799988, -0.8449701070785522, 0.2932225167751312, -1.0945196151733398, 0.16358627378940582, 1.150181770324707, 0.8175605535507202...
func BeginningOfYear() time.Time { return New(time.Now()).BeginningOfYear() }
[ 0.6171923279762268, -0.6373074650764465, 0.40376895666122437, 0.32178348302841187, -1.2798622846603394, -0.15354396402835846, -0.6247310042381287, -0.7813038229942322, 0.8748391270637512, 0.2967475652694702, 0.35604146122932434, 0.3224252462387085, 0.3800838589668274, 0.47226518392562866, ...
func (now *Now) BeginningOfYear() time.Time { y, _, _ := now.Date() return time.Date(y, time.January, 1, 0, 0, 0, 0, now.Location()) }
[ 0.5125770568847656, -1.040164828300476, 0.564105212688446, 0.18947787582874298, -0.8183907270431519, -0.18848346173763275, -0.27821022272109985, -0.9808818697929382, 0.6510435342788696, 0.4802292585372925, 0.4772959351539612, 0.3424359858036041, 0.7278546094894409, 1.1091734170913696, -0...
func (r *Ris) Render() { r.render() }
[ 0.40017467737197876, -0.41986083984375, 0.18656641244888306, -0.03829354792833328, 0.9252193570137024, 0.07539083063602448, -0.05788953974843025, -0.19553902745246887, -0.3212745487689972, -0.19420205056667328, 0.11296425759792328, 0.1952977478504181, -1.537139654159546, 0.4357357025146484...
func NewRateLimiter(capacity int) *RateLimiter { semaphore := make(chan bool, capacity) // Fill channel for i := 0; i < capacity; i++ { semaphore <- true } return &RateLimiter{semaphore} }
[ 0.014255822636187077, 0.3541610836982727, 0.5133870840072632, 0.26792508363723755, -0.44902554154396057, -0.4764845371246338, -1.1357324123382568, -0.3798925578594208, -0.10398586839437485, 0.30557647347450256, 0.012441339902579784, 0.1901709884405136, -0.8221344351768494, -0.0046417000703...
func (rater *RateLimiter) Limit() { <-rater.semaphore }
[ 0.4556801915168762, -0.06933699548244476, 0.36483654379844666, 0.2074141800403595, 0.2127663493156433, 0.40175601840019226, -0.460570752620697, 0.46824535727500916, 0.5991508960723877, 0.9564247131347656, 0.6761270761489868, 0.10003671050071716, -0.9856211543083191, 0.4966064393520355, 0...
func (rater *RateLimiter) Free() { rater.semaphore <- true }
[ 0.3231411576271057, 0.5156099796295166, 0.29924070835113525, -0.15411882102489471, -0.31494152545928955, 0.45989683270454407, -0.4505562484264374, -0.6774865388870239, -0.0021316385827958584, 0.6927168965339661, -0.040780309587717056, 0.1853279024362564, -1.3376818895339966, 0.555614590644...
func (app *applicationBuilder) Create() ApplicationBuilder { return createApplicationBuilder() }
[ 0.8371926546096802, -0.14793607592582703, 0.09216650575399399, 1.703215479850769, -0.538414716720581, 0.7812957763671875, -0.432767391204834, 0.616487979888916, 0.4311046302318573, -0.8178737163543701, 0.3639291524887085, 0.050584349781274796, -0.7718349099159241, 1.5539190769195557, -0....
func (app *applicationBuilder) WithHead(head HeadSection) ApplicationBuilder { app.head = head return app }
[ 0.8001834154129028, -0.8256868124008179, 0.36319130659103394, 1.0922768115997314, -0.4925433397293091, 0.9866669178009033, -0.2121683955192566, -0.387370228767395, 1.2963056564331055, -0.31800493597984314, 0.5609748959541321, 0.1914086788892746, 0.09999627619981766, 0.34838971495628357, ...
func (app *applicationBuilder) WithLabel(label LabelSection) ApplicationBuilder { app.label = label return app }
[ 1.2420259714126587, -0.963249683380127, 0.1912613809108734, 0.5184680819511414, -0.42625853419303894, 0.9673945307731628, -0.43090373277664185, 0.16879446804523468, 1.11276113986969, -0.2457267791032791, 0.7188825607299805, -0.2006424367427826, 0.5308713316917419, 0.7033670544624329, -0....
func (app *applicationBuilder) WithMain(main MainSection) ApplicationBuilder { app.main = main return app }
[ 0.8701378703117371, -0.8203712701797485, 0.4396175742149353, 0.551845908164978, -0.8586229681968689, 0.8144000768661499, -0.11223973333835602, 0.4506053626537323, 0.529561460018158, -0.6509860157966614, 0.7732899188995361, -0.45238083600997925, -0.2680814862251282, 0.7860082387924194, -0...
func (app *applicationBuilder) WithTest(test TestSection) ApplicationBuilder { app.test = test return app }
[ 1.4943338632583618, -0.31257978081703186, 0.3359433114528656, 0.8504799604415894, -0.23442161083221436, 0.37084057927131653, 0.09111042320728302, -0.23401892185211182, 0.9456828236579895, -0.6913322806358337, 0.40258026123046875, -0.30392318964004517, 0.035254668444395065, 0.61043667793273...
func (app *applicationBuilder) WithDefinition(def DefinitionSection) ApplicationBuilder { app.def = def return app }
[ 0.9866021871566772, -0.21262477338314056, 0.26196515560150146, 1.2279216051101685, 0.06741289794445038, 0.1086585596203804, -0.024715516716241837, 0.42684417963027954, 0.901200532913208, -0.3772583603858948, -0.0770428404211998, 0.13534381985664368, 0.7593789100646973, 1.935645580291748, ...
func (app *applicationBuilder) Now() (Application, error) { if app.head == nil { return nil, errors.New("the HeadSection is mandatory in order to build a Application instance") } if app.main == nil { return nil, errors.New("the MainSection is mandatory in order to build a Application instance") } if app.test...
[ 0.1980574131011963, -1.136112093925476, 0.7080209255218506, 0.7233163714408875, 0.06350979208946228, 0.659064769744873, 0.03216047212481499, -0.24288100004196167, -0.2391408085823059, -0.16293244063854218, 0.09812508523464203, -0.056419193744659424, -0.3403317630290985, 0.7866658568382263,...
func (o *Cos) Init(prms Prms) (err error) { for _, p := range prms { switch p.N { case "a": o.a = p.V case "b": o.b = p.V case "c": o.c = p.V case "b/pi": // b/π => b = b/pi * π o.b = p.V * math.Pi default: return chk.Err("cos: parameter named %q is invalid", p.N) } } return }
[ -0.639959990978241, -0.38335177302360535, 0.39520925283432007, -0.6882736682891846, 0.6641442179679871, 0.5623263120651245, -0.09104212373495102, 0.30315056443214417, -0.3899122178554535, 0.7602732181549072, -0.06897453963756561, 0.17735296487808228, -0.10141133517026901, 0.218756958842277...
func (o Cos) F(t float64, x []float64) float64 { return o.a*math.Cos(o.b*t) + o.c }
[ 0.2963257133960724, 0.18709395825862885, 0.21649961173534393, -0.27840667963027954, 0.8530208468437195, 0.05576762929558754, -0.0631222277879715, -0.02163509652018547, -1.1794421672821045, 0.5774130821228027, -0.18995386362075806, -0.7048525214195251, 1.4291224479675293, -0.806778311729431...
func (ac *AppCreate) SetName(s string) *AppCreate { ac.mutation.SetName(s) return ac }
[ -0.05449996143579483, 0.1142231673002243, 0.3045915365219116, 1.6537505388259888, -0.6631598472595215, 0.5354576110839844, 0.12732456624507904, 0.20533771812915802, 0.21670670807361603, 0.39704209566116333, -0.7597416639328003, -0.9580390453338623, 0.919137716293335, 0.42978107929229736, ...
func (ac *AppCreate) SetVersion(s string) *AppCreate { ac.mutation.SetVersion(s) return ac }
[ 0.22582975029945374, -0.07029812037944794, 0.05934610962867737, 2.114565372467041, 0.31150591373443604, 1.057532787322998, 0.578391969203949, 0.7161334753036499, 0.19302324950695038, -0.022336512804031372, -1.0885391235351562, -0.9963341951370239, 0.7175341844558716, 0.29674798250198364, ...
func (ac *AppCreate) SetNillableVersion(s *string) *AppCreate { if s != nil { ac.SetVersion(*s) } return ac }
[ 0.6640802025794983, 0.1349342167377472, -0.15690554678440094, 0.9712026715278625, -0.2502332925796509, 0.7534445524215698, 0.2978551685810089, 0.20099346339702606, -0.05940946191549301, 0.07166586816310883, -0.6171778440475464, -1.259792447090149, -0.049387719482183456, 0.6290664076805115,...
func (ac *AppCreate) SetBuild(s string) *AppCreate { ac.mutation.SetBuild(s) return ac }
[ 1.2085007429122925, -0.14542722702026367, 0.07022680342197418, 1.8311983346939087, -0.11311333626508713, 1.3332865238189697, 0.6320573091506958, 0.1447221040725708, 0.3028571605682373, -1.1522375345230103, -0.3366643190383911, -0.34254834055900574, 0.7575352787971497, 0.9146307110786438, ...
func (ac *AppCreate) SetNillableBuild(s *string) *AppCreate { if s != nil { ac.SetBuild(*s) } return ac }
[ 1.4462562799453735, 0.2983303666114807, -0.0492372028529644, 1.0331405401229858, -0.5361692309379578, 0.8920198678970337, 0.02766856923699379, 0.08075156062841415, 0.19442981481552124, -1.2750115394592285, -0.16675589978694916, -0.3018822968006134, -0.8521666526794434, 0.9662695527076721, ...
func (ac *AppCreate) SetNamespace(s string) *AppCreate { ac.mutation.SetNamespace(s) return ac }
[ -0.18643993139266968, 0.33532479405403137, 0.03803423047065735, 1.5013606548309326, -0.2677536606788635, 0.502642035484314, 0.1395300328731537, -0.5231480598449707, 1.4647512435913086, -1.0175944566726685, -0.4517935514450073, -0.6103008389472961, 0.7280857563018799, 0.8213285803794861, ...
func (ac *AppCreate) SetNillableNamespace(s *string) *AppCreate { if s != nil { ac.SetNamespace(*s) } return ac }
[ 0.4217628538608551, 0.8590620756149292, -0.14026445150375366, 0.39943331480026245, -0.6197165846824646, 0.4442978799343109, -0.37614887952804565, -0.9455292224884033, 1.2708271741867065, -0.7537238597869873, -0.4285700023174286, -0.7703877091407776, -0.19738762080669403, 1.29734206199646, ...
func (ac *AppCreate) SetProperties(m map[string]interface{}) *AppCreate { ac.mutation.SetProperties(m) return ac }
[ -0.2955436408519745, 0.041881583631038666, 0.1436837762594223, 0.9270617961883545, 0.11913421005010605, 0.846439003944397, 0.3059576153755188, 0.25345578789711, 0.00004697413896792568, -0.48627880215644836, -0.25965964794158936, -1.1221874952316284, 0.641546368598938, 1.0158510208129883, ...
func (ac *AppCreate) AddEventIDs(ids ...uuid.UUID) *AppCreate { ac.mutation.AddEventIDs(ids...) return ac }
[ -0.5370269417762756, -0.42960286140441895, 0.2576061487197876, 0.6948029398918152, 0.23438535630702972, 0.5222529172897339, -0.5154547095298767, 0.8353788256645203, 0.433737576007843, 0.4126058518886566, 0.2383470982313156, -0.2794837951660156, 0.020932015031576157, 0.4916470944881439, -...
func (ac *AppCreate) AddEvents(e ...*Event) *AppCreate { ids := make([]uuid.UUID, len(e)) for i := range e { ids[i] = e[i].ID } return ac.AddEventIDs(ids...) }
[ -0.5424674153327942, 0.1758137196302414, 0.43325361609458923, 1.0803554058074951, 0.8359652161598206, 0.7804208993911743, -0.3833869695663452, 0.2629401385784149, 0.07077847421169281, -0.20767931640148163, 0.6112985014915466, -0.9661766886711121, 0.16817383468151093, 0.5727115869522095, ...
func (ac *AppCreate) Mutation() *AppMutation { return ac.mutation }
[ -0.008897088468074799, -0.5489497184753418, 0.09671672433614731, 1.0509577989578247, 0.10495700687170029, 0.970626950263977, 0.32445481419563293, -0.4127417206764221, 1.1200312376022339, -0.11482114344835281, 0.4274216592311859, -0.8135221600532532, 0.5118373036384583, 0.179887592792511, ...
func (ac *AppCreate) Save(ctx context.Context) (*App, error) { if err := ac.preSave(); err != nil { return nil, err } var ( err error node *App ) if len(ac.hooks) == 0 { node, err = ac.sqlSave(ctx) } else { var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { mutation,...
[ -0.3503192961215973, 0.5301144123077393, 0.5165601968765259, 0.5065892934799194, 0.2957002520561218, -0.011708623729646206, 0.7279577851295471, -1.0484386682510376, -0.2740967273712158, 0.5704396963119507, 0.2190987914800644, -0.01757090911269188, 0.18062235414981842, 0.14107975363731384, ...
func (ac *AppCreate) SaveX(ctx context.Context) *App { v, err := ac.Save(ctx) if err != nil { panic(err) } return v }
[ 0.042277537286281586, 0.4865201413631439, 0.25335928797721863, 1.0911177396774292, -0.5795892477035522, 1.6848936080932617, -0.873736560344696, -0.41001346707344055, 1.2907993793487549, 0.3210914433002472, -0.8785516023635864, -0.4994623064994812, 0.08866499364376068, 0.20559358596801758, ...
func (acb *AppCreateBulk) Save(ctx context.Context) ([]*App, error) { specs := make([]*sqlgraph.CreateSpec, len(acb.builders)) nodes := make([]*App, len(acb.builders)) mutators := make([]Mutator, len(acb.builders)) for i := range acb.builders { func(i int, root context.Context) { builder := acb.builders[i] ...
[ -0.48729124665260315, 0.38233909010887146, 0.758767306804657, 1.1460461616516113, 0.789349377155304, -0.426770955324173, 0.760603666305542, -0.8585435748100281, 0.034872736781835556, 0.7149055600166321, -0.19384333491325378, 0.24328994750976562, -0.05617397278547287, 0.014748607762157917, ...
func (acb *AppCreateBulk) SaveX(ctx context.Context) []*App { v, err := acb.Save(ctx) if err != nil { panic(err) } return v }
[ -0.6237131953239441, 0.6567258238792419, 0.4949074685573578, 1.7197940349578857, 0.03121109865605831, 1.2085351943969727, -0.7025567889213562, -0.4253332316875458, 1.2618389129638672, 0.882947564125061, -1.2217460870742798, -0.057801492512226105, -0.10018462687730789, 0.7394518852233887, ...
func InitOsStore() error { if err := context.InitKeyring(viper.GetString("openstack.user"), viper.GetString("openstack.password"), viper.GetString("openstack.tenant.name"), viper.GetString("openstack.authurl"), viper.GetString("openstack.tenant.id"), viper.GetString("openstack.region")); err != nil { return err } ...
[ -0.3779190480709076, -0.28079211711883545, 0.7124793529510498, 0.0004205360310152173, -0.1966131627559662, 0.20697255432605743, -0.687806248664856, -0.12883847951889038, -0.24895697832107544, -0.0097444336861372, -0.6380560398101807, 0.30916857719421387, -0.08238494396209717, -0.2516370117...
func StoreCopyImageFromURL(basePath, fromURL string) (key, URL string, err error) { parts := strings.Split(fromURL, "/") fileName := parts[len(parts)-1] // DL image resp, err := http.Get(fromURL) if err != nil { return } defer resp.Body.Close() key = fmt.Sprintf("%s/%s", basePath, url.QueryEscape(fileName)) ...
[ -0.9000813961029053, -0.4374313950538635, 0.7963151335716248, -0.5967863202095032, -0.7550673484802246, 0.3238723874092102, 0.1000158041715622, -0.16940948367118835, -0.3798055648803711, 1.3395334482192993, -0.41138947010040283, -0.035714104771614075, 0.29090744256973267, -0.36536598205566...
func (m *Message) Validate() bool { return len(m.Key) > 0 }
[ -0.059471338987350464, 0.614504873752594, 0.5977587699890137, -0.08732098340988159, 0.5510917901992798, -0.20224818587303162, -0.6778894662857056, -0.46723970770835876, -1.1276209354400635, 0.03916099667549133, 0.8375792503356934, -0.06055273115634918, -1.849031686782837, 1.287224650382995...
func (c *context) write(data []byte) error { defer c.close() _, err := c.conn.Write(data) return err }
[ -0.8211886882781982, 0.10847531259059906, 0.23026756942272186, 0.1711985021829605, 0.7716277241706848, 0.6077373027801514, -0.1172492653131485, 0.16794322431087494, 0.15185926854610443, -0.06671680510044098, -0.4801361560821533, -0.5449234247207642, -1.254480004310608, -0.01369375176727771...
func (c *context) close() error { if c.Protocol != protocolUDP { return c.conn.Close() } return nil }
[ -0.10555924475193024, 0.9211714267730713, 0.609096348285675, 0.6706740260124207, -0.08289317041635513, 0.6051639914512634, -0.11534178256988525, -0.7360150218009949, 0.6305015087127686, -0.646580159664154, 0.594298779964447, -0.40580326318740845, -1.5336241722106934, -0.3329564332962036, ...
func (c *context) Write(res Response) error { data, err := json.Marshal(res) if err != nil { return err } return c.write(data) }
[ -1.0034898519515991, -0.6330862641334534, 0.22606261074543, -0.26114708185195923, 0.967159628868103, -0.5308986306190491, -0.13911432027816772, -0.17526957392692566, 0.877718448638916, 0.12492832541465759, -0.7407525181770325, -0.42578360438346863, 0.06314260512590408, -0.4584624469280243,...
func NewDefaultConfig() Config { return Config{ Server: serverConfig{ UDP: defaultUDPPort, TCP: defaultTCPPort, HTTP: defaultHTTPPort, }, Store: storeConfig{TTL: defaultDuration}, } }
[ 0.31713077425956726, 0.5652126669883728, 0.2104111611843109, 0.08328307420015335, -0.4995541274547577, -0.3427690863609314, -0.9839632511138916, 0.6300869584083557, 0.20463579893112183, -0.001573156681843102, -0.8704825043678284, 0.04766472429037094, -0.009832069277763367, 1.11012864112854...
func GenerateAuthURL(state, redirectURL string) (authUrl string) { base, _ := url.Parse(discoveryCache.AuthEndpoint) // construct query params params := url.Values{} params.Set("response_type", "code") params.Set("scope", "openid foundation_profile") params.Set("client_id", viper.GetString("oidc.client_id")) par...
[ -0.5224955677986145, -0.02423619106411934, 0.5861750245094299, 0.22509773075580597, -0.2376910150051117, 0.08732830733060837, -0.14134280383586884, -0.22334277629852295, 0.7299562692642212, 0.25367605686187744, -0.1208198070526123, -0.03742392361164093, 0.7847117185592651, 0.04151923581957...
func NewTuple(n int) *Tuple { t := &Tuple{} t.data = make([]interface{}, n) return t }
[ -1.0763858556747437, 1.5647867918014526, 0.40430307388305664, -0.46763238310813904, 0.019123660400509834, -0.03527596592903137, -0.6339796185493469, -0.9546109437942505, -0.20237277448177338, -0.6791606545448303, -0.9810884594917297, -0.4074719250202179, -0.36663204431533813, -0.1059905588...
func NewTupleFromSlice(slice []interface{}) *Tuple { t := &Tuple{} t.data = slice return t }
[ -1.1518160104751587, 0.12069085240364075, 0.27962175011634827, 0.16656865179538727, -0.5369102954864502, 0.025662144646048546, -0.8577112555503845, -0.8337826132774353, -0.1372331976890564, 0.04755149409174919, -0.902481198310852, -0.5918598175048828, -0.26837894320487976, -0.1921207308769...
func NewTupleFromItems(items ...interface{}) *Tuple { t := NewTuple(len(items)) for i, item := range items { t.Set(i, item) } return t }
[ -0.8305274248123169, 0.31208696961402893, 0.16338375210762024, -0.007737181149423122, 0.6614568829536438, 0.3016868531703949, -0.7531013488769531, -0.46178871393203735, -0.17752015590667725, -0.01595035009086132, -0.7712936401367188, -1.2650954723358154, -0.7682366967201233, -0.96816498041...
func (this *Tuple) Copy() *Tuple { t := NewTuple(this.Len()) copy(t.data, this.data) return t }
[ -1.3923237323760986, 0.005140368361026049, 0.5487846732139587, -0.9975110292434692, -0.6841720342636108, 1.196858286857605, -0.09441100805997849, -0.5548127293586731, -0.19273021817207336, 0.20404894649982452, -0.6399025321006775, -0.6651374101638794, -0.6165457963943481, -1.38274323940277...
func (this *Tuple) Len() int { return len(this.data) }
[ -0.8628990054130554, 0.5110665559768677, 0.01554854866117239, -1.6572993993759155, 0.2748132348060608, 0.028522394597530365, 0.313998281955719, 0.9629308581352234, -0.5509033203125, -0.6533024311065674, -1.3725613355636597, -0.3482694625854492, 0.45628848671913147, -0.8820729851722717, -...
func (this *Tuple) Data() []interface{} { return this.data }
[ -1.8516645431518555, -0.014468188397586346, 0.5526652932167053, -0.18986721336841583, 0.28176525235176086, 1.0835208892822266, 0.043914150446653366, -0.4748465120792389, -0.10112637281417847, -0.7387101054191589, -1.0461050271987915, 0.14922674000263214, 0.0013400012394413352, -0.097839228...
func (this *Tuple) Left(n int) *Tuple { return this.Slice(0, n) }
[ -0.7640656232833862, 0.5628787279129028, 0.4208180010318756, -0.20803919434547424, 0.44102931022644043, 0.4250633120536804, -0.6065211892127991, -1.3861638307571411, 0.47024139761924744, 0.20025789737701416, -1.3642973899841309, -1.2715567350387573, -0.6312779188156128, 0.4718354642391205,...
func (this *Tuple) Right(n int) *Tuple { length := this.Len() n = max(0, length-n) return this.Slice(n, length) }
[ -1.0787763595581055, 0.7316386103630066, 0.8337790966033936, -0.016331177204847336, -0.005436249542981386, 0.026449240744113922, -1.1100419759750366, -1.0934820175170898, -0.1532779335975647, 0.3223849833011627, -0.3664551377296448, -0.8298736810684204, -0.6524396538734436, 0.4662672877311...
func (this *Tuple) Slice(start int, end int) *Tuple { c := this.Copy() max := this.Len() start = min(c.Offset(start), max) end = min(c.Offset(end), max) c.data = c.data[start:end] return c }
[ -1.1451436281204224, -0.5183820724487305, 0.6605650186538696, -0.5216001868247986, -0.7133688926696777, 0.4809311628341675, -0.7333880066871643, -0.1615419089794159, -0.9122114181518555, -0.15091228485107422, -0.5446352362632751, -0.04602744057774544, -0.154955193400383, -2.030882120132446...
func (this *Tuple) Offset(n int) int { // allow negative indexing as in Python if n < 0 { n = this.Len() + n } return n }
[ -1.5089441537857056, 0.8935262560844421, 0.6064358949661255, -0.6069721579551697, -0.6313812136650085, 1.0276449918746948, 0.5840604305267334, 0.42901018261909485, 0.33822524547576904, -0.16196070611476898, -0.18732164800167084, -0.6496819257736206, -0.3226684033870697, 0.06553687155246735...
func (this *Tuple) Set(n int, item interface{}) { this.data[this.Offset(n)] = item }
[ -1.8048267364501953, 0.2643366754055023, 0.15014946460723877, -0.9814238548278809, 0.19839240610599518, 0.8398926854133606, -0.39762082695961, -0.5822214484214783, -0.5913687348365784, 0.2240988314151764, -1.3745671510696411, -0.18792597949504852, 0.32758817076683044, -0.5106279850006104, ...
func (this *Tuple) Get(n int) interface{} { item := this.data[this.Offset(n)] return item }
[ -1.9162462949752808, 0.26052042841911316, 0.6126907467842102, -0.7628027200698853, -0.3914923369884491, 0.20278817415237427, -0.647042989730835, -1.2262171506881714, -0.6794572472572327, -0.5709168910980225, -0.8040981888771057, -0.11252966523170471, 0.21083223819732666, -0.890094339847564...