sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
638cda191a17fb6d88253147b04b1e9d62f0e51861a2e57dbe7a6297e5fa32ea | Text | 40,449 | 546 | # Genrich: detecting sites of genomic enrichment
## Table of Contents
* [Introduction](#intro)
* [Quick start](#quick)
* [Software compilation](#compile)
* [Usage message](#usage)
* [Attributes](#attributes)
* [Peak-calling method](#method)
* [Alignment parsing](#alignment)
* [Multimapping reads](#multimap... |
5147994e589d00651db395f87b902a207f725d37a89dbdf37e61b764befdc674 | Text | 42,719 | 486 | # fastman
## Description
An **R package** for fast and efficient visualizing of GWAS results using Q-Q and Manhattan plots directly from PLINK output files.
* **Fast**: Drastically reduces time in plot generation compared to qqman. On a typical imputed PLINK assoc file of 10 million SNPs, plotting time is reduced from... |
36f4e561b6417c1c7f22fc3d6eef6841b5d0b793ddee19f8c28518a9ba2a2ab3 | Text | 58,072 | 790 | # ROAST: Realistic vOlumetric-Approach-based Simulator for Transcranial electric stimulation
1. [Getting started](#1-getting-started)
2. [How to use `roast`](#2-how-to-use-roast)
- [2.1 Synopsis of `roast`](#21-synopsis-of-roast)
- [2.2 Examples on `roast`](#22-examples-on-roast)
3. [How to use `roast_target`](#... |
1d11974ffda410ead48be9a53afeefde8b21cb6e62f9b320bd08647fb9f52c83 | Text | 70,077 | 1,329 |
[](https://zenodo.org/badge/latestdoi/174428856)
[](https://badge.fury.io/py/bioinfokit)
[
- [Install](#install)
- [Usage](#usage)
- [Parameters](#parameters)
- [Simple ViT](#simple-vit)
- [NaViT](#navit)
- [Distillation](#distillation)
- [Deep ViT](#deep-vit)
- [CaiT](#cait... |
0b473fa67bd85dfb219b7b04f9822bcda0dcd6bcf44f71dba222af4543f7f06a | TypeScript | 49 | 1 | export { default as Deck } from './Deck.svelte';
|
1e82ff3e9d40c129876d519130e7ba1d9b18531d72703053687fd1ec20c0695c | TypeScript | 51 | 1 | export { default as Tasks } from './Tasks.svelte';
|
c5756c98bf28bcb063960b7ec0131c1400d0a5d2e5116670d97fd537cf7d1a27 | TypeScript | 51 | 1 | export { default as Input } from './Input.svelte';
|
1f9d66fb0dc753f4a3fadd2d882ad4fed52bfb79cfafab9ed5b70ef9b3e7198b | TypeScript | 53 | 1 | export { default as Select } from './Select.svelte';
|
e476028d3dfd423c986b5574ffe52c433aea6d82f2bf3ae7582481b5b03a5a62 | TypeScript | 53 | 1 | export { default as Toggle } from './Toggle.svelte';
|
3af7640e0031e9b177c1f659ca6a010a5926b116d3c08e47161b8fbad1d63c7b | TypeScript | 54 | 1 | export { default as Toaster } from './sonner.svelte';
|
ed8d2c4302c15b20a3605a7285996d03c9ffbdd60a7cdb41bf78974698cc73d1 | TypeScript | 55 | 1 | export { default as Spinner } from './spinner.svelte';
|
64317e5efc6b29b081e9c1cfc8194d4685c41d823986e3a71fec1e4ac933c0cf | TypeScript | 56 | 1 | export { default as Root } from './scroll-area.svelte';
|
13913f4a0640af02fed53e19bc2120d228e6fad308f0a4beeebdc0aa6e58a575 | TypeScript | 58 | 2 | export const prerender = false;
export const ssr = false;
|
6b19d5ea76ddeb9121e6c6cc7a1c029a54e0a58079cbb37ed0be3396276228ba | TypeScript | 77 | 7 | import Root from './input.svelte';
export {
//
Root as Input,
Root
};
|
56428ad83c5daf2da79fc06388b8a173de4d9dd212a27fbe6a5fd5dcb4da149d | TypeScript | 83 | 7 | import Root from './skeleton.svelte';
export {
Root,
//
Root as Skeleton
};
|
b785b3668c3f9a3a3e734f058dc271b776295306d9a0f099d253ff8dc84a9c8d | TypeScript | 85 | 7 | import Root from './separator.svelte';
export {
Root,
//
Root as Separator
};
|
9ad61da387742763ba1c473f4206d46a5c0ed79e930ea4334bdd73f1ffa38012 | TypeScript | 124 | 6 | import { afterEach, vi } from 'vitest'
// Keep tests isolated from each other.
afterEach(() => {
vi.restoreAllMocks()
})
|
c0fa1e04d042a7d6a84ecef65558cd115fe68d34801d9c69c99d320935e65419 | TypeScript | 147 | 8 | export interface Group {
name: string
publicGroup: boolean
type: string
auto: boolean
}
export type GroupType = 'APPLICATION' | 'RESOURCE' |
43bde89f008207f3a798bfe52c7ff128b3f5f62cce89f562d5dafda41c825725 | TypeScript | 167 | 7 | import { redirect } from '@sveltejs/kit';
import { resolve } from '$app/paths';
export function load(): never {
redirect(307, resolve('/(dashboard)/stations'));
}
|
5767351e1c554afd845f320fc93c6c110cab1b98800e08ebf8d57c8905935701 | TypeScript | 178 | 9 | import { mount } from "svelte";
import "./app.css";
import App from "./App.svelte";
const app = mount(App, {
target: document.getElementById("app")!,
});
export default app;
|
f0d9549beb1e28a05a71b5e65c9e77983a42d0af0ed9eae2eec19b9844cd3cff | TypeScript | 178 | 9 | import DOMPurify from 'dompurify'
export function sanitizeHtml(input: string): string {
return DOMPurify.sanitize(input, {
USE_PROFILES: {
html: true,
},
})
} |
c40cb8b3a931454e014dc104b71917077e18a0476bd953bb417af1299fbea4de | TypeScript | 206 | 12 |
export type TagValueType = 'STRING' | 'BOOLEAN'
export interface Tag {
key: string
value: string
type: TagValueType
application: string
version: string
visible: boolean
boutiques: boolean
}
|
99352214f1e0c8b624ebd10f7ed3bee87ab5366c1215dd7ae0cec9d10ecdb38e | TypeScript | 228 | 7 | import Handle from './Handle.svelte';
import Item from './Item.svelte';
import Root from './Root.svelte';
export type { SortableLayout } from './placement';
export { Handle, Item, Root };
export default { Handle, Item, Root };
|
ca0c9ff964ba28ffffdf77a38447aca38d87609d542d960197d72e74d40b7942 | TypeScript | 231 | 4 | export type { Viewport } from './geometry';
export { default as StageControls } from './StageControls.svelte';
export { default as StageGizmo } from './StageGizmo.svelte';
export { default as StageView } from './StageView.svelte';
|
5dff6e9abbe757a78483ea48365c5ba801c7a49e47e3b933550efb3366243404 | TypeScript | 232 | 4 | export { default as Input } from './Input.svelte';
export { default as NumericField } from './NumericField.svelte';
export { default as SpinBox } from './SpinBox.svelte';
export { default as SpinSlider } from './SpinSlider.svelte';
|
25e893eaba7fc161c13b37fa790aa7d2e98558a8747a7ec0f072e4676df774bd | TypeScript | 247 | 9 | import { MediaQuery } from 'svelte/reactivity';
const DEFAULT_MOBILE_BREAKPOINT = 768;
export class IsMobile extends MediaQuery {
constructor(breakpoint: number = DEFAULT_MOBILE_BREAKPOINT) {
super(`max-width: ${breakpoint - 1}px`);
}
}
|
2014d46ec9e040d4c1d178ac913fdcd44fb7b4d734c5c4354f2da7d49d4677a7 | TypeScript | 249 | 9 | import { pack, Unpackr } from 'msgpackr';
const decoder = new Unpackr({ useRecords: false, int64AsType: 'number' });
export const encodeMsgpack = pack;
export function decodeMsgpack<T>(data: Uint8Array): T {
return decoder.unpack(data) as T;
}
|
430ca842652a81067312d3f98c6246594e81f4b56ec8d031aeec010299d7c11f | TypeScript | 251 | 11 | import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
// https://vite.dev/config/
export default defineConfig({
plugins: [svelte()],
build: {
outDir: "../simopt/web/dist",
emptyOutDir: true,
},
});
|
96bb85928ead3f39d1f3a4c1aa9956ab7ae82f4b44f7822cd093f9627484a801 | TypeScript | 259 | 8 | import { test, expect } from '@playwright/test'
// See here how to get started:
// https://playwright.dev/docs/intro
test('visits the app root url', async ({ page }) => {
await page.goto('/')
await expect(page.locator('h1')).toHaveText('You did it!')
})
|
b6daecb091d49ae1a485629b1799769b673dcf42a802db381b0566f8330fcbe6 | TypeScript | 262 | 12 | import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, buttonVariants } from './button.svelte';
export {
//
Root as Button,
type ButtonProps,
type ButtonSize,
type ButtonVariant,
buttonVariants,
type ButtonProps as Props,
Root
};
|
56266ff4cc543544b6863fc4852b84c13ff1ad2aba29713cb458e74242d8aec3 | TypeScript | 267 | 12 | import type { Group } from '@/types/group.types'
export type ResourceType = 'LOCAL' | 'BATCH' | 'KUBERNETES' | 'DIRAC'
export interface Resource {
name: string
status: boolean
type: ResourceType
configuration: string
engines: string[]
groups: Group[]
}
|
ba15ff77a2bcff921e0ef5a245597713274886fbbf24f96423c586c69b2e3edc | TypeScript | 279 | 6 | export const SIDEBAR_COOKIE_NAME = 'sidebar_state';
export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
export const SIDEBAR_WIDTH = '16rem';
export const SIDEBAR_WIDTH_MOBILE = '18rem';
export const SIDEBAR_WIDTH_ICON = '3rem';
export const SIDEBAR_KEYBOARD_SHORTCUT = 'b';
|
e87b028a9239f8232a3f5942e523f14dd2da605d6b72c9901fd26a89c5b1c649 | TypeScript | 281 | 13 | import Root from './collapsible.svelte';
import Content from './collapsible-content.svelte';
import Trigger from './collapsible-trigger.svelte';
export {
//
Root as Collapsible,
Content as CollapsibleContent,
Trigger as CollapsibleTrigger,
Content,
Root,
Trigger
};
|
4a8b647bd6462e0024c230e60dfa75cb578e80e15a970e68315b7592b254cf2f | TypeScript | 285 | 9 | export * from './client.svelte';
export * from './device.svelte';
export * from './device-role';
export * from './inpaint.svelte';
export * from './planning';
export * from './prop.svelte';
export * from './snapshots.svelte';
export * from './station.svelte';
export * from './types';
|
21f0deb499f7a51aa5251dd3592a0cb14410d0bef3d86cffac0197e36331758a | TypeScript | 286 | 13 | // See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};
|
95007634fbece6fc3bab508e3773fee43417bbc65be9c2c387866dfe586abbce | TypeScript | 300 | 18 | export interface MessageItem {
id: string
subject: string
body: string
from: string
to: string[]
date: string
read: boolean
groupName?: string
isGroupMessage: boolean
}
export interface SendMessagePayload {
to: string
subject: string
body: string
isGroupMessage: boolean
}
|
ecabafb2d60863d3719793da2fc32da17ee34373bb244d50650bbb65f6d35109 | TypeScript | 319 | 15 | import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.use(createPinia())
app.use(router)
// Mount without awaiting router.isReady() to avoid blocking on route guards
app.mount('#app')
|
48b7a44394772c15bca796a6b3a9cde8813ee1dc144b8b60fae84a6ad3062f33 | TypeScript | 341 | 16 | export interface Publication {
id: number
title: string
date: string | null
doi: string | null
authors: string
type: string | null
typeName: string | null
vipAuthor: string | null
vipApplication: string | null
}
export type PublicationInput = Omit<Publication, 'id' | 'vipAuthor'> & {
id?: number
... |
8c4c4716b9254b3a0d2b26cbdc7760df323b7d7f020e9a6bc0c516b6c62b577f | TypeScript | 344 | 13 | export * as Bool from './bool';
export * as Enumerated from './enumerated';
export * as Numeric from './numeric';
export { default as PropInput } from './PropInput.svelte';
export * as Text from './text';
export {
decimalsFromStep,
formatPropDisplay,
formatPropValue,
isErrorMsg,
isPropDiverged,
isStructured... |
9ba5ea17bf1f40066ebd8b14eaf2e1964372d78000921d26494216d5a3b01221 | TypeScript | 354 | 14 | import Root from './hover-card.svelte';
import Content from './hover-card-content.svelte';
import Portal from './hover-card-portal.svelte';
import Trigger from './hover-card-trigger.svelte';
export {
Content,
Root as HoverCard,
Content as HoverCardContent,
Portal as HoverCardPortal,
Trigger as HoverCardTrigge... |
7996f1c316a8b591ada04a5790ee4dfc64958e98d6a5079f54fa5a2c8509f511 | TypeScript | 414 | 20 | import type { Group } from './group.types'
export interface UserSuggestion {
id: string
email: string
firstName?: string
lastName?: string
confirmed?: boolean
accountLocked?: boolean
institution?: string
registration?: number
lastLogin?: number
level?: string
maxRunningSimulations?: number
cou... |
e32e9b6be7c594d87e65eccec315ed6a5068654a682d2da14ec1599cc641f696 | TypeScript | 426 | 19 | export type NotificationType = 'success' | 'error' | 'warning' | 'info'
export interface Notification {
id: string
type: NotificationType
title: string
message: string
duration?: number
}
export interface DashboardNotification {
id: string
type: 'message' | 'execution_running' | 'execution_completed' | ... |
2572379c974b57f71bc12a0f86e8e24c34d1ede43087247a490ee9ce52ec3fe1 | TypeScript | 433 | 19 | import Root from './tooltip.svelte';
import Content from './tooltip-content.svelte';
import Portal from './tooltip-portal.svelte';
import Provider from './tooltip-provider.svelte';
import Trigger from './tooltip-trigger.svelte';
export {
Content,
Portal,
Provider,
Root,
//
Root as Tooltip,
Content as Too... |
1700f99a4d22027b07898f4c56a6988d832376bac382d63f3fdd58c40a7cf11b | TypeScript | 435 | 14 | import { backendClient } from './client'
import type { PrecisePage } from '@/types/application.types'
import type { Tag } from '@/types/tag.types'
export type BackendTag = Tag
export const tagsApi = {
getAll: (offset = 0, quantity = 50) => {
const params: Record<string, number> = { offset, quantity }
return... |
14b6240bd4308f7d3014e3a23c58366f4f7abdb8e18889a912431a05c5bd5b41 | TypeScript | 438 | 15 | import { backendClient } from './client'
export const apikeyApi = {
get(): Promise<string> {
return backendClient.get<string>('/internal/users/me/apikey').then((r) => r.data)
},
generateNew(): Promise<string> {
return backendClient.post<string>('/internal/users/me/apikey').then((r) => r.data)
},
de... |
dc66d5896866f4bdc5fe6c7ebc75bce985f9b20a2c1e3a541f4e95a07b2b5989 | TypeScript | 456 | 27 | export interface LoginCredentials {
username: string
password: string
}
export interface RegisterPayload {
firstName: string
lastName: string
email: string
password: string
countryCode: string
institution: string
comments: string
}
export type VipUserLevel = 'User' | 'Administrator'
export interfac... |
3b042ee192977abcb24ec58fd9c06e2a94a6b7799a43940bdebfb6045dc98261 | TypeScript | 469 | 27 | export interface VipGroup {
name: string
publicGroup: boolean
type: string
auto: boolean
}
export interface Application {
name: string
fullName: string | null
citation: string | null
owner: string | null
groups: VipGroup[]
note: string | null
}
export interface PrecisePage<T> {
data: T[]
total... |
ce4d3064fe29d2dfe8caa97148467bbef65fb7d4f0d6da3bb15f138cd55ab705 | TypeScript | 490 | 8 | export type { WithElementRef, WithoutChild, WithoutChildren, WithoutChildrenOrChild } from './cn';
export { clampTopLeft, cn } from './cn';
export { displayName as displayName, pref, toastError, trimFloat } from './helpers';
export { IDBKeyVal } from './idb';
export { createMultiSelect, type MultiSelect } from './multi... |
a7183b80ceaafa3152694140717646483ee9824025d2f2e8d2253ba92ce13d87 | TypeScript | 502 | 17 | export { default as AppearanceSheet } from './AppearanceSheet.svelte';
export {
type Density,
type Mode,
type ThemeEntry,
type ThemeId,
type ThemePrefs,
themes,
watchTheme
} from './manager.svelte';
export { default as ThemePicker } from './ThemePicker.svelte';
export const brand = {
green: { light: '#... |
2ff30790da83c853ddd2a95122219254ef8a0aff9e33f990aa671904a2486c7e | TypeScript | 526 | 26 | export const GROUP_BADGE_COLORS = [
'red',
'orange',
'amber',
'yellow',
'lime',
'green',
'emerald',
'teal',
'cyan',
'sky',
'blue',
'indigo',
'violet',
'purple',
'fuchsia',
'pink',
'rose',
] as const
export type GroupBadgeColor = (typeof GROUP_BADGE_COLORS)[number]
export function get... |
0c32124915da04577edef6b5778bda8650a82416589236ed1e6062bfa8fcc4ba | TypeScript | 530 | 25 | import type { Group } from './group.types'
export interface ProfileUser {
id: string
firstName: string
lastName: string
email: string
institution: string
countryCode: string
maxRunningSimulations: number
level: string
termsOfUse: string | null
lastUpdatePublications: string | null
welcomeDismisse... |
1208e198de00ccbb17754d2b2ce5281243ee9e11aba2781b43ade0044ecb5e8a | TypeScript | 546 | 18 | import { backendClient } from './client'
import type { PrecisePage } from '@/types/application.types'
import type { Resource } from '@/types/resource.types'
export type BackendResource = Resource
export const resourcesApi = {
getAll: (offset = 0, quantity = 50, group?: string) => {
const params: Record<string, ... |
1946eb60c83d32c52576f29245e15b17098d9cbf53aff1b0c877d97dd324f030 | TypeScript | 548 | 17 | import { backendClient } from './client'
import type { LoginCredentials, VipSession } from '@/types/auth.types'
export const sessionApi = {
login: (credentials: LoginCredentials) =>
backendClient.post<VipSession>('/internal/session', credentials).then((r) => r.data),
getSession: () =>
backendClient.get<V... |
5f209a1dd641e90f31dc7488202e7269132f3b6e5f37c9af14a9c6896cb6c9f4 | TypeScript | 559 | 17 | export function getFrontendBase(): string {
if (typeof window === 'undefined') return '/'
const script = document.querySelector<HTMLScriptElement>('script[type="module"][src]')
if (!script) return '/'
const parts = new URL(script.src).pathname.split('/')
parts.pop()
parts.pop()
return parts.join('/') + '/... |
98978e5f7a76e67db9945f67bd031ecef8f13291cb5528694380c9b8eebf583c | TypeScript | 585 | 17 | import { describe, expect, it } from 'vitest'
import { GROUP_BADGE_COLORS, getGroupBadgeColor } from './groupColor'
describe('getGroupBadgeColor', () => {
it('returns a stable color from the allowed palette', () => {
const colorA = getGroupBadgeColor('Neuro')
const colorB = getGroupBadgeColor('Neuro')
e... |
8acab10d0d23cc8a80eef58afbd0060971d4be5a1c066831b56c729ec8c21b35 | TypeScript | 604 | 22 | import { fileURLToPath, URL } from 'node:url'
import { defineConfig, configDefaults } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
globals: tru... |
99f5f3720f6d20b441370a6f4fe91bd8dbd4105ca91cdaf44951401009b33262 | TypeScript | 606 | 25 | import Root from './breadcrumb.svelte';
import Ellipsis from './breadcrumb-ellipsis.svelte';
import Item from './breadcrumb-item.svelte';
import Link from './breadcrumb-link.svelte';
import List from './breadcrumb-list.svelte';
import Page from './breadcrumb-page.svelte';
import Separator from './breadcrumb-separator.s... |
b8dd9131b4d22f298353d3d2d048c7051a46992bc553e886004561f206a22a55 | TypeScript | 606 | 26 | import { describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import AppBadge from './AppBadge.vue'
describe('AppBadge', () => {
it('renders slot content', () => {
const wrapper = mount(AppBadge, {
slots: {
default: 'Running',
},
})
expect(wrapper.text()).toCo... |
ccc1bf51c8ccdad4593f3855ecb0f55a075652f1fc57c764aeee38511eafbbe2 | TypeScript | 642 | 20 | import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import Icons from 'unplugin-icons/vite';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const apiTarget = env.VITE_API_URL || 'http:/... |
c18fa754fd1a5a211df5646fe90217ff56399ada1876b1f5ebcad877680e92e6 | TypeScript | 709 | 29 | import { describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import AppCard from './AppCard.vue'
describe('AppCard', () => {
it('renders slot content', () => {
const wrapper = mount(AppCard, {
slots: {
default: 'Card content',
},
})
expect(wrapper.text()).toC... |
aadd4127786592ed924f17e57cd2f5d7e6a17aeed9bb3251ac80097715c108db | TypeScript | 724 | 22 | import { backendClient } from './client'
import type { PrecisePage } from '@/types/application.types'
import type { Group } from '@/types/group.types'
export type BackendGroup = Group
export const groupsApi = {
getAll: (onlyApplications = false, onlyResources = false, offset = 0, quantity = 50) => {
const param... |
701aed2cd9b338c9a4a711d1ada373de80b67e46c04015a84b3dfbdb8e9d4e98 | TypeScript | 760 | 17 | import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type WithoutChild<T> = T extends { child?: any } ? Omit<T, 'child'> : T;
// esli... |
c220789dd318969669a2642f4708b50f5f195ba7d6fc3dbce4ab09e60fccc0e8 | TypeScript | 779 | 30 | import { ref } from 'vue'
import { defineStore } from 'pinia'
import { resourcesApi } from '@/api/resources.api'
import type { Resource } from '@/types/resource.types'
export const useResourcesStore = defineStore('resources', () => {
const resources = ref<Resource[]>([])
const totalCount = ref(0)
const isLoading... |
706c39e9e30a15516d46bfca7f7388858b1dee41417b1dbbc510f23cac070821 | TypeScript | 815 | 35 | import { describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import AppButton from './AppButton.vue'
describe('AppButton', () => {
it('renders slot content', () => {
const wrapper = mount(AppButton, {
slots: {
default: 'Launch application',
},
})
expect(wrapp... |
d5f29d9fe65ea3ac269954a75273ae7d8b772c17acb6129251a9b5d814af527a | TypeScript | 818 | 34 | import Root from './sheet.svelte';
import Close from './sheet-close.svelte';
import Content from './sheet-content.svelte';
import Description from './sheet-description.svelte';
import Footer from './sheet-footer.svelte';
import Header from './sheet-header.svelte';
import Overlay from './sheet-overlay.svelte';
import Po... |
e7ee582fa09365146ef96cf0223983f6366288f298d536ffb9a470c6bb760d14 | TypeScript | 929 | 39 | import { fileURLToPath, URL } from 'node:url'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import vueDevTools from 'vite-plugin-vue-devtools'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineCo... |
6d767a75fcafb7482da036e722c44953056ddbaa6b464411d4d206c212c2df63 | TypeScript | 938 | 41 | import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { tagsApi } from '@/api/tags.api'
import type { Tag } from '@/types/tag.types'
export const useTagsStore = defineStore('tags', () => {
const tags = ref<Tag[]>([])
const totalCount = ref(0)
const isLoading = ref(false)
const tagKeys... |
3ba6949e9c1f647249745eb2e5c238d69b1b5ddbad796131fac2168f54fe44f7 | TypeScript | 948 | 36 | import Root from './dialog.svelte';
import Close from './dialog-close.svelte';
import Content, { type DialogContentVariants, dialogContentVariants } from './dialog-content.svelte';
import Description from './dialog-description.svelte';
import Footer from './dialog-footer.svelte';
import Header from './dialog-header.sve... |
79f81b1faf998bd26aabfbff4420f45b1756899e5ec356e9d9d5f990b68fdb0c | TypeScript | 951 | 36 | import { describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import AppInput from './AppInput.vue'
describe('AppInput', () => {
it('renders label and required marker', () => {
const wrapper = mount(AppInput, {
props: {
label: 'Execution name',
required: true,
... |
8222f50b432088a9def20527ab595f8e563a7b5c4eea1c8989db571d8096d80a | TypeScript | 977 | 32 | export async function getWebGPUDevice(lossHandler?: (info: GPUDeviceLostInfo) => void): Promise<GPUDevice> {
if (!navigator.gpu) {
throw new Error('WebGPU is not supported in this browser.');
}
// Retry with backoff - GPU adapter may need time to become available after page load
const maxRetries = 3;
con... |
ffd013c8737ab1458ac149ac33299f4021067fa30d9d4aab223731392a50ad03 | TypeScript | 992 | 39 | import semver from 'semver'
type Versioned = {
version: string
}
function normalizeVersion(version: string): string {
if (semver.valid(version)) return version
const parts = version.split('.')
if (parts.length === 2 && /^\d+$/.test(parts[0]!) && /^\d+$/.test(parts[1]!)) {
return `${parts[0]}.${parts[1]}... |
1cd70a9e6dbbcbcd2630dd6ebf87e8f7a60fdeeff5bc833e33b8e5499ea97dd5 | TypeScript | 1,087 | 42 | export type Page = "Simulator" | "Data Farming" | "User Guide" | "About Us";
export type SummaryKind = "solver" | "problem" | "plot";
export type EditMode = { kind: SummaryKind; index: number };
export type Param = {
name: string;
description: string;
default: unknown;
value: string;
source?: string;
};
exp... |
4f4c43f3ea08aedefcbc7cebae30fe295bc3f14651a8d58bc2ee2cdff03d85ed | TypeScript | 1,093 | 35 | export function useFormatters() {
const relativeFormatter = new Intl.RelativeTimeFormat('en', { numeric: 'auto' })
function formatRelativeTime(input: string | number | Date): string {
const date = input instanceof Date ? input : new Date(input)
const diffMs = date.getTime() - Date.now()
const diffSecon... |
c87ab052378699e5e010d737b4ff2b17f6f8aee780ff79df6c08e39e1fe6ce66 | TypeScript | 1,100 | 41 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useGroupsStore } from './groups.store'
const mocked = vi.hoisted(() => ({
getAll: vi.fn(),
}))
vi.mock('@/api/groups.api', () => ({
groupsApi: {
getAll: mocked.getAll,
},
}))
describe(... |
54f1320a0db813409baaeb44dfb306936c18151510e392cb83b013f034a985eb | TypeScript | 1,113 | 28 | import { backendClient } from './client'
import type { Publication, PublicationInput } from '@/types/publication.types'
export const publicationsApi = {
getPublic: () =>
backendClient.get<Publication[]>('/internal/publications/public').then((r) => r.data),
getAll: () =>
backendClient.get<Publication[]>('/... |
5d94c9a2689a7177555eff63c16446178ed46509aee40fc69b273987d07f2232 | TypeScript | 1,162 | 47 | /** Session-scoped write ordering and unfinished-edit tracking. */
export function createEditQueue() {
let pending = $state(0);
let closed = false;
let tail: Promise<void> = Promise.resolve();
function hold(): () => void {
if (closed) throw new Error('Edit queue is closed');
pending += 1;
let relea... |
31134283bdae05ff244677e307cedaeec3647966f25d5ec0d55e888ef5a7fac7 | TypeScript | 1,221 | 41 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useResourcesStore } from './resources.store'
const mocks = vi.hoisted(() => ({
getAll: vi.fn(),
}))
vi.mock('@/api/resources.api', () => ({
resourcesApi: {
getAll: mocks.getAll,
},
}))
... |
f1a46c65b2d0b0f340118e217d61fcb3b61f2f2982c76011da59d51fd94c93b3 | TypeScript | 1,263 | 34 | import { describe, expect, it } from 'vitest'
import { compareVersionDesc, sortByVersionDesc } from './versionSort'
describe('versionSort utils', () => {
it('compares valid semver in descending order', () => {
expect(compareVersionDesc('2.0.0', '1.9.9')).toBeLessThan(0)
expect(compareVersionDesc('1.0.0', '1.... |
f06155785f19c763f4ca30d24eb75e1e5098d9754a529cc48620abb921e8b9e7 | TypeScript | 1,272 | 38 | import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import pluginPlaywright from 'eslint-plugin-playwright'
import pluginVitest from '@vitest/eslint-plugin'
import pluginOxlint from 'eslint-plugin-oxl... |
a6c9003851c14acb05a81b86bd97fc619cd8a5501fbba636656df873d5b22e18 | TypeScript | 1,275 | 39 | import { describe, expect, it } from 'vitest'
import { sanitizeHtml } from './sanitizeHtml'
describe('sanitizeHtml', () => {
it('removes script tags and inline event handlers while keeping rich text html', () => {
const raw = `
<div class="wrap" style="color: red">
<h1 onclick="alert('xss')">Title<... |
af45b150576115f5d6b10a71b6971b58094898192f55745819b5866d7e3568c8 | TypeScript | 1,391 | 51 | import { getContext, setContext } from 'svelte';
import type { Bounds } from './geometry';
export type RegionField = keyof Bounds;
export class RegionSelection {
minX = $state<number | null>(null);
minY = $state<number | null>(null);
maxX = $state<number | null>(null);
maxY = $state<number | null>(null);
#... |
344edf829998082d0af5329141f835656a548186e474906cbc592f15b7e22917 | TypeScript | 1,463 | 42 | import type { SpatialUnit } from '$lib/prefs';
export interface SpatialUnitDefinition {
value: SpatialUnit;
label: string;
/** Micrometers per displayed unit. Internal values always remain in µm. */
scale: number;
/** Plan input increments: 0.1 µm fine, 10 µm coarse. */
step: number;
bigStep: number;
d... |
9f48b95cec53479cf4710e63e4e5231f2eed5aed545d4ff86f74103bdde9dc96 | TypeScript | 1,528 | 51 | import { backendClient } from './client'
export interface BoutiquesCheckResult {
valid: boolean
errors: string[]
}
/**
* Mocked API call used before backend endpoint is implemented.
* It validates minimal Boutiques structure constraints.
*/
export const boutiquesApi = {
checkDescriptor: async (file: File): P... |
c8667e3641bf7ad4aca74b77952b88a0dc785830938e45a7181438592d3ad39b | TypeScript | 1,529 | 64 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useTagsStore } from './tags.store'
const mocked = vi.hoisted(() => ({
getAll: vi.fn(),
}))
vi.mock('@/api/tags.api', () => ({
tagsApi: {
getAll: mocked.getAll,
},
}))
describe('useTags... |
0c60cdbc467f51d0afb1071e28883d5e23488e8eee7bb2ba71fd25ced766f712 | TypeScript | 1,551 | 51 | import { backendClient } from './client'
import type { PrecisePage } from '@/types/application.types'
export interface BackendApplication {
name: string
fullName: string | null
citation: string | null
owner: string | null
groups: { name: string; publicGroup: boolean; type: string; auto: boolean }[]
note: ... |
b90fcdba8e845a8f1a514b3f3d1025af1401d4dd118965b5bb73a8d3c85e518b | TypeScript | 1,588 | 46 | /** 2D vector with y, x components (matches backend Vec2D/IVec2D). */
export interface Vec2D {
y: number;
x: number;
}
/** 3D vector with z, y, x components (matches backend Vec3D/IVec3D). */
export interface Vec3D {
z: number;
y: number;
x: number;
}
/** Parse a Vec2D from "y,x" string, [y,x] array, or {y,... |
d9f61279c3df1075dde5c0b089d19fdc75d132b175ce813d61542c806e9eb601 | TypeScript | 1,611 | 52 | import Root from './context-menu.svelte';
import CheckboxItem from './context-menu-checkbox-item.svelte';
import Content from './context-menu-content.svelte';
import Group from './context-menu-group.svelte';
import GroupHeading from './context-menu-group-heading.svelte';
import Item from './context-menu-item.svelte';
i... |
309d24312257473242942331b2602bd7434c4b17895eb6b717d95e5864faedb6 | TypeScript | 1,613 | 42 | import { PersistedState } from 'runed';
import { toast } from 'svelte-sonner';
/** Fire-and-forget a mutation promise, surfacing any rejection as an error toast.
* Accepts `undefined` so `toastError(instrument?.method())` is a no-op when there's no instrument. */
export function toastError(promise: Promise<unknown> ... |
f3268981bf8f7bf456bea7edf7e22afe2e5927e5cdde2d45c221ec9b54209300 | TypeScript | 1,645 | 58 | import { ref } from 'vue'
import { defineStore } from 'pinia'
import type { Group } from '@/types/group.types'
import { groupsApi } from '@/api/groups.api'
export const useGroupsStore = defineStore('groups', () => {
const groups = ref<Group[]>([])
const totalCount = ref(0)
const isLoading = ref(false)
... |
c19a626208818643cce9e37bc3b61a6c394ae65adf86ce9e20dde3dc6a05a101 | TypeScript | 1,670 | 30 | /**
* Low-level UI primitive components.
*/
export { default as Button, type ButtonVariants, buttonVariants } from './Button.svelte';
export { default as Checkbox, type CheckboxVariants, checkboxVariants } from './Checkbox.svelte';
export * as Breadcrumb from './cn/breadcrumb';
export * as Collapsible from './cn/col... |
c8824c08fa385a359b7f8046192deef0d2b6315f88eae6055b54a1a0a2dc4b14 | TypeScript | 1,715 | 55 | import { backendClient } from './client'
import type { PrecisePage } from '@/types/application.types'
import type { Workflow, WorkflowLaunchPayload, WorkflowListParams, JobLogType } from '@/types/workflow.types'
import type { Task } from '@/types/workflow.types'
const enc = (s: string) => encodeURIComponent(s)
export... |
50376790e868680b198c4108b6933ad0f5a1e4922814d68a5f8c1b69cd3a0d39 | TypeScript | 1,742 | 77 | import type { Tag } from '@/types/tag.types'
export interface BoutiquesContainerImage {
image?: string
type?: string
index?: string
'container-opts'?: string[]
[key: string]: unknown
}
export interface BoutiquesInput {
id?: string
name?: string
type?: string
description?: string
optional?: boolean... |
4cce7bfdecea03a5a75b8a14e6ff4fb4ada6997c6b22067af240d6f32213bab6 | TypeScript | 1,767 | 54 | import { onDestroy } from 'svelte';
import { type EditContext, NumericModel } from '$lib/model';
export interface RawNumeric {
value?: number;
onChange?: (value: number, context: EditContext) => void;
onEditStart?: () => () => void;
disabled?: boolean;
throttleMs?: number;
min?: number | null;
max?: num... |
ba20fe4db3bfdf26b7d09e1b836ffd75d30bf578bdb559973847124e12402334 | TypeScript | 1,768 | 54 | import Root from './dropdown-menu.svelte';
import CheckboxGroup from './dropdown-menu-checkbox-group.svelte';
import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
import Content from './dropdown-menu-content.svelte';
import Group from './dropdown-menu-group.svelte';
import GroupHeading from './dropdown-menu... |
5898fe511e89329f10bea8dc16931204226c74cba7086a754751f755c6480c87 | TypeScript | 1,848 | 66 | const RECENT_APPLICATIONS_STORAGE_KEY = 'vip.recentApplications'
const MAX_RECENT_APPLICATIONS = 20
export type RecentApplication = {
name: string
fullName?: string
lastVersion?: string
usedAt: string
}
function isRecentApplication(value: unknown): value is RecentApplication {
if (!value || typeof value !==... |
74f84ecc47bc716876dd4618496dfc5885816d7b6311d9d1a41c9578871adafd | TypeScript | 1,896 | 59 | import { pref } from '$lib/utils/helpers';
export type SpatialUnit = 'mm' | 'um';
export type ViewerMode = 'fov' | 'stage';
export type LogLevel = 'debug' | 'info' | 'warning' | 'error';
export interface PlanRegion {
minX: number;
minY: number;
maxX: number;
maxY: number;
}
export interface PlanDefaults {
... |
db94d4715b5f53cfdf32acafc823317c174e3ed64cc9ee9ad039b2c98744159b | TypeScript | 1,923 | 66 | import { ref } from 'vue'
import { defineStore } from 'pinia'
import { appVersionsApi, type BackendAppVersion } from '@/api/appVersions.api'
import type { AppVersion } from '@/types/appversion.types'
function toAppVersion(backend: BackendAppVersion): AppVersion {
return {
applicationName: backend.applicationName... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.