sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
6e49e919049ae113ff6cef9bbedb610b992758ce82c39c395abf7e6c93a1e263 | TypeScript | 78 | 4 | interface CrowdMoviesOptions {
playback_rate: number;
loop: boolean;
} |
e8514df98c4532ddfd1aff01ff8383d528bc98102e10e304874bb6cdd140878d | TypeScript | 79 | 6 |
export interface WindowsState {
basename: string;
items: string[];
}
|
76cf39c8dc778703dd63424a594346cd9aeaf1c6e71cab95a4612823073f6925 | TypeScript | 85 | 4 | export enum Orientation {
Horizontal = "horizontal",
Vertical = "vertical",
} |
dd86daf05df0a09419ffa1382b68baaa739e843f9f16eac8508e884734339773 | TypeScript | 106 | 6 | declare module 'vue-resize';
declare module '*.json' {
const value: any;
export default value;
}
|
25bae821e7450fc9b232046c1fcfb61c4477e2d9d575df39a6172ac8e4f6c5e1 | TypeScript | 128 | 4 |
export { default as LinePlotCanvas } from './LinePlotCanvas.vue';
export { default as LinePlotSVG } from './LinePlotSVG.vue';
|
282f9e8baf2fac58646ba57e532e1ede388ad65b5c81a67ee99c75d0b0fd070b | TypeScript | 133 | 6 | export interface ModuleClipsSettings {
stream: string;
loop: boolean;
playback_rate: number;
only_subclip: boolean;
} |
41f8d56ee91929aa55145bbd647ca337211397f2547733ba21ea909bc2e4eaa8 | TypeScript | 137 | 4 |
export function clamp(value: number, min = Number.MIN_VALUE, max = Number.MAX_VALUE) {
return Math.min(Math.max(value, min), max);
} |
f9cb4d570f38e5d6fc8609e43f0e60c28ea79a39fb7d2b96cd6e89a3a7f27ef9 | TypeScript | 147 | 6 | import { Operation } from "@render/api/DataLoader.types";
export interface DataQuerySettings {
dataset: string,
operations: Operation[],
} |
416633ae003c2aed3a9ab5c82acad8bc30fd4ab5a11dc3c369cb88267d6e2b19 | TypeScript | 171 | 8 | import { App } from 'vue';
import { v4 as uuidv4 } from 'uuid';
export default {
install(app: App) {
app.config.globalProperties.$uniqueId = () => uuidv4();
}
};
|
e55f90586c562270d523409106d473dbfea3e12598932f7ff1236a04aaaf431c | TypeScript | 179 | 12 |
export interface HistoryState {
items: HistoryItem[];
}
export interface HistoryItem {
time: Date;
message: string;
variant: string;
details: string|null;
} |
2a1a296a879feafd81233257c688921dda3cc631fe8725de6567c3a822815e56 | TypeScript | 180 | 9 | import { mount } from "svelte";
import "./app.css";
import App from "./App.svelte";
const app = mount(App, {
target: document.getElementById("app")!,
});
export default app;
|
70f01e63e29c26bf238b732c41980b9a6caf221c80c5296b17c350884eac4346 | TypeScript | 193 | 7 | import {useAboutWindowStore} from '@store/aboutwin.store';
export default function showAboutWindow() {
const aboutWindowStore = useAboutWindowStore();
aboutWindowStore.show = true;
}
|
794f791283f9904430070407ff3b7c5a1086aa1de8483e663996ee299e4c6afd | TypeScript | 200 | 10 | export interface PositionPlotSettings {
mode: PositionPlotMode;
resolution: number;
colormap: string;
}
export enum PositionPlotMode {
Overall = "Overall",
Grouped = "Grouped",
}
|
504f49a61d8384780373198dcbbc6c34b07fb44a38e9c34edb0dfaf209ae8485 | TypeScript | 201 | 5 |
export { default as ClusteredHeatmapSVG } from './ClusteredHeatmapSVG.vue';
export { default as ClusteredHeatmapCanvas } from './ClusteredHeatmapCanvas.vue';
export * from './ClusteredHeatmap.types'; |
e394092b6c89c93a985863378a0eed996bb443872b1c272f641cdb2afe0df694 | TypeScript | 219 | 8 | import {default as HexBinPlotSVG} from "./HexBinPlotSVG.vue";
import {default as HexBinPlotCanvas} from "./HexBinPlotCanvas.vue";
export * from './HexBinPlot.types';
export {
HexBinPlotSVG,
HexBinPlotCanvas,
}; |
51f739e6a6c60fd42609406fb38116e0ba0d7527eea53b7670fd5c76ce13c0ca | TypeScript | 231 | 6 |
export { default as BoxPlotCanvas } from './BoxPlotCanvas.vue';
export { default as BoxPlotSVG } from './BoxPlotSVG.vue';
export { WhiskerType } from './BoxPlot.types'
export type { GroupStats, DataPoint } from './BoxPlot.types'
|
e3409467d3c5d37c96a642f47d9f9b2948019f978202f9da90157184d6b60c25 | TypeScript | 244 | 4 | export { default as BoxPlotCanvas } from "./BoxPlotCanvas.vue";
export { default as BoxPlotSVG } from "./BoxPlotSVG.vue";
export { WhiskerType, OrderingType } from "./BoxPlot.types";
export type { GroupStats, DataPoint } from "./BoxPlot.types"; |
632cfa156c6fa0837ad524122984518018d83469ca2ddb5d3b4d27e4b4bd6082 | TypeScript | 254 | 9 | import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [svelte(), tailwindcss()],
base: "",
});
|
45fa6c8028286b4cceede647b9a4f0c0bcf704b9a8357876e9d71feb4dfec574 | TypeScript | 256 | 15 | import Vue from 'vue';
import Router from 'vue-router';
import HomePage from '@/views/HomePage.vue';
Vue.use(Router);
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: HomePage,
},
],
});
|
684cdcf47ec1db9cd81d0ea3c9a15a5e39de89f12752f1f3f31e8d35913c808e | TypeScript | 278 | 5 | import { ColormapSettings, ColumnOrderingSettings, RowOrderingSettings } from "@render/components/Charts/ClusteredHeatmap";
export interface BehavioralDistanceHeatmapSettings extends ColormapSettings, ColumnOrderingSettings, RowOrderingSettings {
distance_metric: string;
} |
7b2f7fd0e9cab5f0f98949c9a6ea813c18bff313ce302d6479c05abbf7dc2f0b | TypeScript | 285 | 16 | export interface Spinogram {
data: SpinogramTimepoint[];
}
export interface SpinogramTimepoint {
x: number[];
y: number[];
xy: [number, number][];
a: number;
t: number;
}
export interface SpinogramSettings {
line_color: string;
line_weight: number;
}
|
096241299dcb20b43d8f661b49391dd4a506810bbf62e3e1de44f0599e8a913e | TypeScript | 296 | 6 | import { ColormapSettings, ColumnOrderingSettings, RowOrderingSettings } from "@render/components/Charts/ClusteredHeatmap";
export interface UsageHeatmapSettings extends ColormapSettings, ColumnOrderingSettings, RowOrderingSettings {
color_columns: boolean;
color_columns_data: string;
} |
fd1e1a1ef21de08874ca10c2fa501ebae299a1f230fbb4f5146e2986a378a9f5 | TypeScript | 313 | 12 | import store from '@/store/root.store';
import { ComponentRegistration } from '@/store/root.types';
export function AvailableComponents() {
return [...store.state.registry];
}
export function CreateComponent(component: ComponentRegistration) {
store.dispatch('datawindows/createWindow', component);
}
|
2fd84578dea4bddd669127d830ea5820687e5db10970b4a313088da8278771bf | TypeScript | 314 | 10 | export function getModuleNamespace(store: any, state) {
const moduleNamespace = Object.keys(store._modulesNamespaceMap).find(
(path) => store._modulesNamespaceMap[path].context.state === state
);
if (typeof moduleNamespace === "string") {
return moduleNamespace.slice(0, -1);
}
}
|
990e59807d15fa75bf067e196a645abf83c7a86e9bcf4dc8b0f626080f1a1335 | TypeScript | 316 | 16 |
export interface DatasetsState {
isLoaded: boolean;
bundle: string; // path to the bundle
name: string; // basename of the bundle
manifest: object;
groups: string[];
label_map: LabelMapRecord[];
}
export interface LabelMapRecord {
raw: number;
usage: number;
frames: number;
}
|
05503c4b144a85c182f640cc98c413d6020f4411394d1cc69a69e83a163d60f8 | TypeScript | 363 | 12 | import { WhiskerType, OrderingType } from "@render/components/Charts/BoxPlot";
export interface DetailedUsageSettings {
show_points: boolean;
point_size: number;
show_boxplot: boolean,
show_violinplot: boolean,
violin_kde_scale: number,
boxplot_whiskers: WhiskerType;
group_order_type: Order... |
737acbd035c16c14897f79f81af0f33cb54425773e828f04f05ceda7663c394b | TypeScript | 395 | 16 | import { defineStore, acceptHMRUpdate } from 'pinia'
export interface AboutWindowState {
show: boolean; // Whether the about window is visible
}
export const useAboutWindowStore = defineStore('aboutWindow', {
state: (): AboutWindowState => ({
show: false,
}),
});
if (import.meta.hot) {
impor... |
d83234a62d7a166a97b3c228eb16c3bf24404e8b747ca3726edacd5cb80969f5 | TypeScript | 396 | 20 | import Vue from 'vue';
const LoadingMixin = Vue.extend({
beforeUpdate() {
this.emitStartLoading();
},
updated() {
this.emitFinishLoading();
},
methods: {
emitStartLoading() {
this.$emit('start-loading');
},
emitFinishLoading() {
this.... |
ec15c5ba7648193d07e7bdaef84c608ae3a96533b8db12c97ea399fa9d6ebed0 | TypeScript | 401 | 17 |
export function groupby<TItem>(
data: TItem[],
fn: (item: TItem) => string,
keys: any[] = []
): { [key: string]: TItem[] } {
return data.reduce(
(rv, item) => {
(rv[fn(item)] = rv[fn(item)] || []).push(item);
return rv;
},
keys.reduce((rv, item) => {
... |
64802d4e3b1c4c9fbbebb64b208627ee5fd67366acd8d609707be0e78a36c431 | TypeScript | 445 | 7 | export { default as BaseWindow } from './BaseWindow.vue';
export { default as Window } from './Window.vue';
export { default as WindowContainer } from './WindowContainer.vue';
export { default as WindowMixin } from './WindowMixin';
export { default as WindowTitlebarButton } from './Titlebar/TitlebarButton.vue';
export ... |
25350c0e315942b19a6dc261b9d252df58d3032546308ed7c15b3726e4e00282 | TypeScript | 450 | 10 | import { MenuComponentRegistration } from "@main/shared/menuAPI";
import { componentRegistry } from "@render/store/component_registry.store";
import { useWindowsStore } from "@render/store/windows.store";
export default function CreateComponent(component: MenuComponentRegistration) {
const spec = componentRegistr... |
291a1fbed541599196cdeb491838df4f8105f1ebaa84f0aefb6eaa8a6c57b3dd | TypeScript | 454 | 10 | // Type definitions for parse-numeric-range 0.0
// Project: https://github.com/euank/node-parse-numeric-range
// Definitions by: Eoin O'Brien <https://github.com/eoin-obrien>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Parses expressions like `1-10,20-30`. Returns an energetic (as opposed... |
3e524a5872a5febf5aca76c075bbb2b4dbea7009494bf274ab57b27cf202b5c2 | TypeScript | 461 | 19 | import { NodeAlignment } from '@render/components/Charts/Sankey/Sankey.types';
export interface SyllableFlowSettings {
plot_group: string;
show_relative_diff: boolean;
relative_diff_group: string;
prune_threshold: number;
colorscale: string;
node_padding: number;
node_width: number;
nod... |
769b42f1da643c5ab78ad38cbe73c8c7cdc2bc8068da1f1647b6ef5c4a529d29 | TypeScript | 461 | 10 |
export { default as MapOperation } from './MapOperation.vue';
export { default as SortOperation } from './SortOperation.vue';
export { default as PluckOperation } from './PluckOperation.vue';
export { default as FilterOperation } from './FilterOperation.vue';
export { default as AggregateOperation } from './AggregateO... |
8132a96412f0c8876f737c7b49e9d57636eb35ddf7ad9b9bea8933a81e93a015 | TypeScript | 464 | 33 |
export interface Node {
type: string;
id: number;
name: string;
}
export interface Link {
type: string;
id: string;
color_id: number,
source: string;
target: string;
value: number;
real_value: number;
}
export enum NodeAlignment {
Left = 'Left',
Right = 'Right',
C... |
56b6cdcee94b8bce0dffc9c8da17907e841e05eb70651ff483cc3c06f7118b0c | TypeScript | 489 | 17 | import ClusteredHeatmapCanvas from './ClusteredHeatmapCanvas.vue';
import ClusteredHeatmapSVG from './ClusteredHeatmapSVG.vue';
export * from './ClusteredHeatmap.types';
export {ClusteredHeatmapCanvas, ClusteredHeatmapSVG}
export * from './Options/Options.types';
import Colormap from './Options/Colormap.vue';
import... |
ce2fd706fb8dfb5b6763747450ebc3b2a510b7b741b3c87d93a088a5e87b3b73 | TypeScript | 500 | 18 | export { };
import { IMenuAPI } from "@electron/shared/menuAPI";
declare global {
interface Window {
electronAPI: {
getNodeProcess: () => {
versions: NodeJS.ProcessVersions;
platform: string;
env: NodeJS.ProcessEnv;
};
sen... |
3c52d6221bdc158932dc32415f77e89cfda011dd1b79aee5cbb89c9e48cfc168 | TypeScript | 507 | 31 |
export enum WhiskerType {
TUKEY = 'tukey',
MIN_MAX = 'min_max',
}
export interface DataPoint {
id: string;
value: number;
group: string;
jitter: number;
}
export interface DataPointQueueNode extends DataPoint {
next: DataPointQueueNode | null;
}
export interface GroupStats {
group: ... |
4866d99ad7eb970e263e5d229b18c4681c773c863b4999ee153d0a5fd2040ab1 | TypeScript | 551 | 24 | import { RenderMode } from './datawindow.types';
export interface RootState {
registry: ComponentRegistration[];
sidebarPosition: SidebarPosition;
}
export interface ComponentRegistration {
friendly_name: string;
component_type: string;
settings_type?: string;
default_settings?: object;
in... |
6151e0501d99c4881494b862be1c2f93767cdb0351859f3c0873a75cf19ffbb5 | TypeScript | 566 | 25 | import { defineStore, acceptHMRUpdate } from 'pinia'
export enum SidebarPosition {
Left,
Right,
}
export interface SidebarState {
sidebarPosition: SidebarPosition;
}
export const useSidebarStore = defineStore('sidebar', {
state: (): SidebarState => ({
sidebarPosition: SidebarPosition.Left,
... |
bdf44bb6d451b943dccf9d4f0bf985d1aafb15a7dd9d4a1d3051a9a0164e6c3b | TypeScript | 572 | 25 | import { defineLoader } from 'vitepress';
import * as child from "child_process";
import { version } from '../../../package.json';
export interface Data {
commitRef: string;
commitHash: string;
appVersion: string;
}
declare const data: Data
export { data }
export default defineLoader({
async load(... |
6c22b7d7158d684bf3a68b9819333f2c57cc54cc1ab3475bc23f3c3ecf1980a1 | TypeScript | 573 | 19 | export const EventEmitter = {
events: {} as Record<string, Function[]>,
on(event: string, callback: Function) {
if (!this.events[event]) this.events[event] = [];
this.events[event].push(callback);
},
off(event: string, callback: Function) {
if (!this.events[event]) return;
... |
455073277f0edabe6ed35fd666b2c45f534ae7bf246f3163f08382b8ad73aa4c | TypeScript | 575 | 23 | /// <reference types="vite-plugin-electron/electron-env" />
declare namespace NodeJS {
interface ProcessEnv {
VSCODE_DEBUG?: 'true'
/**
* The built directory structure
*
* ```tree
* ├─┬ dist-electron
* │ ├─┬ main
* │ │ └── index.js > Electron-Main
* │ └─┬ preload
* ... |
7fb466a31cab2e5f68233f1e72ca7697c3ecc815974678a1ff27bafb3d30a35d | TypeScript | 582 | 19 | import store from '@/store/root.store';
import {SidebarPosition} from '@/store/root.types';
export function SetSidebarRight() {
store.commit('setSidebarPosition', SidebarPosition.Right);
}
export function SetSidebarLeft() {
store.commit('setSidebarPosition', SidebarPosition.Left);
}
export function CurrentSid... |
6477f8b0012a073024563e3acd577784443519ee9cc76f12728c03aacd290223 | TypeScript | 597 | 15 | import openAboutWindow from 'about-window';
import path from 'path';
declare const __static: any;
export default function showAboutWindow() {
const isDevelopment = process.env.NODE_ENV !== 'production';
const packageJsonDir = isDevelopment ? path.dirname(__static) : __static;
// uses https://github.com/rhy... |
3505a528d19d28968dee41972a6bb2fd2fb02a4122dfcf09ad0d9e9083a01a7c | TypeScript | 616 | 21 |
export function getDendrogramOrder(tree) {
return _getDendrogramOrder(tree, []);
}
function _getDendrogramOrder(tree, denOrder) {
if (typeof tree.children === 'undefined') {
denOrder[denOrder.length] = tree.name;
return denOrder;
}
denOrder = _getDendrogramOrder(tree.children[0], denO... |
345931e3346e05a95af76a3cf34cea9254115bf8da3667cdaf6543fa9e6e359d | TypeScript | 626 | 21 | import { ColormapSettings, ColumnOrderingSettings, RowOrderingSettings } from "@render/components/Charts/ClusteredHeatmap";
export enum TransitionsHeatmapMode {
Overall = "Overall",
SingleGroup = "SingleGroup",
GroupDifference = "GroupDifference",
}
export enum TransitionsNormalization {
Bigram = "Big... |
9a40394439591a0036ccf204d97a1859544c6a5d913dd6ad8b2e1d3511ff3077 | TypeScript | 632 | 24 | /**
* Auto-generated `/robots.txt` for the static export.
*
* Allows everything; the only restriction we'd want is keeping crawlers
* out of the API tree's internal anchors, but the JSON itself isn't
* served as HTML so this is moot.
*/
import type { MetadataRoute } from 'next';
// Static export requires explici... |
1f907e438763c8a1a62689f571aa7c0cb7bc2e2d614ccfc6fdf9bb51177517ef | TypeScript | 642 | 37 |
export const availableMetrics = {
angle: {
title: 'Angle',
units: 'degrees',
},
velocity_2d_mm: {
title: 'Velocity 2D',
units: 'mm/s',
},
velocity_3d_mm: {
title: 'Velocity 3D',
units: 'mm/s',
},
velocity_theta: {
title: 'Velocity The... |
66c847f17a1eba7139cf8c87a3e6264f7efe6639be9612075de1574d0c38e28b | TypeScript | 665 | 27 | import { Module } from 'vuex';
import { RootState } from './root.types';
import { HistoryState, HistoryItem } from './history.types';
const HistoryModule: Module<HistoryState, RootState> = {
namespaced: true,
state() {
return {
items: [],
};
},
mutations: {
addE... |
db1859011236715a149bfd64124989c6998a4a78fe18e703a24b6c0dbf4a58f9 | TypeScript | 667 | 25 | /// <reference types="vite/client" />
/// <reference types="vite-plugin-comlink/client" />
/// <reference types="unplugin-icons/types/vue" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
declare module 'vue' {
impor... |
be270e0a8361a90885406365385c568b6a4afc448bc6964a09d00c34b90a1cd9 | TypeScript | 700 | 20 |
export function getModuleNamespace(store: any, state) {
const moduleNamespace = Object.keys(store._modulesNamespaceMap)
.find((path) => store._modulesNamespaceMap[path].context.state === state);
if (typeof moduleNamespace === 'string') {
return moduleNamespace.slice(0, -1);
}
}
export func... |
dc2cb801897b9223acaa66be529295e1cd295a3e105eca92b0487cbc84273c9a | TypeScript | 704 | 36 |
export enum OrderingType {
Natural = 'natural',
Value = 'value',
HCluster = 'hcluster',
KCluster = 'kcluster',
Dataset = 'dataset',
Computed = 'computed',
}
export enum SortOrderDirection {
Asc = 'asc',
Dec = 'dec',
}
export enum HClusterDistance {
Euclidean = 'euclidean',
Angu... |
045fd38f07add2efc1d994eea69de76efda1d8c9996438adaad0b2d82577b563 | TypeScript | 713 | 36 | export interface Observation {
x: number;
y: number;
id: string;
group: string;
}
export interface HexBin {
x: number;
y: number;
length: number;
z: number;
[key: string]: any;
}
export interface HexBinPlotBaseProps {
data: Observation[];
width: number;
height: number;
... |
15b5ce4dcedc508cf22c630e233e18a2dbec440d0bb8b63c2e4945babcb732b6 | TypeScript | 724 | 28 | import { App, Plugin } from 'vue'
import { axisBottom, axisLeft } from 'd3-axis'
import { select } from 'd3-selection'
function draw_axis(el, binding) {
const axis = binding.arg;
if (axis !== undefined) {
const axisMethod = { x: axisBottom, y: axisLeft }[axis];
if (!axisMethod) {
co... |
f1f0876da1940831fb8890f89e447a34b8d543148803f09b37efbeea74714d6a | TypeScript | 736 | 27 | import DefaultTheme from 'vitepress/theme';
import type { Theme } from 'vitepress';
import Layout from "./Layout.vue";
import { redirects } from './redirects';
import { withBase } from 'vitepress'
export default {
extends: DefaultTheme,
Layout,
enhanceApp({ app, router, siteData }) {
// handle r... |
013eed4630a5ae0f6620c807c695305a4d3d2ba34700044acc85db3c5abfe067 | TypeScript | 769 | 22 | import { PromiseWithToast, ToastOrchestratorCreateParam, useToastController } from "bootstrap-vue-next";
import { App, Plugin } from "vue";
export const ToastPlugin: Plugin = {
install: (app: App, options: any) => {
// inject a globally available $showToast() method
app.config.globalProper... |
8960e95fb76fd4c74f0853e3f35c6496ee76ef92bfee6ed9a0b3d4d79c173b31 | TypeScript | 773 | 35 | import { Titlebar, Color } from 'custom-electron-titlebar';
import createMainMenu from './MenuStrip';
let titlebar: Titlebar|undefined;
export function CreateTitleBar() {
DisposeTitlebar();
titlebar = new Titlebar({
icon: '/img/mouse.png',
backgroundColor: Color.fromHex('#FFFFFF'),
men... |
5e3ac3a41533093497025f444d1627a86b814c181c21ae9a866459c05d337482 | TypeScript | 791 | 42 |
export enum CountMethod {
Usage = 'Usage',
Frames = 'Frames',
Raw = 'Raw',
}
export interface DataviewState {
name: string;
color: string;
loading: boolean;
countMethod: CountMethod;
selectedGroups: string[];
groupColors: string[];
moduleIdFilter: number[];
selectedSyllable... |
e4fc9b70c9e78c52873682c5364432261d4a0f8d1344f3262b2664e936d4d6b8 | TypeScript | 798 | 31 |
export function clone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}
export function isObject(item: any): boolean {
return (item && typeof item === 'object' && !Array.isArray(item));
}
export function mergeDeep(target, ...sources) {
if (!sources.length) {
return target;
}
cons... |
04239ce88b2357049cfc8abff0c44283cce0b956b31d3e34e493ac0531730d62 | TypeScript | 801 | 32 | import { OrderingType } from "@render/components/Charts/ClusteredHeatmap";
import { SortOrderDirection } from "@render/components/Charts/common.types";
export interface MutationPlotSettings {
show_points: boolean;
point_size: number;
show_lines: boolean;
line_weight: number;
show_errors: boolean;
... |
8b4c00462baac89e1428a90192cabde70295c2f091fbd67981cd19bf8e1872df | TypeScript | 872 | 27 | import Vue from 'vue';
declare module 'vue/types/vue' {
interface Vue {
/**
* When you need to ensure the DOM has been updated Vue's nextTick
* just doesn't work. You will need to use the double requestAnimationFrame
* method. This is an elegant wrapper to allow you to use the do... |
135d5a9a7294b02a836dd16ee6adfe15fba4ffb68d9f99729ee62e332fe60bfe | TypeScript | 878 | 29 |
export function transpose(data: number[][]): number[][] {
return data[0].map((col, i) => data.map((row) => row[i]));
}
export function groupby<TItem>(data: TItem[], fn: (item: TItem) => string, keys: any[] = []): {[key: string]: TItem[]} {
return data.reduce((rv, item) => {
(rv[fn(item)] = rv[fn(item)... |
d7f8bf0be3ad54710813b7fb83330f3dee9455f44fbb8650eee98a26d8cb00c3 | TypeScript | 896 | 26 | import {useSidebarStore, SidebarPosition} from '@store/sidebar.store';
export function SetSidebarRight() {
const sidebarStore = useSidebarStore();
sidebarStore.setSidebarPosition(SidebarPosition.Right);
window.menuAPI.preload.updateSidebarPosition("right");
}
export function SetSidebarLeft() {
const ... |
15d2e1717396766510b8ea0fc95d3ecb8ad25eeea408ca1332f2dd467e5277e8 | TypeScript | 907 | 50 | export enum CountMethod {
Usage = "Usage",
Frames = "Frames",
Raw = "Raw",
}
export interface SyllableMap {
usage: number;
frames: number;
raw: number;
}
export interface GroupItem {
name: string;
color: string;
selected: boolean;
}
export interface DataViewRecord {
name: stri... |
e38ac8c48f2dc9b4a749f45fe2077628c4f54631958e5722736300299b822ea9 | TypeScript | 925 | 27 | import { expect, assert } from 'chai';
import { shallowMount, mount } from '@vue/test-utils';
// import DataModel from '@/models/DataModel';
import GroupBox from '@/components/GroupBox.vue';
/*
// 2019-11-21 - JT - disableing these as they do not make much sense right now.
// These are testing internal implementatio... |
e8311604d733b34aa6c1a9b822c0784ad2fdc668f92c3b0c61d4352f8c6783db | TypeScript | 931 | 47 | import { WhiskerType } from "@render/components/Charts/BoxPlot";
export const availableMetrics = {
angle: {
title: 'Angle',
units: 'degrees',
},
velocity_2d_mm: {
title: 'Velocity 2D',
units: 'mm/s',
},
velocity_3d_mm: {
title: 'Velocity 3D',
units: ... |
ccebb987e706bbd8331094d1ff2cd20189f5ffd4011abba2f51e27a1ed540416 | TypeScript | 935 | 32 | /* tslint:disable:no-console */
import { register } from 'register-service-worker';
if (process.env.NODE_ENV === 'production' && !process.env.IS_ELECTRON) {
register(`${process.env.BASE_URL}service-worker.js`, {
ready() {
console.log(
'App is being served from cache by a service worker.\n' +
... |
cf2371c1ce46134daf42d394cebae42af3903db8109fec25340f63456f24a237 | TypeScript | 966 | 36 | import { remote } from 'electron';
export const WINDOW_MIN_WIDTH: number = 260;
export const WINDOW_MIN_HEIGHT: number = 155;
export function isValidX(x: number): boolean {
const [maxX, _] = remote.getCurrentWindow().getSize();
return x < maxX;
}
export function isValidY(y: number): boolean {
const [_, ... |
7cd24209d2faa52e70408a3bd1113884263ebff6e2bde2cb30cc3e7ee412ed88 | TypeScript | 983 | 38 | import { getCurrentWindow } from "@electron/remote";
export const WINDOW_MIN_WIDTH: number = 260;
export const WINDOW_MIN_HEIGHT: number = 155;
export function isValidX(x: number): boolean {
const [maxX, _] = getCurrentWindow().getSize();
return x < maxX;
}
export function isValidY(y: number): boolean {
... |
8185b4dd27be67e42c727c58227d515b4c849522740f8c9c8ba8239bf0488400 | TypeScript | 1,040 | 30 | import { getCurrentInstance, } from "vue";
import { pauseTracking, enableTracking } from '@vue/reactivity';
export function useLoadingMixin() {
const instance = getCurrentInstance();
if (!instance) {
throw new Error("useLoadingMixin must be called within a component setup function.");
}
const ... |
07592e2b0de245e69f4ab66b87dff967846d818f17b0cf0b6def46a2c9c454b9 | TypeScript | 1,044 | 36 |
export interface MenuComponentRegistration {
friendly_name: string;
component_type: string;
}
/*
export enum MenuEvents {
OPEN_DATA = "open-data",
CREATE_COMPONENT = "create-component",
SNAPSHOT_WORKSPACE = "snapshot-workspace",
ABOUT_WINDOW = "about-window",
}
*/
export interface IMenuAPIPre... |
3f9bbd7d2931f961fedc4c1c9f9bc8b07f670fda1adc024187e3c93f5e7fe8c1 | TypeScript | 1,048 | 32 | import { beforeEach, describe, expect, it } from 'vitest';
import { useAuthStore } from './auth';
function reset() {
localStorage.clear();
useAuthStore.setState({ accessToken: null, refreshToken: null, user: null });
}
describe('auth store', () => {
beforeEach(reset);
it('persists refresh token to localStora... |
68f45f631ba0be2960b4c9b5bed8dea38c1e18cd208216e4f51e673107ba4d29 | TypeScript | 1,054 | 32 | import { App } from "vue";
import { componentRegistry, ComponentRegistration } from "@store/component_registry.store";
export function DiscoverDataComponents(app: App) {
GlobalRegisterVueComponents(
app,
import.meta.glob("@render/components/Core/**/*.vue", { eager: true })
);
GlobalRegist... |
cddc5ac8b6018e1fa9852084faa4c29455db275b85858bd02c01bb7071c667fb | TypeScript | 1,072 | 34 |
export function autoType(object) {
const pattern = /^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/;
for (const key of Object.keys(object)) {
let value = object[key].trim();
let num;
let m;
if (!value) {
value = null;
... |
82aafa92dda61dc64fb9808399ac235624002558d8d1dd152a15fc8645f09e17 | TypeScript | 1,099 | 46 |
export interface DataObject {
columns: string[];
data: any[];
}
export const SortDirection = {
Asc: 'asc',
Desc: 'desc',
} as const;
export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
export type Operation = KeysOperation|ValuesOperation|PluckOperation|SortOperation|Filter... |
ef1c3b135a94d9d090d5ea1f9d76a9cbc64a21e718c6be4fc09a6559b13ec521 | TypeScript | 1,127 | 58 | export interface DataObject {
columns: string[];
data: any[];
}
export const SortDirection = {
Asc: "asc",
Desc: "desc",
} as const;
export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
export type Operation =
| KeysOperation
| ValuesOperation
| PluckOperation
| SortOperation
... |
4d043df4ba0f34b2b614d6fdfbfa50f4211b861541474ade9fa65c5630dd4d66 | TypeScript | 1,156 | 37 | import { Cluster } from "ml-hclust";
export function getDendrogramOrder(tree: any): string[] {
return traverseDendrogram(tree, []);
}
function traverseDendrogram(tree: any, denOrder: string[]): string[] {
if (!tree.children) {
denOrder.push(tree.name);
return denOrder;
}
traverseDendr... |
4249426cc3c58e416787079ba43b81d615dc7510646212771622de3121920841 | TypeScript | 1,164 | 38 | export function clone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}
export function isObject(item: any): boolean {
return item && typeof item === "object" && !Array.isArray(item);
}
export function mergeDeep(target, ...sources) {
if (!sources.length) {
return target;
}
const so... |
e0c47539ea43c61db95ae779141a730c4c34797bff343d0003276d2c696d380c | TypeScript | 1,180 | 43 | import { OrderingType, SortOrderDirection } from '../ClusteredHeatmap.types';
export { default as Colormap } from './Colormap.vue';
export { default as ColumnOrdering } from './ColumnOrdering.vue';
export { default as RowOrdering } from './RowOrdering.vue';
export function get_colormap_options() {
return {
... |
34bcb23d7298ef4858e09a362d827c1af8ddae0eddfff242f84b89d5e0ac8ef9 | TypeScript | 1,197 | 58 | export interface DataObject {
columns: string[];
data: any[];
}
export const SortDirection = {
Asc: "asc",
Desc: "desc",
} as const;
export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
export type Operation =
| KeysOperation
| ValuesOperation
| PluckOperation
|... |
e7bfe8ffb45c77f9b0eb81c62ec272a258f92f5ebbc64091a4ef945c3b70c935 | TypeScript | 1,199 | 58 | export interface DataObject {
columns: string[];
data: any[];
}
export const SortDirection = {
Asc: "asc",
Desc: "desc",
} as const;
export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
export type Operation =
| KeysOperation
| ValuesOperation
| PluckOperation
|... |
b5d131c946900176324acdfb619ec633004c9702da4b03d09b573ae41dd60c49 | TypeScript | 1,230 | 42 | import "@render/commands"
import { createApp } from "vue";
import App from "@render/App.vue";
import VueForceNextTick from "vue-force-next-tick";
import uniqueIdPlugin from '@render/@types/uniqueIdPlugin';
import timeago from "vue-timeago3";
import { enUS } from 'date-fns/locale';
import { createBootstrap } from 'boots... |
ea99119dfed0a370c4883a9b0fe43cd53f122014ca3b798d99097972e51738bc | TypeScript | 1,254 | 47 | import { WhiskerType, OrderingType } from "@render/components/Charts/BoxPlot";
import { transition } from "d3";
export const availableMetrics = {
entropy: {
title: "Entropy",
is_per_syllable: false,
source: "entropy",
},
entropy_rate_bigram: {
title: "Bigram Entropy Rate",
... |
11929ea82be6c307ca5968acdcc73513cc5f59efceb6d38a3f5c672f0d9efd1b | TypeScript | 1,293 | 42 | /**
* Pure helpers for DynamicForm. Kept in a separate file from the React
* components so ESLint's react-refresh plugin is happy (fast-refresh only
* works when a module exports components *only*).
*/
import type { SetupParamSchema } from '@/api/types';
/** Values keyed by parameter name. Each value type depends... |
a260772f58b53cb909ab2b569ed1adc81b39bf1d576c537bb89d71ab4ff47225 | TypeScript | 1,299 | 48 | import { defineStore, acceptHMRUpdate } from 'pinia'
import { VNode } from 'vue';
export interface HistoryState {
items: HistoryItem[];
}
export interface HistoryItem {
time: Date;
message: string | (() => VNode);
variant: string;
details: string | null;
}
export const useHistoryStore = defineSt... |
0c9ec944a3626804830b710e1fd7971aa69948fcab161f3f7415ce1bfabc8ec5 | TypeScript | 1,308 | 65 | export enum WhiskerType {
TUKEY = "tukey",
MIN_MAX = "min_max",
}
export enum OrderingType {
Natural = "natural",
Dataset = "dataset",
}
export interface DataPoint {
id: string;
value: number;
group: string;
jitter: number;
}
export function isDataPoint(obj: any): obj is DataPoint {
... |
0018f8ec735aa5179c2de07f07f8a960eac1658788203e9f767a7de0dc0b2ccd | TypeScript | 1,312 | 46 |
import { spawn, Pool, Worker } from 'threads';
import { DataLoaderWorker } from './Worker';
import { Operation } from './DataLoader.types';
import os from 'os';
import LRU from 'lru-cache';
import sizeof from 'object-sizeof';
if (module.hot) {
module.hot?.addDisposeHandler(async () => {
await pool.term... |
021334d071345776af4a18a245cef3f65f8121ebd51625c28f3c14c1dfb5aa3c | TypeScript | 1,313 | 34 |
import { IMenuAPI, IMenuAPIRenderer, MenuComponentRegistration } from "@main/shared/menuAPI";
import LoadData from "./LoadData";
import CreateComponent from "./CreateComponent";
import { SnapshotWorkspace } from "@render/components/Core/SnapshotHelper";
import { SetSidebarLeft, SetSidebarRight } from "./SidebarPositi... |
d91d90999960233040e17e7e941ad6c25eb16424a8c01bac948729ca1f2150e8 | TypeScript | 1,324 | 56 | import type { Config } from 'tailwindcss';
/**
* Tailwind tokens for pycaret.org.
*
* Palette mirrors the dashboard (`apps/web/src/index.css`) so docs +
* landing share a brand. Inter for sans, JetBrains Mono for code.
*/
const config: Config = {
content: ['./app/**/*.{ts,tsx,mdx}', './components/**/*.{ts,tsx}'... |
adfbb25755ce94c8fce3974a21da0139bb1245a18d4004935ff51e495d86e227 | TypeScript | 1,332 | 46 | export function transpose(data: number[][]): number[][] {
return data[0].map((col, i) => data.map((row) => row[i]));
}
export function groupby<TItem>(
data: TItem[],
fn: (item: TItem) => string,
keys: any[] = []
): { [key: string]: TItem[] } {
return data.reduce(
(rv, item) => {
... |
6c3c715c24d03dda5bcedee48224b663bafd5838a3350085bde37e2f3b620d90 | TypeScript | 1,412 | 50 | import Vue from 'vue';
import { ComponentRegistration } from '@/store/root.types';
import { DataWindowState, Layout } from '@/store/datawindow.types';
import { unnest } from '@/util/Vuex';
import { DataviewState } from '@/store/dataview.types';
const WindowMixin = Vue.extend({
props: {
id: {
... |
ae5a2b849a3f9258d900d62bc3aca9d2caec914d5fa19384c229c50fa1ac5efe | TypeScript | 1,455 | 55 | /**
* A function that emits a side effect and does not return anything.
*/
export type Procedure = (...args: any[]) => void;
export type DebounceOptions = {
isImmediate: boolean,
}
export function debounce<F extends Procedure>(
func: F,
waitMilliseconds = 50,
options: DebounceOptions = {
isI... |
19471ead4309e36b6f6d9d0d129020950fd83a383988e99139af9ab5a7f5e2ab | TypeScript | 1,458 | 55 | /**
* A function that emits a side effect and does not return anything.
*/
export type Procedure = (...args: any[]) => void;
export type DebounceOptions = {
isImmediate: boolean;
};
export function debounce<F extends Procedure>(
func: F,
waitMilliseconds = 50,
options: DebounceOptions = {
is... |
a845564fbee72240bb49ab8c9b8a5c4d446773307d7b5319e889780af79287d1 | TypeScript | 1,491 | 48 | import { hexbin } from "d3-hexbin";
import { groupby } from "@render/util/Array";
import { scaleLinear } from "d3-scale";
import { extent } from "d3-array";
import { Observation, HexBin } from "./HexBinPlot.types"
export function binData(data: Observation[], groupLabels: string[] | null, width: number, resolution: num... |
a7eb8516179c5e79bc83ff4b0875452dc5b0ca82112f550d04eeb63b5be96349 | TypeScript | 1,494 | 48 | import { RenderMode } from "@store/datawindow.types";
export interface ComponentRegistryState {
registry: ComponentRegistration[];
}
export interface ComponentRegistration {
friendly_name: string;
component_type: string;
settings_type?: string;
default_settings?: object;
init_width?: number;
... |
9551151b8d24d20d1a91db198abe0352c69f3bff9189f05fe777304e4bdcad3c | TypeScript | 1,539 | 55 | import { defineComponent, computed } from "vue";
import { DataWindowState, Layout } from "@store/datawindow.types";
import { DataviewState } from "@store/dataview.types";
import {useDataWindowStore} from "@store/datawindow.store";
import {useDataViewStore} from "@store/dataview.store";
export function useWindowMixin<... |
c556dff193208d22e6acddbe344ad5c41b5a9ad792774cdc22d75e0060ce9a53 | TypeScript | 1,571 | 44 | import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';
/**
* Vite config. Dev server proxies /api and /ws to the FastAPI backend so the
* frontend can assume same-origin (no CORS headaches locally).
*
* In production the UI is a static build served by nginx; th... |
006443cc2f15914f455766472c31f3ff8f71eedda8cfabd17c208bcbfa91794d | TypeScript | 1,631 | 51 | import Vue from 'vue';
import Vuex, {StoreOptions} from 'vuex';
import {
RootState,
ComponentRegistration,
SidebarPosition
} from './root.types';
import DatasetsStore from '@/store/datasets.store';
import FiltersModule from '@/store/filters.store';
import WindowsModule from './windows.store';
import History... |
2bc62ff920dc658390dd8a734b0b2325c4db0ca28f3c3a6aaa2f5cde20e2981b | TypeScript | 1,694 | 93 |
export interface DataWindowState {
type: string;
title: string;
width: number;
height: number;
pos_x: number;
pos_y: number;
datasource: string;
render_mode: RenderMode;
settings: object;
z_index: number;
is_hidden: boolean;
aspect_ratio?: number;
}
export interface Sh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.