sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
055993b8293f7cff7f6347343235a925ca60fc48c1f9b61f2747ac43a4fcf8c4
TypeScript
2,290
58
import { Component, OnInit } from '@angular/core'; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {SettingsService} from "../../settings.service"; import {FormBuilder, FormGroup} from "@angular/forms"; import {DataService} from "../../data.service"; @Component({ selector: 'app-sample-condit...
6ac44eac857245a869075f15061b61af9e303831dde50b6b40d08056646140e5
TypeScript
2,294
183
export const ENGLISH_STOPWORDS = [ "a", "about", "above", "after", "again", "against", "ain", "all", "am", "an", "and", "any", "are", "aren", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "betwee...
2b38748e30b1cecd1d48ead4fe31cd622a84998c5949f3fb4db4e5558bab88b5
TypeScript
2,320
91
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import { snakeCase, validateConfigSchema, } from "@chroma-core/ai-embeddings-common"; import Together from "together-ai"; const NAME = "together-ai"; export interface TogetherAIConfig { ap...
c6b12416de67b8997f254f536fe031acbef1b2bbc78a5e5a2ddbfc73139191d1
TypeScript
2,321
76
import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {UntypedFormBuilder, Validators} from "@angular/forms"; import {AccountsService} from "../accounts.service"; import {WebService} from "../../web.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {Subject,...
a5f376b65637dcd6b4d8e50c6a0bba27769e9ae427d787d28b1673ddd1a5ba1a
TypeScript
2,330
91
import { isBrowser, validateConfigSchema, } from "@chroma-core/ai-embeddings-common"; import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import type { Ollama as OllamaNode } from "ollama"; import type { Ollama as OllamaBrowser } from "ollama/b...
f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8
TypeScript
2,337
73
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
8b19138d870fb923d17a299a463c80f4ddc3fc289498bfc4d6f50607a2c32815
TypeScript
2,340
53
/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported...
091f417275a51ab3c47b949723e9e8a193012157ecc64a96e2d7b1505e82f395
TypeScript
2,353
97
// Type definitions for Chalk // Definitions by: Thomas Sauer <https://github.com/t-sauer> export const enum Level { None = 0, Basic = 1, Ansi256 = 2, TrueColor = 3 } export interface ChalkOptions { enabled?: boolean; level?: Level; } export interface ChalkConstructor { new (options?: ChalkOptions): Chalk; (...
7dead9aba4bd955bf95804a2501d064d1ba9dd0a7d3a36c615d5c0c3670f5dc4
TypeScript
2,363
90
import type { IEmbeddingFunction } from "./IEmbeddingFunction"; import { validateConfigSchema } from "../schemas/schemaUtils"; type StoredConfig = { url: string; model_name: string; }; export class OllamaEmbeddingFunction implements IEmbeddingFunction { name = "ollama"; private readonly url: string; private...
1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff
TypeScript
2,374
42
declare module 'stream/promises' { import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream'; function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;...
18191093390cb2391bc9bc19b878a012cdc8ddf3ed5e0bbb1c6ef98efe08f9d5
TypeScript
2,393
65
// @jairad26 Auth is not yet implemented in the rust server, will enable this once we have a new auth system import { describe, expect, test } from "@jest/globals"; // import { afterAll, beforeAll, describe, expect, test } from "@jest/globals"; // import { chromaBasic } from "./initClientWithAuth"; // import { startCh...
3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6
TypeScript
2,397
93
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {CompareKeys} from 'pretty-format'; /** * Class representing one diff tuple. * Attempts to look like a two-element...
d03095f20aaa2c095a5aa0681f0c1e04a9ba737c7871c1cdaada51498efe9803
TypeScript
2,397
76
import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {UntypedFormBuilder, Validators} from "@angular/forms"; import {AccountsService} from "../accounts.service"; import {WebService} from "../../web.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {Sub...
2d0066d38c0f11450f33a9aa0d40d62c629305306975bff6f4e0421bee8e1477
TypeScript
2,401
93
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import { validateConfigSchema } from "@chroma-core/ai-embeddings-common"; import { Mistral } from "@mistralai/mistralai"; const NAME = "mistral"; export interface MistralConfig { api_key_env_v...
7e731e33dd3ba8c0cdd03e22ad316b611ffdfe31a7239baaba36e18c95250e1f
TypeScript
2,435
72
// scripts/nwb_ts/inspectNwb.ts import { DandiClient } from './dandiClient'; async function main() { const client = new DandiClient(); const dandisetId = '001261'; const version = '0.250917.2023'; try { console.log('1. Fetching asset list from DANDI...'); const assetsResponse = await client.getAssets(...
61c1f9fd85a6951cb84ba9e9fb1ce2234c8b75dba568295599b211e0d7c08b46
TypeScript
2,443
93
import { IEmbeddingFunction } from "./IEmbeddingFunction"; import { validateConfigSchema } from "../schemas/schemaUtils"; type StoredConfig = { model_name: string; api_key_env_var: string; }; const ENDPOINT = "https://api.together.xyz/v1/embeddings"; export class TogetherAIEmbeddingFunction implements IEmbedding...
b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1
TypeScript
2,451
49
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
4ada5034b5778ab7dc35bd9e2735a9d744fc60d81896793706c44a0745ceb410
TypeScript
2,466
97
import * as TsConfigLoader2 from "./tsconfig-loader"; import * as path from "path"; import { options } from "./options"; export interface ExplicitParams { baseUrl: string; paths: { [key: string]: Array<string> }; mainFields?: Array<string>; addMatchAll?: boolean; } export type TsConfigLoader = ( params: TsC...
b2bd7026a66387adcb9612a637344c1878c4c6f5ab0f389cfb95f828feb2b596
TypeScript
2,540
97
import { createMatchPath } from "./match-path-sync"; import { configLoader, ExplicitParams } from "./config-loader"; import { options } from "./options"; const noOp = (): void => void 0; function getCoreModules( builtinModules: string[] | undefined ): { [key: string]: boolean } { builtinModules = builtinModules |...
9537fb3f446b5686b88c1e9e5b046a900f86e7262efbc57efa4f5bc2662ed1cd
TypeScript
2,541
32
import * as Types from '../typebox'; import { ValueError } from '../errors/index'; import { Edit } from './delta'; /** Provides functions to perform structural updates to JavaScript values */ export declare namespace Value { /** Casts a value into a given type. The return value will retain as much information of th...
2154ffa8f93802db249ddbc404a083959be0ddf036d0afd5280a88369c555c01
TypeScript
2,543
103
declare namespace camelcase { interface Options { /** Uppercase the first character: `foo-bar` → `FooBar`. @default false */ readonly pascalCase?: boolean; /** Preserve the consecutive uppercase characters: `foo-BAR` → `FooBAR`. @default false */ readonly preserveConsecutiveUppercase?: boolean; ...
e830b5c1fb2bcc4864dd7c382c002def23f4507dfd064351998038a7e76bb352
TypeScript
2,544
68
// @jairad26 Auth is not yet implemented in the rust server, will enable this once we have a new auth system import { describe, expect, test } from "@jest/globals"; // import { afterAll, beforeAll, describe, expect, test } from "@jest/globals"; // import { chromaTokenDefault, chromaTokenBearer } from "./initClientWith...
4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3
TypeScript
2,552
77
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
6e6a1f2eb432bb3675fa9b9a3f1f387f1724aa43763aa14791ea79d1fe665c7c
TypeScript
2,599
57
/*************************************************************************************************** * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. */ import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. * You ...
25320463c9152cf6a4ee6ba6ab0ee7399a2bdd5ae548383711cc54019c9f3e09
TypeScript
2,609
87
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { HuggingfaceServerEmbeddingFunction } from "./index"; // Mock fetch globally const mockFetch = jest.fn() as jest.MockedFunction<typeof fetch>; global.fetch = mockFetch; describe("HuggingfaceServerEmbeddingFunction", () => { beforeEach((...
6a61697f65beb341884485c695894ee1876a45c1a7190d76cb4a57a679c9d5b8
TypeScript
2,615
75
// This file is generated at pre-commit by running `node create-typings.js`. /** * Returns a boolean. Will be `true` if the code is running on a CI server, * otherwise `false`. * * Some CI servers not listed here might still trigger the `ci.isCI` * boolean to be set to `true` if they use certain vendor neutral en...
6b93b3fb8212e661489959e8102bef4d8985169d98c01228dc0da4718e1db8d6
TypeScript
2,653
101
import {Component, Input, OnInit} from '@angular/core'; import {WebService} from "../../web.service"; @Component({ selector: 'app-protein-domain-plot', templateUrl: './protein-domain-plot.component.html', styleUrls: ['./protein-domain-plot.component.scss'] }) export class ProteinDomainPlotComponent implements On...
29b68ec2bd9d6fc397a6602a8917c0f9f57b909a16af05267956368a89110a14
TypeScript
2,656
57
/*************************************************************************************************** * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. */ import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. ...
1eb7c6632ecf1aaef5d5023d46026178a0579f9b99dcc1cfa64d54664e7f648b
TypeScript
2,657
60
import axios, {AxiosHeaders} from "axios"; export function getProteomicsData(acc: string, tissueType: string) { let headers = new AxiosHeaders(); headers["Accept"] = "application/json"; headers["Content-Type"] = "application/json"; return axios.get( "https://www.proteomicsdb.org/proteomicsdb/lo...
61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839
TypeScript
2,687
77
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
7a82e952bf333dbcc16b1d717755719c540859ac743aeb32a719c51fc41ea4b8
TypeScript
2,722
79
import { describe, expect, jest, test } from "@jest/globals"; import { CollectionImpl } from "../src/collection"; import type { CollectionConfiguration } from "../src/collection-configuration"; import type { ChromaClient } from "../src/chroma-client"; describe("count with readLevel", () => { test("count passes readL...
27b0139f37e8cff445374edf58ad6a68c846f553b5ddc504894e8d9963df462a
TypeScript
2,734
76
import { Injectable } from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {UniprotService} from "./uniprot.service"; @Injectable({ providedIn: 'root' }) export class PlmdService { plmdMap: any = {} acetylPLMDMap: any = {} methylPLMDMap: any = {} constructor(private http: HttpClient,...
ccb6a2b26fc9deebea15b12a51fb0b28eb62d7a4724023e2185114814f408f59
TypeScript
2,736
76
// /* // * fonction calculant une matrice utilisable pour réaliser un dotplot // * prend comme paramètre un tableau de 1 ou deux séquences, ou bien un tableau contenant les n° de séquences déjà ajoutées // */ // m.calculeDotPlot = function (tabSeq) { // if (tabSeq.length == 1) return this.calculeDotPlot([tabSeq[...
61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22
TypeScript
2,739
73
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
3c0c55ea980e8e78c230188825e33ee13dcdf092914cf64b5e6dfd1b295deb57
TypeScript
2,767
107
/** * Collection-scoped conditional transaction example. * * Run against a Chroma server that supports conditional transactions: * * cd clients/new-js * npx tsx packages/chromadb/examples/conditional-transactions.ts * * Optional environment: * * CHROMA_ENDPOINT=http://localhost:8000 * CHROMA_TENANT=d...
a484d0393a17492ffa0b82dc840ccbb0079a5b7f1c287747b642c9a40d1e11a3
TypeScript
2,774
90
import { describe, expect, test } from "@jest/globals"; import { validateMetadata } from "../src/utils"; describe("validateMetadata", () => { test("accepts scalar values", () => { expect(() => validateMetadata({ str: "hello", num: 42, bool: true }), ).not.toThrow(); }); test("accepts null values",...
ad5cfc52b3b15a3e1762f9813d63d722a5eaf8de8873b83c43760d97560c1bc8
TypeScript
2,785
87
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { MatToolbarModule } from '@angular/material/toolbar'; import { MatIconModule } from '@angular/material/icon'; import { MatBadgeModule } from '@angular/material/b...
74294e948fdb0c8d05ec8b38f40479239c3b81737f7e9a5492d5b9a82c1974ff
TypeScript
2,807
107
import {Component, Input, OnInit} from '@angular/core'; import {WebService} from "../../web.service"; import {SettingsService} from "../../settings.service"; @Component({ selector: 'app-protein-domain-plot', templateUrl: './protein-domain-plot.component.html', styleUrls: ['./protein-domain-plot.component.scss'] ...
23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda
TypeScript
2,818
67
/** * The `string_decoder` module provides an API for decoding `Buffer` objects into * strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 * characters. It can be accessed using: * * ```js * const { StringDecoder } = require('string_decoder'); * ``` * * The following example shows the basic ...
3e7ad7e83835566c48690f00ab39ded223dc7924fe3b968957dfed813e23c060
TypeScript
2,839
84
/** * @file index * @author Paul Pillot <paul.pillot@libmol.org> * @license MIT * @copyright 2020-2021 */ declare type TAlignMethod = 'diag' | 'complete' | 'auto'; declare type TAlignSequenceType = 'amino' | 'nucleic' | 'auto'; export declare type TAlignOpt = { /** * Gap open penalty (generally ...
f259f4b084ba1f2e72a6dc6edf97a7b8ff847011eb120e63ccbe44737726c59a
TypeScript
2,865
107
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import { validateConfigSchema, decodeBase64Embedding, } from "@chroma-core/ai-embeddings-common"; import Perplexity from "@perplexity-ai/perplexity_ai"; const NAME = "perplexity"; export int...
2a063dc7dfff8851b94fee39de80a2730e89c49db4ba770e5eae38c1e49dab8d
TypeScript
2,866
104
/** * This is a generic Chroma error. */ export class ChromaError extends Error { constructor(name: string, message: string, public readonly cause?: unknown) { super(message); this.name = name; } } /** * Indicates that there was a problem with the connection to the Chroma server (e.g. the server is down...
b741ae95b0c362e141c3447a0a3ca396ae274a21933ab4deded7c1e09d91ab1e
TypeScript
2,868
105
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import { validateConfigSchema } from "@chroma-core/ai-embeddings-common"; import { VoyageAIClient } from "voyageai"; const NAME = "voyageai"; export interface VoyageAIConfig { api_key_env_var:...
47c7aa020c1dc9678d5f384d775c6fe548f93a99c444b2c0ca0a37a7ff8a7382
TypeScript
2,881
91
import { beforeEach, describe, expect, test } from "@jest/globals"; import { ChromaClient } from "../src"; import { EMBEDDINGS, IDS, METADATAS } from "./utils/data"; describe("delete collection", () => { // connects to the unauthenticated chroma instance started in // the global jest setup file. const client = n...
c3d41dc1237ec4da1ca0e355e465dd2f018ccf60f684d762df11a8195adcccac
TypeScript
2,914
107
import {Component, Input, OnInit} from '@angular/core'; import {WebService} from "../../web.service"; import {SettingsService} from "../../settings.service"; @Component({ selector: 'app-protein-domain-plot', templateUrl: './protein-domain-plot.component.html', styleUrls: ['./protein-domain-plot.component....
625e7635a4baf76d59d7487ebacdc4df18b4f267f3243b202e039713b6467826
TypeScript
2,928
139
export class Differential { get reverseFoldChange(): boolean { return this._reverseFoldChange; } set reverseFoldChange(value: boolean) { this._reverseFoldChange = value; } get sequence(): string { return this._sequence; } set sequence(value: string) { this._sequence = value; } get ac...
58f6dda1c95e626c4d629b2d7cb9686607c6240d89e99eb0dee0c8b633dde914
TypeScript
2,942
106
import {Component, Input, OnInit} from '@angular/core'; import {DataService} from "../../data.service"; import {SettingsService} from "../../settings.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; @Component({ selector: 'app-selected-data-distribution-plot', templateUrl: './selected-data-dist...
01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e
TypeScript
2,955
42
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
3fe14fc5fffcbf0b9bba962e9e727a97d59e948b55d852ac23b262ee5d736dbb
TypeScript
2,963
108
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import { validateConfigSchema } from "@chroma-core/ai-embeddings-common"; import OpenAI from "openai"; const NAME = "morph"; export interface MorphConfig { api_key_env_var: string; model_nam...
99fb3e0984e05de3274af4ba0e83bafa984bd9fcbd790c932d73100cb2af0f39
TypeScript
2,977
42
import { User } from "./curtain-user"; export declare const replacer: (key: any, value: any) => any; export declare const reviver: (key: any, value: any) => any; export declare class CurtainWebAPI { loginURL: string; logoutURL: string; refereshURL: string; orcidLoginURL: string; userInfoURL: string;...
0ca301fc81e3159b2d56f5b810720c5ba668fd78294a24bc9b772b15e81dcd6c
TypeScript
2,987
71
import { Injectable } from '@angular/core'; import {CurtainLink} from "./classes/curtain-link"; import {PlotlyService} from "angular-plotly.js"; import {HttpClient} from "@angular/common/http"; @Injectable({ providedIn: 'root' }) export class WebService { siteProperties: any = { non_user_post: true } links...
b849f882ee1786ceaa9b6006ffaebed35c78cf31d1159a3e056d8db0b53dac52
TypeScript
2,987
102
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { MistralEmbeddingFunction } from "./index"; describe("MistralEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const defaultParametersTest = "should initialize with default parameters"; if (!process.env....
90315f5a8144b8e8e0ef4b4c9ee43c77ac2d4f22637d71601c3ecae86aa72b0d
TypeScript
2,996
99
import { BaseError } from 'make-error'; import * as _ts from 'typescript'; /** * @internal */ export declare const INSPECT_CUSTOM: symbol; /** * Common TypeScript interfaces between versions. */ export interface TSCommon { version: typeof _ts.version; sys: typeof _ts.sys; ScriptSnapshot: typeof _ts.Scri...
41e14c5332f20ba57bdf33caa7e44ce60ededb5e6a53efc8976bda07445ab6aa
TypeScript
3,024
86
import {Component, OnDestroy} from '@angular/core'; import {FormBuilder, Validators} from "@angular/forms"; import {AccountsService} from "../../accounts/accounts.service"; import {SettingsService} from "../../settings.service"; import {DataService} from "../../data.service"; import {NgbActiveModal} from "@ng-bootstrap...
8ef6bc1b3480c02d4b6eb85bf08c53f157b8912d20a725cebab5a5fc5239e878
TypeScript
3,036
89
// @jairad26 Auth is not yet implemented in the rust server, will enable this once we have a new auth system import { describe, expect, test } from "@jest/globals"; // import { afterAll, beforeAll, describe, expect, test } from "@jest/globals"; // import { chromaTokenXToken, cloudClient } from "./initClientWithAuth"; ...
bea28a5e9730ecc963b8dc99476d081eee1854d429e3ab6c8c9a19f2615fbb3f
TypeScript
3,048
106
import {Component, Input, OnInit} from '@angular/core'; import {DataService} from "../../data.service"; import {SettingsService} from "../../settings.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; @Component({ selector: 'app-selected-data-distribution-plot', templateUrl: './selected-da...
ec22e69f3a150155f627daa400781e961f683c92d8d4a11740655f48990331fa
TypeScript
3,058
71
import { Injectable } from '@angular/core'; import {CurtainLink} from "./classes/curtain-link"; import {PlotlyService} from "angular-plotly.js"; import {HttpClient} from "@angular/common/http"; @Injectable({ providedIn: 'root' }) export class WebService { siteProperties: any = { non_user_post: true ...
2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579
TypeScript
3,060
98
export interface StartOfSourceMap { file?: string; sourceRoot?: string; } export interface RawSourceMap extends StartOfSourceMap { version: string; sources: string[]; names: string[]; sourcesContent?: string[]; mappings: string; } export interface Position { line: number; column: n...
d793734a3882845bf4a49ca2fb82d3729d539879931db250145bc8dc30ba7945
TypeScript
3,070
98
import { describe, expect, test } from "@jest/globals"; import { AdminClient, CloudClient } from "../src"; describe("AdminClient", () => { // connects to the unauthenticated chroma instance started in // the global jest setup file. const adminClient = new AdminClient({ host: process.env.DEFAULT_CHROMA_INSTAN...
473bd75a0146b151fd40f6480866448edd48192dbf8fb647b74d88d69bfc0438
TypeScript
3,072
92
import { expect, test, describe, beforeEach } from "@jest/globals"; import { DOCUMENTS, EMBEDDINGS, IDS, METADATAS } from "./utils/data"; import { ChromaClient } from "../src"; describe("add collections", () => { const client = new ChromaClient({ path: process.env.DEFAULT_CHROMA_INSTANCE_URL, }); beforeEach...
6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df
TypeScript
3,076
71
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
45f88cecd0639b59d8edeee3bd09c06d983df4ad9a1430841d67ba6f5d2877f0
TypeScript
3,083
115
import { ChromaValueError, EmbeddingFunction, EmbeddingFunctionSpace, registerEmbeddingFunction, } from "chromadb"; import OpenAI from "openai"; import { validateConfigSchema } from "@chroma-core/ai-embeddings-common"; const NAME = "openai"; export interface OpenAIConfig { api_key_env_var?: string; model_...
0c4caa15d50a9da6034a49604081e656ebdb5a781f3f9a549a54ef6ed0dc5776
TypeScript
3,089
102
import { Injectable } from '@angular/core'; import {AccountsService} from "./accounts/accounts.service"; import {Observable, Observer, Subject} from "rxjs"; import {WebSocketSubject} from "rxjs/internal/observable/dom/WebSocketSubject"; import * as readableIDs from "uuid-readable"; @Injectable({ providedIn: 'root' ...
a7a9cd93abc44b5076f4c3abee8d1aa10344e47b220f96de15c118640aef5e98
TypeScript
3,100
104
import type { SearchResponse } from "../../api"; import type { Metadata } from "../../types"; import { deserializeMetadatas } from "../../utils"; export interface SearchResultRow { id: string; document?: string | null; embedding?: number[] | null; metadata?: Metadata | null; score?: number | null; } const n...
8f056c9fe142c89b933109d32ab4b3e0f17b06e50bca2e2f467c1753393e8741
TypeScript
3,101
105
export type AuthHeaders = { [header: string]: string }; type TokenHeaderType = "AUTHORIZATION" | "X_CHROMA_TOKEN"; export type AuthOptions = { provider: ClientAuthProvider | string | undefined; credentials?: any | undefined; // Only relevant for token auth tokenHeaderType?: TokenHeaderType | undefined; }; ex...
4fe46cf8a17bf51876a2c505dc8361d3d321fe7cf537100c9a1c14a5f1dcc45a
TypeScript
3,110
86
import {Component, OnDestroy} from '@angular/core'; import {FormBuilder, Validators} from "@angular/forms"; import {AccountsService} from "../../accounts/accounts.service"; import {SettingsService} from "../../settings.service"; import {DataService} from "../../data.service"; import {NgbActiveModal} from "@ng-boot...
2aa17e00fdb14e8897a1a1672ac7a275191e0d5add88fa886db6e0621a890c9f
TypeScript
3,116
82
import {Component, Input, OnInit} from '@angular/core'; import {DataFrame, IDataFrame, ISeries, Series} from "data-forge"; import {FormBuilder} from "@angular/forms"; import {DataService} from "../../data.service"; import {debounceTime, distinctUntilChanged} from "rxjs"; import {UniprotService} from "../../uniprot.serv...
745c48b45d9b07490621d646f8f8491ada0d2782c855dcd14051c8e543bdeae7
TypeScript
3,129
93
import { ChromaClient } from "./chroma-client"; import * as process from "node:process"; import { AdminClient } from "./admin-client"; import { ChromaUnauthorizedError, ChromaValueError } from "./errors"; /** * ChromaDB cloud client for connecting to hosted Chroma instances. * Extends ChromaClient with cloud-specifi...
e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6
TypeScript
3,137
93
/** * The `timers/promises` API provides an alternative set of timer functions * that return `Promise` objects. The API is accessible via`require('timers/promises')`. * * ```js * import { * setTimeout, * setImmediate, * setInterval, * } from 'timers/promises'; * ``` * @since v15.0.0 */ declare module ...
f60fa68955601439ac9aed155832a23a444f1c878991154e3541acea647fd4f0
TypeScript
3,143
106
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { VoyageAIEmbeddingFunction } from "./index"; describe("VoyageAIEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const MODEL = "voyage-3.5-lite"; const defaultParametersTest = "should initialize with de...
4db95b9bd3ec63ec0d5755ae538916d8b7b5a82e7cb98ae13d15ddc2ef94938c
TypeScript
3,149
121
import { IEmbeddingFunction } from "./IEmbeddingFunction"; import { validateConfigSchema } from "../schemas/schemaUtils"; class VoyageAIAPI { private client: any; private apiKey: string; constructor(configuration: { apiKey: string }) { this.apiKey = configuration.apiKey; } private async loadClient() { ...
be79288853048017e4cce55adde984bede33c225f9ea3bf747ca4db881f199ad
TypeScript
3,166
118
import { ChromaClient, CloudClient, K, Knn, knownSparseEmbeddingFunctions, registerSparseEmbeddingFunction, Rrf, Search, } from "chromadb"; import { ChromaBm25EmbeddingFunction } from "@chroma-core/all"; function getChromaClient(): ChromaClient { if (!process.env.CHROMA_API_KEY) { throw new Error...
efabe55e4956b37a0dc7e891d1601bc698d5c945125637efa75d24b70110fd53
TypeScript
3,169
105
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { TogetherAIEmbeddingFunction } from "./index"; describe("TogetherAIEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const MODEL = "WhereIsAI/UAE-Large-V1"; const defaultParametersTest = "should initial...
cbfb7446f56e5808f577fac119fab8e87ede53220dd2ec7792b12ffb71906f63
TypeScript
3,171
115
import { IEmbeddingFunction } from "./IEmbeddingFunction"; import { validateConfigSchema } from "../schemas/schemaUtils"; type StoredConfig = { account_id: string; model_name: string; api_key_env_var: string; gateway_id?: string; }; const BASE_URL = "https://api.cloudflare.com/client/v4/accounts"; const GATEW...
261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca
TypeScript
3,173
83
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
a207cab28add2b1f9087e9c4dfa65787d245c6345673ed9d2a8999fda848fc12
TypeScript
3,184
105
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { PerplexityEmbeddingFunction } from "./index"; describe("PerplexityEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const MODEL = "pplx-embed-v1-0.6b"; const defaultParametersTest = "should initialize ...
2de8785c3bdc4d1d362d628c64da57db2785adaa8b3062886a18172d345dd575
TypeScript
3,191
102
import { Injectable } from '@angular/core'; import {AccountsService} from "./accounts/accounts.service"; import {Observable, Observer, Subject} from "rxjs"; import {WebSocketSubject} from "rxjs/internal/observable/dom/WebSocketSubject"; import * as readableIDs from "uuid-readable"; @Injectable({ providedIn:...
f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b
TypeScript
3,199
81
/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. 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....
a33427ac633c5aa35880070c587a3b1080686a0bb029b623657c087feca52bd4
TypeScript
3,240
94
import {Component, Input, OnInit} from '@angular/core'; import {UntypedFormBuilder} from "@angular/forms"; import {WebService} from "../../web.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {DataService} from "../../data.service"; import {SettingsService} from "../../settings.service"; impo...
8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215
TypeScript
3,247
117
// Type definitions for istanbul-lib-coverage 2.0 // Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs // Definitions by: Jason Cheatham <https://github.com/jason0x43> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 export interface CoverageSummary...
92f6530cc9abada7fae44c60810e6b60e5a4df0beac9d014c1207bddcb9fa267
TypeScript
3,253
94
import {HttpClient, HttpHeaders} from "@angular/common/http"; import {interval, Subject} from "rxjs"; export class UniprotParser { baseURL: string = "https://rest.uniprot.org/idmapping/run" checkStatusURL: string = "https://rest.uniprot.org/idmapping/status/" format: string = "tsv" columns: string = "accession...
fed43de52c62693e9447ad7664bf1ede62010202d6dcde62cc21ee3b522fa895
TypeScript
3,254
95
import {HttpClient, HttpHeaders} from "@angular/common/http"; import {interval, Subject} from "rxjs"; export class UniprotParser { baseURL: string = "https://rest.uniprot.org/idmapping/run" checkStatusURL: string = "https://rest.uniprot.org/idmapping/status/" format: string = "tsv" columns: string = "accession...
8514cdb30b510b0b581da35c92da66de70d180ea2384730324a9f3bc1c84bdba
TypeScript
3,280
125
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /// <reference types="node" /> import type {Config} from '@jest/types'; import type {Global} from '@jest/types'; declare const ...
308b9788112c4b778790ad5a5959650c07b66f06305908c3f7cff47e9fbc3b43
TypeScript
3,281
102
import * as path from "path"; import { MappingEntry } from "./mapping-entry"; import { dirname } from "path"; import { removeExtension } from "./filesystem"; export interface TryPath { readonly type: "file" | "extension" | "index" | "package"; readonly path: string; } /** * Builds a list of all physical paths to...
ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66
TypeScript
3,298
138
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import chalk = require('chalk'); import {DiffOptions as DiffOptions_2} from 'jest-diff'; export declare const BOLD_WEIGHT: chalk...
21316b54829651bf152ac04459a45fc34edcf0bb329aa5ebf343f0cf8b781b26
TypeScript
3,338
107
import { DefaultEmbeddingFunction } from "./index"; import { beforeEach, describe, expect, it, jest } from "@jest/globals"; // Mock the transformers pipeline jest.mock("@huggingface/transformers", () => { // Create a mock embeddings result const mockEmbeddings = [ Array(384) .fill(0) .map((_, i) =>...
1a1b13174f37c8ccd4c728f54fae3b732c4f23023157784071e1b56af8b2128f
TypeScript
3,347
94
import {HttpClient, HttpHeaders} from "@angular/common/http"; import {interval, Subject} from "rxjs"; export class UniprotParser { baseURL: string = "https://rest.uniprot.org/idmapping/run" checkStatusURL: string = "https://rest.uniprot.org/idmapping/status/" format: string = "tsv" columns: string = "ac...
12f911354da578ec7a99e7c70d425a5649e2364023d5b1b34b74bfdc0be67935
TypeScript
3,355
124
import { validateConfigSchema } from "@chroma-core/ai-embeddings-common"; import { pipeline, ProgressCallback } from "@huggingface/transformers"; import { env as TransformersEnv } from "@huggingface/transformers"; export type DType = | "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" ...
2d47012580f859dae201d2eef898a416bdae719dffc087dfd06aefe3de2f9c8d
TypeScript
3,402
165
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {SnapshotFormat} from '@jest/schemas'; export declare type Colors = { comment: { close: string; open: stri...
ea21745b67b186110978a890cf7e3a8d66140c87a58b0ebe77c3eb9dec8a0379
TypeScript
3,409
110
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { GoogleGeminiEmbeddingFunction } from "./index"; describe("GoogleGeminiEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const defaultParametersTest = "should initialize with default parameters"; if (!pr...
16abb2917e431cb3289c8fab00996377aa3460366e9cebf390aae16de0cc2835
TypeScript
3,441
60
import * as Types from '../typebox'; export declare class TypeGuardUnknownTypeError extends Error { readonly schema: unknown; constructor(schema: unknown); } /** Provides functionality to test if values are TypeBox types */ export declare namespace TypeGuard { /** Returns true if the given schema is TAny */...
5c8401aa4ab2bcfa246fe94f504ff58bc77f0647aa1d9f1fa7a94964b70d1596
TypeScript
3,447
92
// scripts/nwb_ts/readAcquisition.ts import { DandiClient } from './dandiClient'; async function main() { const client = new DandiClient(); const dandisetId = '001261'; const version = '0.250917.2023'; try { console.log('1. Fetching asset list & downloading NWB file...'); const assetsResponse = await ...
b9d0f898510aaac3eb2d5b813b9bca27e7dd439e9d6c29152d9cdcadf36e0296
TypeScript
3,455
108
import {Component, Input, OnInit, ViewChild} from '@angular/core'; import {DataFrame, IDataFrame} from "data-forge"; import {DataService} from "../../data.service"; import {SettingsService} from "../../settings.service"; //import {ContextMenuComponent} from "ngx-contextmenu"; @Component({ selector: 'app-raw-data', ...
d4c75a8619adc50fe84ddd662447693cb93e289f5ab59bf355e9cd0486a0475a
TypeScript
3,469
114
import { beforeEach, describe, expect, it, jest } from "@jest/globals"; import { MorphEmbeddingFunction } from "./index"; describe("MorphEmbeddingFunction", () => { beforeEach(() => { jest.resetAllMocks(); }); const MODEL = "morph-embedding-v2"; const defaultParametersTest = "should initialize with defau...
7296e4522adaa14b804d6e4675dd162663528407e58ce3f22e6597291df1c622
TypeScript
3,511
116
import { ChromaUnauthorizedError, ChromaClientError, ChromaConnectionError, ChromaForbiddenError, ChromaNotFoundError, ChromaServerError, ChromaValueError, ChromaError, createErrorByType, ChromaUniqueError, ChromaQuotaExceededError, } from "./Errors"; import { FetchAPI } from "./generated"; funct...
2caf63f0983e4951aaf2a0972b0da96915fb77eb851cda58aa347aa85d3f5433
TypeScript
3,522
151
import { isPlainObject } from "./common"; import { Key } from "./key"; export interface MinKJSON { keys: string[]; k: number; } export interface MaxKJSON { keys: string[]; k: number; } export type AggregateJSON = { $min_k: MinKJSON } | { $max_k: MaxKJSON }; export type AggregateInput = Aggregate | Aggregate...
79345a89e6bb19743839254b7b658db2e3a1f4ee3eb72137344792954f3468fe
TypeScript
3,522
100
import { configLoader, loadConfig, ConfigLoaderFailResult, ConfigLoaderSuccessResult, } from "../config-loader"; import { join } from "path"; describe("config-loader", (): void => { it("should use explicitParams when set", () => { const result = configLoader({ explicitParams: { baseUrl: "/f...
e45a7c4f9d0852894552e18e83928fc1787cd65d8f1fbe05aa9cae2960ca0f6f
TypeScript
3,533
130
import { Component, OnInit } from '@angular/core'; import {DataService} from "../../data.service"; import {JeezyService} from "../../jeezy.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {ToastService} from "../../toast.service"; import {WebService} from "../../web.service"; import {Settings...
f828ddc9cad0b96d9592a72968dac32b16272ec62f5c73b4ce1d9f1cfadb92dd
TypeScript
3,543
101
import {Component, Input, OnInit} from '@angular/core'; import {UntypedFormBuilder} from "@angular/forms"; import {WebService} from "../../web.service"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {DataService} from "../../data.service"; import {SettingsService} from "../../settings.service"; impo...
e1fd69fddde66f1ef472b20a888c505702825e2c4be7281b531d25678270c117
TypeScript
3,559
108
import { afterAll, beforeAll, beforeEach, describe, expect, test, } from "@jest/globals"; import { DefaultEmbeddingFunction } from "../src/embeddings/DefaultEmbeddingFunction"; import { StartedTestContainer } from "testcontainers"; import { ChromaClient } from "../src/ChromaClient"; import { startChromaCont...