text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (c *GlPushDebugGroupKHR) Label(ctx context.Context, s *api.GlobalState) string {
// This is incorrect, fudging for a bug in Unity which has been fixed but not
// rolled out.
// See https://github.com/google/gapid/issues/459 for reference.
//
// c.Length() should only be treated as null-terminated if c.Length(... | [
0.05543380230665207,
-0.2846975028514862,
0.18762105703353882,
-0.46783503890037537,
0.37441790103912354,
0.3453409671783447,
-0.3433506488800049,
-0.9428474307060242,
0.4155659079551697,
0.6127787232398987,
0.5362105369567871,
-0.02322562038898468,
-0.8987259864807129,
-0.0509657822549343... |
func BenchmarkSubscriber(b *testing.B) {
tests.BenchSubscriber(b, func(n int) (message.Publisher, message.Subscriber) {
logger := watermill.NopLogger{}
publisher, err := googlecloud.NewPublisher(
googlecloud.PublisherConfig{},
logger,
)
if err != nil {
panic(err)
}
subscriber, err := googlecloud... | [
1.0783973932266235,
0.1983361691236496,
0.24046024680137634,
-0.11200282722711563,
0.39331623911857605,
0.003264957806095481,
0.20192331075668335,
-0.19738160073757172,
-0.9025185704231262,
0.42663857340812683,
-0.0936369001865387,
0.6898058652877808,
-0.6853640079498291,
1.319025158882141... |
func NewMemoryAuthConfigService() ConfigService {
saver := newMemoryAuthSaver()
return NewAuthConfigService(saver)
} | [
-0.058537695556879044,
-0.26656338572502136,
0.4019600450992584,
0.514187753200531,
-1.1668003797531128,
-0.8300858736038208,
-0.4335564374923706,
-0.20118094980716705,
-0.02412482723593712,
0.7865124344825745,
-0.8304673433303833,
0.04417569190263748,
-0.8481777906417847,
0.96132349967956... |
func (m *MemoryAuthConfigSaver) SaveConfig(config *AuthConfig) error {
m.config = *config
return nil
} | [
-0.45657628774642944,
0.4710247814655304,
0.3167243003845215,
0.5757411122322083,
0.15596318244934082,
0.16768155992031097,
0.3430659770965576,
1.2298418283462524,
0.8339279890060425,
0.7070035934448242,
-1.7226457595825195,
-0.49880480766296387,
-0.6406642198562622,
1.3751331567764282,
... |
func (g *Graph) AddNode(n *Body) {
if g.bodies == nil {
g.bodies = make(map[Body]int)
}
g.bodies[*n] = -1
} | [
-1.4665111303329468,
0.8392713665962219,
0.5769526958465576,
-0.7242493629455566,
0.6933313608169556,
0.907717227935791,
-0.4832666218280792,
-0.41247791051864624,
0.5703835487365723,
-0.3945621848106384,
-0.6214998364448547,
0.4257802665233612,
-1.0264922380447388,
1.2417793273925781,
-... |
func (g *Graph) AddUnidirectionalEdge(n1, n2 *Body) {
if g.edges == nil {
g.edges = make(map[Body][]*Body)
}
g.edges[*n1] = append(g.edges[*n1], n2)
// g.edges[*n2] = append(g.edges[*n2], n1)
} | [
-0.7371571660041809,
0.055928219109773636,
0.8136605620384216,
-0.5395565629005432,
0.6024124622344971,
1.4917583465576172,
-0.6675007343292236,
0.3292875289916992,
0.141191303730011,
-0.5711320638656616,
-0.053754772990942,
0.37568894028663635,
-0.18524131178855896,
0.6743299961090088,
... |
func (g *Graph) CalcChecksum(origin *Body) int {
queue := newFifo()
checksum := 0
queue.enqueue(origin, 0)
for queue.length() > 0 {
node, distance := queue.dequeue()
checksum += distance
adjacent, ok := g.edges[*node]
if !ok {
continue
}
for _, a := range adjacent {
queue.enqueue(a, distance+1)
... | [
0.5806198120117188,
-0.05127264931797981,
0.8154961466789246,
-0.4110240340232849,
-0.4303376078605652,
-0.01992897130548954,
0.9209929704666138,
0.4422745108604431,
-0.20140227675437927,
0.5502021908760071,
-0.2398463487625122,
0.344110369682312,
0.012005755677819252,
0.876762866973877,
... |
func Ping(w http.ResponseWriter, r *http.Request) {
// Get rid of warnings
_ = r
// Sets your Google Cloud Platform project ID.
projectId := os.Getenv("GCP_PROJECT")
if projectId == "" {
http.Error(w, fmt.Sprintf("GCP_PROJECT environment variable unset or missing"), http.StatusInternalServerError)
}
// Get ... | [
-0.010987400077283382,
-0.13271979987621307,
0.697098970413208,
-0.18973493576049805,
0.46408045291900635,
0.7817922234535217,
0.34818097949028015,
-0.3584425449371338,
-0.6623452305793762,
0.8871002197265625,
0.5439196228981018,
-0.3014547526836395,
-0.8568194508552551,
-0.067077033221721... |
func Get(i int) int64 {
genPrimes(i)
return primes[i]
} | [
-1.9336274862289429,
0.7472350001335144,
0.4348604083061218,
-0.8155139684677124,
0.09295438975095749,
0.02259562537074089,
0.2974779009819031,
-0.41018804907798767,
0.22539746761322021,
0.3668663501739502,
-0.48166415095329285,
0.08279050141572952,
-0.5912154912948608,
-0.3078018128871918... |
func genPrimes(i int) {
again:
if i < len(primes) {
return
}
if sieved == 0 {
// simple sieve for primes up to 60000
// index i represents number 2*i+3
const n = (60000 - 3 + 1) / 2
if n*n <= sievewidth {
panic("need to raise initial sieve size")
}
s := make([]bool, n)
for i := int64(0); i < 128; ... | [
-0.7591427564620972,
0.6835265159606934,
0.8774539232254028,
-0.5266579389572144,
-0.24689579010009766,
0.6269336938858032,
0.4252728521823883,
0.47379350662231445,
0.8527217507362366,
0.5508996248245239,
-0.9498202800750732,
-0.21454954147338867,
-0.6678771376609802,
-0.23373346030712128,... |
func CORSMiddleware(origin string, methods ...string) Middleware {
return func(next http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
if !stringInSlice(r.Method, methods) {
next.ServeHTTP(w, r)
return
}
httpp.AddCORSHeaders(w, origin, methods...)
next.ServeHTTP(w... | [
-0.41572943329811096,
-0.5836289525032043,
0.3160669803619385,
0.15139776468276978,
-1.0790441036224365,
-0.09226313978433609,
-1.1071467399597168,
-0.07592930644750595,
0.3130958080291748,
-0.016805466264486313,
0.4343898892402649,
-0.24684986472129822,
-0.8202191591262817,
0.049558516591... |
func GetUUID() uuid.UUID {
return uuid.New()
} | [
0.3780597150325775,
0.015600542537868023,
0.4209037125110626,
0.23275499045848846,
-0.005338288377970457,
0.8414615392684937,
0.2784369885921478,
1.5536742210388184,
0.17773215472698212,
-1.4052932262420654,
0.3019537925720215,
1.156834602355957,
0.18288402259349823,
-0.6454582214355469,
... |
func GetDoubleUUID() string {
return fmt.Sprintf("%s-%s\n", uuid.New().String(), uuid.New().String())
} | [
-0.08963734656572342,
-0.7845562696456909,
0.8671365976333618,
-0.43568286299705505,
-0.004035865887999535,
0.32911279797554016,
-0.46490734815597534,
0.4246203899383545,
-0.5532836318016052,
0.13533103466033936,
-0.5453435182571411,
1.1852308511734009,
0.2696714997291565,
-0.1094662025570... |
func (ri *rawItemList) len() int { return len(ri.cumSize) } | [
0.18584410846233368,
-0.19958488643169403,
0.0830908864736557,
-0.3396500051021576,
0.2766120135784149,
-0.29791566729545593,
1.2211982011795044,
1.251218557357788,
0.27375364303588867,
-0.7832627892494202,
-2.084289073944092,
-0.06344057619571686,
0.45055899024009705,
-0.38604217767715454... |
func (ri *rawItemList) item(i int) []byte {
startOff := ri.firstOff
if i > 0 {
startOff += ri.cumSize[i-1]
}
limitOff := ri.firstOff + ri.cumSize[i]
return ri.bytes[startOff:limitOff]
} | [
-1.048842430114746,
-0.12352556735277176,
0.3283929228782654,
-0.070132315158844,
-0.4525288939476013,
0.5747528076171875,
1.0123428106307983,
-0.2844417095184326,
0.6884951591491699,
0.1950635462999344,
-1.2157907485961914,
0.0380132757127285,
-0.6787804365158081,
-0.7809791564941406,
0... |
func parseChunksToItems(rawItems *rawItemList, chunks [][]byte, transform TransformFunc) error {
if transform == nil {
// TODO(saito) Allow TransformFunc to return an iov, and refactor the rest
// of the codebase to consume it.
transform = idTransform
}
var err error
if rawItems.bytes != nil {
// zstd doesn... | [
-0.07244496047496796,
-0.28543734550476074,
0.8738709092140198,
-0.6174591779708862,
-0.10985927283763885,
-0.7852715849876404,
0.17771045863628387,
0.33924397826194763,
-0.19865906238555908,
0.18893739581108093,
-0.6407849788665771,
0.09142129123210907,
0.41584324836730957,
-0.15516546368... |
func NewScanner(in io.ReadSeeker, opts ScannerOpts) Scanner {
return NewShardScanner(in, opts, 0, 1, 1)
} | [
-0.4627942740917206,
-0.3808319866657257,
0.2358800768852234,
1.2353084087371826,
-1.007220983505249,
-0.25943952798843384,
0.01593313179910183,
-0.37982499599456787,
0.4894023835659027,
-0.9069868326187134,
0.2792551517486572,
-0.34338507056236267,
-0.1623259037733078,
0.34934043884277344... |
func NewShardScanner(in io.ReadSeeker, opts ScannerOpts, start, limit, nshard int) Scanner {
if opts.Unmarshal == nil {
opts.Unmarshal = idUnmarshal
}
if err := internal.Seek(in, 0); err != nil {
return &errorScanner{err}
}
var magic internal.MagicBytes
if _, err := io.ReadFull(in, magic[:]); err != nil {
r... | [
-0.2173103392124176,
-0.33127713203430176,
0.9795318245887756,
0.329481840133667,
-1.3632861375808716,
-0.5286148190498352,
0.04567039757966995,
-0.31189873814582825,
0.2025899589061737,
-0.23090530931949615,
0.5271563529968262,
0.417236328125,
-0.11357813328504562,
-0.017121421173214912,
... |
func NewFromFile(filepath string) (*Writer, error) {
fp, err := os.Create(filepath)
if err != nil {
return nil, err
}
var w writer
switch ext := path.Ext(filepath); ext {
case ".tsv":
w = newTSVWriter(fp)
default:
w = newCSVWriter(fp)
}
return &Writer{
fp: fp,
w: w,
}, nil
} | [
0.581082820892334,
-0.35645726323127747,
0.1414891481399536,
0.3238084018230438,
-0.383362352848053,
-0.02380811981856823,
0.4050460457801819,
0.18409305810928345,
-0.6817072629928589,
0.055462226271629333,
0.2736128270626068,
-0.6036381125450134,
-0.17563985288143158,
0.16647642850875854,... |
func NewDummy() *Writer {
return &Writer{
fp: nil,
w: newDummyWriter(),
}
} | [
-0.39099636673927307,
-0.2821464538574219,
0.41903993487358093,
0.03560999780893326,
-0.0010215159272775054,
-1.4802294969558716,
0.2480027824640274,
-0.3485686182975769,
0.16397854685783386,
-0.5178471207618713,
-0.8611755967140198,
0.287108451128006,
-0.1669313609600067,
-0.0704753771424... |
func (w *Writer) Write(line []string) error {
err := w.w.Write(line)
if err != nil {
return err
}
w.w.Flush()
return nil
} | [
-0.5715505480766296,
0.5180659294128418,
0.2572574317455292,
0.4478553831577301,
1.4370192289352417,
0.0912277102470398,
0.09685131162405014,
0.10165324062108994,
-0.18818862736225128,
-0.09203306585550308,
-0.3831547796726227,
-0.32837140560150146,
-0.2824482023715973,
1.2147496938705444,... |
func TestEcho(t *testing.T) {
// Create a new logger.
logger := New("TEST-PREFIX:")
// Classical test.
r, w, _ := os.Pipe()
err := logger.SetOutputs(Output{
Name: "test",
Writer: w,
Levels: level.Default,
})
if err != nil {
t.Fatal(err)
}
logger.echo(nil, level.Debug, "test %s", "message")
outC :=... | [
0.7642735838890076,
0.05441507324576378,
1.034241795539856,
-0.06461229920387268,
0.07048642635345459,
0.08804444223642349,
0.6216837763786316,
-0.35312992334365845,
-0.41694703698158264,
0.1829039454460144,
-0.0028571742586791515,
0.7511301040649414,
0.07495324313640594,
0.171296522021293... |
func TestEchoWithTextFormatting(t *testing.T) {
tests := []struct {
name string
format string
in []interface{}
want string
}{
{
name: "Empty format",
format: "",
in: []interface{}{"hello", "world"},
want: "helloworld", // used fmt.Print
},
{
name: "System formatStr",
... | [
0.5196136236190796,
-0.30392879247665405,
0.9262838363647461,
0.26426997780799866,
-0.09376964718103409,
-0.3020358979701996,
0.010956352576613426,
-0.45841848850250244,
-0.17795410752296448,
-0.00012292491737753153,
0.06951319426298141,
0.6764325499534607,
-0.11395210772752762,
0.21409003... |
func TestEchoWithJSONFormatting(t *testing.T) {
tests := []struct {
name string
format string
in []interface{}
want string
}{
{
name: "Empty format",
format: "",
in: []interface{}{"hello", "world"},
want: "helloworld", // used fmt.Print
},
{
name: "System formatStr",
... | [
0.25141891837120056,
-0.33943602442741394,
0.9862263202667236,
0.07911047339439392,
-0.12060435116291046,
-0.37968185544013977,
0.1225847452878952,
-0.6828083395957947,
-0.1301184594631195,
0.10002691298723221,
0.05782024934887886,
0.8705199360847473,
0.2716299593448639,
0.0612170323729515... |
func (c *Client) GetContentModeration(ctx context.Context, params *GetContentModerationInput, optFns ...func(*Options)) (*GetContentModerationOutput, error) {
if params == nil {
params = &GetContentModerationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetContentModeration", params, optFns, addOpera... | [
-1.0832538604736328,
0.8001649975776672,
0.6981952786445618,
0.09880472719669342,
0.26982998847961426,
-1.3815025091171265,
0.5388423204421997,
-1.5179591178894043,
0.517686128616333,
-0.11357340216636658,
-0.19697551429271698,
0.41249704360961914,
-0.9574909210205078,
-1.1357414722442627,... |
func NewGetContentModerationPaginator(client GetContentModerationAPIClient, params *GetContentModerationInput, optFns ...func(*GetContentModerationPaginatorOptions)) *GetContentModerationPaginator {
if params == nil {
params = &GetContentModerationInput{}
}
options := GetContentModerationPaginatorOptions{}
if pa... | [
-0.7784451842308044,
0.05849631503224373,
0.5115869641304016,
-0.5307212471961975,
-0.6564973592758179,
-1.1241464614868164,
0.3776434659957886,
-0.27712973952293396,
0.168545663356781,
-0.0038048953283578157,
-0.1547226905822754,
-0.12749259173870087,
-0.7340760231018066,
0.29732620716094... |
func (p *GetContentModerationPaginator) HasMorePages() bool {
return p.firstPage || p.nextToken != nil
} | [
-0.06491914391517639,
-0.2164308875799179,
0.24168775975704193,
-0.9940423369407654,
0.8448150157928467,
-0.9830115437507629,
-1.4006190299987793,
-0.33925214409828186,
0.19545596837997437,
-0.6878397464752197,
-0.6101604700088501,
-0.8562763333320618,
-0.19148662686347961,
1.2785141468048... |
func (p *GetContentModerationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetContentModerationOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.NextToken = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit... | [
-0.4391189217567444,
0.5599880218505859,
0.647619366645813,
-0.33985576033592224,
0.2720264792442322,
-0.9409846663475037,
0.38491523265838623,
-0.7554222345352173,
0.2299843728542328,
-0.2559750974178314,
0.6153015494346619,
0.046320926398038864,
-1.0074151754379272,
-0.08971048891544342,... |
func NewCFNSelector(prompt Prompter) *CFNSelector {
return &CFNSelector{
prompt: prompt,
}
} | [
-0.9099516868591309,
-0.5930423140525818,
0.0823230892419815,
0.5718729496002197,
-0.8054508566856384,
-1.0954678058624268,
0.9137134552001953,
-0.1562841236591339,
-0.23371902108192444,
-1.0197540521621704,
-1.243974208831787,
-0.3044881224632263,
-0.4122951328754425,
-0.23345115780830383... |
func (sel *CFNSelector) Resources(msg, finalMsg, help, body string) ([]template.CFNResource, error) {
tpl := struct {
Resources map[string]struct {
Type string `yaml:"Type"`
} `yaml:"Resources"`
}{}
if err := yaml.Unmarshal([]byte(body), &tpl); err != nil {
return nil, fmt.Errorf("unmarshal CloudFormation t... | [
-0.36498260498046875,
-0.2262914478778839,
0.298909068107605,
-1.0851911306381226,
0.1740087866783142,
-0.6556011438369751,
0.2062898725271225,
-0.3698482811450958,
0.2506293058395386,
0.2491043210029602,
-0.004524022340774536,
0.39739951491355896,
-0.033066362142562866,
0.6921628713607788... |
func Test(t *testing.T) { TestingT(t) } | [
0.5603705644607544,
0.47240784764289856,
0.14808350801467896,
0.21293595433235168,
0.38073426485061646,
0.712630569934845,
1.494964361190796,
-0.18387949466705322,
-0.4030367434024811,
0.012481830082833767,
-0.6709293127059937,
-0.1728723794221878,
-0.05282559245824814,
0.4567270874977112,... |
func NewInsertOneModel() *InsertOneModel {
return &InsertOneModel{}
} | [
-0.5940950512886047,
0.19782386720180511,
0.3238150477409363,
0.9927638173103333,
-0.726936936378479,
-0.13747459650039673,
1.1071361303329468,
0.12364906072616577,
0.03878411278128624,
-0.3939145505428314,
-1.4101030826568604,
-0.7261918187141418,
-1.6299086809158325,
0.24011214077472687,... |
func (iom *InsertOneModel) SetDocument(doc interface{}) *InsertOneModel {
iom.Document = doc
return iom
} | [
-0.48374485969543457,
1.003240942955017,
0.19884242117404938,
0.4774319529533386,
0.34407782554626465,
0.9555728435516357,
1.5178481340408325,
0.46476519107818604,
-0.2587573528289795,
-0.7560631036758423,
-0.4007963240146637,
-0.6975950598716736,
-1.2713942527770996,
1.1611751317977905,
... |
func NewDeleteOneModel() *DeleteOneModel {
return &DeleteOneModel{}
} | [
-0.6750417947769165,
-0.42166638374328613,
-0.08874531835317612,
1.0513893365859985,
-0.16940268874168396,
-0.5620886087417603,
0.38664722442626953,
-0.21937695145606995,
0.1733998954296112,
0.03169848024845123,
-1.3818981647491455,
-0.9454777836799622,
-1.0608818531036377,
0.6192896366119... |
func (dom *DeleteOneModel) SetFilter(filter interface{}) *DeleteOneModel {
dom.Filter = filter
return dom
} | [
-0.6537288427352905,
0.6351305246353149,
0.22702625393867493,
0.9635687470436096,
-0.27468836307525635,
0.4273918569087982,
0.45953935384750366,
0.813414990901947,
0.2621738016605377,
-0.6330782175064087,
-0.3378629684448242,
-0.018374299630522728,
-0.08498593419790268,
1.3243253231048584,... |
func (dom *DeleteOneModel) SetCollation(collation *options.Collation) *DeleteOneModel {
dom.Collation = collation
return dom
} | [
-0.16173255443572998,
0.12589192390441895,
0.30822062492370605,
0.5534552931785583,
0.8947542309761047,
0.07823371142148972,
1.301134467124939,
0.5764565467834473,
0.6793162226676941,
0.16840940713882446,
-0.10692193359136581,
-1.2340583801269531,
0.19496192038059235,
0.9352032542228699,
... |
func NewDeleteManyModel() *DeleteManyModel {
return &DeleteManyModel{}
} | [
-0.20735271275043488,
-0.8081583380699158,
-0.026689741760492325,
1.1470493078231812,
-0.8827634453773499,
0.04811124503612518,
-0.664454460144043,
-0.15843160450458527,
-0.13883207738399506,
0.16798147559165955,
-0.7934221029281616,
-0.567667543888092,
-0.27034473419189453,
1.144439816474... |
func (dmm *DeleteManyModel) SetFilter(filter interface{}) *DeleteManyModel {
dmm.Filter = filter
return dmm
} | [
-0.5919439196586609,
0.6367244124412537,
0.30356693267822266,
0.8414644598960876,
-0.3769853115081787,
0.603863537311554,
-0.275120347738266,
0.5801729559898376,
-0.072090744972229,
-0.2481922209262848,
-0.09515348821878433,
0.02529347874224186,
-0.29746711254119873,
1.7396591901779175,
... |
func (dmm *DeleteManyModel) SetCollation(collation *options.Collation) *DeleteManyModel {
dmm.Collation = collation
return dmm
} | [
-0.12003792822360992,
0.1231503114104271,
0.4345426857471466,
0.5439864993095398,
0.6221678256988525,
0.15368907153606415,
0.5955675840377808,
0.25652602314949036,
0.45101648569107056,
0.3210129737854004,
0.07712490111589432,
-1.0454013347625732,
0.299884557723999,
1.3135639429092407,
-0... |
func NewReplaceOneModel() *ReplaceOneModel {
return &ReplaceOneModel{}
} | [
-0.617274284362793,
-0.22093912959098816,
-0.11925630271434784,
0.6696549654006958,
-0.5442774891853333,
-0.34516629576683044,
0.292281836271286,
0.6722440123558044,
0.31830033659935,
0.005092843435704708,
-1.4915459156036377,
-1.0708603858947754,
-1.3956818580627441,
0.5861710906028748,
... |
func (rom *ReplaceOneModel) SetFilter(filter interface{}) *ReplaceOneModel {
rom.Filter = filter
return rom
} | [
-0.710845410823822,
0.46856334805488586,
0.2880714535713196,
1.1637226343154907,
-0.195091113448143,
0.5482252240180969,
0.898047149181366,
0.601742148399353,
0.11775737255811691,
-0.6428200006484985,
-1.1117489337921143,
0.30785566568374634,
-0.6119519472122192,
0.9678979516029358,
-0.3... |
func (rom *ReplaceOneModel) SetReplacement(rep interface{}) *ReplaceOneModel {
rom.Replacement = rep
return rom
} | [
-1.1375876665115356,
0.1752522736787796,
0.2076803743839264,
0.5160614848136902,
0.061071913689374924,
0.17614242434501648,
1.2271379232406616,
0.8787199854850769,
0.5378834009170532,
-0.11775273084640503,
-1.3253053426742554,
-1.036574363708496,
-0.7661867737770081,
0.6555643677711487,
... |
func (rom *ReplaceOneModel) SetCollation(collation *options.Collation) *ReplaceOneModel {
rom.Collation = collation
return rom
} | [
-0.30509862303733826,
0.027387471869587898,
0.3311121165752411,
0.6021293997764587,
0.7893403768539429,
0.2958751916885376,
1.6388803720474243,
0.3679179251194,
0.6268149018287659,
0.04179288074374199,
-0.6308304667472839,
-1.0055986642837524,
-0.2986137270927429,
0.7222362756729126,
-0.... |
func (rom *ReplaceOneModel) SetUpsert(upsert bool) *ReplaceOneModel {
rom.Upsert = &upsert
return rom
} | [
-0.6912625432014465,
0.011108835227787495,
0.43316197395324707,
-0.4279671311378479,
0.18828202784061432,
0.04769996926188469,
0.6021985411643982,
0.5953662991523743,
0.02587629295885563,
-0.2511264383792877,
-0.6012718677520752,
-0.9822830557823181,
-1.399225115776062,
0.40868812799453735... |
func NewUpdateOneModel() *UpdateOneModel {
return &UpdateOneModel{}
} | [
-0.7190699577331543,
-0.6495226621627808,
-0.004669154994189739,
0.9004109501838684,
-1.0800527334213257,
-0.10624154657125473,
-0.2913343012332916,
-0.29562848806381226,
0.04645702242851257,
0.43942320346832275,
-0.9567314982414246,
-1.0699247121810913,
-1.4232250452041626,
0.283440828323... |
func (uom *UpdateOneModel) SetFilter(filter interface{}) *UpdateOneModel {
uom.Filter = filter
return uom
} | [
-0.5322356820106506,
-0.20540864765644073,
0.302957683801651,
1.75344979763031,
-0.6084576845169067,
0.9166770577430725,
0.5724977850914001,
0.7798555493354797,
0.10558757930994034,
-0.3612755835056305,
-0.5060468316078186,
-0.3500627875328064,
-0.8637412190437317,
0.5679650902748108,
-1... |
func (uom *UpdateOneModel) SetUpdate(update interface{}) *UpdateOneModel {
uom.Update = update
return uom
} | [
-0.3965059220790863,
-0.6754264831542969,
0.3763222098350525,
1.40360689163208,
-0.43871110677719116,
0.8173760175704956,
0.20866960287094116,
0.7438739538192749,
0.5494273900985718,
0.03117154724895954,
0.20495320856571198,
-1.6602702140808105,
-1.2516794204711914,
0.22496575117111206,
... |
func (uom *UpdateOneModel) SetArrayFilters(filters options.ArrayFilters) *UpdateOneModel {
uom.ArrayFilters = &filters
return uom
} | [
-0.5880294442176819,
-0.5359746217727661,
0.5288499593734741,
0.8313841223716736,
-0.07977297902107239,
0.0340203195810318,
-0.2967836558818817,
-0.8927602767944336,
0.14728911221027374,
0.20141594111919403,
-0.6410447359085083,
0.35554999113082886,
-0.7450976371765137,
0.1633281260728836,... |
func (uom *UpdateOneModel) SetCollation(collation *options.Collation) *UpdateOneModel {
uom.Collation = collation
return uom
} | [
-0.05833569914102554,
-0.4789149761199951,
0.3499318063259125,
1.1701664924621582,
0.281271755695343,
0.46987253427505493,
1.1904640197753906,
0.5922521948814392,
0.7175840139389038,
0.38344159722328186,
-0.19501280784606934,
-1.4744240045547485,
-0.44795775413513184,
0.3278222382068634,
... |
func (uom *UpdateOneModel) SetUpsert(upsert bool) *UpdateOneModel {
uom.Upsert = &upsert
return uom
} | [
-0.31081631779670715,
-0.230081707239151,
0.5275229215621948,
-0.12106014043092728,
-0.22601577639579773,
0.18891119956970215,
0.3209169805049896,
0.5892229676246643,
0.06219178065657616,
-0.208237424492836,
-0.22421753406524658,
-1.1619648933410645,
-1.387892484664917,
0.16864429414272308... |
func NewUpdateManyModel() *UpdateManyModel {
return &UpdateManyModel{}
} | [
-0.8476885557174683,
-0.9105956554412842,
0.0404486320912838,
1.1634429693222046,
-1.61002516746521,
0.47753167152404785,
-0.8971725702285767,
-0.31014013290405273,
-0.3743826448917389,
0.6090976595878601,
-0.5700792074203491,
-0.4556083083152771,
-0.461987167596817,
0.5623414516448975,
... |
func (umm *UpdateManyModel) SetFilter(filter interface{}) *UpdateManyModel {
umm.Filter = filter
return umm
} | [
-0.9342701435089111,
0.014165109023451805,
0.42974036931991577,
1.3609014749526978,
-0.8832759261131287,
0.9130405783653259,
0.10694540292024612,
0.7379297614097595,
0.21554069221019745,
-0.4499267041683197,
-0.30091381072998047,
-0.1965153068304062,
-0.4896976053714752,
1.335852861404419,... |
func (umm *UpdateManyModel) SetUpdate(update interface{}) *UpdateManyModel {
umm.Update = update
return umm
} | [
-0.6377620697021484,
-0.6854472160339355,
0.43647894263267517,
1.1026453971862793,
-0.7963768243789673,
0.8495143055915833,
-0.3467893898487091,
0.8129140138626099,
0.6866486668586731,
0.01825683005154133,
0.2214788943529129,
-1.4018065929412842,
-0.8550773859024048,
1.0538724660873413,
... |
func (umm *UpdateManyModel) SetArrayFilters(filters options.ArrayFilters) *UpdateManyModel {
umm.ArrayFilters = &filters
return umm
} | [
-0.7228848338127136,
-0.5030036568641663,
0.6841871738433838,
0.6976380348205566,
-0.30528634786605835,
0.08680682629346848,
-0.6146044731140137,
-0.8689556121826172,
0.42118290066719055,
0.07894199341535568,
-0.5514177083969116,
0.41144728660583496,
-0.3181997537612915,
0.6934763193130493... |
func (umm *UpdateManyModel) SetCollation(collation *options.Collation) *UpdateManyModel {
umm.Collation = collation
return umm
} | [
-0.44784441590309143,
-0.3800469934940338,
0.5199348330497742,
0.8238374590873718,
0.09661220014095306,
0.3571185767650604,
0.7498947978019714,
0.4885314106941223,
0.7455092668533325,
0.1829240918159485,
0.028281832113862038,
-1.360883355140686,
-0.10177967697381973,
0.9452422261238098,
... |
func (umm *UpdateManyModel) SetUpsert(upsert bool) *UpdateManyModel {
umm.Upsert = &upsert
return umm
} | [
-0.5847085118293762,
-0.11654787510633469,
0.5368223786354065,
-0.3739856779575348,
-0.5152674317359924,
0.13094502687454224,
0.043545473366975784,
0.7281172871589661,
0.10523631423711777,
-0.18975050747394562,
0.04955679550766945,
-1.159985899925232,
-1.0594888925552368,
0.956022560596466... |
func svformatFromQueryString(r *http.Request) SparseVolFormat {
switch r.URL.Query().Get("format") {
case "srles":
return FormatStreamingRLE
case "blocks":
return FormatBinaryBlocks
default:
return FormatLegacyRLE
}
} | [
1.4054603576660156,
-0.9528573155403137,
0.23855887353420258,
0.40167370438575745,
-0.6777642965316772,
-0.3194432258605957,
-0.6078953146934509,
-0.5843077898025513,
1.216144323348999,
-0.10703999549150467,
0.8920756578445435,
0.3200036883354187,
-0.20856627821922302,
0.7412306070327759,
... |
func ZeroBytes() []byte {
return zeroLabelBytes
} | [
-0.14786358177661896,
-0.29628562927246094,
0.27409979701042175,
-0.33438023924827576,
-0.08994011580944061,
0.6853901743888855,
-0.33452481031417847,
0.0842636302113533,
0.6624337434768677,
-0.3734225332736969,
-0.15043391287326813,
0.9210942387580872,
-1.568570852279663,
0.34574943780899... |
func GetByDataUUID(dataUUID dvid.UUID) (*Data, error) {
source, err := datastore.GetDataByDataUUID(dataUUID)
if err != nil {
return nil, err
}
data, ok := source.(*Data)
if !ok {
return nil, fmt.Errorf("instance '%s' is not a labelmap datatype", source.DataName())
}
return data, nil
} | [
-0.9017847776412964,
0.21027952432632446,
0.2958883047103882,
-1.1668238639831543,
-0.4493328630924225,
0.20203712582588196,
-0.40632471442222595,
-0.19885221123695374,
0.07655929028987885,
-0.2880133092403412,
-0.25119516253471375,
0.8574121594429016,
-0.021510010585188866,
-0.08743321895... |
func GetByUUIDName(uuid dvid.UUID, name dvid.InstanceName) (*Data, error) {
source, err := datastore.GetDataByUUIDName(uuid, name)
if err != nil {
return nil, err
}
data, ok := source.(*Data)
if !ok {
return nil, fmt.Errorf("instance '%s' is not a labelmap datatype", name)
}
return data, nil
} | [
-1.0767669677734375,
-0.09840631484985352,
0.30635347962379456,
-1.0444083213806152,
-0.5963812470436096,
-0.2001529335975647,
-1.121468186378479,
-0.07439485192298889,
-0.6947453618049622,
0.6276759505271912,
0.2430940419435501,
0.3850359618663788,
0.0021569395903497934,
-0.42704236507415... |
func GetByVersionName(v dvid.VersionID, name dvid.InstanceName) (*Data, error) {
source, err := datastore.GetDataByVersionName(v, name)
if err != nil {
return nil, err
}
data, ok := source.(*Data)
if !ok {
return nil, fmt.Errorf("instance '%s' is not a labelmap datatype", name)
}
return data, nil
} | [
-0.3935566246509552,
-0.5844834446907043,
0.45810577273368835,
-0.6082392930984497,
-0.8031866550445557,
0.037320688366889954,
-0.8768479228019714,
-0.29063349962234497,
-0.30325818061828613,
0.8513705134391785,
-0.44259992241859436,
0.6587517857551575,
-0.39427459239959717,
-0.12733347713... |
func (d *Data) modifyConfig(config dvid.Config) error {
if err := d.Data.ModifyConfig(config); err != nil {
return err
}
s, found, err := config.GetString("MaxDownresLevel")
if err != nil {
return err
}
if found {
maxDownresLevel, err := strconv.ParseUint(s, 10, 8)
if err != nil {
return err
}
d.Ma... | [
-0.9265745282173157,
0.47413554787635803,
0.6861497163772583,
-0.19403652846813202,
0.3466363251209259,
-0.2034716159105301,
0.09814772009849548,
1.0529423952102661,
0.8148388266563416,
-0.23768986761569977,
-0.2508077919483185,
0.0628357082605362,
-0.7562647461891174,
1.0516619682312012,
... |
func (d *Data) GetMaxDownresLevel() uint8 {
return d.MaxDownresLevel
} | [
0.027429943904280663,
0.23185130953788757,
0.311149001121521,
0.5278134346008301,
-0.4468909204006195,
0.6403033137321472,
0.15102818608283997,
-0.3715439736843109,
0.7990476489067078,
-0.8627932667732239,
0.30183887481689453,
-0.08712801337242126,
-1.1239275932312012,
0.06354697048664093,... |
func (d *Data) CopyPropertiesFrom(src datastore.DataService, fs storage.FilterSpec) error {
d2, ok := src.(*Data)
if !ok {
return fmt.Errorf("unable to copy properties from non-labelmap data %q", src.DataName())
}
// TODO -- Handle mutable data that could be potentially altered by filter.
d.MaxLabel = make(map[... | [
-0.8640453219413757,
-0.7661195993423462,
0.3462695777416229,
-0.35281261801719666,
-0.9677689671516418,
0.4209859371185303,
-0.2855146527290344,
-0.12884420156478882,
0.22743971645832062,
-0.38226118683815,
0.62992262840271,
0.5573179125785828,
1.0035240650177002,
-0.19284093379974365,
... |
func NewData(uuid dvid.UUID, id dvid.InstanceID, name dvid.InstanceName, c dvid.Config) (*Data, error) {
blockSizeStr, found, err := c.GetString("BlockSize")
if err != nil {
return nil, err
}
if found {
var nx, ny, nz int
fmt.Sscanf(blockSizeStr, "%d,%d,%d", &nx, &ny, &nz)
if nx%16 != 0 || ny%16 != 0 || nz%... | [
-0.5072213411331177,
-0.13308852910995483,
0.9876500964164734,
-0.350521445274353,
-0.2523573338985443,
-0.3112502694129944,
0.455140084028244,
-0.5829675197601318,
-0.2399453967809677,
-0.20657183229923248,
0.24214215576648712,
0.4058293104171753,
-0.5098692774772644,
-0.05904488265514374... |
func (d *Data) setResolution(uuid dvid.UUID, jsonBytes []byte) error {
config := make(dvid.NdFloat32, 3)
if err := json.Unmarshal(jsonBytes, &config); err != nil {
return err
}
d.Properties.VoxelSize = config
return datastore.SaveDataByUUID(uuid, d)
} | [
-0.8869073987007141,
0.41580089926719666,
0.3305697739124298,
-0.745104968547821,
-0.00855670589953661,
-0.7819501161575317,
-0.688625156879425,
0.5704805850982666,
-0.12927979230880737,
0.38191622495651245,
-1.5745090246200562,
-0.6720770001411438,
-0.22853323817253113,
0.1016739532351493... |
func (d *Data) updateMaxLabel(v dvid.VersionID, label uint64) (changed bool, err error) {
d.mlMu.RLock()
curMax, found := d.MaxLabel[v]
if !found || curMax < label {
changed = true
}
d.mlMu.RUnlock()
if !changed {
return
}
d.mlMu.Lock()
defer d.mlMu.Unlock()
d.MaxLabel[v] = label
if err = d.persistMaxL... | [
-1.3626288175582886,
-0.4207953214645386,
0.4837093949317932,
-0.306987464427948,
-0.901721179485321,
0.31074053049087524,
-0.9808418154716492,
-0.460857629776001,
0.8026560544967651,
1.0561251640319824,
-0.14969797432422638,
0.766059935092926,
-0.33381542563438416,
-0.20459282398223877,
... |
func (d *Data) updateBlockMaxLabel(v dvid.VersionID, block *labels.Block) {
var changed bool
d.mlMu.RLock()
curMax, found := d.MaxLabel[v]
d.mlMu.RUnlock()
if !found {
curMax = 0
}
for _, label := range block.Labels {
if label > curMax {
curMax = label
changed = true
}
}
if changed {
d.mlMu.Lock(... | [
-1.0541831254959106,
-0.7676390409469604,
0.6603713035583496,
0.15300914645195007,
-0.7382269501686096,
0.10375943034887314,
-0.7733116149902344,
0.011133858002722263,
-0.03627888485789299,
1.1432275772094727,
-0.2853092849254608,
0.7510094046592712,
-0.49277159571647644,
0.064161442220211... |
func (d *Data) newLabel(v dvid.VersionID) (uint64, error) {
d.mlMu.Lock()
defer d.mlMu.Unlock()
// Increment and store if we don't have an ephemeral new label start ID.
if d.NextLabel != 0 {
d.NextLabel++
if err := d.persistNextLabel(); err != nil {
return d.NextLabel, err
}
return d.NextLabel, nil
}
... | [
-0.9947153329849243,
0.08688917011022568,
0.5559755563735962,
-0.5079829096794128,
-0.47225913405418396,
-0.18987834453582764,
0.0001153040211647749,
-0.18695461750030518,
1.0293254852294922,
0.14957639575004578,
-0.3333978056907654,
0.623588502407074,
-0.21012020111083984,
0.0829445570707... |
func (d *Data) newLabels(v dvid.VersionID, numLabels uint64) (begin, end uint64, err error) {
if numLabels <= 0 {
err = fmt.Errorf("cannot request %d new labels, must be 1 or more", numLabels)
}
d.mlMu.Lock()
defer d.mlMu.Unlock()
// Increment and store.
if d.NextLabel != 0 {
begin = d.NextLabel + 1
end = ... | [
-1.7415261268615723,
0.20371855795383453,
0.3937797248363495,
-0.8965108394622803,
-0.28762543201446533,
-0.4992998242378235,
-0.4017024338245392,
-0.387857586145401,
0.3908825218677521,
-0.30570971965789795,
-0.2605665922164917,
0.3153003454208374,
-0.49588558077812195,
0.0623223669826984... |
func (d *Data) SetNextLabelStart(nextLabelID uint64) error {
d.NextLabel = nextLabelID
if err := d.persistNextLabel(); err != nil {
return err
}
return nil
} | [
-1.0574382543563843,
-0.5784949660301208,
0.2270674854516983,
-0.8391191959381104,
-0.4978952407836914,
0.5590240359306335,
-0.5293309092521667,
-0.22878538072109222,
0.3244152367115021,
0.28896191716194153,
-0.2989107370376587,
0.7996280193328857,
-0.8673428297042847,
0.3191165030002594,
... |
func (d *Data) LoadMutable(root dvid.VersionID, storedVersion, expectedVersion uint64) (bool, error) {
ctx := storage.NewDataContext(d, 0)
store, err := datastore.GetOrderedKeyValueDB(d)
if err != nil {
return false, fmt.Errorf("Data type labelmap had error initializing store: %v", err)
}
wg := new(sync.WaitGro... | [
-1.4381365776062012,
0.4142545163631439,
0.8488349318504333,
-0.05496187508106232,
-0.5549939274787903,
0.1143944263458252,
-0.8372728824615479,
-0.1703370362520218,
0.011665127240121365,
0.8565136194229126,
-0.5522105097770691,
0.34541594982147217,
-0.2617380619049072,
0.49963000416755676... |
func (d *Data) NewLabels(geom dvid.Geometry, img interface{}) (*Labels, error) {
bytesPerVoxel := d.Properties.Values.BytesPerElement()
stride := geom.Size().Value(0) * bytesPerVoxel
var data []byte
if img == nil {
numVoxels := geom.NumVoxels()
if numVoxels <= 0 {
return nil, fmt.Errorf("illegal geometry re... | [
-0.42274513840675354,
0.18155574798583984,
0.7812204957008362,
-0.2852366864681244,
-0.5225770473480225,
-0.631359875202179,
-0.6390113234519958,
-0.9170759916305542,
0.3580774962902069,
-0.03156988322734833,
0.9202057123184204,
0.2603991627693176,
-0.19359970092773438,
0.8043290376663208,... |
func (d *Data) convertTo64bit(geom dvid.Geometry, data []uint8, bytesPerVoxel, stride int) ([]byte, error) {
nx := int(geom.Size().Value(0))
ny := int(geom.Size().Value(1))
numBytes := nx * ny * 8
data64 := make([]byte, numBytes)
var byteOrder binary.ByteOrder
if geom.DataShape().ShapeDimensions() == 2 {
byteO... | [
-0.15577714145183563,
0.3174317181110382,
0.9893118739128113,
-0.4230436086654663,
-0.22313150763511658,
0.32295212149620056,
0.38916951417922974,
-1.0063841342926025,
0.41497793793678284,
0.6471616625785828,
-0.47827592492103577,
-0.26641368865966797,
0.4899863600730896,
0.489913552999496... |
func (d *Data) PushData(p *datastore.PushSession) error {
// Delegate to imageblk's implementation.
return d.Data.PushData(p)
} | [
-0.4757927656173706,
0.6868946552276611,
0.38940107822418213,
0.07028458267450333,
-0.054754216223955154,
0.23335804045200348,
0.1601676195859909,
0.04087727144360542,
0.8314388394355774,
-0.01890663243830204,
0.09421341121196747,
0.5193536281585693,
0.7132478952407837,
0.6099651455879211,... |
func (d *Data) DoRPC(req datastore.Request, reply *datastore.Response) error {
switch req.TypeCommand() {
case "set-nextlabel":
if len(req.Command) < 5 {
return fmt.Errorf("poorly formatted set-nextlabel command, see command-line help")
}
// Parse the request
var uuidStr, dataName, cmdStr, labelStr string... | [
-0.7507537007331848,
-0.339870810508728,
1.022560715675354,
-1.0157222747802734,
0.6398680806159973,
0.15914151072502136,
-0.3006151616573334,
-0.5993478298187256,
0.29113414883613586,
-0.12676706910133362,
0.8343632221221924,
0.17611101269721985,
-0.370480477809906,
0.488455593585968,
0... |
func checkContentHash(hash string, data []byte) error {
if hash == "" {
return nil
}
hexHash := fmt.Sprintf("%x", md5.Sum(data))
if hexHash != hash {
return fmt.Errorf("content hash incorrect. expected %s, got %s", hash, hexHash)
}
return nil
} | [
1.2193899154663086,
-0.4964672327041626,
0.23897723853588104,
0.4069095551967621,
0.07369279861450195,
0.7785190939903259,
-0.23014883697032928,
-0.1881292760372162,
-0.25904417037963867,
-0.04246918484568596,
0.30471572279930115,
0.21824078261852264,
-0.7605394124984741,
0.197453349828720... |
func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, r *http.Request) (activity map[string]interface{}) {
// Get the action (GET, POST)
action := strings.ToLower(r.Method)
// Break URL request into arguments
url := r.URL.Path[len(server.WebAPIPath):]
parts := strings.Split(... | [
-1.2822142839431763,
-0.023208284750580788,
0.8540692925453186,
-0.1655915528535843,
-0.44826555252075195,
-0.007113947533071041,
0.1808321326971054,
-1.3027303218841553,
-0.38907039165496826,
0.8374319672584534,
0.34497007727622986,
0.5364590287208557,
-0.09404127299785614,
0.080102182924... |
func (c *Client) History(asset int) *HistoryService {
return &HistoryService{service{c}, asset}
} | [
0.47654086351394653,
0.9407344460487366,
0.07279272377490997,
-0.9952473640441895,
-0.18149852752685547,
-0.07920164614915848,
0.37152355909347534,
-1.3790016174316406,
0.34960657358169556,
-0.9911492466926575,
0.08351098001003265,
1.0456982851028442,
0.1701090931892395,
0.0063995919190347... |
func (hs *HistoryService) Withdraw() (*CurrencyHistory, error) {
return hs.currency("withdraw")
} | [
-0.42938846349716187,
1.5113976001739502,
0.1817612648010254,
-0.282979816198349,
0.31407833099365234,
-0.7729167938232422,
0.15636855363845825,
-0.14433620870113373,
0.25335004925727844,
-1.1328434944152832,
-0.21605530381202698,
0.6505565047264099,
-0.6757281422615051,
0.5295856595039368... |
func (hs *HistoryService) Deposit() (*CurrencyHistory, error) {
return hs.currency("deposit")
} | [
0.12060447037220001,
1.3195146322250366,
0.17777571082115173,
0.05096394568681717,
0.1005040630698204,
-0.4300689995288849,
0.5919613838195801,
-0.5335108041763306,
-0.37967076897621155,
-0.6684820652008057,
0.06175559386610985,
0.19062530994415283,
-0.018291570246219635,
1.417184591293335... |
func (hs *HistoryService) All(actionType string) ([]*TransactionHistory, error) {
var transHist []*TransactionHistory
if err := hs.client.Get(buildString("history/", actionType, "/", strconv.Itoa(hs.assetId)),
&transHist); err != nil {
return nil, err
}
return transHist, nil
} | [
0.6072568893432617,
0.06211722269654274,
0.5697798132896423,
0.2655699849128723,
0.9996176362037659,
0.060490772128105164,
-0.9475647807121277,
-0.3432076871395111,
-0.12158887833356857,
0.6346891522407532,
0.3571505844593048,
1.4730340242385864,
0.24192817509174347,
1.0384576320648193,
... |
func NewFetch(repos, exclude, optional []string) *Fetch {
for i, url := range repos {
if !strings.HasSuffix(url, "/") {
repos[i] = url + "/"
}
if strings.HasPrefix(url, "http:") {
log.Warning("Repo URL %s is not secure, you should really be using https", url)
}
}
f := &Fetch{
repos: repos,
clien... | [
-0.03673143312335014,
-0.21449655294418335,
0.33531397581100464,
0.12384918332099915,
-1.0888028144836426,
0.19000527262687683,
-1.1709394454956055,
-0.22595587372779846,
0.5644872784614563,
-0.15487395226955414,
-0.11939231306314468,
0.23331329226493835,
0.27866169810295105,
0.45583039522... |
func toMap(sl []string) map[string]bool {
m := make(map[string]bool, len(sl))
for _, s := range sl {
m[s] = true
}
return m
} | [
-0.6195366382598877,
-0.4150114357471466,
0.5988935232162476,
-0.16873815655708313,
-0.9965968132019043,
0.3809186518192291,
-0.5905462503433228,
0.7834799289703369,
1.0744993686676025,
1.3749068975448608,
-0.4263918697834015,
-0.18127202987670898,
0.45634856820106506,
-0.08154892921447754... |
func (f *Fetch) Pom(a *Artifact) *PomXML {
if a.Version == "+" {
// + indicates the latest version, presumably.
a.SetVersion(f.Metadata(a).LatestVersion())
}
pom, created := f.Resolver.CreatePom(a)
pom.Lock()
defer pom.Unlock()
if !created {
return pom
}
pom.Unmarshal(f, f.mustFetch(a.PomPath()))
return ... | [
-0.11291377246379852,
0.3230123519897461,
0.29217925667762756,
0.48390069603919983,
-0.6655616760253906,
0.13227900862693787,
-0.19903235137462616,
-0.19361314177513123,
0.43550026416778564,
-0.4430059492588043,
0.5669563412666321,
-0.8950066566467285,
0.4653056263923645,
-0.98590117692947... |
func (f *Fetch) Metadata(a *Artifact) *MetadataXML {
metadata := &MetadataXML{Group: a.GroupID, Artifact: a.ArtifactID}
metadata.Unmarshal(f.mustFetch(a.MetadataPath()))
return metadata
} | [
0.22350254654884338,
-0.29264843463897705,
0.2181520313024521,
-0.5257380604743958,
-0.3871219754219055,
-0.042119961231946945,
-0.45000243186950684,
-0.8583936095237732,
0.26437926292419434,
0.2383614033460617,
0.9896664023399353,
0.07779787480831146,
0.9126983880996704,
-0.29225760698318... |
func (f *Fetch) HasSources(a *Artifact) bool {
_, err := f.fetch(a.SourcePath(), false)
return err == nil
} | [
0.3905840516090393,
0.45674288272857666,
0.38826656341552734,
-0.7139074802398682,
0.2142695188522339,
-0.46411681175231934,
0.009618155658245087,
-0.13530144095420837,
0.26830270886421204,
-0.6194807291030884,
-0.3923347294330597,
-1.5669474601745605,
0.43900465965270996,
0.85174196958541... |
func (f *Fetch) IsExcluded(artifact string) bool {
return f.exclude[artifact]
} | [
0.03790917992591858,
1.0769597291946411,
0.20138785243034363,
0.3688453435897827,
-1.1687630414962769,
1.0819480419158936,
-0.21355211734771729,
-0.6305102705955505,
0.6924265623092651,
-0.37200257182121277,
-0.5454334616661072,
0.1992921680212021,
-0.5340313911437988,
-0.30548223853111267... |
func (f *Fetch) ShouldInclude(artifact string) bool {
return f.optional[artifact]
} | [
0.9179693460464478,
0.950547993183136,
0.48534831404685974,
0.7280908226966858,
-1.15120530128479,
1.1315468549728394,
-0.4860442280769348,
0.014778802171349525,
0.7203894853591919,
-0.5154271125793457,
-0.3087226450443268,
-0.21870610117912292,
-0.4717983901500702,
-0.2737528383731842,
... |
func (f *Fetch) mustFetch(url string) []byte {
b, err := f.fetch(url, true)
if err != nil {
log.Fatalf("Error downloading %s: %s\n", f.repos[len(f.repos)-1]+url, err)
}
return b
} | [
-0.6405314207077026,
0.23726463317871094,
0.39464834332466125,
-0.07718503475189209,
-0.38328614830970764,
0.5067529678344727,
-1.5093413591384888,
-0.9463536143302917,
0.6771351099014282,
0.1573234349489212,
-0.19769679009914398,
0.2804778814315796,
0.2715855538845062,
0.6717833280563354,... |
func (f *Fetch) fetch(url string, readBody bool) ([]byte, error) {
f.mutex.Lock()
contents, present := f.cache[url]
f.mutex.Unlock()
if present {
log.Debug("Retrieved %s from cache", url)
return contents, nil
}
var err error
for _, repo := range f.repos {
if contents, err = f.fetchURL(repo+url, readBody); ... | [
-0.47346031665802,
0.3006950914859772,
0.4714493751525879,
0.19902582466602325,
-0.42902061343193054,
-0.27137091755867004,
-0.9751704335212708,
-0.42672058939933777,
0.3918009400367737,
0.0723281130194664,
0.022821031510829926,
-0.18169966340065002,
0.02783999778330326,
0.9935891628265381... |
func (f *Fetch) description(readBody bool) string {
if readBody {
return "Downloading"
}
return "Checking"
} | [
0.20036032795906067,
0.20120517909526825,
0.5651528239250183,
0.2332460731267929,
-0.16971658170223236,
0.8651078343391418,
-0.8969674706459045,
-0.0048449174501001835,
0.5435160994529724,
0.7785099148750305,
0.5596333146095276,
0.793736457824707,
0.36294713616371155,
0.8786771297454834,
... |
func newNetworkServicesEndpointPolicies(c *NetworkservicesV1beta1Client, namespace string) *networkServicesEndpointPolicies {
return &networkServicesEndpointPolicies{
client: c.RESTClient(),
ns: namespace,
}
} | [
-0.1277933567762375,
-0.20744842290878296,
-0.12019416689872742,
-0.14964452385902405,
-0.06504321843385696,
0.8079773783683777,
-0.6737638711929321,
-1.1310118436813354,
0.5561391115188599,
-0.02226877026259899,
-0.19979730248451233,
-0.3043000102043152,
-1.1759767532348633,
0.22299784421... |
func (c *networkServicesEndpointPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkServicesEndpointPolicy, err error) {
result = &v1beta1.NetworkServicesEndpointPolicy{}
err = c.client.Get().
Namespace(c.ns).
Resource("networkservicesendpointpolicies").
Name(name).
... | [
-0.7029443383216858,
0.27521228790283203,
0.24501918256282806,
-0.8769550919532776,
0.3918425738811493,
0.7512044906616211,
-0.7755030989646912,
-1.0745463371276855,
-0.045793317258358,
0.5034966468811035,
-0.09442318975925446,
0.24734853208065033,
-0.8900311589241028,
-0.2972484529018402,... |
func (c *networkServicesEndpointPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkServicesEndpointPolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.NetworkServicesEndpoin... | [
-0.7571492195129395,
-0.06311950087547302,
0.14702479541301727,
-0.4689265489578247,
0.5841572284698486,
0.7777121067047119,
-0.6715191602706909,
-0.4107811450958252,
0.17401885986328125,
0.5061588287353516,
-0.2844163179397583,
-0.108819380402565,
-1.069698691368103,
-0.12104498594999313,... |
func (c *networkServicesEndpointPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("netw... | [
-0.25152522325515747,
0.03811149671673775,
0.2921503782272339,
-0.3458820581436157,
-0.004203759599477053,
0.9913951754570007,
-0.3869350254535675,
-0.18257899582386017,
0.2765892744064331,
0.020983772352337837,
-0.2419721633195877,
0.5798827409744263,
-0.6501507759094238,
-0.3948342204093... |
func (c *networkServicesEndpointPolicies) Create(ctx context.Context, networkServicesEndpointPolicy *v1beta1.NetworkServicesEndpointPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkServicesEndpointPolicy, err error) {
result = &v1beta1.NetworkServicesEndpointPolicy{}
err = c.client.Post().
Namespace(c.ns).
... | [
-0.7558178901672363,
0.2522977292537689,
-0.0011324012884870172,
-0.188432514667511,
0.6576012969017029,
1.6959266662597656,
-0.493133544921875,
-1.148128867149353,
-0.130044624209404,
0.1772058606147766,
-0.24750743806362152,
-0.6628447771072388,
-1.1219719648361206,
0.17623667418956757,
... |
func (c *networkServicesEndpointPolicies) Update(ctx context.Context, networkServicesEndpointPolicy *v1beta1.NetworkServicesEndpointPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkServicesEndpointPolicy, err error) {
result = &v1beta1.NetworkServicesEndpointPolicy{}
err = c.client.Put().
Namespace(c.ns).
R... | [
-0.7384824156761169,
-0.44090139865875244,
-0.054077617824077606,
-0.5361385941505432,
-0.05198162794113159,
1.621498465538025,
-0.3603017330169678,
-0.8822236657142639,
0.26975926756858826,
0.3908686339855194,
-0.008092653937637806,
-0.2875572144985199,
-1.4535073041915894,
-0.54159641265... |
func (c *networkServicesEndpointPolicies) UpdateStatus(ctx context.Context, networkServicesEndpointPolicy *v1beta1.NetworkServicesEndpointPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkServicesEndpointPolicy, err error) {
result = &v1beta1.NetworkServicesEndpointPolicy{}
err = c.client.Put().
Namespace(c.ns... | [
-0.9800335168838501,
-0.6019958853721619,
0.17417685687541962,
-0.1521054357290268,
-0.43098536133766174,
1.2953381538391113,
-0.12003234773874283,
-0.08749888837337494,
0.5656108260154724,
0.5967134833335876,
-0.2746935188770294,
0.23724395036697388,
-0.8388955593109131,
-0.25812375545501... |
func (c *networkServicesEndpointPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("networkservicesendpointpolicies").
Name(name).
Body(&opts).
Do(ctx).
Error()
} | [
0.030659593641757965,
0.1672961562871933,
0.30827656388282776,
-0.4165753722190857,
0.3808024525642395,
1.3515807390213013,
-0.6781922578811646,
-0.6453761458396912,
0.49444156885147095,
0.8466570973396301,
-0.03485020622611046,
-0.40795618295669556,
-1.3857800960540771,
-0.432523280382156... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.