repo_id
stringclasses
927 values
file_path
stringlengths
99
214
content
stringlengths
2
4.15M
indenthandler4
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/slog-handler-guide/indenthandler4/indent_handler.go
//go:build go1.21 package indenthandler import ( "context" "fmt" "io" "log/slog" "runtime" "slices" "strconv" "sync" "time" ) // !+IndentHandler type IndentHandler struct { opts Options preformatted []byte // data from WithGroup and WithAttrs unopenedGroups []string // groups from WithGroup...
indenthandler1
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/slog-handler-guide/indenthandler1/indent_handler_test.go
//go:build go1.21 package indenthandler import ( "bytes" "regexp" "testing" "log/slog" ) func Test(t *testing.T) { var buf bytes.Buffer l := slog.New(New(&buf, nil)) l.Info("hello", "a", 1, "b", true, "c", 3.14, slog.Group("g", "h", 1, "i", 2), "d", "NO") got := buf.String() wantre := `time: [-0-9T:.]+Z? l...
indenthandler1
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/slog-handler-guide/indenthandler1/indent_handler.go
//go:build go1.21 package indenthandler import ( "context" "fmt" "io" "log/slog" "runtime" "sync" "time" ) // !+types type IndentHandler struct { opts Options // TODO: state for WithGroup and WithAttrs mu *sync.Mutex out io.Writer } type Options struct { // Level reports the minimum level to log. // L...
hello
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/hello/hello.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Hello is a hello, world program, demonstrating // how to write a simple command-line program. // // Usage: // // hello [options] [name] // // The options are...
hello
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/hello/go.mod
module golang.org/x/example/hello go 1.19
reverse
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/hello/reverse/reverse_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package reverse import "testing" func TestString(t *testing.T) { for _, c := range []struct { in, want string }{ {"Hello, world", "dlrow ,olleH"}, {"H...
reverse
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/hello/reverse/reverse.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package reverse can reverse things, particularly strings. package reverse // String returns its argument string reversed rune-wise left to right. func Strin...
reverse
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/hello/reverse/example_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package reverse_test import ( "fmt" "golang.org/x/example/hello/reverse" ) func ExampleString() { fmt.Println(reverse.String("hello")) // Output: olleh }...
weave
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/internal/cmd/weave/weave.go
// The weave command is a simple preprocessor for markdown files. // It builds a table of contents and processes %include directives. // // Example usage: // // $ go run internal/cmd/weave go-types.md > README.md // // The weave command copies lines of the input file to standard output, with two // exceptions: // // If...
template
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/template/index.tmpl
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>{{.Title}}</title> <style> body { font-family: sans-serif; } h1 { background: #ddd; } #sidebar { float: right; } </style> </head> <body> <h1>{{.Title}}</h1> <div id="sidebar"> {{block "sidebar" .}} <h2>Links<...
template
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/template/image.tmpl
{{define "content"}} <div id="image"> <img src="{{.URL}}" title="{{.Title}}" alt="{{.Title}}"> </div> {{end}} {{define "sidebar"}} <a href="/">Back</a> {{end}}
template
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/template/main.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Template is a trivial web server that uses the text/template (and // html/template) package's "block" feature to implement a kind of template // inheritance....
helloserver
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/helloserver/go.mod
module golang.org/x/example/helloserver go 1.19
helloserver
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/example/helloserver/server.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Hello is a simple hello, world demonstration web server. // // It serves version information on /version and answers // any other request like /name by sayin...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/CONTRIBUTING.md
# Contributing to Go Go is an open source project. It is the work of hundreds of contributors. We appreciate your help! ## Filing issues When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 1. What version of Go are you using (`go version`)? 2. What operating system and...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/PATENTS
Additional IP Rights Grant (Patents) "This implementation" means the copyrightable works distributed by Google as part of the Go project. Google hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, o...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/go.mod
module golang.org/x/oscar go 1.23 require ( github.com/cockroachdb/pebble v1.1.1 github.com/google/generative-ai-go v0.16.0 golang.org/x/tools v0.23.0 google.golang.org/api v0.186.0 rsc.io/markdown v0.0.0-20240617154923-1f2ef1438fed rsc.io/omap v1.2.1-0.20240709133045-40dad5c0c0fb rsc.io/ordered v1.1.0 rsc.io...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/README.md
# Oscar, an open-source contributor agent architecture Oscar is a project aiming to improve open-source software development by creating automated help, or “agents,” for open-source maintenance. We believe there are many opportunities to reduce the amount of toil involved with maintaining open-source projects both lar...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/go.sum
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwred...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/LICENSE
Copyright 2024 The Go Authors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistribu...
oscar
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/codereview.cfg
issuerepo: golang/go
pebble
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/pebble/pebble_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package pebble import ( "encoding/binary" "fmt" "math/rand/v2" "path/filepath" "testing" "golang.org/x/oscar/internal/storage" "golang.org/x/oscar/inte...
pebble
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/pebble/pebble.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package pebble implements a storage.DB using Pebble, // a production-quality key-value database from CockroachDB. // A pebble database can only be opened by ...
gaby
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/gaby/main.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Gaby is an experimental new bot running in the Go issue tracker as [@gabyhelp], // to try to help automate various mundane things that a machine can do reaso...
testutil
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/testutil/testutil.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package testutil implements various testing utilities. package testutil import ( "bytes" "io" "log/slog" "testing" ) // LogWriter returns an [io.Writer...
githubdocs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/githubdocs/sync_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package githubdocs import ( "testing" "golang.org/x/oscar/internal/docs" "golang.org/x/oscar/internal/github" "golang.org/x/oscar/internal/storage" "gola...
githubdocs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/githubdocs/sync.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package githubdocs implements converting GitHub issues into text docs // for [golang.org/x/oscar/internal/docs]. package githubdocs import ( "fmt" "log/sl...
httprr
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/httprr/rr_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package httprr import ( "errors" "io" "net/http" "net/http/httptest" "os" "strings" "testing" "testing/iotest" ) func handler(w http.ResponseWriter, r...
httprr
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/httprr/rr.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package httprr implements HTTP record and replay, mainly for use in tests. // // [Open] creates a new [RecordReplay]. Whether it is recording or replaying //...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/testdata/markdown.txt
-- rsc/markdown#1 -- Title: Support Github Emojis State: closed Assignee: Closed: 2023-12-12 22:02:32 Labels: Milestone: URL: https://github.com/rsc/markdown/issues/1 Reported by matloob (2023-12-12 13:57:39) This is an issue for supporting github emojis, such as `:smile:` for 😄 . There's a github page that gi...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/testdata/rsctmp.txt
-- rsc/tmp#1 -- Title: Dummy issue with dummy title State: closed Assignee: Closed: 2024-06-17 14:56:22 Labels: none Milestone: Granite URL: https://github.com/rsc/tmp/issues/1 Reported by rsc (2015-01-07 23:11:46) For testing. * rsc changed title (2015-01-07 23:12:19) - Dummy issue + Dummy issue with dummy ti...
secret
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/secret/secret_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package secret import ( "os" "path/filepath" "testing" ) func TestNetrc(t *testing.T) { file := filepath.Join(t.TempDir(), "netrc") if err := os.WriteFil...
secret
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/secret/secret.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package secret defines an interface to a database storing secrets, such as passwords and API keys. // // TODO(rsc): Consider adding a basic key: value text f...
embeddocs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/embeddocs/sync_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package embeddocs import ( "context" "fmt" "strings" "testing" "golang.org/x/oscar/internal/docs" "golang.org/x/oscar/internal/llm" "golang.org/x/oscar...
embeddocs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/embeddocs/sync.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package embeddocs implements embedding text docs into a vector database. package embeddocs import ( "context" "log/slog" "golang.org/x/oscar/internal/do...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/data.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "encoding/json" "fmt" "iter" "math" "strconv" "strings" "golang.org/x/oscar/internal/storage" "golang.org/x/oscar/internal/sto...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testing_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "testing" "golang.org/x/oscar/internal/storage" "golang.org/x/oscar/internal/testutil" ) func TestLoadTxtar(t *testing.T) { gh :=...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/edit_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "net/http" "slices" "testing" "golang.org/x/oscar/internal/httprr" "golang.org/x/oscar/internal/secret" "golang.org/x/oscar/inte...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testing.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "encoding/json" "fmt" "os" "strconv" "strings" "sync/atomic" "testing" "time" "golang.org/x/oscar/internal/storage" "golang....
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/edit.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "bytes" "encoding/json" "fmt" "io" "net/http" "slices" "strings" "testing" ) // NOTE: It's possible that we should elevate Tes...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/sync_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "bytes" "errors" "iter" "net/http" "slices" "testing" "golang.org/x/oscar/internal/httprr" "golang.org/x/oscar/internal/secret...
github
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/sync.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package github implements sync mechanism to mirror GitHub issue state // into a [storage.DB] as well as code to inspect that state and to make // issue chang...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/markdown.httprr
httprr trace v1 176 49838 GET https://api.github.com/repos/rsc/markdown/issues?direction=asc&page=1&per_page=100&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Accept-Ranges: bytes Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, Location, R...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/omap.httprr
httprr trace v1 172 1240 GET https://api.github.com/repos/rsc/omap/issues?direction=asc&page=1&per_page=100&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Content-Length: 2 Accept-Ranges: bytes Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/markdown3.httprr
httprr trace v1 207 6198 GET https://api.github.com/repos/rsc/markdown/issues?direction=asc&page=1&per_page=100&since=2024-06-04T02%3A57%3A22Z&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Accept-Ranges: bytes Access-Control-Allow-Origin: * Access-Control-Expose-He...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/tmpedit.httprr
httprr trace v1 171 60426 GET https://api.github.com/repos/rsc/tmp/issues?direction=asc&page=1&per_page=100&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, ...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/markdowninc.httprr
httprr trace v1 176 50061 GET https://api.github.com/repos/rsc/markdown/issues?direction=asc&page=1&per_page=100&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/ivy.httprr
httprr trace v1 175 262432 GET https://api.github.com/repos/robpike/ivy/issues?direction=asc&page=1&per_page=100&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/github/testdata/markdown2.httprr
httprr trace v1 207 11073 GET https://api.github.com/repos/rsc/markdown/issues?direction=asc&page=1&per_page=100&since=2024-05-21T17%3A56%3A12Z&sort=updated&state=all HTTP/1.1 Host: api.github.com User-Agent: Go-http-client/1.1 HTTP/2.0 200 OK Accept-Ranges: bytes Access-Control-Allow-Origin: * Access-Control-Expose-H...
related
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/related/related_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package related import ( "fmt" "maps" "slices" "strings" "testing" "time" "golang.org/x/oscar/internal/diff" "golang.org/x/oscar/internal/docs" "gola...
related
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/related/related.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package related implements posting about related issues to GitHub. package related import ( "fmt" "log/slog" "strings" "time" "golang.org/x/oscar/inte...
keycheck
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/keycheck/key_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that API keys do not appear in any httprr logs in this repo. package keycheck import ( "bytes" "io/fs" "os" "path/filepath" "strings" "testing" ...
diff
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/diff.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package diff import ( "bytes" "fmt" "sort" "strings" ) // A pair is a pair of values tracked for both the x and y side of a diff. // It is typically a pai...
diff
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/diff_test.go
// Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package diff import ( "bytes" "path/filepath" "testing" "golang.org/x/tools/txtar" ) func clean(text []byte) []byte { text = bytes.ReplaceAll(text, []by...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/same.txt
-- old -- hello world -- new -- hello world -- diff --
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/dups.txt
-- old -- a b c d e f -- new -- a B C d e f -- diff -- diff old new --- old +++ new @@ -1,8 +1,8 @@ a $ -b - -c +B + +C $ d $
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/long.txt
-- old -- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14½ 15 16 17 18 19 20 -- new -- 1 2 3 4 5 6 8 9 10 11 12 13 14 17 18 19 20 -- diff -- diff old new --- old +++ new @@ -4,7 +4,6 @@ 4 5 6 -7 8 9 10 @@ -12,9 +11,6 @@ 12 13 14 -14½ -15 -16 17 18 19
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/allnew.txt
-- old -- -- new -- a b c -- diff -- diff old new --- old +++ new @@ -0,0 +1,3 @@ +a +b +c
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/end.txt
-- old -- 1 2 3 4 5 6 7 eight nine ten eleven -- new -- 1 2 3 4 5 6 7 8 9 10 -- diff -- diff old new --- old +++ new @@ -5,7 +5,6 @@ 5 6 7 -eight -nine -ten -eleven +8 +9 +10
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/triv.txt
Another example from Hunt and McIlroy, “An Algorithm for Differential File Comparison.” https://www.cs.dartmouth.edu/~doug/diff.pdf Anchored diff gives up on finding anything, since there are no unique lines. -- old -- a b c a b b a -- new -- c a b a b c -- diff -- diff old new --- old +++ new @@ -1,7 +1,6 @@ -a -b -...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/eof2.txt
-- old -- a b c^D -- new -- a b c -- diff -- diff old new --- old +++ new @@ -1,3 +1,3 @@ a b -c \ No newline at end of file +c
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/eof1.txt
-- old -- a b c -- new -- a b c^D -- diff -- diff old new --- old +++ new @@ -1,3 +1,3 @@ a b -c +c \ No newline at end of file
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/start.txt
-- old -- e pi 4 5 6 7 8 9 10 -- new -- 1 2 3 4 5 6 7 8 9 10 -- diff -- diff old new --- old +++ new @@ -1,5 +1,6 @@ -e -pi +1 +2 +3 4 5 6
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/basic.txt
Example from Hunt and McIlroy, “An Algorithm for Differential File Comparison.” https://www.cs.dartmouth.edu/~doug/diff.pdf -- old -- a b c d e f g -- new -- w a b x y z e -- diff -- diff old new --- old +++ new @@ -1,7 +1,7 @@ +w a b -c -d +x +y +z e -f -g
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/allold.txt
-- old -- a b c -- new -- -- diff -- diff old new --- old +++ new @@ -1,3 +0,0 @@ -a -b -c
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/diff/testdata/eof.txt
-- old -- a b c^D -- new -- a b c^D -- diff --
commentfix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/fix.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package commentfix implements rule-based rewriting of issue comments. package commentfix import ( "fmt" "io" "log/slog" "os" "reflect" "regexp" "stri...
commentfix
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/fix_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package commentfix import ( "bytes" "io" "path/filepath" "strings" "testing" "text/template" "time" "golang.org/x/oscar/internal/diff" "golang.org/x/...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/testdata/replacetext.txt
{{.ReplaceText `cancelled` "canceled"}} -- 1.in -- The context is cancelled. -- 1.out -- The context is canceled. -- 2.in -- fmt.Printf("cancelled\n") -- 2.out -- -- 3.in -- The context **is cancelled.** -- 3.out -- The context **is canceled.** -- 4.in -- The context *is cancelled.* -- 4.out -- The context *is cancele...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/testdata/replaceurl.txt
{{.ReplaceURL `https://golang.org/(.*)` "https://go.dev/$1#"}} {{.ReplaceURL `(?i)https://lowercase.com/(.*)` "https://lowercase.com/$1"}} -- 1.in -- Visit https://golang.org/doc for more docs. -- 1.out -- Visit [https://go.dev/doc#](https://go.dev/doc#) for more docs. -- 2.in -- Visit <https://golang.org/doc> for more...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/testdata/order.txt
{{/* rules apply in order. make sure this does not loop; it claims to have edited (and did edit) the text, so the result is non-empty, but no actual change is made. */}} {{.ReplaceText `cancelled` "canceled"}} {{.ReplaceText `canceled` "cancelled"}} -- 1.in -- The context is cancelled. -- 1.out -- The context...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/testdata/autolink.txt
{{.AutoLink `\bCL (\d+)\b` "https://go.dev/cl/$1"}} -- 1.in -- This is in CL 12345. -- 1.out -- This is in [CL 12345](https://go.dev/cl/12345). -- 2.in -- This is in **CL 12345**. -- 2.out -- This is in **[CL 12345](https://go.dev/cl/12345)**. -- 3.in -- This is in [the CL 12345 page](https://go.dev/cl/12345). -- 3.out...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/commentfix/testdata/nop.txt
{{/* make sure this does not loop; it claims to have edited (and did edit) the text, so the result is non-empty, but no actual change is made. */}} {{.ReplaceText `cancelled` "canceled"}} {{.ReplaceText `canceled` "cancelled"}} -- 1.in -- The context is cancelled. -- 1.out -- The context is cancelled.
llm
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/llm/embed_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package llm import ( "context" "fmt" "strings" "testing" ) func TestQuote(t *testing.T) { ctx := context.Background() docs := []EmbedDoc{{Text: "abc"}, ...
llm
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/llm/llm.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package llm defines interfaces implemented by LLMs (or LLM-related services). package llm import ( "context" "encoding/binary" "math" ) // An Embedder c...
llm
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/llm/llm_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package llm import ( "slices" "testing" ) func TestVector(t *testing.T) { v1 := Vector{1, 2, 3, 4} v2 := Vector{-200, -3000, 0, -10000} dot := v1.Dot(v2)...
llm
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/llm/embed.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package llm import ( "context" "math" ) const quoteLen = 123 // QuoteEmbedder returns an implementation // of Embedder that can be useful for testing but /...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/mem.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "bytes" "fmt" "iter" "log/slog" "slices" "sync" "golang.org/x/oscar/internal/llm" "rsc.io/omap" "rsc.io/ordered" "rsc.io/to...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/vtest.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "math" "reflect" "slices" "testing" "golang.org/x/oscar/internal/llm" ) func TestVectorDB(t *testing.T, newdb func() VectorDB) ...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/mem_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "testing" "golang.org/x/oscar/internal/testutil" ) func TestMemDB(t *testing.T) { TestDB(t, MemDB()) } func TestMemVectorDB(t *t...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "fmt" "slices" "sync" "testing" "rsc.io/ordered" ) // TestDB runs basic tests on db. // It should be empty when TestDB is calle...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/vectordb_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import "testing" func TestVectorResultCompare(t *testing.T) { type R = VectorResult var tests = []struct { x, y VectorResult cmp int }...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/vectordb.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "cmp" "golang.org/x/oscar/internal/llm" ) // A VectorDB is a vector database that implements // nearest-neighbor search over embed...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/db.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package storage defines the storage abstractions needed for Oscar: // [DB], a basic key-value store, and [VectorDB], a vector database. // The storage needs ...
storage
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/db_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package storage import ( "math" "testing" "rsc.io/ordered" ) func TestPanic(t *testing.T) { func() { defer func() { r := recover() if r.(string) ...
timed
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/timed/timed_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package timed import ( "slices" "strings" "testing" "golang.org/x/oscar/internal/storage" ) func Test(t *testing.T) { db := storage.MemDB() b := db.Bat...
timed
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/storage/timed/timed.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package timed implements modification-time-indexed storage // that can be accessed in modification-time order as well as key order. // // Timed storage build...
gemini
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/gemini/gemini.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package gemini implements access to Google's Gemini model. // // [Client] implements [llm.Embedder]. Use [NewClient] to connect. package gemini import ( "b...
gemini
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/gemini/gemini_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package gemini import ( "bytes" "context" "fmt" "net/http" "testing" "golang.org/x/oscar/internal/httprr" "golang.org/x/oscar/internal/llm" "golang.or...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/gemini/testdata/embedbatch.httprr
httprr trace v1 1005 98997 POST https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:batchEmbedContents?%24alt=json%3Benum-encoding%3Dint HTTP/1.1 Host: generativelanguage.googleapis.com User-Agent: Go-http-client/1.1 Content-Length: 676 Content-Type: application/json x-goog-request-params: model=...
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/gemini/testdata/bigbatch.httprr
httprr trace v1 9570 1645472 POST https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004:batchEmbedContents?%24alt=json%3Benum-encoding%3Dint HTTP/1.1 Host: generativelanguage.googleapis.com User-Agent: Go-http-client/1.1 Content-Length: 9240 Content-Type: application/json x-goog-request-params: mod...
docs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/docs/docs.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package docs implements a corpus of text documents identified by document IDs. // It allows retrieving the documents by ID as well as retrieving documents th...
docs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/oscar/internal/docs/docs_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package docs import ( "slices" "strings" "testing" "golang.org/x/oscar/internal/storage" ) func TestCorpus(t *testing.T) { db := storage.MemDB() corpu...
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/Makefile
upload: winstrap.go build.go upload.go go run winstrap.go build.go upload.go -upload
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/winstrap.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "bufio" "flag" "fmt" "io" "io/ioutil" "log" "net/http" "os" "os/exec" "path/filepath" "runtime" "strings" ) var files = map...
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/upload.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !windows package main import ( "bytes" "fmt" "io" "io/ioutil" "log" "net/http" "cloud.google.com/go/storage" "golang.org/x/oauth2" "golan...
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/build.go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !windows package main import ( "crypto/sha1" "flag" "fmt" "io" "log" "os" "os/exec" "path/filepath" "time" ) func init() { altMain = not...
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/README
This tool bootstraps a fresh Windows VM into being a Go buildbot. We cross-compile this into a Windows exe from Mac or Linux or whatever and then on Windows do something like this: http://golang.org/s/windowsbuilderhowto The latest windows executable is: https://storage.googleapis.com/winstrap/winstrap-2015-02-...
winstrap
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/winstrap/LICENSE
Copyright (c) 2012 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following d...
groupcache
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/groupcache/.travis.yml
language: go go_import_path: github.com/golang/groupcache os: linux dist: trusty sudo: false script: - go test ./... go: - 1.9.x - 1.10.x - 1.11.x - master cache: directories: - $GOPATH/pkg