sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
6b5249e1e80cc958de0279b3c9c1177a14ecc3c29cc946dbf07afacbd62af461 | TypeScript | 1,625 | 44 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { AuthActions, AuthActionTypes } from 'actions/auth-actions';
import { GrowthActions, GrowthActionTypes } from 'actions/growth-actions';
import { BoundariesActions, BoundariesActionTypes } from 'actions/boundaries-actions';
import { GrowthS... |
dd4f0c38aa345cb97fab994fc1ab21003898d73e9ee06a246c1a67b63364ff48 | TypeScript | 1,645 | 39 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
export function formatTimeShort(seconds: number): string {
const safe = Math.max(0, Math.round(seconds * 1000));
const totalMins = Math.floor(safe / 60000);
const secs = Math.floor((safe % 60000) / 1000);
const milliseconds = safe ... |
864ed98ce2cee24d2a1ae97dcbb853f77eabb06bdc95eda7855c8f700200bf27 | TypeScript | 1,680 | 70 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ObjectState } from '.';
import {
Canvas3dModel, Mode, DrawData, ActiveElement,
GroupData, MergeData, SplitData,
} from './canvas3dModel';
export interface Canvas3dController {
read... |
a1dd092fc46deeef83ac6711fa1e0966abc9ff566287d0741503cef8d4533451 | TypeScript | 1,681 | 58 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
interface PaginationFilter {
page?: number;
page_size?: number;
[key: string]: any;
}
interface PaginatedResult<T> {
count: number;
[Symbol.iterator](): Iterator<T>;
}
interface PaginatedFetcher<T> {
(filter: PaginationFi... |
adecbda649ba45e494ec4b147e52c429b48ab2b9c6a0785d67f0697555eeb8cd | TypeScript | 1,716 | 56 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { AudioIntervalState } from 'cvat-core-wrapper';
import { toClipboard } from 'utils/to-clipboard';
import { clamp } from 'utils/math';
export interface AudioTimeRange {
start: number;
end: number;
}
export interface AudioPlaybackR... |
a13675a4da0326e54a00acf722e26a30ba62836d0f160957238c684c74401f18 | TypeScript | 1,775 | 47 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ActionUnion, createAction, ThunkAction } from 'utils/redux';
import { Project, ProjectOrTaskOrJob, getCore } from 'cvat-core-wrapper';
import { updateRequestProgress } from './requests-actions';
const core = getCore();
export enum Cons... |
99338ed377ce37468377070ab6dd93f723c4404fe38d1623d803d37007be41fe | TypeScript | 1,835 | 59 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
const BASE_STROKE_WIDTH = 1.25;
const BASE_GRID_WIDTH = 2;
const BASE_POINT_SIZE = 4;
const TEXT_MARGIN = 10;
const SIZE_THRESHOLD = 1;
const POINTS_STROKE_WIDTH = 1;
const POINTS_SELECTED_STROKE_WIDTH ... |
e3f9f791bae7e0536a37fd6ed09c8397fbe84e31c7f0e4a046196163b8208283 | TypeScript | 1,853 | 74 |
import { ServiceException } from '@services/service-exception';
/**
* Represents a label of a dataset sample.
*/
export class Label {
// #region Constructor
/**
* Initializes a new Label instance.
*
* @param {LabelJson} label The JSON object that was retrieved from the backend REST API.
... |
700a79a2efada91b3d84708f807856204cbf96d6b1202fbc58429d6024c996ed | TypeScript | 1,891 | 61 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
description: {
label: 'Descr... |
88654e61756615514b4a4dc8181b553bb52f9dd9c42282830bfac9881781a6c0 | TypeScript | 1,905 | 54 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { getCVATStore } from 'cvat-store';
import { CombinedState, Workspace } from 'reducers';
import { ObjectState, ObjectType } from 'cvat-core-wrapper';
export interface FilterAnnotationsParams {
workspace: Workspace;
exclude?: Object... |
82e4beadddc53abe7c500bfd4e00060314a8f1542f1297d67a69b5002a19d7f7 | TypeScript | 1,917 | 75 |
import { ServiceException } from '@services/service-exception';
/**
* Represents a single vector from the embedding of the analysis.
*/
export class EmbeddingVector {
// #region Constructor
/**
* Initializes a new EmbeddingVector instance.
*
* @param {EmbeddingVectorJson} embeddingVector Th... |
d026b60ac957e39dd78b46351a9e032ee6f776b357330a43c8a58a0630cfb002 | TypeScript | 1,927 | 64 |
import { ServiceException } from '@services/service-exception';
/**
* Represents a single category in an analysis. One category can contain many analyses for different attributions. The category name is usually an
* umbrella term for all the attributions contained in the analysis. This is most-likely a class name.
... |
321ca18e02411c45a801ce5daec4959c37e566098bbb92af0d1e5490320657fa | TypeScript | 1,940 | 79 |
import { ServiceException } from '@services/service-exception';
/**
* Represents a color map that can be used to render heatmaps.
*/
export class ColorMap {
// #region Constructor
/**
* Initializes a new ColorMap instance.
*
* @param {ColorMapJson} colorMap The JSON object that was retrieve... |
b3bd24941e8501949a3bcd654c3db38240c7e01761c1a05cde39af5139ddc6fd | TypeScript | 2,005 | 54 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { useCallback, useEffect, useRef } from 'react';
import type { Region } from 'wavesurfer.js/dist/plugins/regions';
import { clientIDFromWaveRegionId } from '../utils/audio-interval';
type RegionContextMenuCleanup = () => void;
interface ... |
d02c3027af889fed2df0cd4765285cfdd40c8ef97bf7bf55a11383061aaddecc | TypeScript | 2,007 | 81 | // Copyright (C) 2020-2022 Intel Corporation
//
// SPDX-License-Identifier: MIT
import * as SVG from 'svg.js';
import consts from './consts';
export default class Crosshair {
private x: SVG.Line | null;
private y: SVG.Line | null;
private canvas: SVG.Container | null;
public constructor() {
t... |
e606ecadd33155afd329e20142ef3cb27537ffe0fbbc8a3260a5b97d2141f8ee | TypeScript | 2,058 | 55 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ShapeType } from '../enums';
import type { SerializedTrack } from '../server-response-types';
import { checkNumberOfPoints } from '../object-utils';
import type { AnnotationInjection, Interpola... |
be9fdbcae6376b9003b8f790852ce00ef634a41e724b84ec77b5693182b109c7 | TypeScript | 2,128 | 71 | // Copyright (C) 2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedConsensusSettingsData } from './server-response-types';
import PluginRegistry from './plugins';
import serverProxy from './server-proxy';
import { convertDescriptions, getServerAPISchema } from './server-schema';
import { f... |
ac6847dba7e6ebe81f4291ea45a91c7e666fbab48b9fc6bbb3f3f98b8b54a4ed | TypeScript | 2,138 | 64 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Task } from 'cvat-core-wrapper';
export function sorter(path: string) {
return (obj1: any, obj2: any): number => {
let currentObj1 = obj1;
let currentObj2 = obj2;
let field1: string | number | null = null;
... |
fa2feffbab4f470e7a350472e5b61c85ad77fbb5fa43c90a711a8d92b511b6ed | TypeScript | 2,151 | 70 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Source } from '../enums';
import type { SerializedAttributes, SerializedTrack } from '../server-response-types';
import type { TrackedShape } from './types';
export const defaultGroupColor = '... |
a97860fb83cfc47954d47b35e6bbf5829ae61acd72fe19b97e7dd26313a102f8 | TypeScript | 2,168 | 75 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { GroupData } from './canvasModel';
import { ObjectSelector, SelectionFilter } from './objectSelector';
export interface GroupHandler {
group(groupData: GroupData, selectionFilter: Selection... |
ccae20609d1b836b6680ec7a755d7287817d32d537c5b1e3bc2100911f5a51bf | TypeScript | 2,178 | 78 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Project, ProjectOrTaskOrJob } from 'cvat-core-wrapper';
import { ConsensusActions, ConsensusActionTypes } from 'actions/consensus-actions';
import { getInstanceType } from 'actions/common';
import { ConsensusState } from '.';
const defau... |
1f74bba86da1ecabdd512d10c57cf67e53d25e9477021fd1596dd19f031592e8 | TypeScript | 2,185 | 62 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import JSZip from 'jszip';
onmessage = (e) => {
let errored = false;
function handleError(error): void {
try {
if (!errored) {
postMessage({ error });
... |
7fcc329c90325302032a8ee0ab0098edd66963175f36d864eac29e316ab81fcd | TypeScript | 2,207 | 90 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import type AnnotationHistory from '../annotations-history';
import type { Label } from '../labels';
import type { DimensionType, JobType } from '../enums';
import type { MaskShape } from './mask-shape'... |
33e62c8141e13d0bc8b27551257dcc07fb4f64ef1132af9997d835650d3c1bc9 | TypeScript | 2,232 | 68 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { BoundariesActions, BoundariesActionTypes } from 'actions/boundaries-actions';
import { ServerAPIActions, ServerAPIActionTypes } from 'actions/server-actions';
import { ServerAPIState } from '.';
const defaultState: ServerAPIState = {
... |
d30750eea907b2cee5bd4e3112fe0c2293f41e43078b05174ecb35ca4b6eb4c9 | TypeScript | 2,276 | 65 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { BaseImageFilter } from './image-processing';
export default class HistogramEqualizationImplementation extends BaseImageFilter {
private cv: any;
constructor(cv: any) {
super()... |
35a72e2057384c88365c0e46b7ee1a0ff07ab2f80b90025de1ab5cbb154be361 | TypeScript | 2,282 | 86 |
import { AnalysisCategory } from '@services/projects/analysis-category';
import { ServiceException } from '@services/service-exception';
/**
* Represents an analysis method.
*/
export class AnalysisMethod {
// #region Constructor
/**
* Initializes a new AnalysisMethod instance.
*
* @param {... |
c7d8ff4580e25a24e8918d6ce383c4c6c26fc389991f85893f0545f8303b2d4e | TypeScript | 2,289 | 70 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import {
ActionUnion, createAction, ThunkAction, ThunkDispatch,
} from 'utils/redux';
import { getCore } from 'cvat-core-wrapper';
import { fetchAnnotationsAsync } from './annotation-actions';
cons... |
04f009467e9094986ea20fd01f7ece3d6edbdd5c6b63329dfe8c934a4c40af47 | TypeScript | 2,362 | 74 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import PluginRegistry from './plugins';
import serverProxy from './server-proxy';
import User from './user';
import { fieldsToSnakeCase } from './common';
import { SerializedUserGrowthData } from './server-response-types';
import {
APIUserGrow... |
9d00628da5d83406b3c4052be59059047bfdadb90f53d54fa6221a8e52189e19 | TypeScript | 2,379 | 67 |
import { map } from 'rxjs/operators';
import { lastValueFrom } from 'rxjs';
import { inject, Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { ColorMap, ColorMapJson } from '@services/color-maps/color-map';
import { Configuration, CONFIGURAT... |
4fb850cb4739094b855c6c2dce5f9856338a32d5deb3d06c4668bf5b35397240 | TypeScript | 2,401 | 85 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
const validationPatterns = {
validatePasswordLength: {
pattern: /^(?=.{8,256}$)/,
message: 'Password must be between 8 and 256 characters',
},
passwordContainsNumericCharact... |
9e358d101b9a873e75c35f3fcd08a164a4a26beb42cbd3b1860acfe35fcc643a | TypeScript | 2,404 | 66 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { getCore, UserGrowthData, UserGrowthDataModifiableFields } from 'cvat-core-wrapper';
import { ActionUnion, createAction, ThunkAction } from 'utils/redux';
const core = getCore();
export enum GrowthActionTypes {
GET_GROWTH_DATA = 'GET... |
a866cb1433a5e5a47c2caba316514db345c55ba5ffd76b2e9990cf5f6cceef6c | TypeScript | 2,414 | 97 |
import { AnalysisMethod, AnalysisMethodJson } from '@services/projects/analysis-method';
import { ServiceException } from '@services/service-exception';
/**
* Represents a single project from the workspace.
*/
export class Project {
// #region Constructor
/**
* Initializes a new Project instance.
... |
697721caf226bb39b14e829ae24e4fe48fab300ac801360a40ab59f36b4b43aa | TypeScript | 2,446 | 75 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedJobValidationLayout, SerializedTaskValidationLayout } from './server-response-types';
import PluginRegistry from './plugins';
export class JobValidationLayout {
#honeypotCount: JobValidationLayout['honeypotCount'];
#hon... |
4907b5fd646d2caa2d686909cfd08f865dcdd61ed0a09641653832f81544c97f | TypeScript | 2,449 | 76 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { useEffect, useState, RefObject } from 'react';
interface UseDialogPositioningParams {
ref: RefObject<HTMLDivElement>;
top: number;
left: number;
scale: number;
angle: number;
clientCoordinates: [number, number];
... |
747964b8cc76adfb87de15961310a65bcfbecf507552339da0df6054e207d73e | TypeScript | 2,466 | 73 | // Copyright (C) 2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
... |
7348ac7f3614b5352bcf5e828baadd65ac9b37e1d633ce5e9f87023ef5c9f377 | TypeScript | 2,543 | 83 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SelectData } from './canvasModel';
import { ObjectSelector, SelectionFilter } from './objectSelector';
export interface SelectHandler {
select(selectData: SelectData, selectionFilter: SelectionFilter, initialEvent?: MouseEvent): void... |
2d1bda93f505a8cc6f74302d8b8d118f7edf1b27eec2a243fb848521d13a0129 | TypeScript | 2,568 | 63 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ShapeType } from '../enums';
import type { SerializedShape } from '../server-response-types';
import { checkNumberOfPoints } from '../object-utils';
import type { AnnotationInjection } from './... |
fbf53762b2b8fe0fa55026cdd0b73acbec6387bad2c890bfdf502f10656a46c4 | TypeScript | 2,581 | 65 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { combineReducers, Reducer } from 'redux';
import authReducer from './auth-reducer';
import projectsReducer from './projects-reducer';
import tasksReducer from './tasks-reducer';
import jobsReduc... |
895bda80cf58af123906cd20850e49b173eafbd943c2c88e8f58381432cc89be | TypeScript | 2,641 | 74 | // Copyright (C) 2020-2022 Intel Corporation
//
// SPDX-License-Identifier: MIT
import platform from 'platform';
const engine = platform.layout || 'unknown';
const name = platform.name || 'unknown';
const version = platform.version || 'unknown';
const os = platform.os ? platform.os.toString() : 'unknown';
let platfor... |
9f7d0e81e690e45680b37d3d8939efc628872f246a13daa252a260acd5eb8227 | TypeScript | 2,660 | 90 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import Axios, { AxiosRequestConfig, AxiosResponse } from 'axios';
import * as tus from 'tus-js-client';
class AxiosHttpResponse implements tus.HttpResponse {
readonly #axiosResponse: AxiosResponse;
constructor(axiosResponse: AxiosRespons... |
2128e8c3ef1c903840587915284f1dd0d59e17af13695a81f25ba5a91d46ff70 | TypeScript | 2,716 | 116 | export function getKeyfromCode(code: string): string | null {
const mapping: Record<string, string> = {
ControlLeft: 'ctrl',
ControlRight: 'ctrl',
MetaLeft: 'command',
MetaRight: 'command',
AltLeft: 'alt',
AltRight: 'alt',
ShiftLeft: 'shift',
ShiftRigh... |
18677901d7fd54967326cb256afcdd0ecf8897e09be8978bb69f5a63e84301a3 | TypeScript | 2,721 | 104 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { DimensionType } from './enums';
import {
SerializedAnnotationExporter,
SerializedAnnotationFormats,
SerializedAnnotationImporter,
} from './server-response-types';
export class Loa... |
2ab80b201ecff047239386ee9aea31540fe8d532cba5742dd835fe0c778c94d5 | TypeScript | 2,738 | 57 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
export function getFileContentTypeByMimeType(mimeType: string): string {
return mimeType.split('/')[0];
}
export function getFileContentType(file: File): string {
return getFileContentTypeByMimeType(file.type);
}
export function checkFil... |
d5f72b724a0fa31d6f79b61bb32e9655ebe78884bba52a03a1a5a1ec6d3aea1d | TypeScript | 2,784 | 74 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import type ObjectState from '../object-state';
import { checkObjectType } from '../common';
import { clamp } from '../opencv/math-utils';
import { ShapeType, DimensionType } from '../enums';
import {
... |
2daaa049b1ecedf813335989e9f3135defad3261bddfc9c8f4af08793da05587 | TypeScript | 2,799 | 100 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import User from './user';
import { ArgumentError } from './exceptions';
export interface RawCommentData {
id?: number;
message?: string;
created_date?: string;
updated_date?: string;
... |
ce480ea4e373a1914696838872b8db969656d13836d5e75c62d8593bbd2657d2 | TypeScript | 2,805 | 98 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ObjectState, ObjectType } from 'cvat-core-wrapper';
const OBJECT_DRAG_ID_PREFIX = 'object:';
const LAYER_DRAG_ID_PREFIX = 'drag-layer:';
const LAYER_DROP_ID_PREFIX = 'layer:';
const LAYER_INSERT_DROP_ID_PREFIX = 'insert-layer:';
export ... |
58fabd73f90e7d3d92e286e827caf05050fda2bea8af9716cf094bf70ce5fe87 | TypeScript | 2,829 | 84 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import ErrorStackParser from 'error-stack-parser';
import { getCore } from 'cvat-core-wrapper';
import { getCVATStore } from 'cvat-store';
import { CombinedState } from 'reducers';
const core = getCore... |
116a43d9fb3104e1a12ba4950b04f71cd082c30aa6cc12b3d1e9b43a33e5e5a0 | TypeScript | 2,836 | 76 |
import { map } from 'rxjs/operators';
import { lastValueFrom } from 'rxjs';
import { inject, Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Configuration, CONFIGURATION } from '@config/configuration';
import { Sample, SampleJson } from '@... |
09b33abd6b06a8e3faf759575e0854daa70ba9b4e35b8f18c21c2b399359b69a | TypeScript | 2,844 | 81 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ShapeType } from '../enums';
import type { SerializedShape } from '../server-response-types';
import { checkNumberOfPoints } from '../object-utils';
import type { AnnotationInjection } from './... |
cf06f94bde5847236fe5dbb7f65a7c06fd3e8e69aba21b1b3f46048ff5cfd27f | TypeScript | 2,876 | 109 |
import { EmbeddingVector, EmbeddingVectorJson } from '@services/analyses/embedding-vector';
import { ServiceException } from '@services/service-exception';
/**
* Represents a single analysis.
*/
export class Analysis {
// #region Constructor
/**
* Initializes a new Analysis instance.
*
* @p... |
d0294af7f23ba6ad4ec3da6e83a8892fc97351808689fc221df513de04c389a1 | TypeScript | 2,888 | 71 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { DimensionType, ShapeType } from '../enums';
import type { SerializedTrack } from '../server-response-types';
import { checkNumberOfPoints, findAngleDiff } from '../object-utils';
import { Track... |
32e01ce2b9a6700c8d06791f75c30592fb3381f3daf6eb047290c306ec728866 | TypeScript | 2,908 | 92 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedGuide } from './server-response-types';
import { ArgumentError, DataError } from './exceptions';
import PluginRegistry from './plugins';
import serverProxy from './server-proxy';
class AnnotationGuide {
#id: AnnotationGuide... |
777d8eec9dfdb6037225decc1bd075173e9e798baa071d5b9d9de7ff43fa9b5b | TypeScript | 2,932 | 107 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
export function escapeCSVValue(value: any): string {
if (value === null || value === undefined) return '';
if (typeof value !== 'string') {
return String(value);
}
const escapedStr = value.replace(/"/g, '""');
return ... |
e156a40a5a3d83942cfb5695ec7495705f47716c126860b8093794ed0fb28c58 | TypeScript | 2,982 | 85 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { range } from 'lodash';
import ObjectState from '../object-state';
import { Job, Task } from '../session';
import { SerializedShape } from '../server-response-types';
import { propagateShapes } from '../object-utils';
import { ObjectType ... |
90f46df77e9d464ad62bafc90107ca074513ce985c375b4366f6cf8f30ab89e8 | TypeScript | 2,998 | 66 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ShapeType } from '../enums';
import type { SerializedShape } from '../server-response-types';
import { checkNumberOfPoints, rotatePoint } from '../object-utils';
import { Shape } from './shape'... |
c107ec72695d5b2f4e2361cd5ce65fb1b7bccb5b916b10bb5f314c95a2591e50 | TypeScript | 3,021 | 76 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ActionUnion, createAction, ThunkAction } from 'utils/redux';
import { PluginsList, SupportedPlugins } from 'reducers';
import { getCore } from 'cvat-core-wrapper';
import React from 'react';
c... |
6106f3ebc12cd36df11ab8226d87fe9dcced258849fb621162c0f3e744a935ab | TypeScript | 3,081 | 95 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { CombinedState } from 'reducers';
import { ThunkDispatch } from 'utils/redux';
import IncrementalCSVWriter, { CSVColumn, downloadCSV } from 'utils/csv-writer';
import { bulkActions } from './bulk-actions';
export interface CSVExportOption... |
b3a3e2ef9212c673e2d707eac714f5891afcdada57967c505d860cbe048eec86 | TypeScript | 3,092 | 85 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ActionUnion, createAction } from 'utils/redux';
import { CombinedState, RequestsQuery } from 'reducers';
import { Request, getCore } from 'cvat-core-wrapper';
import { Store } from 'redux';
import { getCVATStore } from 'cvat-store';
cons... |
0da776ec9dace46713cfc492c5a4b681f5dfd80e28dba317859bb0ea8d5fec4c | TypeScript | 3,155 | 95 |
import { Component, type OnInit, inject } from '@angular/core';
import { Router, RouterModule } from '@angular/router';
import { ClarityModule } from '@clr/angular';
import { CommonModule } from '@angular/common';
import type { Project } from '@services/projects/project';
import { ProjectsService } from '@services/pr... |
de038ce692f45923653c3fe251c1fe9119290a7abcd6b6dd90211370345f1b32 | TypeScript | 3,192 | 90 | // Copyright (C) 2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
... |
2b8096df95cd253293a63c4d5c9af96b7139072585936e2b7516644270876278 | TypeScript | 3,193 | 120 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedAnnotationConflictData, SerializedQualityConflictData } from './server-response-types';
import { ObjectType } from '../enums';
export enum QualityConflictType {
EXTRA = 'extra_annotation',
MISMATCHING = 'mismatching_lab... |
2e6d7b4e379746092df53127698297802cbf1975b38f2d05fd1099633b34baef | TypeScript | 3,198 | 89 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { CombinedState } from 'reducers';
import { ActionUnion, createAction, ThunkDispatch } from 'utils/redux';
import { selectionActions } from './selection-actions';
export enum BulkActionsTypes {
START_BULK_ACTION = 'START_BULK_ACTION',
... |
949d456e05d5d5f8a2357c6ccbb9a1a4f688f3057da3a3782b1b1dc65936d5aa | TypeScript | 3,230 | 107 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ExportActions, ExportActionTypes } from 'actions/export-actions';
import { ExportState } from '.';
import { defineActititiesField } from './import-reducer';
const defaultState: ExportState = ... |
c64207ca9df1eeeb072edd94dc4bb3cd5387bcd5648bde877fa99aeadecb1998 | TypeScript | 3,234 | 131 |
import { Label, LabelJson } from '@services/datasets/label';
import { ServiceException } from '@services/service-exception';
/**
* Represents a single sample from the dataset for which the analyses were performed.
*/
export class Sample {
// #region Constructor
/**
* Initializes a new Sample instance... |
ba3414896b8c154a3d50625861e3cb5c1df684787680a0f778cc06684feb3dc6 | TypeScript | 3,292 | 97 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedCollection } from '../server-response-types';
import ObjectState from '../object-state';
import { Job, Task } from '../session';
export enum ActionParameterType {
SELECT = 'select',
NUMBER = 'number',
CHECKBOX = 'ch... |
dcef361b1d82ecd2e2581bdc8fd3d047c2fbf9de74d5408d13aedabeefdbdf02 | TypeScript | 3,377 | 103 | // Copyright (C) 2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
... |
f9a08b49da311fc91a368df669b6b28f419450a05bdbadd248611f397a67e42f | TypeScript | 3,384 | 110 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import ObjectState, { type SerializedData } from '../object-state';
import { ScriptingError } from '../exceptions';
import { ObjectType } from '../enums';
import type { SerializedTag } from '../server-r... |
1f1c407c015642e8ebf00aea7fc7a56c9824f7aac1f548cdcf91437a412cf2bd | TypeScript | 3,405 | 127 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import PluginRegistry from './plugins';
import {
LabelType, ModelProviders, ModelKind, ShapeType,
} from './enums';
import {
SerializedModel, ModelParams, MLModelTip, MLModelLabel,
} from './cor... |
ef22b2ceb6e414dce3cd01e6bf57b421a8d69841359f22a4380cd547f273693d | TypeScript | 3,408 | 124 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import ObjectState from '../object-state';
import { ArgumentError } from '../exceptions';
import { Job, Task } from '../session';
import { BaseAction } from './base-action';
import {
BaseShapesAction, run as runShapesAction, call as callShapes... |
cb03eeab58c04a9860931ae3ab9e2ef1844dbe83b502e36ed86474054752374e | TypeScript | 3,451 | 103 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { useDispatch, useSelector } from 'react-redux';
import { audioActions } from 'actions/audio-actions';
import { ActiveControl, CombinedState } from 'reducers';
import { registerComponentShortcuts } from 'actions/shortcuts-actions';
import ... |
d6882d1400a261d86215dfb8f0f7c5bff5bdaeeeae77abc20eb636bb1905e6de | TypeScript | 3,508 | 134 | // Copyright (C) 2021-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Canvas3dController, Canvas3dControllerImpl } from './canvas3dController';
import {
Canvas3dModel,
Canvas3dModelImpl,
Mode,
DrawData,
ViewType,
MouseInteraction,
Conf... |
cd9ddd8a1022f2b2b24908d44558adf87010c3ee9b03afc24bf1f4b7392028c9 | TypeScript | 3,511 | 108 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import {
SerializedApiToken, SerializedUser, SerializedUserGrowthData,
} from './server-response-types';
import { QualityRequirementAnnotationType } from './quality/server-response-types';
import { JobType } from './enums';
import { Camelized,... |
69d4060d24f271c7ece5d5cac2aafa4dc585dacb7cce72602e3e02841bb4d6e7 | TypeScript | 3,512 | 129 |
/**
* A utility for building URLs.
*/
export class UrlBuilder {
// #region Private Fields
/**
* Contains the base URL from which the URL is built.
*/
private baseUrl: string | null = null;
/**
* Contains the path segments that are added to the URL.
*/
private readonly pathS... |
01160c5018ed6536a4df0506e34c29ccc1f1256e52e8f160b65952a6552876eb | TypeScript | 3,522 | 110 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import * as SVG from 'svg.js';
import { SplitData } from './canvasModel';
export interface SplitHandler {
split(splitData: SplitData): void;
select(state: any): void;
cancel(): void;
}
exp... |
24cef04e3bd917bc5f841888931e02aaa33de47de494564bd6f275e7c6bf2c81 | TypeScript | 3,525 | 93 |
import { map } from 'rxjs/operators';
import { lastValueFrom } from 'rxjs';
import { inject, Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Analysis, AnalysisJson } from '@services/analyses/analysis';
import { Configuration, CONFIGURATION... |
29ebbdd1ba401dc6dfbaae2900cc1dd625dab499ad4a604a2f608dbbbbf5348d | TypeScript | 3,537 | 111 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import _ from 'lodash';
import { AnyAction } from 'redux';
import { RQStatus } from 'cvat-core-wrapper';
import { BoundariesActionTypes } from 'actions/boundaries-actions';
import { RequestsActionsTypes } from 'actions/requests-actions';
import { ... |
9d6ebce25870dc01c2015acb0185df1036913d503a088c803cf55d83536cfc36 | TypeScript | 3,569 | 109 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Dispatch } from 'redux';
import {
Job, Task, Project, CloudStorage,
} from 'cvat-core-wrapper';
import MLModel from 'cvat-core/src/ml-model';
import { getJobPreviewAsync } from 'actions/jobs-actions';
import { getTaskPreviewAsync } fr... |
965d4c82fe4af491dd43cf3092a3f43d6182f9357f8700b39668a95cf9d08ed4 | TypeScript | 3,687 | 103 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import type ObjectState from '../object-state';
import { checkObjectType } from '../common';
import { ArgumentError } from '../exceptions';
import { Label } from '../labels';
import {
attrsAsAnObjec... |
2d934caac5e48330c868f1e173462616847a97ac24db098de0df9e788a16707e | TypeScript | 3,702 | 123 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import Platform from 'platform';
import ErrorStackParser from 'error-stack-parser';
export class Exception extends Error {
private readonly time: string;
private readonly system: string;
pr... |
435271c1fee5ccaddb5e43f26e1ce869c748609deae30a016e7af3460ca9b06f | TypeScript | 3,721 | 121 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { AuthActionTypes } from 'actions/auth-actions';
import { WebhooksActionsTypes } from 'actions/webhooks-actions';
import { SelectionActionsTypes } from 'actions/selection-actions';
import { AnyAction } from 'redux';
import { omit } from 'lo... |
978993d67491ed12b546d9c9c7f72e1d3b7b13d42028947eaed0bccc9656a18f | TypeScript | 3,734 | 102 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
state: {
label: 'State',
... |
36fe7fe7c72285a54065ecf77d69054b0c7d0d6c402f98f1282c9082c7668cb1 | TypeScript | 3,782 | 113 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedQualitySettingsData, SerializedQualitySettingsSaveData } from './server-response-types';
import PluginRegistry from '../plugins';
import serverProxy from '../server-proxy';
import { convertDescriptions, getServerAPISchema } from... |
d28741ff2f4fc6735b81053aa1f67f75417892523aaa295a86e6efa2f178655f | TypeScript | 3,789 | 102 |
import { map } from 'rxjs/operators';
import { lastValueFrom } from 'rxjs';
import { inject, Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Configuration, CONFIGURATION } from '@config/configuration';
import { Project, ProjectJson } from ... |
bcc937aef74d88c04080ad5df4369bff04dd03939904277b08fd303292daecac | TypeScript | 3,792 | 119 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
/* eslint-disable no-restricted-globals */
import { initializeOpenCVInWorker } from '../worker-utils';
import type { OpenCVInterface } from '../opencv/opencv-interface';
export enum WorkerAction {
INITIALIZE = 'initialize',
SIMPLIFY_POLY... |
ecee266f25e51ba29abdb5a7cf8cff2a799e0ff0386be3d0218afe249880f171 | TypeScript | 3,807 | 116 | // Copyright (C) 2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { Config } from '@react-awesome-query-builder/antd';
import asyncFetchUsers from 'components/resource-sorting-filtering/request-users';
export const config: Partial<Config> = {
fields: {
... |
4332aca941002467bc564d801da5f85f4c8b3ab67e1aa4a6f997a4e0a06da7fc | TypeScript | 3,825 | 106 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import {
useRef, useState,
} from 'react';
import { MINIMAP_HEIGHT } from 'audio/utils/waveform-geometry';
import { clamp } from 'utils/math';
const WAVEFORM_PANEL_HEIGHT_STORAGE_KEY = 'audioWaveformPanelHeight';
const DEFAULT_WAVEFORM_PANEL... |
1834cf60007e67396d444f914c1fabe73d3c15665210043c3682418d0f947ba1 | TypeScript | 3,866 | 139 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { RQStatus } from './enums';
import User from './user';
import { SerializedRequest } from './server-response-types';
export type RequestOperation = {
target: string;
type: string;
format: string | null;
jobID: number | null... |
e85aa7bcd809b1e3ba3fd05d6994c7483cfef68b24238bc96cf839d8c6f2dfca | TypeScript | 3,904 | 143 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import PluginRegistry from './plugins';
import serverProxy from './server-proxy';
import User from './user';
import { SerializedApiToken } from './server-response-types';
import { APIApiTokenModifiableFields, ApiTokenModifiableFields } from './ser... |
7162589cf5c62c10a680671b5772642e33feaeef13761ba5d034aeb98a4509e0 | TypeScript | 3,947 | 113 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ArgumentError } from './exceptions';
const plugins = [];
export interface APIWrapperEnterOptions {
preventMethodCall?: boolean;
preventMethodCallWithReturn?: unknown;
}
export defaul... |
f3ee8dad4020c002422f4df833fab47a97189c3080f647e16ec652c09d16a06a | TypeScript | 4,055 | 111 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { InferenceSession, env, Tensor } from 'onnxruntime-web';
let decoder: InferenceSession | null = null;
env.wasm.wasmPaths = '/assets/';
export enum WorkerAction {
INIT = 'init',
DECODE = 'decode',
}
export interface InitBody {
... |
1667dfe3fd428e0f8bef8131f773f6ff54e59fe6cc37fe0ffcb418f0fedbd2bf | TypeScript | 4,105 | 120 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ChunkQuality } from 'cvat-data';
import serverProxy from '../server-proxy';
const PEAKS_SAMPLE_RATE = 8000;
export interface AssembledAudioData {
/** original sample rate PCM audio buffer for playback */
audioBuffer: AudioBuffer... |
0ddf9a1b4594084af6e3b6b9679930d369dbc9349a7aa0f83780699681a328b8 | TypeScript | 4,164 | 121 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ServerError, getCore } from 'cvat-core-wrapper';
import { EventScope } from 'cvat-logger';
import config from 'config';
import _ from 'lodash';
import { platformInfo } from 'utils/platform-checker';
const core = getCore();
const { CONTRO... |
1a06a1eb182c49c5797ec61dc1d755fd3a6a41c11f30287375111a1da4efd687 | TypeScript | 4,240 | 128 |
/**
* The dimensions of the selection box that is used in the embedding visualizer to select embedding vectors.
*/
export class SelectionBox {
// #region Constructor
/**
* Initializes a new instance of the SelectionBox class.
*
* @param {number} startX Contains the initial x-coordinate of th... |
11ba04e92e7ff9525a162b82f355ce7086679848b7ec8c33a5250986802fcc68 | TypeScript | 4,250 | 133 | // Copyright (C) 2019-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { SerializedUser } from './server-response-types';
import { UserModifiableFields } from './server-request-types';
import PluginRegistry from './plugins';
import { fieldsToSnakeCase } from './comm... |
fbb20bfa8ee4cecf492a24d05c1b236ade29943233313dd7a3b9a98b382982f6 | TypeScript | 4,268 | 148 |
import { Label, LabelJson } from '@services/datasets/label';
import { ServiceException } from '@services/service-exception';
/**
* Represents a single attribution.
*/
export class Attribution {
// #region Constructor
/**
* Initializes a new Attribution instance.
*
* @param {AttributionJson}... |
d45a2d48e0de30a962f4d6c4fd437997d60a5a3a6af510cb75f374ea50b12644 | TypeScript | 4,298 | 123 | import { type HttpErrorResponse, HttpStatusCode } from '@angular/common/http';
/**
* Represents an enumeration for the different kinds of errors that a service exception can be caused by.
*/
export enum ServiceExceptionKind {
/**
* It is unknown what caused the error.
*/
Unknown = 'Unknown',
... |
5687b40ccd8373e25465d632b478dec4846931b204fd866dd85efafacebc60a8 | TypeScript | 4,382 | 134 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import * as SVG from 'svg.js';
import consts from './consts';
import { translateToSVG } from './shared';
import { Geometry } from './canvasModel';
export interface RegionSelector {
select(enabled:... |
765a11e3d878dba6744a5013eca834bd80a82bd4242d943bee3557af6c803570 | TypeScript | 4,392 | 119 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { useEffect, useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { audioActions } from 'actions/audio-actions';
import { CombinedState } from 'reducers';
import { shallowEqual, ThunkDispatch } from 'utils/... |
c35673f9193388e9cd388c0415a409169f7be078cdc7961c35c1de5a4a9fd685 | TypeScript | 4,394 | 105 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { ThunkAction } from 'utils/redux';
import { CombinedState, RequestsQuery } from 'reducers';
import {
getCore, RQStatus, Request, Project, Task, Job, StorageLocation,
} from 'cvat-core-wrapper';
import { listenExportBackupAsync, listenE... |
780175a01512575b337169899d7a546ebb962e34ee5f0adce1bcf49c50f7ef3e | TypeScript | 4,481 | 113 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
import { getCore, Webhook } from 'cvat-core-wrapper';
import { WebhooksQuery } from 'reducers';
import {
ActionUnion, createAction, ThunkAction, ThunkDispatch,
} from 'utils/redux';
import { filterNull } from 'utils/filter-null';
const cvat =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.