repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/naive_bayes/GaussianNB.test.ts | src/naive_bayes/GaussianNB.test.ts | /**
* @license
* Copyright 2022, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/naive_bayes/BaseNaiveBayes.ts | src/naive_bayes/BaseNaiveBayes.ts | /**
* @license
* Copyright 2022, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/impute/SimpleImputer.test.ts | src/impute/SimpleImputer.test.ts | import { SimpleImputer, setBackend, fromJSON } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('SimpleImputer', function () {
it('Imputes with "constant" strategy 2D one column. In this strategy, we give the fill value', function () {
const imputer = new SimpleImputer({ strategy: '... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/impute/SimpleImputer.ts | src/impute/SimpleImputer.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/StandardScaler.ts | src/preprocessing/StandardScaler.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/LabelEncoder.ts | src/preprocessing/LabelEncoder.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/MaxAbsScaler.ts | src/preprocessing/MaxAbsScaler.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/OrdinalEncoder.test.ts | src/preprocessing/OrdinalEncoder.test.ts | import { OrdinalEncoder, setBackend } from '../index'
import { arrayTo2DColumn } from '../utils'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('OrdinalEncoder', function () {
it('OrdinalEncoder works on array', function () {
const data = ['dog', 'cat', 'man', 'dog', 'cat', 'man', 'man', 'cat']
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/LabelEncoder.test.ts | src/preprocessing/LabelEncoder.test.ts | import { LabelEncoder, setBackend } from '../index'
import * as dfd from 'danfojs-node'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('LabelEncoder', function () {
it('LabelEncoder works for Series', function () {
const sf = new dfd.Series([1, 2, 2, 6])
const scaler = new LabelEncoder()
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/RobustScaler.ts | src/preprocessing/RobustScaler.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/Normalizer.test.ts | src/preprocessing/Normalizer.test.ts | import { Normalizer, setBackend } from '../index'
import * as dfd from 'danfojs-node'
import { arrayEqual } from '../utils'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('Normalizer', function () {
it('Standardize values in a DataFrame using a Normalizer (l1 case)', function () {
const data = [
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/OneHotEncoder.test.ts | src/preprocessing/OneHotEncoder.test.ts | import { OneHotEncoder, setBackend } from '../index'
import { arrayTo2DColumn } from '../utils'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('OneHotEncoder', function () {
it('OneHotEncoder works on array', function () {
const data = ['dog', 'cat', 'man', 'dog', 'cat', 'man', 'man', 'cat']
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/MinMaxScaler.ts | src/preprocessing/MinMaxScaler.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/Normalizer.ts | src/preprocessing/Normalizer.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/OrdinalEncoder.ts | src/preprocessing/OrdinalEncoder.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/StandardScaler.test.ts | src/preprocessing/StandardScaler.test.ts | import { StandardScaler, setBackend } from '../index'
import * as dfd from 'danfojs-node'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('StandardScaler', function () {
it('StandardScaler works for DataFrame', function () {
const data = [
[0, 0],
[0, 0],
[1, 1],
[1, 1]
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/MinMaxScaler.test.ts | src/preprocessing/MinMaxScaler.test.ts | import { MinMaxScaler, setBackend, fromJSON } from '../index'
import * as dfd from 'danfojs-node'
import { isDataFrameInterface, isSeriesInterface } from '../typesUtils'
import { ScikitVecOrMatrix } from '../types'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
export function convertTensorToInputType(
tensor... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/OneHotEncoder.ts | src/preprocessing/OneHotEncoder.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/MaxAbsScaler.test.ts | src/preprocessing/MaxAbsScaler.test.ts | import { MaxAbsScaler, setBackend, fromJSON } from '../index'
import * as dfd from 'danfojs-node'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
import { arrayEqual } from '../utils'
describe('MaxAbsScaler', function () {
it('Standardize values in a DataFrame using a MaxAbsScaler', function () {
const sca... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/preprocessing/RobustScaler.test.ts | src/preprocessing/RobustScaler.test.ts | import { RobustScaler, setBackend } from '../index'
import * as dfd from 'danfojs-node'
import { arrayEqual } from '../utils'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('RobustScaler', function () {
it('Standardize values in a DataFrame using a RobustScaler', function () {
const X = [
[... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/datasets/datasets.ts | src/datasets/datasets.ts | export const dataUrls = {
loadBoston: 'http://scikitjs.org/data/boston.csv',
loadIris: 'http://scikitjs.org/data/iris.csv',
loadWine: 'http://scikitjs.org/data/wine.csv',
loadDiabetes: 'http://scikitjs.org/data/diabetes.csv',
loadBreastCancer: 'http://scikitjs.org/data/breast_cancer.csv',
loadDigits: 'http:... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/datasets/makeRegression.test.ts | src/datasets/makeRegression.test.ts | import { makeLowRankMatrix, makeRegression, setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('makeRegression tests', () => {
it('returns the right size', () => {
let [X, y, model] = makeRegression({
nSamples: 10,
nFeatures: 20,
nTargets: 5,
coef:... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/datasets/makeRegression.ts | src/datasets/makeRegression.ts | import { Tensor1D, Tensor2D } from '../types'
import { getBackend } from '../tf-singleton'
interface MakeRegressionInput {
nSamples?: number
nFeatures?: number
nInformative?: number
nTargets?: number
bias?: number
effectiveRank?: number | null
tailStrength?: number
noise?: number
shuffle?: boolean
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/metrics/metrics.ts | src/metrics/metrics.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/metrics/metrics.test.ts | src/metrics/metrics.test.ts | import * as metrics from './metrics'
import { setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('Metrics', function () {
it('accuracyScore', function () {
const labels = [1, 2, 3, 1]
const predictions = [1, 2, 4, 4]
expect(metrics.accuracyScore(labels, prediction... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/dummy/DummyRegressor.ts | src/dummy/DummyRegressor.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/dummy/DummyClassifier.test.ts | src/dummy/DummyClassifier.test.ts | import { DummyClassifier, setBackend, fromJSON } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('DummyClassifier', function () {
it('Use DummyClassifier on simple example (mostFrequent)', function () {
const clf = new DummyClassifier()
const X = [
[-1, 5],
[-0.5, ... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/dummy/DummyClassifier.ts | src/dummy/DummyClassifier.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/dummy/DummyRegressor.test.ts | src/dummy/DummyRegressor.test.ts | import { DummyRegressor, setBackend, fromJSON } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('DummyRegressor', function () {
it('Use DummyRegressor on simple example (mean)', function () {
const reg = new DummyRegressor()
const X = [
[-1, 5],
[-0.5, 5],
[0... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/ElasticNet.ts | src/linear_model/ElasticNet.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/LassoRegression.ts | src/linear_model/LassoRegression.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/SgdClassifier.ts | src/linear_model/SgdClassifier.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/LogisticRegression.test.ts | src/linear_model/LogisticRegression.test.ts | import { LogisticRegression, setBackend, fromJSON } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('LogisticRegression', function () {
it('Works on arrays (small example)', async function () {
const lr = new LogisticRegression()
await lr.fit([[1], [2]], [0, 1])
expect(lr.... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/LinearRegression.test.ts | src/linear_model/LinearRegression.test.ts | import { LinearRegression, setBackend, fromJSON, fromObject } from '../index'
import { tensorEqual } from '../utils'
// Needs to be tfjs and not tfjs-node because the node
// version messes with jest unit tests
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
function roughlyEqual(a: number, b: number, tol = 0.1)... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/LinearRegression.ts | src/linear_model/LinearRegression.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/LogisticRegression.ts | src/linear_model/LogisticRegression.ts | // /**
// * @license
// * Copyright 2021, JsData. All rights reserved.
// *
// * This source code is licensed under the MIT license found in the
// * LICENSE file in the root directory of this source tree.
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is d... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/SgdRegressor.ts | src/linear_model/SgdRegressor.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/linear_model/RidgeRegression.ts | src/linear_model/RidgeRegression.ts | /**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS"... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/compose/ColumnTransformer.test.ts | src/compose/ColumnTransformer.test.ts | import {
ColumnTransformer,
MinMaxScaler,
SimpleImputer,
setBackend,
fromJSON
} from '../index'
import * as dfd from 'danfojs-node'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('ColumnTransformer', function () {
it('ColumnTransformer simple test', function () {
const X = [
[2, 2... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/compose/ColumnTransformer.ts | src/compose/ColumnTransformer.ts | import { DataFrameInterface, Scikit1D, Transformer, Tensor2D } from '../types'
import { isDataFrameInterface } from '../typesUtils'
import { getBackend } from '../tf-singleton'
import { Serialize } from '../simpleSerializer'
/*
Next steps:
1. Support 'passthrough' and 'drop' and estimator for remainder (also in transfo... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/cluster/KMeans.test.ts | src/cluster/KMeans.test.ts | import * as tf from '@tensorflow/tfjs'
import { KMeans, setBackend, fromJSON } from '../index'
setBackend(tf)
// Next steps: Improve on kmeans cluster testing
describe('KMeans', () => {
const X = [
[1, 2],
[1, 4],
[1, 0],
[4, 2],
[4, 4],
[4, 0]
]
it('should fit vector1 + k=2 should return... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/cluster/KMeans.ts | src/cluster/KMeans.ts | import { Scikit2D, Tensor1D, Tensor2D } from '../types'
import { convertToNumericTensor2D, sampleWithoutReplacement } from '../utils'
import { getBackend } from '../tf-singleton'
import { Serialize } from '../simpleSerializer'
/*
Next steps
1. Implement correct tol, maxIter logic
2. Implement correct nIter logic
3. Ma... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/SVC.test.ts | src/svm/SVC.test.ts | // import { SVC } from './SVC'
// describe('SVC', function () {
// it('Works on arrays (small example)', async function () {
// const lr = new SVC()
// await lr.fit(
// [
// [1, 2],
// [2, -1]
// ],
// [-1, 1]
// )
// const predict = (
// await lr.predict([
// ... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/SVR.test.ts | src/svm/SVR.test.ts | // import { SVR } from './SVR'
// describe('SVR', function () {
// it('Works on arrays (small example)', async function () {
// const lr = new SVR()
// await lr.fit(
// [
// [1, 1, 1],
// [-2, -2, -2]
// ],
// [-1, 1]
// )
// const predict = (
// await lr.predi... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/SVC.ts | src/svm/SVC.ts | // import { getBackend } from '../tf-singleton'
// import { Scikit1D, Scikit2D } from '../index'
// import { SVM, SVMParam, KERNEL_TYPE, ISVMParam, SVM_TYPE } from 'libsvm-wasm'
// import { convertToNumericTensor1D, convertToNumericTensor2D } from '../utils'
// import { assert } from '../typesUtils'
// export interfac... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/LinearSVC.ts | src/svm/LinearSVC.ts | // /**
// * @license
// * Copyright 2021, JsData. All rights reserved.
// *
// * This source code is licensed under the MIT license found in the
// * LICENSE file in the root directory of this source tree.
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is d... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/SVR.ts | src/svm/SVR.ts | // import { getBackend } from '../tf-singleton'
// import { Scikit1D, Scikit2D } from '../index'
// import { SVM, SVMParam, KERNEL_TYPE, ISVMParam, SVM_TYPE } from 'libsvm-wasm'
// import { convertToNumericTensor1D, convertToNumericTensor2D } from '../utils'
// import { assert } from '../typesUtils'
// export interfac... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/LinearSVR.test.ts | src/svm/LinearSVR.test.ts | import { LinearSVR, setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
import { tensorEqual } from '../utils'
describe('LinearSVR', function () {
it('Works on arrays (small example)', async function () {
const lr = new LinearSVR({ epsilon: 0, fitIntercept: false, C: 0.0001 })
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/LinearSVR.ts | src/svm/LinearSVR.ts | // /**
// * @license
// * Copyright 2021, JsData. All rights reserved.
// *
// * This source code is licensed under the MIT license found in the
// * LICENSE file in the root directory of this source tree.
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is d... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/svm/LinearSVC.test.ts | src/svm/LinearSVC.test.ts | import { LinearSVC, setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('LinearSVC', function () {
it('Works on arrays (small example)', async function () {
const lr = new LinearSVC()
await lr.fit([[1], [2]], [0, 1])
expect(lr.predict([[1], [2]]).arraySync()).toEq... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/Splitter.test.ts | src/tree/Splitter.test.ts | import { ImpurityMeasure } from './Criterion'
import { Splitter } from './Splitter'
import { fromJSON } from '../simpleSerializer'
import { setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('Splitter', function () {
let types = ['gini', 'entropy', 'squared_error']
it('Use ... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/utils.ts | src/tree/utils.ts | import { TypedArray } from '../types'
export function validateX(X: number[][] | TypedArray[]) {
if (X.length === 0) {
throw new Error(
`X can not be empty, but it has a length of 0. It is ${X}.`
)
}
for (let i = 0; i < X.length; i++) {
let curRow = X[i]
if (curRow.length === 0) {
thro... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/Criterion.ts | src/tree/Criterion.ts | import { int } from '../randUtils'
import { Serialize } from '../simpleSerializer'
export type ImpurityMeasure = 'gini' | 'entropy' | 'squared_error'
export function giniCoefficient(labelFreqs: int[], nSamples: int) {
let freqSquares = 0
for (let i = 0; i < labelFreqs.length; i++) {
freqSquares += labelFreqs[... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/DecisionTree.ts | src/tree/DecisionTree.ts | import { ImpurityMeasure } from './Criterion'
import { Splitter } from './Splitter'
import { int } from '../randUtils'
import { r2Score, accuracyScore } from '../metrics/metrics'
import { Split, makeDefaultSplit } from './Splitter'
import { assert, isScikit1D, isScikit2D } from '../typesUtils'
import { validateX, valid... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/DecisionTree.test.ts | src/tree/DecisionTree.test.ts | import {
DecisionTreeClassifier,
DecisionTreeRegressor,
setBackend,
fromJSON
} from '../index'
import { dataUrls } from '../datasets/datasets'
import * as dfd from 'danfojs-node'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('DecisionTree', function () {
it('Use the DecisionTree (toy)', asyn... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/Criterion.test.ts | src/tree/Criterion.test.ts | import { ClassificationCriterion, giniCoefficient, entropy } from './Criterion'
import { fromJSON } from '../simpleSerializer'
import { setBackend } from '../index'
import * as tf from '@tensorflow/tfjs'
setBackend(tf)
describe('Criterion', function () {
let X = [
[-2, -1],
[-1, -1],
[-1, -2],
[1, 1],... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/tree/Splitter.ts | src/tree/Splitter.ts | import {
ClassificationCriterion,
RegressionCriterion,
ImpurityMeasure
} from './Criterion'
import shuffle from 'lodash/shuffle'
import { int } from '../randUtils'
import { Serialize } from '../simpleSerializer'
export interface Split {
feature: int
threshold: int
pos: int
impurityLeft: number
impurity... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/pipeline/Pipeline.ts | src/pipeline/Pipeline.ts | /* eslint-disable @typescript-eslint/no-explicit-any */
import { assert } from '../typesUtils'
import { Scikit1D, Scikit2D, Tensor2D } from '../types'
import { Serialize } from '../simpleSerializer'
/*
Next steps:
0. Implement nFeaturesIn, and featureNamesIn
1. Implement attribute classes
2. Pass next 5 scikit-learn t... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/src/pipeline/Pipeline.test.ts | src/pipeline/Pipeline.test.ts | import {
Pipeline,
makePipeline,
LinearRegression,
SimpleImputer,
MinMaxScaler,
setBackend,
fromJSON
} from '../index'
import * as tf from '@tensorflow/tfjs'
import { tensorEqual } from '../utils'
setBackend(tf)
describe('Pipeline', function () {
it('Use a Pipeline (min-max scaler, and linear regressio... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/docs/src/pages/index.tsx | docs/src/pages/index.tsx | import React from 'react'
import clsx from 'clsx'
import Layout from '@theme/Layout'
import Link from '@docusaurus/Link'
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'
import styles from './index.module.css'
import HomepageFeatures from '../components/HomepageFeatures'
function HomepageHeader() {
... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
javascriptdata/scikit.js | https://github.com/javascriptdata/scikit.js/blob/f388a67c0127a047b70971b790cfd29e7aa3f709/docs/src/components/HomepageFeatures.tsx | docs/src/components/HomepageFeatures.tsx | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react'
import clsx from 'clsx'
import styles from './HomepageFeatures.module.css'
type FeatureItem = {
title:... | typescript | MIT | f388a67c0127a047b70971b790cfd29e7aa3f709 | 2026-01-05T04:59:44.189609Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/windi.config.ts | frontend/windi.config.ts | import { defineConfig } from 'vite-plugin-windicss';
import { primaryColor } from './build/config/themeConfig';
export default defineConfig({
darkMode: 'class',
plugins: [createEnterPlugin()],
theme: {
extend: {
zIndex: {
'-1': '-1',
},
colors: {
primary: primaryColor,
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/vite.config.ts | frontend/vite.config.ts | import type { UserConfig, ConfigEnv } from 'vite';
import pkg from './package.json';
import dayjs from 'dayjs';
import { loadEnv } from 'vite';
import { resolve } from 'path';
import { generateModifyVars } from './build/generate/generateModifyVars';
import { createProxy } from './build/vite/proxy';
import { wrapperEnv ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/main.ts | frontend/src/main.ts | //Windi CSS 是下一代工具优先的 CSS 框架
import 'virtual:windi-base.css';
import 'virtual:windi-components.css';
//utilities 引入这个css库,默认有媒体查询@media样式,需要注释
// import 'virtual:windi-utilities.css';
//vben admin 添加的样式,我们不需要,所以注释掉。
import '/@/design/index.less';
import '/@/design/keeper.less'
// Register icon sprite
import 'virtual:s... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/modals/typing.ts | frontend/src/second/modals/typing.ts | export interface ContextMenuItem {
divider?: boolean;
text?: string
label: string;
keyText?: string
onClick?: Fn;
submenu?: ContextMenuItem[]
}
export interface CreateContextOptions {
event: MouseEvent;
icon?: string;
styles?: any;
items?: ContextMenuItem[] | Fn;
}
export interface ContextMenuProp... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/modals/DropDownMenu_.ts | frontend/src/second/modals/DropDownMenu_.ts | function getElementOffset(element, side = null) {
const de = document.documentElement;
const box = element.getBoundingClientRect();
const top = box.top + window.pageYOffset - de.clientTop;
const left = box.left + window.pageXOffset - de.clientLeft;
if (side == 'right') return {top: top, left: left + box.width... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/modals/createContextMenu.ts | frontend/src/second/modals/createContextMenu.ts | import contextMenuVue from '/@/second/modals/ContextMenu.vue'
import { isClient } from '/@/utils/is';
import { CreateContextOptions, ContextMenuProps } from './typing';
import { createVNode, render } from 'vue';
import invalidateCommands from '/@/second/commands/invalidateCommands'
const menuManager: {
domList: Eleme... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/parseFilter.ts | frontend/src/second/keeper-filterparser/parseFilter.ts | import P from 'parsimmon';
import { FilterType } from './types';
import {Condition} from '/@/second/keeper-sqltree'
import { interpretEscapes, token, word, whitespace } from './common';
import { mongoParser } from './mongoParser';
import { datetimeParser } from './datetimeParser';
const binaryCondition = operator => v... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/common.ts | frontend/src/second/keeper-filterparser/common.ts | import P from 'parsimmon';
export const whitespace = P.regexp(/\s*/m);
export function token(parser) {
return parser.skip(whitespace);
}
export function word(str) {
return P.string(str).thru(token);
}
export function interpretEscapes(str) {
let escapes = {
b: '\b',
f: '\f',
n: '\n',
r: '\r',
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/filterTool.ts | frontend/src/second/keeper-filterparser/filterTool.ts | import dayjs from 'dayjs'
import {isTypeDateTime} from '/@/second/keeper-tools'
export type FilterMultipleValuesMode = 'is' | 'is_not' | 'contains' | 'begins' | 'ends';
export function getFilterValueExpression(value, dataType?) {
if (value == null) return 'NULL'
if (isTypeDateTime(dataType)) return dayjs(value).f... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/mongoParser.ts | frontend/src/second/keeper-filterparser/mongoParser.ts | import P from 'parsimmon';
import { interpretEscapes, token, word, whitespace } from './common';
const operatorCondition = operator => value => ({
__placeholder__: {
[operator]: value,
},
});
const regexCondition = regexString => value => ({
__placeholder__: {
$regex: regexString.replace('#VALUE#', valu... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/getFilterType.ts | frontend/src/second/keeper-filterparser/getFilterType.ts | import { isTypeNumber, isTypeString, isTypeLogical, isTypeDateTime } from '/@/second/keeper-tools';
import { FilterType } from './types';
export function getFilterType(dataType: string): FilterType {
if (!dataType) return 'string';
if (isTypeNumber(dataType)) return 'number';
if (isTypeString(dataType)) return '... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/types.ts | frontend/src/second/keeper-filterparser/types.ts | // import types from 'dbgate-types';
export type FilterType = 'number' | 'string' | 'datetime' | 'logical' | 'eval' | 'mongo';
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/index.ts | frontend/src/second/keeper-filterparser/index.ts | export * from './common';
export * from './datetimeParser';
export * from './filterTool';
export * from './getFilterType';
export * from './mongoParser';
export * from './parseFilter';
export * from './types';
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-filterparser/datetimeParser.ts | frontend/src/second/keeper-filterparser/datetimeParser.ts | import P from 'parsimmon';
import dayjs from 'dayjs';
import {TransformType} from '/@/second/keeper-types';
import {token, whitespace, word} from './common';
const compoudCondition = conditionType => conditions => {
if (conditions.length == 1) return conditions[0];
return {
[conditionType]: conditions,
};
};... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/FormViewDisplay.ts | frontend/src/second/keeper-datalib/FormViewDisplay.ts | import {omit, pick} from 'lodash-es'
import {createGridCache, GridCache, GridConfig} from './GridConfig'
import {ChangeCacheFunc, ChangeConfigFunc, DisplayColumn} from './GridDisplay'
import {DatabaseInfo, EngineDriver, SqlDialect, TableInfo} from '/@/second/keeper-types'
import {getFilterValueExpression} from '/@/seco... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/runMacro.ts | frontend/src/second/keeper-datalib/runMacro.ts | import {MacroDefinition, MacroSelectedCell} from './MacroDefinition'
import {ChangeSet, setChangeSetValue} from './ChangeSet';
import {GridDisplay} from './GridDisplay';
const getMacroFunction = {
transformValue: code => `
(value, args, modules, rowIndex, row, columnName) => {
${code}
}
`,
transformRows: code ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/TableFormViewDisplay.ts | frontend/src/second/keeper-datalib/TableFormViewDisplay.ts | import {FormViewDisplay} from './FormViewDisplay'
import {GridCache, GridConfig} from './GridConfig'
import {ChangeCacheFunc, ChangeConfigFunc, DisplayColumn} from './GridDisplay'
import {DictionaryDescriptionFunc, TableGridDisplay} from './TableGridDisplay'
import {Condition, mergeConditions, OrderByExpression} from '... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/GridConfig.ts | frontend/src/second/keeper-datalib/GridConfig.ts | export interface GridConfigColumns {
hiddenColumns: string[];
expandedColumns: string[];
addedColumns: string[];
}
export interface GridReferenceDefinition {
schemaName: string;
pureName: string;
columns: {
baseName: string;
refName: string;
}[];
}
export type GroupFunc = 'GROUP' | 'MAX' | 'MIN'... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/CollectionGridDisplay.ts | frontend/src/second/keeper-datalib/CollectionGridDisplay.ts | import {compact, findLastIndex, isArray, isNumber, isPlainObject} from 'lodash-es'
import {ChangeCacheFunc, ChangeConfigFunc, GridDisplay} from './GridDisplay'
import type {CollectionInfo, EngineDriver} from '/@/second/keeper-types'
import {GridCache, GridConfig} from './GridConfig'
function getObjectKeys(obj) {
if... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/ChangeSet.ts | frontend/src/second/keeper-datalib/ChangeSet.ts | import {isEqual, maxBy} from 'lodash-es'
import {NamedObjectInfo} from '/@/second/keeper-types'
export interface ChangeSetItem {
pureName: string;
schemaName?: string;
insertedRowIndex?: number;
document?: any;
condition?: { [column: string]: string };
fields?: { [column: string]: string };
}
export inter... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/GridDisplay.ts | frontend/src/second/keeper-datalib/GridDisplay.ts | import {
cloneDeepWith,
compact,
findIndex,
isEmpty,
keyBy,
keys,
omit,
omitBy,
pick,
pickBy,
values
} from 'lodash-es'
import {
CollectionInfo,
ColumnInfo,
DatabaseInfo,
EngineDriver,
ForeignKeyInfo,
NamedObjectInfo,
SqlDialect,
TableInfo,
ViewInfo
} from '/@/second/keeper-types... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/TableGridDisplay.ts | frontend/src/second/keeper-datalib/TableGridDisplay.ts | import {
ChangeCacheFunc,
ChangeConfigFunc,
DisplayColumn,
DisplayedColumnInfo,
GridDisplay
} from './GridDisplay'
import {
ColumnInfo,
DatabaseInfo,
EngineDriver,
ForeignKeyInfo,
NamedObjectInfo,
TableInfo
} from '/@/second/keeper-types'
import {GridCache, GridConfig} from './GridConfig'
import ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/MacroDefinition.ts | frontend/src/second/keeper-datalib/MacroDefinition.ts | export interface MacroArgument {
type: 'text' | 'select';
label: string;
name: string;
}
export interface MacroDefinition {
title: string;
name: string;
group: string;
description?: string;
type: 'transformValue';
code: string;
args?: MacroArgument[];
}
export interface MacroSelectedCell {
colum... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-datalib/index.ts | frontend/src/second/keeper-datalib/index.ts | export * from './GridConfig';
export * from './GridDisplay';
export * from './ChangeSet';
export * from './MacroDefinition';
export * from './TableGridDisplay';
export * from './FormViewDisplay';
export * from './TableFormViewDisplay';
export * from './runMacro';
export * from './CollectionGridDisplay'
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/query/queryParserWorkerFallback.ts | frontend/src/second/query/queryParserWorkerFallback.ts | import {splitQuery} from '/@/second/keeper-splitter'
export default function c(data) {
return splitQuery(data.text, data.options);
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/query/AceEditor.tsx | frontend/src/second/query/AceEditor.tsx | import {defineComponent, onMounted, onBeforeUnmount, PropType, ref, toRefs} from 'vue'
import {useBootstrapStore} from "/@/store/modules/bootstrap";
import queryParserWorkerFallback from './queryParserWorkerFallback'
import * as ace from 'ace-builds/src-noconflict/ace'
import 'ace-builds/src-noconflict/mode-sql';
impor... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/icons/expandIcons.ts | frontend/src/second/icons/expandIcons.ts | export function plusExpandIcon(isExpanded): string {
return isExpanded ? 'icon minus-box' : 'icon plus-box';
}
export function chevronExpandIcon(isExpanded): string {
return isExpanded ? 'icon chevron-down' : 'icon chevron-right';
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/splitQuery.ts | frontend/src/second/keeper-splitter/splitQuery.ts | import { SplitterOptions, defaultSplitterOptions } from './options';
const SEMICOLON = ';';
export interface SplitStreamContext {
options: SplitterOptions;
currentDelimiter: string;
pushOutput: (item: SplitResultItem) => void;
commandPart: string;
line: number;
column: number;
streamPosition: number;
... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/splitterStream.test.ts | frontend/src/second/keeper-splitter/splitterStream.test.ts | import { mysqlSplitterOptions, mssqlSplitterOptions, postgreSplitterOptions, noSplitSplitterOptions } from './options';
import stream from 'stream';
import { splitQueryStream } from './splitQueryStream';
import fs, { fchownSync } from 'fs';
function createInputStream(...lines) {
const pass = new stream.PassThrough({... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/options.ts | frontend/src/second/keeper-splitter/options.ts | export interface SplitterOptions {
stringsBegins: string[];
stringsEnds: { [begin: string]: string };
stringEscapes: { [begin: string]: string };
allowSemicolon: boolean;
allowCustomDelimiter: boolean;
allowGoDelimiter: boolean;
allowDollarDollarString: boolean;
noSplit: boolean;
doubleDashComments: ... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/splitter.test.ts | frontend/src/second/keeper-splitter/splitter.test.ts | import {
mysqlSplitterOptions,
mssqlSplitterOptions,
postgreSplitterOptions,
mongoSplitterOptions,
noSplitSplitterOptions,
redisSplitterOptions,
} from './options';
import { splitQuery } from './splitQuery';
test('simple query', () => {
const output = splitQuery('select * from A');
expect(output).toEqu... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/splitQueryStream.ts | frontend/src/second/keeper-splitter/splitQueryStream.ts | import stream from 'stream';
import {
SplitStreamContext,
getInitialDelimiter,
SplitLineContext,
splitQueryLine,
finishSplitStream,
} from './splitQuery';
import { SplitterOptions } from './options';
export class SplitQueryStream extends stream.Transform {
context: SplitStreamContext;
lineBuffer: string;... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-splitter/index.ts | frontend/src/second/keeper-splitter/index.ts | export {splitQuery} from './splitQuery'
export * from './options';
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/buttons/ToolStripCommandButton.tsx | frontend/src/second/buttons/ToolStripCommandButton.tsx | import {defineComponent} from 'vue'
export default defineComponent({
name: 'ToolStripCommandButton',
setup() {
}
})
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/buttons/CloseSearchButton.tsx | frontend/src/second/buttons/CloseSearchButton.tsx | import {defineComponent, PropType, toRefs} from 'vue'
import InlineButton from '/@/second/buttons/InlineButton.vue'
import FontIcon from '/@/second/icons/FontIcon.vue'
export default defineComponent({
name: 'CloseSearchButton',
components: {
InlineButton,
FontIcon
},
props: {
filter: {
type: S... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/buttons/DropDownButton.tsx | frontend/src/second/buttons/DropDownButton.tsx | import {defineComponent, PropType, ref, toRefs, unref} from 'vue'
import InlineButton from '/@/second/buttons/InlineButton.vue'
import FontIcon from '/@/second/icons/FontIcon.vue'
import {ContextMenuItem} from '/@/components/ContextMenu'
import {useContextMenu} from '/@/hooks/web/useContextMenu'
export default defineCo... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-types/extensions.d.ts | frontend/src/second/keeper-types/extensions.d.ts | import { EngineDriver } from './engines'
export interface ExtensionsDirectory {
drivers: EngineDriver[]
}
| typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-types/dumper.d.ts | frontend/src/second/keeper-types/dumper.d.ts | export type TransformType = 'GROUP:YEAR' | 'GROUP:MONTH' | 'GROUP:DAY' | 'YEAR' | 'MONTH' | 'DAY'; // | 'GROUP:HOUR' | 'GROUP:MINUTE';
export interface SqlDumper extends AlterProcessor {
s: string;
dialect: SqlDialect;
putRaw(s: string);
put(format: string, ...args);
putCmd(format: string, ...args);
putVa... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
tiyongliu/keeper | https://github.com/tiyongliu/keeper/blob/9bb57af82c4529e41031ea41f656e9977e0a6617/frontend/src/second/keeper-types/index.d.ts | frontend/src/second/keeper-types/index.d.ts | import { DatabaseInfo } from './dbinfo';
export interface OpenedDatabaseConnection {
conid: string;
database: string;
structure: DatabaseInfo;
analysedTime?: number;
serverVersion?: any;
disconnected?: boolean;
status?: {
name: string;
message?: string;
counter: numbe... | typescript | MIT | 9bb57af82c4529e41031ea41f656e9977e0a6617 | 2026-01-05T04:59:45.217156Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.