sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
a0d7a48a7b08a301effbf470d98711fa3cb19ec578b0d15d25189c72da6edb7c | TypeScript | 1,299 | 45 | import { SEQUENCE_TYPE } from '../../align/params';
import { getSequenceType, encodeSeqToNum, sortMSA } from '../sequence';
test('Detects DNA', () => {
const seq = 'ATCG';
expect(getSequenceType(seq)).toBe(SEQUENCE_TYPE.NUCLEIC);
});
test('Detects RNA', () => {
const seq = 'AUCG';
expect(getSequenceTy... |
2cd0803258d507f4c53f568012a20dca2d5bd8720b468fce62d8eb98da9260f3 | TypeScript | 1,302 | 45 | import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { PubmedService } from '../../services/pubmed.service';
import { AcronymService } from '../../services/acronym.service';
import * as FileSaver from 'file-saver';
@Component({
... |
248bb0cbb35783dffc69f33b5755077e885252db03acf90b6c0e2f31c764a71a | TypeScript | 1,307 | 45 | import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {SettingsService} from "../../settings.service";
import {WebService} from "../../web.service";
import {DataService} from "../../data.service";
@Component({
selector: 'app-pride',
templateUrl: './pride.component.html',
styleUrls: ['./... |
7c21798b447265d10bc6ed1166b7e49cf329431e39d9f83234149b10ea594764 | TypeScript | 1,322 | 41 | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FlexLayoutModule } from... |
1a1ac24169ad40a0f0e365178ebc781dfe59a278881346d4be15f2436e476801 | TypeScript | 1,331 | 28 | import { ValueError } from '../errors/index';
import * as Types from '../typebox';
export type CheckFunction = (value: unknown) => boolean;
export declare class TypeCheck<T extends Types.TSchema> {
private readonly schema;
private readonly references;
private readonly checkFunc;
private readonly code;
... |
50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc | TypeScript | 1,336 | 39 | /*! *****************************************************************************
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.... |
03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4 | TypeScript | 1,352 | 30 | /*! *****************************************************************************
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.... |
b4c73536b28f54adc788bb4fe2b65595c7d54b98cd96c8e7e65b17ab1a77d190 | TypeScript | 1,352 | 45 | import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {SettingsService} from "../../settings.service";
import {WebService} from "../../web.service";
import {DataService} from "../../data.service";
@Component({
selector: 'app-pride',
templateUrl: './pride.component.html',
styleU... |
23a024e0a6953a6005e256e7da85c4b9f0452ec9e20c879457cf202524834822 | TypeScript | 1,371 | 46 | const { writeFile } = require('fs');
const { argv } = require('yargs');
// read environment variables from .env file
require('dotenv').config();
// set baseApiUrl options
let baseApiUrlLocal = "http://localhost:8083/";
let baseApiUrlProd = "/acronyms";
// read the command line arguments passed with yargs
const envir... |
bd77f210af7a83cfd81442c095210d6957aaf5b0210cb9b78485f72289af5a7e | TypeScript | 1,380 | 42 | import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {fromCSV, IDataFrame} from 'data-forge';
import {InputFile} from "../../classes/input-file";
@Component({
selector: 'app-file-input-widget',
templateUrl: './file-input-widget.component.html',
styleUrls: ['./file-input-widget.com... |
80b0fd8512964d5b004037213ad48b53c5c1167f6ab2407206da641cecb47821 | TypeScript | 1,384 | 31 | import { pairwiseAlignment } from '../align';
import { makeSequence } from '../../sequence/sequence'
import { getAlignmentParameters, SEQUENCE_TYPE } from '../params';
import { estringTransform } from '../../utils/estring';
test('aligns ends', () => {
const lSeqA = makeSequence('CCCAATTCTATACCAACAC');
const lS... |
c7d7ac2849ad63e323a47d09aed8bcd0def8a88f9deecb331b227cde53f5f041 | TypeScript | 1,385 | 81 | import "isomorphic-fetch";
/* eslint-disable */
// tslint:disable
/**
* chroma-frontend
*
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator+.
* https://github.com/karlvr/openapi-generator-plus
* Do not edit the class manually.
*/
export const defaultFetch = fetch;
... |
e09a97cdcc9aff60bced18e067c1094e6b196fe50f7d99247f3d1660b282f3d8 | TypeScript | 1,409 | 43 | import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {fromCSV, IDataFrame} from 'data-forge';
import {InputFile} from "../../classes/input-file";
@Component({
selector: 'app-file-input-widget',
templateUrl: './file-input-widget.component.html',
styleUrls: ['./file-input-widget.com... |
9f91eee81fda27d38d60963fe1de2f050a5cfb241af56b7e7ee6d9aa8522a058 | TypeScript | 1,418 | 42 | declare namespace pLimit {
interface Limit {
/**
The number of promises that are currently running.
*/
readonly activeCount: number;
/**
The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
*/
readonly pendingCount: number;
/**
Discard pending promises tha... |
adf121a4c213f1beff5ab856a0ecd28ed6b1806c1afe6943e530d855eb17dceb | TypeScript | 1,422 | 42 | import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {fromCSV, IDataFrame} from 'data-forge';
import {InputFile} from "../../classes/input-file";
@Component({
selector: 'app-file-input-widget',
templateUrl: './file-input-widget.component.html',
styleUrls: ['./file-input-wid... |
9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa | TypeScript | 1,425 | 53 | /*! *****************************************************************************
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.... |
376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a | TypeScript | 1,439 | 45 | /*! *****************************************************************************
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.... |
74e47142d7e3882a3bb50d8ec93b0d9d31f855280b92dd222e53a9f884006de9 | TypeScript | 1,443 | 45 | import {
convertToModelMessages,
streamText,
UIMessage,
tool,
stepCountIs,
} from "ai";
import { openai } from "@ai-sdk/openai";
import { queryMovies } from "@/lib/chroma";
import { z } from "zod";
export const maxDuration = 30;
export async function POST(req: Request) {
const { messages }: { messages: UI... |
2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3 | TypeScript | 1,455 | 37 | /*! *****************************************************************************
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.... |
ea1f9423b29252f811eb1bb4c0a43ccf08704db10119cffd1b0e2b4b114f3830 | TypeScript | 1,464 | 17 | import * as Types from '../typebox';
export type TExtends<L extends Types.TSchema, R extends Types.TSchema, T extends Types.TSchema, U extends Types.TSchema> = Types.Static<L> extends Types.Static<R> ? T : U;
export interface TExclude<T extends Types.TUnion, U extends Types.TUnion> extends Types.TUnion<any[]> {
sta... |
093a64b9e65ad2b28fa2a5d2e7cab81851e3dc1d7f3c193e35f7eda124223cf1 | TypeScript | 1,467 | 53 | declare namespace pLocate {
interface Options {
/**
Number of concurrently pending promises returned by `tester`. Minimum: `1`.
@default Infinity
*/
readonly concurrency?: number;
/**
Preserve `input` order when searching.
Disable this to improve performance if you don't care about the order.
@de... |
6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6 | TypeScript | 1,472 | 33 | /*! *****************************************************************************
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.... |
9cae51a2a7a3f0653f5beb651fd63e91347145583902533bfca360f12df1ffa0 | TypeScript | 1,473 | 45 | import { beforeEach, describe, expect, test } from "@jest/globals";
import { EMBEDDINGS, IDS, METADATAS } from "./data";
import { ChromaClient } from "../src/ChromaClient";
import { ChromaNotFoundError } from "../src/Errors";
describe("delete collection", () => {
// connects to the unauthenticated chroma instance st... |
e36f5b6383baffbb8f7784c18854701e9a70045a193c2b18da02ceee54b66648 | TypeScript | 1,476 | 66 | import {Component, Input, OnInit} from '@angular/core';
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-netphos-kinases',
templateUrl: './netphos-kinases.component.html',
styleUrls: ['./netphos-kinases.component.css']
})
export class NetphosKinasesComponent implements OnIni... |
d6ed3ecc670e77138ff23ca2e01124e3a4de85eaf0171a2b57792995ba3750bb | TypeScript | 1,491 | 56 | export interface LimitOptions {
offset?: number;
limit?: number | null | undefined;
}
export type LimitInput = Limit | number | LimitOptions | null | undefined;
export class Limit {
public readonly offset: number;
public readonly limit?: number;
constructor(options: LimitOptions = {}) {
const { offset ... |
6eed88ce45c41746dee34d61027633a63a9ead098bf4fe8005667e1cf655cb02 | TypeScript | 1,505 | 56 | /**
* Generate secure URL-friendly unique ID. The non-blocking version.
*
* By default, the ID will have 21 symbols to have a collision probability
* similar to UUID v4.
*
* ```js
* import { nanoid } from 'nanoid/async'
* nanoid().then(id => {
* model.id = id
* })
* ```
*
* @param size Size of the ID. Th... |
12dc986ccbfd3dbb3125205eb85fb024b8fca292b880e26637ec6a549260ac8a | TypeScript | 1,515 | 62 | import { Key } from "./key";
export type SelectKeyInput = string | Key;
export type SelectInput =
| Select
| Iterable<SelectKeyInput>
| { keys?: Iterable<SelectKeyInput> }
| null
| undefined;
export class Select {
private readonly keys: string[];
constructor(keys: Iterable<SelectKeyInput> = []) {
... |
b0b92fd4bcd2d9eb606726a3f54abd07bb30aec921c910f423f2e78663f8b459 | TypeScript | 1,537 | 66 | /* eslint-disable */
// tslint:disable
/**
* chroma-frontend
*
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator+.
* https://github.com/karlvr/openapi-generator-plus
* Do not edit the class manually.
*/
export interface ConfigurationParameters {
apiKey?: string |... |
37ee9f715ad6f335d35fbf5b21b2f4e2fb4820893f14bb59b77e52d1cd10378c | TypeScript | 1,559 | 48 | import { expect, test, jest } from "@jest/globals";
import { ChromaClient } from "../src";
import { SystemService } from "../src/api";
test("preflight", async () => {
const client = new ChromaClient({
path: process.env.DEFAULT_CHROMA_INSTANCE_URL,
});
const preflight = await client.getPreflightChecks();
ex... |
62a7837feac30d3ce63a2c0c4138f1cc6cdd0b477c8a09342b2c4bfa88f32345 | TypeScript | 1,559 | 48 | import { describe, expect, test } from "@jest/globals";
import { loadSchema, getSchemaVersion } from "../src/schemas";
import { OpenAIEmbeddingFunction } from "../src/embeddings/OpenAIEmbeddingFunction";
import { validateConfigSchema } from "../src/schemas/schemaUtils";
describe("Schema Validation", () => {
test("sh... |
62a8929a1f9c1499eccb574a368838bc3ab486fd215265b6f2bcf7ac109a0350 | TypeScript | 1,570 | 48 | import {AfterViewInit, Component} from '@angular/core';
import {AccountsService} from "./accounts/accounts.service";
import {Enrichr} from "enrichrjs";
import {SwUpdate} from "@angular/service-worker";
import {SettingsService} from "./settings.service";
import {WebsocketService} from "./websocket.service";
import {NgbM... |
da2bb7623035cf8dd05721cc91161d9baffc303aa51a237c71281fc1a52e5691 | TypeScript | 1,580 | 83 | declare namespace locatePath {
interface Options {
/**
Current working directory.
@default process.cwd()
*/
readonly cwd?: string;
/**
Type of path to match.
@default 'file'
*/
readonly type?: 'file' | 'directory';
/**
Allow symbolic links to match if they point to the requested path type.
... |
634d2d891186ba5b92676e298e769bf8c17fe10c8d59d4e5af1b8803135671a5 | TypeScript | 1,606 | 62 | import { Component, OnInit } from '@angular/core';
import {SaveStateService} from "../../save-state.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-local-session-state-modal',
templateUrl: './local-session-state-modal.component.html',
styleUrls: ['./local-session-... |
136103eb8b7424df7198bb8bef0b71e8712e7055c6caba9fcbdc2c5f842ecfee | TypeScript | 1,608 | 47 | import { afterAll, beforeAll, describe, expect, test } from "@jest/globals";
import { ChromaClient } from "../src";
describe("client test", () => {
// connects to the unauthenticated chroma instance started in
// the global jest setup file.
const client = new ChromaClient({
path: process.env.DEFAULT_CHROMA_I... |
e5673631f2bffd296d3f04288caaa57f60f99c0ca43bdcb08395784977eb53bb | TypeScript | 1,615 | 59 | import { DEQueue } from '../queue';
test('Inits a queue', () => {
const lQueue = new DEQueue(10);
expect(lQueue.size).toBe(0);
expect(lQueue.isEmpty).toBe(true);
});
test('Pushes at the head of the queue', () => {
const lQueue = new DEQueue<number>(10);
lQueue.pushHead(1);
const lHead = lQueue... |
94b9a6a559cdd59229d21afda5e8c52a9707fafcaf39909127fb38e8ad60baab | TypeScript | 1,618 | 48 | import {AfterViewInit, Component} from '@angular/core';
import {AccountsService} from "./accounts/accounts.service";
import {Enrichr} from "enrichrjs";
import {SwUpdate} from "@angular/service-worker";
import {SettingsService} from "./settings.service";
import {WebsocketService} from "./websocket.service";
import... |
a8d4b4a859692cd2e74e5649edd3a1733cfc6a9d603a64dc4e0a42369d30b0b7 | TypeScript | 1,636 | 64 | import { Component, OnInit } from '@angular/core';
import {SaveStateService} from "../../save-state.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-local-session-state-modal',
templateUrl: './local-session-state-modal.component.html',
styleUrls: ['./local-session-... |
2b8059dacbd6d45f432296239ab0d2fb169646e85a057e424c35e4299f164634 | TypeScript | 1,646 | 54 | import { beforeEach, describe, expect, test } from "@jest/globals";
import { ChromaClient } from "../src/ChromaClient";
import { ChromaNotFoundError } from "../src/Errors";
describe("upsert records", () => {
// connects to the unauthenticated chroma instance started in
// the global jest setup file.
const client... |
0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea | TypeScript | 1,648 | 46 | /*! *****************************************************************************
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.... |
19d6dcd9302ea0b7318ef6d56ae8fd47b6c4c388385286ef2ceaca7c9488cf32 | TypeScript | 1,668 | 62 | import { Component, OnInit } from '@angular/core';
import {SaveStateService} from "../../save-state.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-local-session-state-modal',
templateUrl: './local-session-state-modal.component.html',
styleUrls: ['./local-s... |
6fa5d56af71f07dc276aae3f6f30807a9cccf758517fb39742af72e963553d80 | TypeScript | 1,691 | 68 | /**
* 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 {Config} from '@jest/types';
import type {StackData} from 'stack-utils';
import type {TestResult} from '@jest/types';... |
3c079982783598ed19456a728ba89382bfc8539950517a1b0ec8562df47ec556 | TypeScript | 1,699 | 68 | import {Component, Input, OnInit} from '@angular/core';
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {FormBuilder} from "@angular/forms";
import {ToastService} from "../../toast.service";
@Component({
selector: 'app-volcano-colors',
templ... |
16ef9db1cfdea85390b249261e18c3748cbac28c657d0f44bbf2f0e0fbb27fb7 | TypeScript | 1,735 | 49 | import {Component, Input, OnInit} from '@angular/core';
import {SettingsService} from "../../settings.service";
import {DataService} from "../../data.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {FormBuilder, FormGroup} from "@angular/forms";
@Component({
selector: 'app-volcano-plot-te... |
5e6bc222777e9aa9eb8c88e160c871ba79420824ac6a063b9ebc0625b40bc7ae | TypeScript | 1,737 | 63 | #!/usr/bin/env node
import semver from "semver";
import binding from "./bindings";
interface NpmPackageData {
"dist-tags": {
latest: string;
[tag: string]: string;
};
}
const getLatestVersion = async (packageName: string): Promise<string> => {
const response = await fetch(`https://registry.npmjs.org/${p... |
dc0618ad4afec75027415203aa3c1d49edafb903e2e3561a4af2f5abda96bb6e | TypeScript | 1,737 | 60 | import { Injectable } from '@angular/core';
import {Observable, Observer, Subject} from "rxjs";
import {WebSocketSubject} from "rxjs/internal/observable/dom/WebSocketSubject";
import * as readableIDs from "uuid-readable";
import {AccountsService} from "./accounts/accounts.service";
@Injectable({
providedIn: 'root'... |
62d0b67933e4b4351e5a6aaf84b59e39778d4dcb7e323e1bf2c15fb08cf6ac9e | TypeScript | 1,739 | 49 | import { afterAll, beforeAll, describe, expect, test } from "@jest/globals";
import { ChromaClient } from "../src/ChromaClient";
import { StartedTestContainer } from "testcontainers";
import { startChromaContainer } from "./startChromaContainer";
describe("client test", () => {
// connects to the unauthenticated chr... |
c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06 | TypeScript | 1,753 | 43 | /*! *****************************************************************************
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.... |
8de97fc2eacfdea924b41f5459c7d9115a6d2df7f84bee48c0eb8b1383abd53c | TypeScript | 1,759 | 43 | import { Static } from '../typebox';
export type Insert = Static<typeof Insert>;
export declare const Insert: import("../typebox").TObject<{
type: import("../typebox").TLiteral<"insert">;
path: import("../typebox").TString<string>;
value: import("../typebox").TUnknown;
}>;
export type Update = Static<typeof... |
3dc633d2336083cd62764da5333893ff0e7ec02b06606855c89ec40605aeec0a | TypeScript | 1,767 | 68 | import {Component, Input, OnInit} from '@angular/core';
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {FormBuilder} from "@angular/forms";
import {ToastService} from "../../toast.service";
@Component({
selector: 'app-volcano-colors',
... |
775f54122096b93497341acbfa73e1c1b56c1bdb7f7c85c48ad25c08b64272f1 | TypeScript | 1,784 | 49 | import {Component, Input, OnInit} from '@angular/core';
import {SettingsService} from "../../settings.service";
import {DataService} from "../../data.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {FormBuilder, FormGroup} from "@angular/forms";
@Component({
selector: 'app-volcano-... |
ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e | TypeScript | 1,802 | 47 | /*! *****************************************************************************
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.... |
0db4d9c23fb3da0ead9e3f349ee78a3b895fa4a0da02db86ef2fdc751b8f0e68 | TypeScript | 1,813 | 87 | export class Differential {
get reverseFoldChange(): boolean {
return this._reverseFoldChange;
}
set reverseFoldChange(value: boolean) {
this._reverseFoldChange = value;
}
get comparisonSelect(): string[] {
return this._comparisonSelect;
}
set comparisonSelect(value: string[]) {
this._co... |
736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50 | TypeScript | 1,825 | 62 | // Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
// Leon Yu <https://github.com/leonyu>
// BendingBender <https://github.com/BendingBender>
// Maple Miao <https://github.com/mapleeit>
/// <reference types="node" />
import * as stream from 'stream... |
27bdd6b5e22ece4414175af265a0f744d4d0ef9ee55b7d1e472436c47eac1f00 | TypeScript | 1,834 | 55 | import {Component, Input, OnInit} from '@angular/core';
import {FormBuilder, FormGroup} from "@angular/forms";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-rank-plot-text-annotation',
templateUrl: './rank-plot-text-annotation.component.html',
styleUrls: ['./rank-plot-tex... |
0bb7350b20c8153ac6a9fdb97917ded768fb39779f5006cdfc803e4051a6a2f2 | TypeScript | 1,836 | 67 | import * as Types from '../typebox';
export declare enum ValueErrorType {
Array = 0,
ArrayMinItems = 1,
ArrayMaxItems = 2,
ArrayUniqueItems = 3,
Boolean = 4,
Date = 5,
DateExclusiveMinimumTimestamp = 6,
DateExclusiveMaximumTimestamp = 7,
DateMinimumTimestamp = 8,
DateMaximumTimes... |
8673a0e33f094585b72538b5421a1a97fcaae59315595e981cd252e4534deca7 | TypeScript | 1,846 | 30 | import * as Filesystem from "./filesystem";
import * as MappingEntry from "./mapping-entry";
/**
* Function that can match a path
*/
export interface MatchPath {
(requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: (name: string) => boolean, extensions?: ReadonlyArray<string>): string | unde... |
c40cc4f34a1d3eb9709097dc6698d38d899afbf4fdbf6f5ff47e74d6ba55e2bb | TypeScript | 1,889 | 55 | import {Component, Input, OnInit} from '@angular/core';
import {FormBuilder, FormGroup} from "@angular/forms";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-rank-plot-text-annotation',
templateUrl: './rank-plot-text-annotation.component.html',
styleUrls: ['./rank-p... |
8fa4ead92e092ca23072e3c3912d52ae0df1f98d89f35ab5dfd6d1c70dd01aa8 | TypeScript | 1,900 | 87 | export class Differential {
get reverseFoldChange(): boolean {
return this._reverseFoldChange;
}
set reverseFoldChange(value: boolean) {
this._reverseFoldChange = value;
}
get comparisonSelect(): string[] {
return this._comparisonSelect;
}
set comparisonSelect(value: string[]) {
... |
5abac98e874d4e54496402e86d388dd2ca398f31e4455609c3f1a953388a2cb1 | TypeScript | 1,915 | 65 | import * as Filesystem from "../filesystem";
import * as path from "path";
describe("filesystem", () => {
const fileThatExists = path.join(__dirname, "../../package.json");
const fileThatNotExists = path.join(__dirname, "../../package2.json");
it("should find file that exists, sync", () => {
const result = ... |
45c697281e20910beafc80e888ed9e239285d1b1bbc9f9849d1344e1bd4ffd6e | TypeScript | 1,916 | 55 | import { OllamaEmbeddingFunction } from "../../src/index";
import { describe, expect, test } from "@jest/globals";
import { DOCUMENTS } from "../data";
describe("ollama embedding function", () => {
if ((globalThis as any).ollamaAvailable) {
test("it should embed with defaults", async () => {
const embedder... |
168600920794ca8a5b21580f3f833b59a0559eb4af39783f3609b8b8f21964e1 | TypeScript | 1,937 | 70 | import { getAbsoluteMappingEntries } from "../mapping-entry";
import { join } from "path";
describe("mapping-entry", () => {
it("should change to absolute paths and sort in longest prefix order", () => {
const result = getAbsoluteMappingEntries(
"/absolute/base/url",
{
"*": ["/foo1", "/foo2"]... |
aaf44ceba055d4bce0895fb6e07ca35365a7fd26de1c995d07d4137d6616e4c4 | TypeScript | 1,945 | 58 | import { Component } from '@angular/core';
import {FormBuilder, FormControl, Validators} from "@angular/forms";
import {PtmService} from "../../ptm.service";
import {SettingsService} from "../../settings.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {DataService} from "../../data.service";... |
ba2e82acbcb25d87c341ef3c0192cd20545896f8389a12e86bf7af6dc9a16ca1 | TypeScript | 1,968 | 68 | import { Component, OnInit } from '@angular/core';
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {FormBuilder} from "@angular/forms";
import {ToastService} from "../../toast.service";
@Component({
selector: 'app-volcano-colors',
templateUr... |
492c8a56ca7dc2c02952621e3e956d3cb1b0e09a585e92dce1faa2687aa9a8cd | TypeScript | 1,970 | 55 | 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-condition-ass... |
ab4c9515d97fc6824fa91fba43c99f510c579eddc5f0ab31b68cc4220fe0a77d | TypeScript | 1,976 | 42 | import { Component, OnInit } from '@angular/core';
import {SettingsService} from "../../settings.service";
import {DataService} from "../../data.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {FormBuilder, FormGroup} from "@angular/forms";
@Component({
selector: 'app-volcano-plot-text-an... |
390a66a9a0e8bbb286382f7cb71a9ceb015bdae33c21a721c07def5408324391 | TypeScript | 1,984 | 61 | import { fileURLToPath } from "url";
import { dirname, join } from "path";
import { rm, readFile, writeFile } from "node:fs/promises";
import { createClient } from "@hey-api/openapi-ts";
import { startChromaServer } from "./start-chroma.js";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(... |
da29c19ddbe3cba32c5a123ad78fbc15e9507314c8df01b217c8fcaa98577f6b | TypeScript | 1,985 | 62 | import { GenericContainer, Wait } from "testcontainers";
const OLLAMA_PORT = 11434;
// checking model name to prevent command injection
function isValidModel(model: string): boolean {
const regex =
/^[a-zA-Z0-9\-]+((:[a-zA-Z0-9\-]+)?|(\/[a-zA-Z0-9\-]+)?(:[a-zA-Z0-9\-]+)?)$/; // matches: <model> or <model>:<versi... |
eed9216cb350bacce60171d616981eb5f35651ba8f722aad870cdc3c85e6031e | TypeScript | 1,991 | 70 | import { beforeEach, describe, expect, it, jest } from "@jest/globals";
import { OllamaEmbeddingFunction } from "./index";
// Mock the ollama package
const mockEmbed = jest.fn() as jest.MockedFunction<any>;
jest.mock("ollama", () => ({
Ollama: jest.fn().mockImplementation(() => ({
embed: mockEmbed,
})),
}));
... |
76905dc24648fad4b962442474fa327bbf77443190148881b00433e7b16c1e3b | TypeScript | 1,996 | 64 | import * as path from "path";
export interface MappingEntry {
readonly pattern: string;
readonly paths: ReadonlyArray<string>;
}
export interface Paths {
readonly [key: string]: ReadonlyArray<string>;
}
/**
* Converts an absolute baseUrl and paths to an array of absolute mapping entries.
* The array is sorte... |
29e2670a528a80eb0020a01cdd78f30aee24f0bfce6230d8a7dc798f4db2263b | TypeScript | 2,035 | 73 | import {Project} from "./project";
export class Settings {
fetchUniprot: boolean = true
inputDataCols: any = {}
probabilityFilterMap: any = {}
pCutoff: number = 0.05
log2FCCutoff: number = 0.6
description: string = ""
uniprot: boolean = true
colorMap: any = {}
academic: boolean = true
backGroundCol... |
a4f12f7738f08cdca1076d42eacbcb1a07747458f505493dc597b92a9ab434c7 | TypeScript | 2,036 | 76 | import { Component } from '@angular/core';
import {AccountsService} from "../../accounts/accounts.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-curtain-stats-summary',
templateUrl: './curtain-stats-summary.component.html',
styleUrls: ['./curtain-stats-summary.co... |
1014c82d3a1100a37558d6b7e368ded7196c83c1f0dd0c4000885986406161fe | TypeScript | 2,050 | 87 | import * as fs from "fs";
/**
* Typing for the fields of package.json we care about
*/
export interface PackageJson {
[key: string]: string;
}
/**
* A function that json from a file
*/
export interface ReadJsonSync {
// tslint:disable-next-line:no-any
(packageJsonPath: string): any | undefined;
}
export in... |
b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a | TypeScript | 2,081 | 39 | /*! *****************************************************************************
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.... |
cd0ba7b2a4351e096b0576e32b1daa33b8a65a833b3db802adb86cedcf0e5c2d | TypeScript | 2,084 | 73 | import { GenericContainer, Wait } from "testcontainers";
const OLLAMA_PORT = 11434;
// checking model name to prevent command injection
function isValidModel(model: string): boolean {
const regex =
/^[a-zA-Z0-9\-]+((:[a-zA-Z0-9\-]+)?|(\/[a-zA-Z0-9\-]+)?(:[a-zA-Z0-9\-]+)?)$/; // matches: <model> or <model>:<versi... |
dcbf37643057aad6020081ed93ccffd71d4042f521f6552ebd61deb61911ae86 | TypeScript | 2,085 | 67 | import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { map } from 'rxjs/operators';
import { environment } from './../../environments/environment';
const baseUrl = environment.baseApiUrl;
@Injectable({
providedIn: 'root'
})
export class Mongo... |
585ac1e08944e278f9cc777f4fe0199f5f1b8ff89511b0bc57f9706d6a5d3587 | TypeScript | 2,112 | 69 | import { Component, OnInit } from '@angular/core';
import {WebsocketService} from "../../websocket.service";
import {FormBuilder, FormControl} from "@angular/forms";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {ToastService} from "../../toast... |
d8eeadc08383bc188272cc5c94b2e2c1704cbd47975e1737e7e4bfedac4545c7 | TypeScript | 2,112 | 76 | import { Component } from '@angular/core';
import {AccountsService} from "../../accounts/accounts.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
@Component({
selector: 'app-curtain-stats-summary',
templateUrl: './curtain-stats-summary.component.html',
styleUrls: ['./curtain-stats-sum... |
5c3d64a75d07288da41facc0cfd41c2c41a4ea92d5e5f1de2be547e9f4fb2d06 | TypeScript | 2,117 | 82 | import { validateConfigSchema } from "../schemas/schemaUtils";
import { IEmbeddingFunction } from "./IEmbeddingFunction";
type StoredConfig = {
url: string;
api_key_env_var?: string;
};
export class HuggingFaceEmbeddingServerFunction implements IEmbeddingFunction {
name = "huggingface_server";
private url: s... |
6c1e688f95fcaf53b1e41c0fdadf2c1cfc96fa924eaf7f9fdb60f96deb0a4986 | TypeScript | 2,120 | 92 | /**
* 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.
*/
export declare const arrayBufferEquality: (
a: unknown,
b: unknown,
) => boolean | undefined;
export declare function emptyO... |
8e0605248115e36304e03271d16a4ae4198e96c911940d080bf1e4939a814506 | TypeScript | 2,120 | 69 | import { Component, OnInit } from '@angular/core';
import {WebsocketService} from "../../websocket.service";
import {FormBuilder, FormControl} from "@angular/forms";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {ToastService} from "../../toast... |
30dc7579a13348e9b02230094230ab7e7b4f25a73524df42cf1dd7ea1ad18682 | TypeScript | 2,152 | 53 | // scripts/nwb_ts/example.ts
import { DandiClient } from './dandiClient';
async function main() {
const client = new DandiClient();
const dandisetId = '001261';
const version = '0.250917.2023'; // Explicitly set the published version
try {
console.log(`========================================`);
conso... |
96bc9ff640aa2f6789b8f95bb91812073f4a9254c65da3f50b9cfd7485b38ea2 | TypeScript | 2,153 | 67 | // dandiClient.ts
import { DandiAsset, DandiAssetDetail, DandiPaginatedResponse, DandisetInfo } from './dandiTypes';
export class DandiClient {
private baseUrl: string;
constructor(baseUrl: string = 'https://api.dandiarchive.org/api') {
this.baseUrl = baseUrl.replace(/\/$/, '');
}
private async fetchJson... |
899e222b6ec8e4f53f33dcc328763f0fcecf5b6dbe79e4a838b97d867243429f | TypeScript | 2,170 | 76 | import {Project} from "./project";
export class Settings {
fetchUniprot: boolean = true
inputDataCols: any = {}
probabilityFilterMap: any = {}
sampleMap: any = {}
barchartColorMap: any = {}
pCutoff: number = 0.05
log2FCCutoff: number = 0.6
description: string = ""
uniprot: boolean = true
colorMap: ... |
43883cf3635bb1846cbdc6c363787b76227677388c74f7313e3f0edb380840fa | TypeScript | 2,178 | 72 | /**
* 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 {Static} from '@sinclair/typebox';
import {TBoolean} from '@sinclair/typebox';
import {TNull} from '@sinclair/typebox';
im... |
099406a19182153cd7170a332fe28bcd2b5d4e06f41affe2beeabdecef512da2 | TypeScript | 2,183 | 65 | import { estringTransform, estringProduct, estringCat, epath2estring, estringMerge, estringDifference } from '../estring';
test('Transforms a string', () => {
const lTxt = 'MQTIF';
const lEString = [3,-1,2];
let lTxt2 = estringTransform(lTxt, lEString, { gapchar: '-' });
expect(lTxt2).toBe('MQT-IF');
}... |
2167376121cb420508d58a98b4a8fef0e6735ca502e9c2e6a9f151dfdcd65727 | TypeScript | 2,183 | 79 | import {AfterContentInit, Component, Input, OnInit} from '@angular/core';
import {EbiService} from "../../ebi.service";
import {UniprotService} from "../../uniprot.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"
import {getEBIAlpha} from "curtain-web-api"
declare const PDBeMolstarPlugin: any;
@Com... |
b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298 | TypeScript | 2,186 | 65 | // Type definitions for stack-utils 2.0
// Project: https://github.com/tapjs/stack-utils#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export = StackUtils;
declare class StackUtils {
static n... |
4d1dd15b1da7a63acb875a5e4c5293ade4f93590beba3484008921715ef3d945 | TypeScript | 2,189 | 69 | import { Component, OnInit } from '@angular/core';
import {WebsocketService} from "../../websocket.service";
import {FormBuilder, FormControl} from "@angular/forms";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap";
import {SettingsService} from "../../settings.service";
import {ToastService} from "../../... |
4051552e354d0adfbce88983cb37aaf292d7f37ee921ae19751c0d8712125eb4 | TypeScript | 2,215 | 99 | /**
* @file queue
* @author Paul Pillot <paul.pillot@libmol.org>
* @license MIT
* @copyright 2021
* @description Queue JS implementation
*
*/
/**
* Double Ended Queue
*
* @export
* @class DEQueue
* @example let queue = new DEQueue(10);
* queue.pushHead(1);
* queue.pushHead(2);
* let lTail = queue.popTai... |
cfa24d1377e93a758c53b59a8f73f528f1fc5d267f60e9d6b2c73cf4c2786d41 | TypeScript | 2,221 | 83 | import { test, describe, afterEach, expect } from "@jest/globals";
import {
CloudClient,
K,
Schema,
SparseVectorIndexConfig,
VectorIndexConfig,
} from "chromadb";
import {
ChromaCloudQwenEmbeddingFunction,
ChromaCloudQwenEmbeddingModel,
} from "@chroma-core/chroma-cloud-qwen";
import { ChromaCloudSpladeEm... |
f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0 | TypeScript | 2,223 | 74 | // Type definitions for istanbul-reports 3.0
// Project: https://github.com/istanbuljs/istanbuljs, https://istanbul.js.org
// Definitions by: Jason Cheatham <https://github.com/jason0x43>
// Elena Shcherbakova <https://github.com/not-a-doctor>
// Definitions: https://github.com/DefinitelyTyped/Definitel... |
a0c5ed4f73a2e23a528528b3140428fdb6dcdb398b4f2f05ae42ce9c14d460c6 | TypeScript | 2,232 | 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-condition-ass... |
e4ebcce16ed5684342da7728b2fddc35206c027acbac523d4415983efe327e9c | TypeScript | 2,232 | 82 | import {
EmbeddingFunction,
EmbeddingFunctionSpace,
registerEmbeddingFunction,
} from "chromadb";
import * as process from "node:process";
import { validateConfigSchema } from "@chroma-core/ai-embeddings-common";
const NAME = "huggingface-server";
export interface HuggingfaceServerConfig {
api_key_env_var?: s... |
e112c923b00f99b5c274bef936b2ff3e684113406202570e824a5d6f7d1f3744 | TypeScript | 2,239 | 72 | import * as axios from 'axios'
interface IAxiosRetry {
(
axios: axios.AxiosStatic | axios.AxiosInstance,
axiosRetryConfig?: IAxiosRetry.IAxiosRetryConfig
): void;
isNetworkError(error: Error): boolean;
isRetryableError(error: Error): boolean;
isSafeRequestError(error: Error): boolean;
isIdempotent... |
69f6353c147a78637a2f121640ac5e28c10a6409a97bd38ba2ce93c1c9e01207 | TypeScript | 2,246 | 76 | import {Project} from "./project";
export class Settings {
fetchUniprot: boolean = true
inputDataCols: any = {}
probabilityFilterMap: any = {}
sampleMap: any = {}
barchartColorMap: any = {}
pCutoff: number = 0.05
log2FCCutoff: number = 0.6
description: string = ""
uniprot: boolean = true
... |
a45ee7555d019a67fbe092898d1aef0b1d02a9f6679ab84461ff515b4460d706 | TypeScript | 2,252 | 91 | /**
* Generate secure URL-friendly unique ID.
*
* By default, the ID will have 21 symbols to have a collision probability
* similar to UUID v4.
*
* ```js
* import { nanoid } from 'nanoid'
* model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
* ```
*
* @param size Size of the ID. The default size is 21.
* @retu... |
67705de2d815614d3ab483e6c76ea0fbb9142e65cc0ea243e545e2a7e165a658 | TypeScript | 2,258 | 65 | import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from './../../environments/environment';
const baseUrl = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/";
const apiKey = environment.pubmedA... |
709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30 | TypeScript | 2,259 | 48 | /*! *****************************************************************************
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.... |
84dbb2c8c3024711e07c1e1c716ad3e682fc32e9bded89e2fbbd3ecdf756e767 | TypeScript | 2,262 | 79 | import {AfterContentInit, Component, Input, OnInit} from '@angular/core';
import {EbiService} from "../../ebi.service";
import {UniprotService} from "../../uniprot.service";
import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"
import {getEBIAlpha} from "curtain-web-api"
declare const PDBeMolstarPlugin: an... |
2e4fcd8a341c4ff4abc7e7c3e70d5f0826211e2145e7491baa9996cb765b0324 | TypeScript | 2,284 | 72 | 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}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.