sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
3e941a4b8d96387f74986e1eda7909b7dc3c0f63967b20b74777d9793909396f | Go | 2,406 | 68 | package dao
import (
"context"
"testing"
"github.com/DATA-DOG/go-sqlmock"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/stretchr/testify/require"
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
func TestGetSegmentsRowFailures(t *testing.T) {
columns := []string{"id", "collection_id", "type", "scope", "... |
e24b4ca1cccbd55dfca93547b1306cd82abe3e69dde7751edaa3562549a4e655 | Go | 2,537 | 105 | package model
type CollectionMetadataValueType interface {
IsCollectionMetadataValueType()
Equals(other CollectionMetadataValueType) bool
}
type CollectionMetadataValueStringType struct {
Value string
}
func (s *CollectionMetadataValueStringType) IsCollectionMetadataValueType() {}
func (s *CollectionMetadataValu... |
a066ce8db90cbe00f9fef4c637ccf64ea62fb4e46a34742b5b25cab3b8bbcf06 | Go | 2,778 | 118 | package grpcutils
import (
"context"
"crypto/tls"
"crypto/x509"
"github.com/chroma-core/chroma/go/shared/otel"
"io"
"net"
"os"
"github.com/pingcap/log"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
const (
maxGrpcFrameSize = 256 * 1024 * 1024
ReadinessProbeService = ... |
0beb459cba335d2113a10ba188a430ddba7dce331021bfae08421ce52d3afc04 | Go | 3,088 | 104 | package s3metastore
import (
"context"
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
)
const (
// MinIO RELE... |
b52e8b3afdcab1b149c85854728dd9f41332a03fc9aaf7b24e3fbd3a837a2386 | Go | 3,103 | 106 | package leader
import (
"context"
"os"
"strings"
"time"
"github.com/pingcap/log"
"go.uber.org/zap"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/leaderelection"
"k8s.io/client-go/tools/leaderelection/resourcelock"
)
// extractSe... |
6a40001fd7565e454904c706bca3ecbc0696a736e11b3c74569f03d3ff57c1a0 | Go | 3,168 | 121 | package dao
import (
"errors"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/jackc/pgx/v5/pgconn"
"github.com/pingcap/log"
"go.uber.org/zap"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
type tenantDb struct {
db *gorm.DB
}
var _ dbmodel... |
704862b97bbf8ed679e87f89ffe9ce6e63540c7bba40008feaefc8e75eafcedb | Go | 3,468 | 149 | // Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
uuid "github.com/google/uuid"
)
// IFunctionDb is an autogenerated mock type for the IFunctionDb type
type IFunctionDb struct... |
07d5b2158b80a38b8cbc9f9cc539de086aac142fb5941688c05d2457adb125f7 | Go | 3,676 | 119 | package model
import (
"time"
"github.com/chroma-core/chroma/go/pkg/types"
)
type Collection struct {
ID types.UniqueID
Name string
ConfigurationJsonStr string
SchemaStr *string
Dimension *int32
Metadata *... |
83a6154e59030f26b00864d792e580392559bb31de47e01f9fdfc706fbf1af4a | Go | 3,830 | 133 | package dao
import (
"strconv"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"gorm.io/gorm"
)
type ... |
eb75e599fea096f8791b9509ad05f69b7f390afc9c529d7bcc4d7d84df8b6bd6 | Go | 4,047 | 136 | package coordinator
import (
"testing"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func testAttachedFunctionEdge(inputCollectionID string, outputCollectionID *string) *dbmodel.AttachedFun... |
02a073fa3103cc231946252a9fe95463a50fcb1daf4ca5ab46f1398d30fe1f2f | Go | 4,132 | 65 | package common
import (
"errors"
)
var (
// Tenant errors
ErrTenantNotFound = errors.New("tenant not found")
ErrTenantUniqueConstraintViolation = errors.New("tenant unique constraint violation")
ErrTenantResourceNameAlreadySet = errors.New("tenant resource name is already set")
// Database ... |
8dfd351f5eeb4cce14ccd19b2433b82a3ba16647e4285e38ba26134740c34686 | Go | 4,373 | 189 | // Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
)
// ITenantDb is an autogenerated mock type for the ITenantDb type
type ITenantDb struct {
mock.Mock
}
// DeleteAll provides... |
9aff2bf2eecef9c596e5b5e1cb51fbf3858afbbb59b0b10e296b7a33f0ab544e | Go | 4,435 | 137 | package dao
import (
"strconv"
"testing"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dao/daotest"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"k8s.io/ap... |
b2a4073935bfcff23abab5aa349d5699f261c261523cb7fb824e3a50a214a3b6 | Go | 4,511 | 83 | package dbmodel
import (
"time"
"github.com/google/uuid"
)
type AttachedFunction struct {
ID uuid.UUID `gorm:"column:id;primaryKey"`
Name string `gorm:"column:name;type:text;not null;uniqueIndex:unique_attached_function_per_collection,priority:2"`
TenantID ... |
8e6900979dab86fdec0ec75690b8e650f3a75af568d1beabee7cfe8ecfcc5082 | Go | 4,545 | 181 | // Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
model "github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
types "github.com/chroma-core/chroma/go/pkg/types"
)
/... |
10b4dee780f3103bf2dde6534136505d44c1a5a555e4af45af3d64090586a2a6 | Go | 4,546 | 189 | // Code generated by mockery v2.53.6. DO NOT EDIT.
package mocks
import (
context "context"
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
)
// IMetaDomain is an autogenerated mock type for the IMetaDomain type
type IMetaDomain struct {
mock.Moc... |
ab8f04982d5df2b66327c6a93a52848cacd8d22a1b1d687da87da818ed531e8e | Go | 4,650 | 98 | package dbmodel
import (
"fmt"
"github.com/google/uuid"
)
// Constants for pre-populated functions.
// These UUIDs must match what's in the database migrations.
//
// When adding a new function:
// 1. Add a migration to populate the functions table with the new function
// 2. Add the UUID constant below (must matc... |
174f6d2d5f936b77ad38a229ac917d9bc8cc25ae20f630f7068c72ab2491c345 | Go | 4,932 | 134 | package grpc
import (
"context"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingc... |
1804399728570f22e15c90084b459115ecf056c6c55f435b726674ac78d63038 | Go | 5,004 | 176 | package memberlist_manager
import (
"context"
"sort"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/pingcap/log"
"go.uber.org/zap"
"k8s.io/client-go/util/workqueue"
)
// A memberlist manager is responsible for managing the memberlist for a
// coordinator. A memberlist consists of a store and... |
a00831f32f15008d4489a7ec3ba6ed64047225c55b45b1be9dacd7af4bbe36b6 | Go | 5,096 | 201 | package dao
import (
"time"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingcap/log"
"go.uber.org/zap"
"gorm.io/gorm"
)
const SegmentType = "urn:chroma:segment/vector/hnsw-distributed"
func GetSegmentScopes() []string {
return []s... |
7670b915e13bb793e581e124bb7621ffc096d98e6758d60c023faa94e533e33f | Go | 5,127 | 180 | package memberlist_manager
import (
"errors"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/pingcap/log"
"go.uber.org/zap"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
list... |
d0250802b3ea1ccefc1470522e2f8aaffc9b0eecd43d34b5140b4271f2c51168 | Go | 5,167 | 165 | package otel
import (
"context"
"encoding/hex"
"fmt"
"time"
"github.com/pingcap/log"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
otelCode "go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrac... |
adc091b727cf9a6586917202d6fe27998dd1c16e08d97f6391df429c186eb0e2 | Go | 5,173 | 81 | package dbmodel
import (
"time"
"github.com/chroma-core/chroma/go/pkg/types"
)
type Collection struct {
ID string `gorm:"id;primaryKey"`
Name *string `gorm:"name;not null;index:idx_name,unique;"`
ConfigurationJsonStr *string `gorm:"con... |
b275140793fd7fc2701ce35042095cb1eb88718feec46cc53963846a1b78d90c | Go | 5,325 | 191 | package dao
import (
"errors"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/jackc/pgx/v5/pgconn"
"github.com/pingcap/log"
"go.uber.org/zap"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
type databaseDb struct {
db *gorm.DB
}
var... |
20971477fe0d204f4f4140e383616374b62a80041586cb329693b8401d522603 | Go | 5,530 | 97 | package main
import (
"io"
"time"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/sysdb/grpc"
"github.com/chroma-core/chroma/go/cmd/flag"
"github.com/chroma-core/chroma/go/pkg/utils"
"github.com/spf13/cobra"
)
var (
conf = grpc.Config{
GrpcConfig: &grpcutils.GrpcConf... |
df00b1b730ab6e64f9b1fca9a9dc206155f81f84e13a71b8876a0c5465498e13 | Go | 5,735 | 185 | package coordinator
import (
"context"
"fmt"
"github.com/chroma-core/chroma/go/pkg/memberlist_manager"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/utils"
"github.com/pingcap/log"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credential... |
6f6ea56b7cf9a5894e0381690a21946026b6c85ba6afbf94c6fdfb4d6a9bd361 | Go | 5,946 | 183 | package memberlist_manager
import (
"context"
"errors"
"fmt"
"github.com/chroma-core/chroma/go/pkg/utils"
"github.com/pingcap/log"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/sc... |
5e572de6772399e53b0ab695fb629c4991e5c3b2db4f24d79b93d40aa7fefa21 | Go | 6,144 | 180 | package daotest
import (
"time"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingcap/log"
"go.uber.org/zap"
)
// defaults for a test collection
var (
defaultConfigurationJsonStr = "{\"a\": \"param\", \"b\": \"param2\", \"3\": t... |
ca8d39b8c6dd8a3a140fae1398cea197b2e879413fb9f67b950d1207b1d9a9d9 | Go | 6,176 | 259 | // Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
time "time"
)
// IDatabaseDb is an autogenerated mock type for the IDatabaseDb type
type IDatabaseDb struct {
mock.Mock
}
/... |
b06f6d0754eb53a075e6d475beff436f6646e4108d53b3fb11283e06688011bc | Go | 6,433 | 243 | package dao
import (
"database/sql"
"encoding/json"
"errors"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/jackc/pgx/v5/pgconn"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/ty... |
beef2f15f8feb2e32a16d88cc23b12b6d4640feb9e9d18161cd796bc86d2e3c1 | Go | 6,571 | 184 | package dao
import (
"fmt"
"sort"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"gorm.io/gorm"
)
ty... |
a73f871e8d450bfa2ac1ec4e7ebe30d3e07338fdb5e84c07a25ab0b3a9588e03 | Go | 7,433 | 207 | package grpc
import (
"testing"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
)
func TestConvertCollectionMetadataToModel(t *tes... |
647ac6d8551a9c075234a9e69c9efbc661df3bef3e8b595c158a55bab32f2f5f | Go | 7,766 | 293 | package dbcore
import (
"context"
"fmt"
"reflect"
"strconv"
"time"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/docker/go-connections/nat"
"github.com/testcontainers/testcontainers-go"
postgres2 "github.com/testcontainers/testcontainers-go/modules/postgres"
"github.com/testcontainers/testcontain... |
ca342e71541a3461406659389b61114bbc8728dab1cd2e6fc1d2e3d5b423eacd | Go | 8,007 | 240 | package grpc
import (
"context"
"errors"
"time"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/leader"
"github.com/chroma-core/chroma/go/pkg/memberlist_manager"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
coordinatorpkg "github.com/chroma-core/chroma/go/p... |
6629a00abfda4a43c3e11e064712d1229135a2db24da1cbb8602eac924473671 | Go | 8,020 | 223 | package coordinator
import (
"context"
"errors"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
dbmodel_mocks "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel/mocks"
"github.com/google/uuid"
"github.... |
811fa83f647ac6e0556fa0c7d91e3a8dbdddac86000ca54b74c3c6e22c50813d | Go | 8,201 | 181 | package coordinator
import (
"sort"
"testing"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/stretchr/testify/assert"
)
func TestConvertCollectionMetadataToModel(t *testing... |
1e6d2c21c0996c2179362008240f9daab3ca989b82b5d4543fb9fc0d667e6533 | Go | 8,290 | 206 | package grpc
import (
"context"
"errors"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/pingcap/log"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chro... |
60b89f7f9289dd846c0b8dbf2565fefabc2b437b41ee6d0b4ebcdc5fc6629da1 | Go | 8,966 | 267 | package grpc
import (
"context"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordi... |
754a2fb9330080ec72bacaf1e84da0591eeefb0a2f85bce7b79fe4d5bb66ac13 | Go | 9,182 | 231 | package grpc
import (
"context"
"fmt"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/pingcap/log"
"go.uber.org/zap"
"google.golang.org/grpc/status"
)
func (s *Server) AttachFunction(ctx cont... |
a1bd38f65cc1267b92aee6139120b4d95012e6f4577fa7f0bf312d662704f945 | Go | 9,675 | 232 | package coordinator
import (
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingcap/log"
"go.uber.org/zap"
)
func convertCollectionToModel(collectionAndMetadataList []*dbmode... |
fb247508f6eb5ff05978bf0b0ab3868ae4de1cf92033dfe311525bc2f6f948bf | Go | 9,685 | 273 | package grpc
import (
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/types"
"github.com/pingcap/log"
"go.uber.org/zap"
"google.golang.org/protob... |
cc0955b70a1354f676756f88396a03cf6e1532f2d494d8616f685edd041191c0 | Go | 10,115 | 280 | package memberlist_manager
import (
"context"
"reflect"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/utils"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/dynamic/fake"
"k8s.io/client-g... |
9e7ef4ef7a2c2aa0ca3272b57bc20750a0f68978eabac92d9f8f16e1ed3009a6 | Go | 10,585 | 385 | // Code generated by mockery v2.53.6. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
time "time"
uuid "github.com/google/uuid"
)
// IAttachedFunctionDb is an autogenerated mock type for the IAttachedFunctionD... |
5a6a148be4c93d61b65eded770e9c30596c21087c90ed1f27be87e75222a8105 | Go | 10,988 | 315 | package coordinator
import (
"context"
"errors"
"testing"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
dbmodel_mocks "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel/mocks"
"github.com/google/uuid"
"github.com/stre... |
570cfa24781551ddd55a3ad5119c702825f33d37c2dde87b534a42d59fe50f54 | Go | 13,709 | 397 | package s3metastore
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net/http"
"strings"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/s3"
"gi... |
c92dcee1702da4cba03e4dee77f5fa0f536131647c24591d89e69959f1cbe794 | Go | 14,241 | 345 | package coordinator
import (
"context"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/memberlist_manager"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/s... |
80080d067594c10103b86f9cf266eac446a00ae77e6468103fc784a0a21a40bb | Go | 14,540 | 393 | package model
import (
"encoding/json"
"fmt"
)
type EmbeddingFunctionConfiguration struct {
Type string `json:"type"`
Name string `json:"name"`
Config interface{} `json:"config"`
}
type VectorIndexConfiguration struct {
Hnsw *HnswConfiguration `json:"hnsw,omitempty"`
Spann *SpannConfiguration ... |
ba6000a014a55c9f83bda01f94a809123f5dc9f95e30c350a27b59441e06558c | Go | 15,527 | 409 | package coordinator
import (
"context"
"database/sql"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/types"
_ "github.com/lib/pq"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
/... |
b6a8f3a271f362611249857c49741f608ddffffcc469f7573309207e9a24fb8c | Go | 15,660 | 575 | package model
import (
"encoding/json"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestUpdateSchemaFromConfig_EmptySchema(t *testing.T) {
efSearch := 50
config := InternalUpdateCollectionConfiguration{
VectorIndex: &UpdateVectorIndexConfiguration{
Hnsw: &Upd... |
43ae659ba557a97509c58ecedc0a32918c053e0a337f83bdadf9a39b5332be1e | Go | 16,776 | 519 | package dao
import (
"errors"
"fmt"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgconn"
"github.com/pingcap/log"
"go.uber.org/zap"
"gorm.io/gorm"
)
type attachedFunctionDb struct {
... |
171aa17192c378da572bd1b4c7d692bb8ffef399d05c98534fa632717ac8725d | Go | 16,845 | 465 | package coordinator
import (
"context"
"testing"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
dbmodel_mocks "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel/mocks"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"... |
9b1ad54a46391785d64bd914ad5505d39d89bedd4c914e803a9326bcd2bb1efc | Go | 21,280 | 645 | // Code generated by mockery v2.53.5. DO NOT EDIT.
package mocks
import (
dbmodel "github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
mock "github.com/stretchr/testify/mock"
time "time"
)
// ICollectionDb is an autogenerated mock type for the ICollectionDb type
type ICollectionDb struct {
mock.Moc... |
5df9e64e70ecb8da6d8a73c2a3eb8d542bcc8d660a91d6e066c74952ae8366d5 | Go | 21,993 | 617 | package dao
import (
"testing"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"github.com/google/uuid"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"gorm.io/gorm"
)... |
56803a7702911f26efd874fdfc7242a96cff829f92ed6d3c27f2a92b60c606f9 | Go | 27,929 | 776 | package dao
import (
"errors"
"sort"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/jackc/pgx/v5/pgconn"
"gorm.io/gorm/clause"
"go.uber.org/zap"
"gorm.io/gorm"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmode... |
5edd106336b1624319ac5a66ad63eaa091e44f1eef1f1015f744ce0c1382e649 | Go | 28,153 | 797 | package dao
import (
"fmt"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dao/daotest"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"
"github.com/pingcap/log"
"github.com/stretchr/testify/suite"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
"g... |
01aa5e98d674d3c693b2c20bab1f6de6a42c854b5435cd88dedbb3342ac4db12 | Go | 31,887 | 855 | package grpc
import (
"context"
"fmt"
"strconv"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator"
"github.com/chroma-core/chroma/g... |
aeebd3896cfe9c1e53e0bedfb0fd712f5a2535f48ad3b7196780d5e535c4c837 | Go | 34,943 | 789 | package grpc
import (
"context"
"encoding/json"
"math"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/google/uuid"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com... |
b585b8ab4c6d121859ac50206302526970b13fd5507ef1b244430ef927a323c9 | Go | 58,033 | 1,868 | package coordinator
import (
"context"
"encoding/json"
"sync"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmod... |
4e2b1e66cd562f42a0e6cac977b48a94e0d78b4ef1c0273166c3c67dbbda5b74 | Go | 59,159 | 1,255 | package coordinator
import (
"context"
"testing"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/memberlist_manager"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbmodel"
dbmodel_mocks "github.com... |
8e5ea0ae66b948de3abc84dd3c111b3597bed7b57d393dbd17a37a6ec2fa51fb | Go | 68,819 | 1,735 | package coordinator
import (
"context"
"errors"
"fmt"
"slices"
"strings"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.co... |
5c3e6511988c290f4cd0143ebca041f4715f51acbd73c58c281c79532a0fe977 | Go | 91,747 | 2,548 | package coordinator
import (
"context"
"errors"
"fmt"
"sort"
"strconv"
"strings"
"sync"
"testing"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dao"
"... |
55a433241783fe3104d52f0b33db48af2f064526caf44090eecd48e151c134a9 | Go | 96,388 | 2,518 | package coordinator
import (
"context"
"encoding/json"
"errors"
"fmt"
"time"
"github.com/chroma-core/chroma/go/pkg/common"
"github.com/chroma-core/chroma/go/pkg/proto/coordinatorpb"
"github.com/chroma-core/chroma/go/pkg/sysdb/coordinator/model"
"github.com/chroma-core/chroma/go/pkg/sysdb/metastore/db/dbcore"... |
8bef32aff5ffd163758ceda783e6fd97a7db78341c3c4d386bcafbc318a80fac | JAGS | 1,086 | 37 |
model {
##########
#Simple NDDM parameter priors
##########
for (p in 1:nparts) {
#Boundary parameter (speed-accuracy tradeoff) per participant
alpha[p] ~ dnorm(1, pow(.5,-2))T(0, 3)
#Non-decision time per participant
ndt[p] ~ dnorm(.5, pow(.25,-2))T(0, 1)
... |
f125ea1d8d61057a5a760e46e12402d4c35392d54b6b29e97494c9660fed206e | JAGS | 1,087 | 38 |
model {
##########
#Simple NDDM parameter priors
##########
for (p in 1:nparts) {
#Boundary parameter (speed-accuracy tradeoff) per participant
alpha[p] ~ dnorm(1, pow(.5,-2))T(0, 3)
#Non-decision time per participant
ndt[p] ~ dnorm(.5, pow(.25,-2))T(0, 1)
... |
9f305246eb2a22805a1618254bb81848682018066a1459254ce803bd73c8d67a | JAGS | 1,623 | 49 |
model {
##########
#Participant- and condition-level parameter priors, this is not a hierarchical model
##########
for (p in 1:nparts) {
for (c in 1:nconds) {
#Boundary parameter per participant and condition
alpha[p, c] ~ dnorm(1, pow(.25,-2))T(0, 3)
#No... |
9574607dbdfc057a4bcce7eaf06d0a81dfb0680830f291a9d32ff4594b5fb84a | JAGS | 2,003 | 77 |
model {
##########
#Between-condition variability parameters priors
##########
#Between-condition variability in drift rate to choice A
deltasdcond ~ dgamma(1,1)
##########
#Between-participant variability parameters priors
##########
#Between-participant variability in non-... |
0d20e79460a2a2de425ea8f5ae07702b656ae4d3163332fb5b224c7277c90995 | JAGS | 2,004 | 78 |
model {
##########
#Between-condition variability parameters priors
##########
#Between-condition variability in drift rate to choice A
deltasdcond ~ dgamma(1,1)
##########
#Between-participant variability parameters priors
##########
#Between-participant variability in non-... |
f926dacc4d02dea0165cd453bdc356ed1fc09e6c56d33468a3341beb2e5a2498 | JAGS | 2,013 | 77 |
model {
##########
#Between-condition variability parameters priors
##########
#Between-condition variability in drift rate to choice A
deltasdcond ~ dgamma(1,1)
##########
#Between-participant variability parameters priors
##########
#Between-participant variability in non-... |
54d6f4c3149081f2f508b7bc021068efb786bfc002ee76c78153613dbaa76696 | JAGS | 2,958 | 101 | model {
##########
#Between-condition variability priors
##########
#Between-condition variability in drift rate to correct
deltasdcond ~ dgamma(1,1)
#Between-condition variability in non-decision time
ndtsdcond ~ dgamma(.3,1)
#Between-condition variability in speed-accuracy trade-of... |
b00d4a9f0067a85a1fe481d76b3257d9d37221d62992a27d63ba0663d5b73cef | JAGS | 2,968 | 98 |
model {
##########
#Between-condition variability parameters priors
##########
#Between-condition variability in drift rate to choice A
deltasdcond ~ dgamma(1,1)
##########
#Between-participant variability parameters priors
##########
#Between-participant variability in non-... |
d41417b612c45a52af2d047a09e225d9d2e872756435ed5461938a0e8f75dea3 | JAGS | 2,972 | 102 |
model {
##########
#Between-condition variability priors
##########
#Between-condition variability in drift rate to correct
deltasdcond ~ dgamma(1,1)
#Between-condition variability in non-decision time
ndtsdcond ~ dgamma(.3,1)
#Between-condition variability in speed-accuracy tra... |
0f5e06cddcc6dfad8f51c4c754f901b626f0e09a5768bae70b272881bc1f38a6 | JAGS | 3,096 | 101 |
model {
##########
#Between-condition variability priors
##########
#Between-condition variability in drift rate to correct
deltasdcond ~ dgamma(1,1)
#Between-condition variability in non-decision time
tersdcond ~ dgamma(.3,1)
#Between-condition variability in speed-accuracy tra... |
390dc760ea5cce8cbf69673086eec1c1bd465bca4bffb2c09431e1bc0481dc84 | JAGS | 3,161 | 104 | model {
##########
#Between-condition variability priors
##########
#Between-condition variability in drift rate to correct
deltasdcond ~ dgamma(1,1)
#Between-condition variability in non-decision time
tersdcond ~ dgamma(.3,1)
#Between-condition variability in speed-accuracy trad... |
5a09a7ff46734b44a369a82273d8515b15474c49f47951ee4052a693536780bd | Java | 448 | 27 | package utility;
public class MTRandom
{
private static MersenneTwister rand = new MersenneTwister();
public static void setSeed(long seed)
{
rand.setSeed(seed);
}
public static double nextDouble()
{
return rand.nextDouble();
}
public static int nextInt(int n)
{
... |
1de98acf04b2a72a35b2c3037cbea80762ba3bc39fb3fbc69ecf0e8e34d856e3 | Java | 498 | 19 | package test.integration;
import org.junit.jupiter.api.Test;
import test.integration.cli.Cli;
import test.integration.cli.CliScenario;
import uk.ac.babraham.FastQC.FastQCApplication;
public class VersionTest {
@Test
public void displays_name_and_semver() throws Exception {
Cli
.Execute(n... |
7757319f1fcc160a7f9109aedaf6a34935bb21d410e214bfef8536a827753cc3 | Java | 514 | 16 | package test.integration;
import org.junit.jupiter.api.Test;
import test.integration.cli.Cli;
import test.integration.cli.CliScenario;
public class OutDirTest {
@Test
public void shows_error_when_output_dir_does_not_exist() throws Exception {
Cli
.Execute(new CliScenario(new String[] { "f... |
818e6cb170b218516d6ee4df4102b5333f79d7c5518a838a8634010985ef7ec2 | Java | 529 | 16 | package test.integration;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class HtmlContentHelpersTest {
@Test
public void matches_and_replaces_date_substring() {
String input = "<div id=\"header_filename\">Fri 25 Dec 2025<br>complex.fastq</div>... |
c53534a36bfce05e77935ca8b6e5212284a5a3e47a2539853ebd3d4b8711e615 | Java | 672 | 19 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
61b6ce4ef8b197b595c361086a939beb1c8e2356bf601fc2fce0a962680ccb1f | Java | 719 | 22 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
fb7e3515ad6095cd7dd6f283f1ee88fc9b8b3002728ab525ba6076c00b36e206 | Java | 731 | 22 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
3043b5bc02200241fa453a5ff791350200a0b36cd5763599201eada70fe17802 | Java | 737 | 28 | package test.integration;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import org.junit.jupiter.api.Test;
import test.integration.cli.Cli;
import test.integration.cli.CliScenario;
public class DupLengthTest {
@Test
public void succeeds_when_dup_length_is_longer_than_reads() t... |
4f0f2e76b795a400df0c6366ded9830af79b099474fae31c44bcedc4531a47e2 | Java | 771 | 25 | package net.schmizz.sshj.examples;
import net.schmizz.sshj.SSHClient;
import net.schmizz.sshj.xfer.FileSystemFile;
import java.io.IOException;
/** This example demonstrates downloading of a file over SCP from the SSH server. */
public class SCPDownload {
public static void main(String[] args)
throws... |
2168c9aaaf1ac9346bc764fd6237382301d06eec1db436640690fef65775bdf5 | Java | 777 | 28 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
b7f423d4842175085d05fd8a259b96f3a64ba58e51e1d1832119e587881cc9be | Java | 803 | 24 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
e739da3c9c761b99c96e144cccc6c31c1a09ea4c400168b70f22c178c2401b5b | Java | 815 | 24 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
8f50779373f1b84c3e348e03e5082bf2be99a2d1a85326a6b0c442c47b4c7105 | Java | 825 | 26 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
17c973eeb73979724fe0b28de17ce37637124e33fe5e4952a7ed1b3d7fd2c1f8 | Java | 846 | 30 | package net.schmizz.sshj.examples;
import net.schmizz.sshj.SSHClient;
import net.schmizz.sshj.sftp.SFTPClient;
import net.schmizz.sshj.xfer.FileSystemFile;
import java.io.IOException;
/** This example demonstrates downloading of a file over SFTP from the SSH server. */
public class SFTPDownload {
public static ... |
5ccf254557d01fa4c16fac37484be092a081572a03bffc519abf1fe46c46ada6 | Java | 867 | 66 | package priors;
import org.ejml.data.DenseMatrix64F;
import data.Data;
public class NormalInverseWishart {
/**
* Hyperparam mean vector.
*/
public DenseMatrix64F mu_0 ;
/**
* initial degrees of freedom
*/
public double nu_0;
/**
* Hyperparam covariance matrix
*/
public DenseMatrix64F si... |
0341beea71e9c19d59a157bf2b048a6e8d45df0be11e137e83958a635b5aff41 | Java | 880 | 28 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
45193e0107022eb02f02ef394688aca021ed68adab0e86a4b8d0941b73a28aa7 | Java | 889 | 26 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
bac0a9955f1a91e269e471a35002cbd4d5d03bbc2e7b2597cc8ef5ad7b565c55 | Java | 907 | 31 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
343ea7055ff60a3b28d8ff7a879f92890062412d42c31e3e60f865151785e5d7 | Java | 916 | 30 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
8eba4b92b247e32d09e6e40f3431165e113fab2630786c267d4ae8871df24b85 | Java | 930 | 33 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
d0250b2781f10d17331b18c47e3f37d92003079f15436ddabe0bc7cc7af34b34 | Java | 948 | 32 | package net.schmizz.sshj.examples;
import net.schmizz.sshj.SSHClient;
import net.schmizz.sshj.sftp.SFTPClient;
import net.schmizz.sshj.xfer.FileSystemFile;
import java.io.File;
import java.io.IOException;
/** This example demonstrates uploading of a file over SFTP to the SSH server. */
public class SFTPUpload {
... |
1b1f72ee497485200a68145aae981474a1d44c80359c43e7bb8df3767eff8522 | Java | 950 | 26 | /**
* Copyright Copyright 2011-17 Simon Andrews
*
* This file is part of FastQC.
*
* FastQC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your... |
a784a3ba86b4c353c34b46d987d2adb12d9502c362279f5c2e338336463f09ee | Java | 959 | 32 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
c924b3f90f81e5f666ba47106a48b2ed2515bdf86b57431caad67f22fbe22c3a | Java | 960 | 30 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
9bd2ad15c16035ca95cd9c4b1ff0d65f99ee6185460b1ea8556b96158b527f50 | Java | 963 | 27 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
f93f297cc651e65a723090f69c08450e2c0bf62ecb452c4b22505be9b8abf174 | Java | 976 | 31 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
81fdb9b24d3e7b358972b88bded725c2152802a8dd880343ae9f780d99bb4364 | Java | 989 | 33 | /*
* Copyright (C)2009 - SSHJ Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.