text stringlengths 3.08k 15.5k |
|---|
<reponame>inJuly0/Sugarscript
import keywords = require("./keywords");
import TokType = require("./tokentype");
import Token from "./token";
function lex(src: string): Token[] {
const tokens: Token[] = [];
let start = 0;
let current = 0;
let line = 0;
let currentLevel = 0;
const levels = [];
const bracke... |
<filename>source/modules/CertificateExtensions/AltName.ta.ts<gh_stars>1-10
/* eslint-disable */
import { ASN1Element as _Element, OPTIONAL } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import {
AltNameType,
_decode_AltNameType,
_encode_AltNameType,
} from "../CertificateExtensi... |
import tl = require("vsts-task-lib/task");
import Q = require("q");
import util = require("util");
import querystring = require('querystring');
var uuid = require('uuid/v4');
var httpClient = require('vso-node-api/HttpClient');
var httpObj = new httpClient.HttpCallbackClient(tl.getVariable("AZURE_HTTP_USER_AGEN... |
<reponame>JPeer264/node-rcs-core<gh_stars>10-100
import { parse } from 'postcss';
import cssVariablesLibrary from '../cssVariablesLibrary';
import arrayToRegex from '../helpers/arrayToRegex';
import keyframesLibrary from '../keyframesLibrary';
import selectorsLibrary from '../selectorsLibrary';
import replaceRegex fro... |
<filename>src/record.ts
import { Type } from '@quenk/noni/lib/data/type';
import {
Record,
merge,
reduce,
empty,
isRecord as _isRecord
} from '@quenk/noni/lib/data/record';
import { keys } from '@quenk/noni/lib/data/record';
import { fail as rfail } from './result/failure/record';
import { Failures... |
<reponame>mzknksh/nova
import { Component, OnInit } from "@angular/core";
import {
Chart,
ChartAssist,
IChartAssistSeries,
IChartSeries,
ILineAccessors,
IXYScales,
LineAccessors,
LinearScale,
LineRenderer,
MissingDataLineRendererConfig,
TimeScale,
XYGrid,
} from "@nova-ui... |
<gh_stars>1-10
import { app, BrowserWindow, ipcMain } from 'electron';
import * as path from 'path';
import * as url from 'url';
let NeDB = require('nedb');
let win: BrowserWindow = null;
const args = process.argv.slice(1),
serve = args.some(val => val === '--serve');
let Algorithms = new NeDB({ filename: __dirname... |
import * as winston from "winston";
import { BlockchainState } from "./BlockchainState";
import { LastParsedBlock } from "../models/LastParsedBlockModel";
import { BlockParser } from "./BlockParser";
import { ValidatorParser } from "./ValidatorParser";
import { TransactionParser } from "./TransactionParser";
import { M... |
#!/usr/bin/env node
import arg from 'arg';
import inquirer from 'inquirer';
import pkg from '../package.json';
import { genEntity } from './lib/gen';
import { readORMConfig } from './lib/readORMFile';
import { writeToFile } from './lib/writeToFile';
const Types = ['int', 'int2', 'int4', 'int8', 'smallint', 'integer',... |
<filename>src/instructions.test.ts
import {processInstruction} from "./interp";
import {bank0, doBranch, PC, setPC, Accum, PStatus} from "./instructions";
import {parseAssembly} from "./assembler";
test('doBranch', () => {
setPC(0x2000)
doBranch(true, 0);
expect(PC).toEqual(0x2000);
doBranch(true, 1);
expect... |
import Accessor = require("esri/core/Accessor");
import i18n = require("dojo/i18n!../../nls/resources");
import {
property,
subclass
} from "esri/core/accessorSupport/decorators";
import { PanelProps, ActionProps } from "../../interfaces/interfaces";
import ApplicationBase from "ApplicationBase/ApplicationBas... |
import * as React from "react";
import styled, { css, StyledComponent } from "styled-components";
import {
border_radius_small,
figma_black_1,
figma_black_8,
figma_blue,
figma_hud,
figma_white,
shadow_hud
} from "../../variables";
import { fontUIPos } from "../../mixins";
const Root = style... |
<reponame>smajl/DefinitelyTyped
/// <reference types="node" />
import ssri = require('ssri');
import { Hash as CryptoHash } from "crypto";
import { createReadStream } from 'fs';
import { Transform } from 'stream';
const integrityString = 'sha512-9KhgCRIx/AmzC8xqYJTZRrnO8OW2Pxyl2DIMZSBOr0oDvtEFyht3xpp71j/r/pAe1DM+JI/A... |
// https://learnxinyminutes.com/docs/typescript/
// There are 3 basic types in TypeScript
let isDone: boolean = false;
let lines: number = 42;
let name: string = 'Anders';
// But you can omit the type annotation if the variables are derived
// from explicit literals
let isDone = false;
let lines = 42;
let name = 'And... |
import { updateGameStateFAF, updateImagePlacementConfiguration } from '../actions/guiActions';
import { selectColor } from '../actions/uiActions';
import { chunkToIndex, TILE_SIZE } from '../chunkHelper';
import colorConverter from '../colorConverter';
import logger from '../handlers/logger';
import { chunkStore, Loade... |
import React, {ReactNode, KeyboardEvent} from 'react'
import {styled} from '@karma.run/react'
import Downshift, {UseSelectPropGetters, ControllerStateAndHelpers} from 'downshift'
import {themeMiddleware, Theme} from '../style/themeContext'
import {
FontSize,
TransitionDuration,
LineHeight,
Spacing,
MarginPro... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import * as fs from "fs";
import * as jszip from "jszip";
import {
AddInType,
getAddInTypeForManifestOfficeAppType,
getOfficeAppName,
getOfficeAppsForManifestHosts,
ManifestInfo,
OfficeApp,
readManifestFile,
}... |
type TCheck = (houseNumber: string, justNumbersPart: number) => boolean;
interface ICheckOddResult {
canIncludesOdd?: string;
canNotIncludesOdd?: string;
}
interface ICheckEvenResult {
canIncludesEven?: string;
canNotIncludesEven?: string;
}
export class HousesParser
{
private static _EVEN = 'четные'... |
import { BrowserTag, CapabilityTag, ContextTag, ExecutionRetriedTag, FeatureTag, IssueTag, ManualTag, PlatformTag, Tag, ThemeTag } from '@serenity-js/core/lib/model';
import { match } from 'tiny-types';
import { equal } from 'tiny-types/lib/objects';
import * as serenitybdd from '../../SerenityBDDJsonSchema';
import {... |
export const audio = document.createElement('audio');
audio.setAttribute('controls', 'true');
audio.setAttribute(
'src',
'https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3',
);
const audioContent = document.createTextNode('Your browser does not support the audio element.');
audio.appendChi... |
<gh_stars>10-100
import { PathFinder } from "../../../src/core/shared/path-finder";
import { FileHelper } from "../../../src/core/integration/file-helper";
import * as mockParsedTestFiles from "../../../__mocks__/parsedTestFiles.mock";
import * as mockTestFileData from "../../../__mocks__/testFileData.mock";
import * a... |
/**
* @license
* Copyright 2020 Dynatrace LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
import { listProjectsThunk } from 'actions/ProjectActions';
import TagSearchBox from 'components/TagSearchBox/TagSearchBox';
import { isMember, isOwner, isAdmin } from 'utils/ProjectUtils';
import { ProjectGraphRecord, TagData, UserRecord } from '@celluloid/types';
import {
Chip,
createStyles,
Fade,
Theme,
To... |
<filename>react-webgl-viz/src/clientProcess/reactComponents/flowjo-vis/webgl/model-dots.ts
/* tslint:disable */
import { default as VertexBuffer } from './buffer';
import { ScaleType } from './constants';
import { Matrix4 } from './glplotlib/cuon-matrix';
import { DataGenerator } from './glplotlib/data-generator';
impo... |
import React, { useState, useEffect } from 'react'
import {
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
TouchableWithoutFeedback,
Alert,
Image,
} from 'react-native'
import FontAwesome from 'react-native-vector-icons/FontAwesome'
import { useNavigation } from '../../utils/useNavigation'
import ... |
import assert from 'assert';
import argon2 from 'argon2';
import fs from 'fs';
import { Credentials, CryptoEngine, Kdbx, KdbxCustomIcon, KdbxEntry, KdbxGroup, KdbxUuid, ProtectedValue} from "kdbxweb";
import { Argon2Type, Argon2Version } from 'kdbxweb/dist/types/crypto/crypto-engine';
import { IIconInfo, image2Base64, ... |
<reponame>Qiskit/web-components<gh_stars>1-10
/**
* Copyright (c) IBM, Corp. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { TemplateResult } from 'lit';
import { LitElement, html } from 'lit';
impor... |
import { invoke } from '@tauri-apps/api/tauri';
import { useEffect, useState } from 'react';
import { Button, Checkbox, Divider, Input, Label, Select } from '@/components';
import { errorToast } from '@/helpers/toast';
import cls from './Account.module.css';
import { CloseIcon, PlusIcon } from '@/components/icons';
i... |
import React from 'react'
import { useState, useEffect } from 'react'
import axios from 'axios'
import { Dropdown, DropdownButton } from 'react-bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css';
import '../App.css'
//________Interfaces___________________
interface RawUser {
gender: string
name: {
first: str... |
import * as gracely from "gracely"
import * as isoly from "isoly"
import * as selectively from "selectively"
import * as authly from "authly"
import { Fee } from "./Fee"
import { Transaction as SettlementTransaction } from "./Transaction"
import { V1 } from "./V1"
export interface Settlement {
reference: string
merch... |
<filename>components/js-api-client/src/core/massCallClient.ts
import { ApiCaller, ClientInterface, VariablesType } from './client';
export type CrystallizePromise<T> = {
key: string;
caller: ApiCaller<T>;
query: string;
variables?: VariablesType;
};
export type MassCallClientBatch = {
from: number... |
import React, { useState } from 'react';
import { ScrollView, View } from 'react-native';
//ThirdParty
import { useTranslation } from 'react-i18next';
import { Appbar, Divider, List, useTheme } from 'react-native-paper';
import { NativeStackScreenProps } from '@react-navigation/native-stack';
import { useDispatch, use... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ɵɵadvance} from '../../../../src/render3/instructions/advance';
import {ɵɵelement, ɵɵelementEnd, ɵɵelementSta... |
<reponame>Janniku9/J9MusicBot
import TelegramBot from 'node-telegram-bot-api';
import {DataBaseHelper} from "../db";
import {Song} from "../types/song";
import {Question} from "../types/question";
import {submission_menu, submission_text} from "./submission_menu"
import {sanitize} from "../util/sanitize"
export funct... |
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Component, NgZone, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { TitleBarComponent } from 'src/app/components/titlebar/titlebar.component';
impo... |
<filename>src/game.ts<gh_stars>0
import { TileTypesWithCount, Tile, TileSetItem, TileOp, TileInfo, Node } from "./interfaces";
import { createTileSet, createHeroTile } from "./tile-factory";
import { TileOpType, InternalTileType, HeroPosition, TileType } from "./enums";
export function* game(tileTypesWithCount: TileT... |
import { Component, DebugElement } from "@angular/core";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { FormBuilder, FormControl, FormsModule, ReactiveFormsModule } from "@angular/forms";
import { By } from "@angular/platform-browser";
import { NoopAnimationsModule } from "@angular/platform... |
<filename>services/frontend/src/modules/battles/battles.ts
import { GlobalConfig, ENERGY_TO_ZERO } from "../../store"
import { MonsterProps } from "../monsters/monsters"
export interface BattleCommitment {
player: string,
commitment: string,
randoms: number[]
}
export interface Arena {
host: string,
lastMov... |
<filename>src/index.ts<gh_stars>10-100
import * as fs from 'fs'
import * as https from 'https'
import * as path from 'path'
import Ajv, * as AJV from 'ajv';
import type {JSONSchema7, JSONSchema4} from 'json-schema'
import type {NodeObject} from 'jsonld';
import {requireJSON} from '@chharvey/requirejson';
import type... |
// ---------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// ---------------------------------------------------------------------------
import './Forms.scss';
import React, { useContext } from 'react';
import { useForm } f... |
<reponame>riyasuchdev/career-book<filename>node_modules/clarity-angular/src/data/datagrid/datagrid-row.ts<gh_stars>1-10
/*
* Copyright (c) 2016-2017 VMware, Inc. All Rights Reserved.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this pr... |
<filename>src/db/sql/index.ts
import { QueryFile, IQueryFileOptions } from 'pg-promise';
import * as path from 'path';
/**
* First, copy all .sql files with npm run copy:assets
*
* In development watch an dcopz any changes in .sql files with npm run watch:assets
*
*/
export const devicetypes = {
getAll: sql('d... |
<reponame>textileio/near-storage-bridge<filename>contracts/provider/assembly/index.ts<gh_stars>1-10
import {
u128,
storage,
context,
ContractPromiseBatch,
PersistentUnorderedMap,
logging,
} from "near-sdk-as";
import { onlyOwner } from "../../ownable/assembly";
export {
transferOwnership,
renounceOwners... |
<reponame>jdiss/eigen<filename>src/lib/Scenes/SavedSearchAlert/pillExtractors.ts
import {
aggregationForFilter,
Aggregations,
FilterParamName,
getDisplayNameForTimePeriod,
} from "lib/Components/ArtworkFilter/ArtworkFilterHelpers"
import { ATTRIBUTION_CLASS_OPTIONS } from "lib/Components/ArtworkFilter/Filters/A... |
<filename>fragile/gl_framebuffer.ts
import Bindable from "./bindable";
import GLRenderbuffer from "./gl_renderbuffer";
import GLTexture2D from "./gl_texture2d";
import {Assert} from "./utilfuncs";
import {gl, glres} from "./global";
import {Attachment} from "./gl_const";
import glc from "./gl_const";
import GLResourceB... |
import * as Enum from '../../enums'
import * as USK from './upstreamKeyers'
import * as DSK from './downstreamKeyers'
export { USK, DSK }
export interface DipTransitionSettings {
rate: number
input: number
}
export interface DVETransitionSettings {
rate: number
logoRate: number
style: Enum.DVEEffe... |
<gh_stars>1-10
import {
isDevMode,
AfterContentChecked,
Directive,
ElementRef,
Input,
OnChanges,
OnDestroy,
OnInit,
Renderer2
} from '@angular/core';
import { IconDirective } from '@ant-design/icons-angular';
import { NzIconService } from './nz-icon.service';
const iconTypeRE = /^anticon\-\w/;
/**
... |
import React, { useState, useEffect, useRef } from 'react';
import { Replay, DeleteO, StarO, Star } from '@react-vant/icons'
import { Button, List, Cell, Dialog, Toast, Tag, hooks, Popup } from 'react-vant';
import { TagType } from 'react-vant/es/tag/PropsType';
import { HistoryItem, convertHistory, favoriteHistory, En... |
<reponame>taylorhansen/pokemonshowdown-ai
import * as fs from "fs";
import * as path from "path";
import * as stream from "stream";
import {TeamGenerators} from "@pkmn/randoms";
import {BattleStreams, Teams} from "@pkmn/sim";
import {SideID} from "@pkmn/types";
import * as tmp from "tmp-promise";
import {LogFunc, Logge... |
<reponame>hankysteamroller/toiminimi
import { DateTime } from 'luxon';
import { Options as CsvParseOptions } from 'csv-parse';
import * as A from 'fp-ts/Array';
import * as NEA from 'fp-ts/NonEmptyArray';
import * as E from 'fp-ts/Either';
import { pipe } from 'fp-ts/function';
import { sequenceT } from 'fp-ts/Apply';... |
import fs from 'fs'
import pathUtil from 'path'
import { diskUtil, SettingsService } from '@sprucelabs/spruce-skill-utils'
import { DirectoryTemplateCode, Templates } from '@sprucelabs/spruce-templates'
import {
FILE_ACTION_ALWAYS_SKIP,
FILE_ACTION_OVERWRITE,
FILE_ACTION_SKIP,
} from '../constants'
import LintServic... |
import { randomInt } from 'crypto'
import _ from 'lodash'
import { nanoid } from 'nanoid'
import { EntityManager, getConnection, getRepository, In } from 'typeorm'
import { User } from '../core/user'
import { UserEntity } from '../entities/user'
import { InvalidArgumentError, UnauthorizedError } from '../error/error'
... |
import { useState, useMemo, useEffect } from 'react'
import {
CreateTxOptions,
MsgExecuteContract,
StdFee,
} from '@terra-money/terra.js'
import { useConnectedWallet } from '@terra-money/wallet-provider'
import { useDebouncedCallback } from 'use-debounce/lib'
import { useRecoilValue } from 'recoil'
import { DEV,... |
enum MonsterKey {
ABADDON = "ABADDON",
ABYSS_WORM = "ABYSS_WORM",
ACHELOUS = "ACHELOUS",
ADAMANTOISE = "ADAMANTOISE",
AEROUGE = "AEROGUE",
AHRIMAN = "AHRIMAN",
ALCYONE = "ALCYONE",
ANACONDAUR = "ANACONDAUR",
BANDERSNATCH = "BANDERSNATCH",
BARBATOS = "BARBATOS",
BASHURA = "BASHURA",
BASILISK = "B... |
<filename>src/app/services/models/doctor.ts
import { Person } from "./person";
export class Doctor extends Person {
public CreateListDoctor() {
var doctors = [];
doctors.push(new Doctor({
dateCreation: new Date("2019-01-14"), dateModification: new Date("2020-02-16"), userCreation: "ADMIN", userModific... |
//
// Copyright 2021 Battelle Energy Alliance, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, mo... |
import { AuthService } from "./../../../shared/auth/auth.service";
import { cities } from './../../others/cities'
import { HttpClient } from "@angular/common/http";
import { Event } from "./../../../shared/events/event.model";
import { Component, OnInit } from "@angular/core";
import { SearchService } from "./../../../... |
<gh_stars>0
import { Post } from '../model/Post'
import { Search } from '../model/Search'
import { createCollection } from './createCollection'
import Axios from 'axios'
import { counterPsw, secretKey } from '../routes/index.routes'
export const searchGet = async (req:any, res:any) => {
try {
Axios(`https... |
import React from 'react';
import { v4 as UUIDv4 } from 'uuid';
import type { Scalars } from '../types/graphql';
import { Integer } from '../types/uint8';
import { Item } from "../Item";
import type { Stage as StageT } from 'konva/lib/Stage';
import { Label } from './LabelTemplate';
import { UUIDStringT, LabelText, Lab... |
/*
* Copyright (C) 2021 by Fonoster Inc (https://fonoster.com)
* http://github.com/fonoster/fonos
*
* This file is part of Project Fonos
*
* Licensed under the MIT License (the "License");
* you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https... |
import { Injectable } from '@angular/core';
import { from, BehaviorSubject, timer, Subject, Subscription } from 'rxjs';
import { map } from 'rxjs/operators';
import {streamToRx} from 'rxjs-stream';
import * as SerialPort from 'serialport';
import * as Readline from '@serialport/parser-readline'
import { SettingsServ... |
import { RadioGroup } from '@headlessui/react';
import { ProposalType } from '@popcorn/contracts/adapters';
import { VoteOptions } from '@popcorn/contracts/lib/BeneficiaryGovernance/constants';
import { useWeb3React } from '@web3-react/core';
import { setDualActionModal } from 'context/actions';
import { store } from '... |
<filename>src/commands/env/create/compute.ts
/*
* Copyright (c) 2020, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import herokuColor from '@heroku-cli/color';... |
import React, { useEffect } from 'react';
import { Chart } from '@antv/g2';
import DataSet from '@antv/data-set';
import { fetch_GET_JSON } from 'services';
import styles from './view.scss';
function G2View() {
const view1Chart = (containerID: string) => {
const data = [{ from: [1, 2] }, { to: [1, 2] }];... |
import { observable, action, computed } from "mobx";
import { IInitialDataPackage } from "../../shared/definitions/socketIODefinitions";
import { IData, ILogLine } from "../../shared/definitions/databaseInterfaces";
import { times } from "../../shared/definitions/mixed";
import { timeStore } from "./timeStore";
import ... |
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import {
Autocomplete,
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
Grid,
Stack,
TextField,
} from "@mui/material";
import DatePicker from "@mui/lab/DatePicker";
import { useFormik } from "formik";
import React, {
forwardRef... |
/* eslint-disable jsx-a11y/accessible-emoji */
import { Form, Field } from 'react-final-form'
import arrayMutators from 'final-form-arrays'
import { FieldArray } from 'react-final-form-arrays'
import { IndexCalculator } from '../../src/classes/IndexCalculator'
const copyToClipboard = (str: string) => {
const el = do... |
import 'reflect-metadata';
import { ClassFields, ClassFieldsKeys, Omit } from './types';
import { isArray, isPrimitive } from './utils';
const propertyDecoratorKey = '__VaTsModelProp__';
/**
* Pick properties from model.
* Useful if server returns model without some properties.
*
* Eg.:
* <code>
* class TestC... |
<reponame>jobdataexchange/reference-app-ui
import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
import {
DefaultService,
MatchTableResponse,
Response,
Substatements,
SubstatementsMatches,
UserActionRequest
} from '@jdx/jdx-referenc... |
import { Component, OnDestroy, OnInit } from '@angular/core';
import { BoardsComponent } from './boards/boards.component';
import { RecordsComponent } from './records/records.component';
import { TimerService } from '../../services/timer.service'
import { DataService } from '../../services/data.service'
import { Da... |
<reponame>wip-abramson/Aries-DID
import * as Koa from "koa";
import * as Router from "koa-router";
import * as uuid from "uuid/v1";
import client from "../client";
import { AgentController } from "../../agent/agent.model";
import { IConnectionsResult } from "../../core/interfaces/connection.interface";
// TODO: move t... |
<filename>src/lib/tour.service.ts
import { Hotkey, HotkeysService } from 'angular2-hotkeys';
import { TourAnchorDirective } from './tour-anchor.directive';
import { IStepOption } from './tour.service';
import { Injectable } from '@angular/core';
import { Router, UrlSegment } from '@angular/router';
import { Subject } f... |
import {
Button,
Icon,
Img,
Box,
Modal,
ModalOverlay,
ModalContent,
ModalHeader,
ModalFooter,
ModalBody,
useDisclosure,
VStack,
FormControl,
useToast,
} from '@chakra-ui/react';
import { GetServerSideProps } from 'next';
import Head from 'next/head';
import { RiAddLine } from 'react-icons/ri... |
import React from 'react'
import {
View,
Text,
TouchableOpacity,
TouchableHighlight,
Image,
StyleSheet,
TextInput,
ScrollView,
PixelRatio,
} from 'react-native'
import moment from 'moment'
import calendarUtils from './utils'
import variables from '../../common/styles/variables'
const styles = StyleS... |
<reponame>espenja/diablo3profiles<filename>src/index.ts
import fs from "fs-extra"
import path from "path"
import prompt from "prompt"
import colors from "colors"
import { buildLocalVariants, LocalBuildVariant } from "./buildLocalVariants"
import { getD3PlannerVariants as getD3PlannerVariants } from "./getD3Plann... |
/* eslint-disable no-param-reassign */
import { FetchStatus } from 'config/constants/types'
import { useCallback, useEffect, useMemo, useRef } from 'react'
import { Contract } from '@ethersproject/contracts'
import { FormatTypes } from '@ethersproject/abi'
import useSWR, {
Middleware,
SWRConfiguration,
KeyedMutat... |
<filename>packages/orga/src/types.ts
import { Literal as UnistLiteral, Node, Parent } from 'unist'
export type { Parent }
export type Primitive = string | number | boolean
export interface Attributes {
[key: string]: Primitive | { [key: string]: Primitive }
}
export interface Attributed {
attributes: Attributes... |
import { AddItemDialog } from '@/components/dialog/add-item'
import { VNode } from '@/lib/model'
import MiniReact from '@/react/index'
import CooperService from '@/services/cooper-service'
interface CooperItem {
icon: string
title: string
folderName: string
ip: string
status: string
tags: Array... |
<filename>packages/language-server/src/utils.ts
import { URI } from 'vscode-uri';
import { Position, Range } from 'vscode-languageserver';
import { Node } from 'vscode-html-languageservice';
/** Normalizes a document URI */
export function normalizeUri(uri: string): string {
return URI.parse(uri).toString();
}
/**
... |
<gh_stars>10-100
/*
* Copyright (c) 2022 ZOOMi Technologies Inc.
*
* all rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in the root directory of this source tree.
*
*use to download file to the front end
*/
/**
* @class file download controller
* purpose of file... |
<gh_stars>0
export interface Address {
AddressLine1: string;
AddressLine2: string;
AddressLine3: string;
PostTown: string;
County: string;
PostCode: string;
Country: string;
}
export enum ContactPreference {
ACCOUNT_OWNER = 'ACCOUNT_OWNER',
NAMED_PERSON = 'NAMED_PERSON',
BOTH_RECEIVE = 'BOTH_RECEIV... |
import { mount, Wrapper } from '@vue/test-utils';
import Vue from 'vue';
import { installNewXPlugin } from '../../../../__tests__/utils';
import { getXComponentXModuleName, isXComponent } from '../../../../components/x-component.utils';
import { XComponentBusAPI } from '../../../../plugins/x-plugin.types';
import { bas... |
import {
BaseModel,
Manager,
Parent,
Receipt,
School,
Student,
User,
NuseryPrimarySchoolClassPreset,
Subject,
cleanNumericEnums,
ParentRelationship,
Record,
schoolTerms,
TermPreset,
} from '@dilta/platform-shared';
import { getDate } from 'date-fns';
import * as faker from 'faker';
import { ... |
<filename>datagym-frontend/src/app/label-mode/model/change/LcEntryChangeFactory.ts
import {LcEntryType} from '../import';
import {LcEntryValue} from '../LcEntryValue';
import {LcEntryChange} from './LcEntryChange';
import {LcEntryChangeType} from './LcEntryChangeType';
import {LcEntrySelectValue} from '../classificatio... |
import { batchActions } from 'redux-batched-actions';
import { createAction } from 'robodux';
import type { Action, ActionWithPayload } from 'robodux';
import type { ApiCtx, Ctx, Next } from './types';
import { compose } from './compose';
import {
addData,
resetLoaderById,
setLoaderError,
setLoaderStart,
set... |
import DragonBone from "../Component/DragonBone";
import GlobalData from "../Common/GlobalData";
import ResourceMgr from "../Manager/ResourceMgr";
const {ccclass, property} = cc._decorator;
@ccclass
export default class EmbattlePage extends cc.Component {
//bag
@property({type: cc.Node})
bag: cc.Node = nu... |
import React, { useState, useEffect } from 'react';
import { AWSRegionType, AWSRegionList } from '../ClusterConfiguration/domain';
import { Loader } from '../Loader/Loader';
import { useNotifications } from '../app-notifications';
import { ErrorMessage, Field, Form, Formik } from 'formik';
export function AWSRegionCho... |
<filename>src/core-utils/reveal.ts
import Client from '../client';
import { getAccessToken } from '../utils/busEvents';
import SkyflowError from '../libs/SkyflowError';
import {
ISkyflowIdRecord, IRevealRecord, IRevealResponseType, MessageType, LogLevel,
} from '../utils/common';
import logs from '../utils/logs';
imp... |
<gh_stars>1-10
// https://www.terraform.io/docs/providers/snowflake/r/masking_policy.html
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
// Configuration
export interface MaskingPolicyConfig extends cdktf.TerraformMetaArguments {
/**
* Specifie... |
import React, { PureComponent, useRef, useState } from 'react';
import { ServiceAccountDTO } from 'app/types';
import { css, cx } from '@emotion/css';
import { config } from 'app/core/config';
import { GrafanaTheme } from '@grafana/data';
import { Button, ConfirmButton, ConfirmModal, Input, LegacyInputStatus, stylesFac... |
import "jest-playwright-preset";
import * as path from "path";
import { JoyTestContext } from "../../../util/joy-test-context";
import { promises } from "fs";
import { findPort, joyBuild, joyExport, killApp, runHttpServer, waitFor } from "../../../util/joy-test-utils";
import { getDomInnerHtml } from "../../../util/htm... |
<reponame>gabeklein/expressive-dsl
/// <reference types="babel__traverse" />
import { NodePath as Path, VisitNodeObject } from '@babel/traverse';
import {
ArrowFunctionExpression,
DoExpression,
Expression,
For,
Program,
Statement,
Node,
} from '@babel/types';
interface BunchOf<T> {
[key: string]: T;
}
... |
<filename>src/actions/svarpased.ts<gh_stars>1-10
import * as types from 'constants/actionTypes'
import * as urls from 'constants/urls'
import { SvarPaSedMode } from 'declarations/app'
import { ReplySed } from 'declarations/sed'
import { ConnectedSed, CreateSedResponse, FagSaker, UpdateReplySedPayload } from 'declaratio... |
<reponame>Mart100/Moosic
const ffmpeg = require('fluent-ffmpeg')
async function openCutSong(song:Song) {
$('#cutSong .currentSong .thumbnail').attr('src', `https://i.ytimg.com/vi/${song.youtubeID}/mqdefault.jpg`)
$('#cutSong .currentSong .title').html(song.title)
//$('#index > div').hide()
$('#index #cutSong').fa... |
import React, { useState, useMemo } from 'react'
import { useStore } from '../store'
import { configs } from '../data'
import { Link, useRouteMatch, useHistory } from 'react-router-dom'
import { currency } from '../common/constants'
import { sumAllPlatesPriceInBag, convertOrderItensIntoDescription, calcPercentage } fro... |
/*
* Copyright 2017 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import events from 'events';
import fs, { promises as fsp } from 'fs';
import path from 'path';
import throttle from 'throttleit';
import { Validation } from './utilities/validation';
import { MergeFiles } from './utilities/merge-files';
import { AcceptRanges } from './accept-ranges';
import { RequestMetadata, Request... |
import axios from 'axios';
import { NextFunction, Request, Response } from 'express';
import passport from 'passport';
import passportJwt from 'passport-jwt';
import passportLocal from 'passport-local';
import { User } from '../models/User';
import { CLIENT_ID, CLIENT_SECRET } from '../util/secrets';
const OAuth2Strat... |
import { useContext, useEffect, useState } from "react"
import {
Card,
Image,
Button,
Progress,
Icon,
Modal,
Header,
SemanticICONS,
} from "semantic-ui-react"
import styled from "styled-components"
import { useTranslation } from "react-i18next"
import platformIcons from "../../common/platformIcons"
import { ID... |
<gh_stars>1-10
import { Player } from './player';
import { Game } from './game';
import { PlayerColor, PlayerColorUtil } from './player-color';
import { PlayerFactory } from './player-factory';
import * as NodeCache from 'node-cache';
import * as _ from 'lodash';
interface MinimaxResult {
scores: number[][];
b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.