text stringlengths 3.08k 15.5k |
|---|
/**
* @license
* Copyright 2018-2022 Streamlit Inc.
*
* 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 applicab... |
<gh_stars>10-100
import { computed, observable } from 'mobx';
import AppController from 'app/controllers';
import { ClientModel } from 'app/controllers/ClientModel';
import { AppPromptsCategories, PromptType } from 'common/models/prompts';
import logger from 'common/logger';
import { DateViewModel, ValidatableViewModel... |
import { Cancelable, delay, timer } from './delay';
import { createLogger } from './logger';
import { IntlNamespaces } from './namespaces';
import {
MessageMetadata,
MessageMetadataToNamespaceResourceReducer,
NamespaceResource,
ResourceFromNamespace,
ResourceServer,
} from './types';
const logger ... |
<filename>src/index.ts<gh_stars>0
import "core-js/stable";
import "regenerator-runtime/runtime";
import * as Fs from "fs";
import {promisify} from 'util'
import * as Path from "path";
import * as express from "express";
import {RequestHandler} from "express";
const defaultConfig = {
//本地路由根目录,相对于package.json,会按照顺序搜索... |
import { initDatabase } from "@database/initDb";
import { cleanData } from "@utils/string";
interface Group {
month: number;
year: number;
dimension: string;
}
interface GroupIngresos extends Group {
abonos: number;
saldos: number;
}
interface GroupGastos extends Group {
valoresConIva: num... |
<filename>source/modules/AuthenticationFramework/PolicySyntax.ta.ts
/* eslint-disable */
import {
ASN1ConstructionError as _ConstructionError,
ASN1Element as _Element,
ASN1TagClass as _TagClass,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import {
InfoSyntax,
_decod... |
import '@logseq/libs';
import StegCloak from 'stegcloak';
// import clipboardy from 'clipboardy';
import { EmojiButton } from '@joeattardi/emoji-button';
const copyToClipboard = str => {
const el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style.position = 'absolute';... |
<gh_stars>1-10
import dbg = require('debug');
const debug = dbg('bitn:quest-gen');
import {Random} from '../random';
import prettybnf = require('prettybnf');
import {Quest, Task} from './quest-task';
import {QuestGrammar} from '../../data/quest-grammar';
const questGrammar = QuestGrammar.grammar;
const RNG = Random.... |
import { Db, ObjectId } from 'mongodb';
import ExecutionerCursor from './executioner-cursor';
import Schema, { FieldTypes, SchemaField } from './schema';
export type TransformResult<T> = {
[K in keyof T]: Array<T[K]>;
} & {
[s: string]: any;
};
export interface OperationContext {
processedIds: Set<string>;
}
c... |
<filename>src/utils/getProjectConfig.ts
import {existsSync, readFileSync} from 'fs';
import {join} from 'path';
import {getRootDirectory} from './getRootDirectory';
/**
* Shape of the configuration file which is implemented in an extending project.
*/
interface ConfigFile {
/**
* The "clean" name of this p... |
<filename>src/main.ts<gh_stars>0
import {spawn, ChildProcessWithoutNullStreams} from "child_process";
import {interpretData} from "./DataInterpretor/interpreteData"
enum stdInReadState {
START,
IN_JSON,
INBETWEEN_JSON,
KILL,
}
const procRestartTimeoutSeconds = 60;
/*
* Created with @iobroker/create-adapter v1.2... |
<gh_stars>0
import { Component, OnInit, ViewChild } from '@angular/core';
import { FormGroup, Validators, FormBuilder } from '@angular/forms';
import { CategoryService } from 'app/services/category.service';
import { MatPaginator, MatSort, MatTableDataSource } from '@angular/material';
declare var $: any;
@Component({... |
import * as PIXI from "pixi.js";
import { BlackPart, ELPart, LEDPart } from "./Parts";
// constants
import { IDLE } from "../../../constants";
// states and actions
import { reactiveState } from "../../../core/state";
import {
setCurrentPosByName,
toggleSelectedDancer,
} from "../../../core/actions";
// store
impor... |
<gh_stars>1-10
import { getCSSLanguageService } from 'vscode-css-languageservice';
import {
DocumentContext, getLanguageService as getWXMLanguageService, IWXMLDataProvider, ClientCapabilities
} from '@vdesjs/vscode-wxml-languageservice';
import {
SelectionRange,
CompletionItem, CompletionList, Definition, Diagnos... |
<filename>packages/mana-syringe/src/register.ts<gh_stars>10-100
import type { interfaces } from 'inversify';
import type { InversifyRegister } from './inversify';
import { isInversifyRegister } from './inversify';
import { bindNamed, bindGeneralToken, bindMonoToken, bindLifecycle } from './inversify';
import { Utils, S... |
import { ChildProcess, exec, execSync } from 'child_process';
import { prompt } from 'enquirer';
import fs from 'fs';
import glob from 'glob';
import path from 'path';
import semver from 'semver';
const featureLibsFolders: string[] = [
'asm',
'cart',
'organization',
'product',
'product-configurator',
'qual... |
import {
OrganizationPolicyName,
OrganizationPolicyType,
} from "@takomo/aws-model"
import { ConfigSetName } from "@takomo/config-sets"
import { CommandContext } from "@takomo/core"
import {
AccountConfigItem,
AccountRepository,
createAccountConfigItemSchema,
createAccountRepositoryRegistry,
createFileSys... |
// Copyright 2017-2019 @polkadot/api authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { SignedBlock } from '@polkadot/types/interfaces';
import { RegistryTypes } from '@polkadot/types/types';
import { ApiBase,... |
<filename>src/transports/IPCTransport.ts
import net, { Socket } from "net";
import fetch from "node-fetch";
import EventEmitter from "events";
import DiscordRPCClient from "../DiscordRPCClient";
import { RPCCommands } from "../constants";
import { uuid4122 } from "../util";
import debug, { Debugger } from "debug";
en... |
import * as fs from 'fs'
import {
genPerVOSpentVoiceCreditsCommitment,
genTallyResultCommitment,
genSpentVoiceCreditsCommitment,
} from 'maci-core'
import {
maciContractAbi,
} from 'maci-contracts'
import {
validateEthAddress,
contractExists,
calcQuinTreeDepthFromMaxLeaves,
} from './util... |
import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd';
import { Decimal128, Document, Double, Int32, Long } from '../../src/index';
import type {
AcceptedFields,
FilterOperations,
IntegerType,
IsAny,
KeysOfAType,
KeysOfOtherType,
NotAcceptedFields,
NumericType,
OneOrM... |
<filename>src/store/providers/onedrive/index.ts<gh_stars>1-10
import { apibase } from '@/utils/apibase'
import { markRaw } from 'vue'
import { decode } from 'js-base64'
import Manage from './Manage.vue'
import { SyncProvider } from '../typing'
import { SYNCERR, SyncError } from '@/store/sync'
interface IMsToken {
a... |
import React, { useState, useEffect, memo } from "react";
import {
Button,
Grid,
CircularProgress,
Typography,
Paper,
Box,
FormControl,
Select,
InputLabel,
FormHelperText
} from "@material-ui/core";
import {
useHistory
} from "react-router-dom";
import { toast } from "react-t... |
<gh_stars>0
import _ from 'lodash';
import { getTicksOfScale, parseScale, checkDomainOfScale, getBandSizeOfAxis } from './ChartUtils';
import { findChildByType } from './ReactUtils';
import { Coordinate, AxisType } from './types';
/**
* Calculate the scale function, position, width, height of axes
* @param {Object}... |
<filename>src/components/textfield/index.ts
import $ from 'mdui.jq/es/$';
import extend from 'mdui.jq/es/functions/extend';
import 'mdui.jq/es/methods/addClass';
import 'mdui.jq/es/methods/appendTo';
import 'mdui.jq/es/methods/attr';
import 'mdui.jq/es/methods/each';
import 'mdui.jq/es/methods/find';
import 'mdui.jq/es... |
/*
* REDUX API DATA - lib for handling api requests and response data.
* Consists of the following:
*
* Configuration:
* - Global configuration, see constants/apiDataConfig
* - Endpoint configuration, see constants/apiDataConfig
*
* Getting and using data:
* - withApiData HOC to bind data from the api to your ... |
import React, { useState, useMemo, useContext, useRef, useEffect } from 'react';
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
import { Tooltip, Toolbar, Grid, Box, Button, Menu, MenuItem, Typography } from '@material-ui/core';
import { GridProps } from '@material-ui/core/Grid';
import { Audiotr... |
<gh_stars>0
/**
* Copyright 2015 CANAL+ Group
*
* 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... |
<gh_stars>0
import { observable } from 'mobx';
import { Injectable, Autowired } from '@opensumi/di';
import { URI, IDisposable, WithEventBus, OnEvent } from '@opensumi/ide-core-browser';
import { Disposable, addElement, LRUMap, ILogger, Emitter } from '@opensumi/ide-core-common';
import {
ResourceService,
IResour... |
/**
* @license
* Copyright 2020 Google 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 ... |
import { BaseState } from './base-state';
import { HalResource, HalLink, HalFormsTemplate, HalFormsProperty } from 'hal-types';
import { parseLink } from '../http/util';
import { Link, Links } from '../link';
import { resolve } from '../util/uri';
import { ActionInfo } from '../action';
import { Field } from '../field'... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {Children, TagAttributes, TagName} from './types';
import {parseMarkup} from './parse';
import {
humanizeNumber,
humani... |
<filename>test/provider/deregisterConfig.inttest.ts<gh_stars>0
import {Window} from 'hadouken-js-adapter';
import * as assert from 'power-assert';
import {ConfigurationObject, Scope} from '../../gen/provider/config/layouts-config';
import {executeJavascriptOnService} from '../demo/utils/serviceUtils';
import {isWindow... |
<filename>apps/demos/src/app/rx-angular-pocs/render-strategies/react/utils/react-source-code/schedulerHostConfig.ts
import {enableIsInputPending} from './schedulerFeatureFlags';
export let requestHostCallback;
export let cancelHostCallback;
export let requestHostTimeout;
export let cancelHostTimeout;
export let should... |
/* tslint:disable component-selector */
import { AfterContentInit, AfterViewInit, Component, ElementRef, Input, ViewChild } from '@angular/core';
import { Location } from '@angular/common';
import { CONTENT_URL_PREFIX } from 'app/documents/document.service';
import { AttrMap, boolFromValue, getAttrs, getAttrValue } fro... |
<filename>packages/core/src/utils/load-plugins.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import { execSync } from "child_process";
import chalk from "chalk";
import endent from "endent";
import glob from "fast-glob";
import * as path from "path";
import { Auto } from "../auto";
import { ILogger } from... |
<reponame>BaiHuoYu/nbp
import { Component, OnInit, ViewContainerRef, ViewChild, Directive, ElementRef, HostBinding, HostListener, ViewChildren } from '@angular/core';
import { Http } from '@angular/http';
import { I18NService } from 'app/shared/api';
import { AppService } from 'app/app.service';
import { I18nPluralPip... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<filename>scripts/run-registry.ts
import { exec } from 'child_process';
import chalk from 'chalk';
import path from 'path';
import program from 'commander';
import detectFreePort from 'detect-port';
import dedent from 'ts-dedent';
import fs from 'fs';
import yaml from 'js-yaml';
import nodeCleanup from 'node-cleanup';
... |
<gh_stars>1-10
/*---------------------------------------------------------
* Copyright (C) VMS Corporation. All rights reserved.
*--------------------------------------------------------*/
const { Subject } = require("await-notify");
import {
InitializedEvent, Logger,
logger,
LoggingDebugSession, Stopped... |
<reponame>rageshchalil/Bodiless-JS<filename>packages/bodiless-documentation/src/tree.ts
/**
* Copyright © 2019 Johnson & Johnson
*
* 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:/... |
// Copyright 2017-2021 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback } from 'react';
import styled from 'styled-components';
import { useToggle } from '@polkadot/react-hooks';
import EditButton from './EditButton';
import Input from './Input';
im... |
import { decode, types } from "binary-data";
import debug from "debug";
import { Event } from "rx.mini";
import { setTimeout } from "timers/promises";
import {
HashAlgorithm,
NamedCurveAlgorithmList,
SignatureAlgorithm,
SignatureHash,
} from "./cipher/const";
import { exportKeyingMaterial } from "./cipher/prf"... |
<reponame>megheshpatil/azure-sdk-for-js
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { createHttpHeaders, createPipelineRequest } from "@azure/core-rest-pipeline";
import { TokenCredential, GetTokenOptions, AccessToken } from "@azure/core-auth";
import { createSpan } from "../util/... |
import { FormikProps } from "formik";
import { clamp, isEqual } from "lodash";
import { all, BigNumber, create, MathJsStatic } from "mathjs";
import { ChangeEvent, useEffect, useState } from "react";
import { useIntl } from "react-intl";
import accents from "remove-accents";
import * as yup from "yup";
import { TextFie... |
import { resolve } from 'path';
import { existsSync, copy, readFile, writeFile } from 'fs-extra';
const inquirer = require('inquirer');
import { templates } from './runtimes';
import uninstall from '../uninstall/uninstall';
import { spawnSync } from 'child_process';
import { ContextUtils, CliContext } from '@malagu/cli... |
import { D1ManifestDefinitions } from 'app/destiny1/d1-definitions';
import { D1CharacterResponse } from 'app/destiny1/d1-manifest-types';
import { warnLog } from 'app/utils/log';
import { DestinyClass } from 'bungie-api-ts/destiny2';
import { StatHashes } from 'data/d2/generated-enums';
import disciplineIcon from 'ima... |
import GasBoostSigner from 'src/gasboost/GasBoostSigner'
import L1Bridge from 'src/watchers/classes/L1Bridge'
import L2Bridge from 'src/watchers/classes/L2Bridge'
import Token from 'src/watchers/classes/Token'
import chainSlugToId from 'src/utils/chainSlugToId'
import contracts from 'src/contracts'
import getRpcProvide... |
/*
* Copyright © 2019 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
/*---------------------------------------------------------
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------*/
'use strict';
import vscode = require('vscode');
import cp = require('child_process');
import * as path... |
/** Descriptor containing information about a flow class. */
export declare interface FlowDescriptor {
readonly name: string;
readonly friendlyName: string;
readonly category: string;
readonly defaultArgs: unknown;
}
/** Map from Flow name to FlowDescriptor. */
export type FlowDescriptorMap = ReadonlyMap<strin... |
import {
TChangeLanguage,
TChangeNodeIntent,
TChangeNodeIntentOneTime,
TAddCustomNode,
TRemoveCustomNode,
TAddCustomNetwork,
AddCustomNodeAction,
changeLanguage,
changeNodeIntent,
changeNodeIntentOneTime,
addCustomNode,
removeCustomNode,
addCustomNetwork
} from 'actions/config';
import React, ... |
/*
* Copyright 2016 Palantir Technologies, Inc. All rights reserved.
*
* 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 req... |
<reponame>JakMobius/tanks
import {Vec2} from '../../../../library/box2d'
import TankBehaviour from '../tank-behaviour';
import TankModel from "../../tank-model";
import {TankWheel} from "./wheel";
export interface WheeledTankBehaviourConfig {
wheels: TankWheel[]
/**
* Maximum force with which the engine... |
import { future, IFuture } from 'fp-future'
import { ILand, IScene, ParcelInfoResponse } from 'shared/types'
import { jsonFetch } from 'atomicHelpers/jsonFetch'
import { createLogger } from 'shared/logger'
const origin = globalThis.origin
const emptyScenes = require('./emptyScenes.json')
const logger = createLogger... |
import React from 'react';
import * as LayoutEvents from '../../lib/LayoutEvents';
import { RenderContainer } from '../RenderContainer';
import { ZIndex } from '../ZIndex';
import { createPropsGetter } from '../../lib/createPropsGetter';
import { Nullable } from '../../typings/utility-types';
import { cx } from '../..... |
import webpack from 'webpack';
import { merge } from 'webpack-merge';
import { PresetOptions } from '@wpackio/babel-preset-base/lib/preset';
// Export common interfaces
/**
* Configuration shape for banner. Inserted in the generated files on production.
*/
export interface BannerConfig {
name: string;
author: st... |
<reponame>onicagroup/serverless-cargo
import * as AWS from 'aws-sdk';
import {Credentials} from 'aws-sdk/clients/sts';
const iot = new AWS.Iot();
const sts = new AWS.STS();
/**
* Requests to create Cargoplane credentials for a client application instance.
*/
export interface CargoplaneCredentialRequest {
/** AW... |
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Injectable } from '@angular/core';
import { DialogService, shareSubscribed, State, Types } from '@app/framework';
import { Observable, of } from 'rxjs';
import { catchError, map, switchMap, tap... |
<reponame>0x6377/denopkg<gh_stars>0
import { ServerRequest, Status } from "https://deno.land/std/http/mod.ts";
import { TopLevelJSONable } from "./json.ts";
import { WebOptions } from "./options.ts";
import { ServerTiming } from "./server_timing.ts";
/**
* i.e. the bit that happens immediately after
* for await (con... |
import * as t from 'io-ts';
import { identity } from 'fp-ts/lib/function';
import { RequiredKeys } from 'typelevel-ts';
export type PropsType<P> = P extends {} ? { [k in RequiredKeys<P>]: t.TypeOf<P[k]> } : never;
export type EndpointInput<E extends EndpointInstance<any>> = PropsType<E['Input']>;
export type Endpoint... |
/// <reference types="node" />
import * as RDF from "rdf-js";
import { Tag } from "sax";
import { Transform, TransformCallback } from "stream";
import EventEmitter = NodeJS.EventEmitter;
export declare class RdfXmlParser extends Transform implements RDF.Sink<EventEmitter, RDF.Stream> {
static readonly IRI_REGEX: Re... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React, { Fragment, useState, useEffect } from 'react';
import { i18n } ... |
import {GestureTool, GestureToolView} from "./gesture_tool"
import {GlyphRenderer} from "../../renderers/glyph_renderer"
import {GraphRenderer} from "../../renderers/graph_renderer"
import {DataRenderer, DataRendererView} from "../../renderers/data_renderer"
import {DataSource} from "../../sources/data_source"
import {... |
import Benchmark from 'benchmark';
import {
createApplication,
createModule,
InjectionToken,
} from 'graphql-modules';
import { parse, execute, GraphQLSchema, ExecutionArgs } from 'graphql';
import { makeExecutableSchema } from '@graphql-tools/schema';
import { strictEqual } from 'assert';
interface TestResult {... |
import {
useAdminCollections,
useAdminDeleteProduct,
useAdminProductTypes,
useAdminUpdateProduct,
} from "medusa-react"
import React from "react"
import { Controller } from "react-hook-form"
import Input from "../../../../components/molecules/input"
import Select from "../../../../components/molecules/select"
i... |
/*
* Copyright 2020, EnMasse authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
import React from "react";
import {
SelectOptionObject,
ToolbarToggleGroup,
ToolbarGroup,
ToolbarFilter,
InputGroup,
Button,
ToolbarItem,
ButtonVariant,
Dro... |
import { User, Context, Session, GroupMemberInfo, Database, paramCase, camelCase, isInteger } from 'koishi-core'
import {} from 'koishi-plugin-mysql'
type ExtendedUser<T extends User.Field = User.Field> = Pick<User, T> & { _value: number }
interface Rank<T extends User.Field = never> {
names: string[]
groupOnly?:... |
<reponame>altasoul/NovaJS
import { GameDataInterface, PreloadData } from "novadatainterface/GameDataInterface";
import { NovaDataInterface, NovaDataType } from "novadatainterface/NovaDataInterface";
import { Gettable, GettableData } from "novadatainterface/Gettable";
import { BaseData } from "novadatainterface/BaseData... |
import AsyncStorage from '@react-native-community/async-storage';
import Toast from 'react-native-simple-toast';
import {
AUTHENTICATE,
LOGOUT,
VERIFY_USER,
UPDATE_USER_DATA,
SET_USER_DATA,
} from '../../../constants';
import { logInWithGoogle, getFBData } from '../../utils';
import { ISignup } from... |
import chalk from 'chalk';
import { Client, RichEmbed, Role, TextChannel, Message } from 'discord.js';
import { guild_id, prefix, token, perms } from './config';
import { dbInit } from './db/database';
import { persistenRoles, initRoles, IRole } from './db/dbRole';
import { CreateUser, IUser } from './db/dbUser';
impor... |
/*
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 in writing, software
distributed under the License i... |
import { noResults, invalidResponse } from './errors';
import useData from './useData';
import delayedMessageAutoDeletion from './delayedMessageAutoDeletion';
import { Provider } from './discordTools';
import { Message } from 'discord.js';
import { HeadersInit } from 'node-fetch';
const SEARCH_TERM = '%SEARCH%';
const... |
import execa from 'execa'
import * as esbuild from 'esbuild'
import { flatten } from '../blaze/flatten'
import { pipe } from '../blaze/pipe'
import { map } from '../blaze/map'
import { transduce } from '../blaze/transduce'
import glob from 'glob'
import path from 'path'
import { watch as createWatcher } from 'chokidar'... |
import {
ANCHOR_DANGER_RATIO,
ANCHOR_SAFE_RATIO,
computeBorrowedAmount,
computeBorrowLimit,
computeBorrowMax,
computeBorrowSafeMax,
computeLtv,
} from '@anchor-protocol/app-fns';
import { validateCollateralAmount } from '@anchor-protocol/app-fns/logics/borrow/validateCollateralAmount';
import { Deployment... |
import { Settings, SuccessFilled, ErrorFilled } from "@navikt/ds-icons";
import { Alert, Heading, Link, Paragraph } from "@navikt/ds-react";
import Alertstripe from "nav-frontend-alertstriper";
import Chevron from "nav-frontend-chevron";
import Ekspanderbartpanel from "nav-frontend-ekspanderbartpanel";
import Etikett f... |
import { CSL, Cardano, WalletProvider, coreToCsl, cslToCore, cslUtil } from '@cardano-sdk/core';
import { InputSelector, SelectionConstraints, SelectionResult } from '@cardano-sdk/cip2';
import { KeyManager } from './KeyManagement';
import { Logger, dummyLogger } from 'ts-log';
import {
OnTransactionArgs,
Transacti... |
import { Injectable } from '@angular/core';
import { tick } from '@angular/core/testing';
import { Subject, Observable, interval, of, concat } from 'rxjs';
import { scan, switchMap, map, distinctUntilChanged, shareReplay, take } from 'rxjs/operators';
import { Month, TimePeriod } from '../time-period';
interface Timer... |
<gh_stars>0
import bSpline from './util/bSpline';
import createArcForLWPolyline from './util/createArcForLWPolyline';
import logger from './util/logger';
/**
* Rotate a set of points.
*
* @param points the points
* @param angle the rotation angle
*/
const rotate = (points, angle) => {
return points.map(function... |
<gh_stars>1-10
export enum SwapAsset {
NIM = 'NIM',
BTC = 'BTC',
EUR = 'EUR',
}
export enum ReferenceAsset {
USD = 'USD',
}
export const Precision = {
[SwapAsset.NIM]: 5,
[SwapAsset.BTC]: 8,
[SwapAsset.EUR]: 2,
[ReferenceAsset.USD]: 2,
} as const;
export enum SwapStatus {
WAITING_... |
import {
Component,
ViewChild,
ElementRef,
OnInit,
AfterViewInit
} from '@angular/core';
import { ModalController } from '@ionic/angular';
declare var google: any;
const directionsDisplay = new google.maps.DirectionsRenderer();
const directionsService = new google.maps.DirectionsService();
@Component({
selector:... |
<reponame>steedos/core
import { Terminal, ILinkMatcherOptions, ITerminalAddon } from 'xterm';
import { URI, Disposable, Emitter, Event } from '@opensumi/ide-core-common';
import { WorkbenchEditorService } from '@opensumi/ide-editor/lib/common';
import { IFileServiceClient, FileStat } from '@opensumi/ide-file-service/l... |
<filename>ui/app/services/auth.ts<gh_stars>10-100
/**
* Copyright (c) 2016 Mirantis Inc.
*
* 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
*
* ... |
import Observable from "./observable";
import Grid from "./grid";
import {PredictionRange} from "./predictionRange";
export type CellState = "normal" | "source" | "target" | "wall";
export default class Cell extends Observable {
protected pathCost: number;
protected state: CellState;
protected index: {x: n... |
<gh_stars>0
import * as _ from 'lodash';
import { getBuckets } from '../destiny2/d2-buckets.service';
import { DestinyAccount } from '../accounts/destiny-account.service';
import { settings } from '../settings/settings';
import { MoveReservations, dimItemService } from '../inventory/dimItemService.factory';
import { D2... |
import { StackLayoutBase } from './stack-layout-common';
import { CoreTypes } from '../../../core-types';
import { View } from '../../core/view';
import { layout } from '../../../utils';
import { Trace } from '../../../trace';
export * from './stack-layout-common';
export class StackLayout extends StackLayoutBase {
... |
<filename>src/app/views/honesolutions/roles/roles.component.ts
import { Component, OnInit, Output, Input, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { Rol } from '../../../model/rol';
import { RolService } from '../../../services/rol.service';
import { FormGroup, FormControl } fr... |
import React, { ReactElement } from 'react';
import { ApolloProvider } from 'react-apollo';
import { ApolloLink, Observable, Operation } from 'apollo-link';
import { addTypenameToDocument } from 'apollo-utilities';
import { Router, Switch } from 'react-router-dom';
import { createMemoryHistory, MemoryHistory } from 'hi... |
<gh_stars>1-10
import { BaseModel, BaseModelListener } from "./BaseModel";
import { PortModel } from "./PortModel";
import { PointModel } from "./PointModel";
import * as _ from "lodash";
import { BaseEvent } from "../BaseEntity";
import { LabelModel } from "./LabelModel";
import { DiagramEngine } from "../DiagramEngin... |
<gh_stars>1-10
import * as acorn from 'acorn';
import * as acornLoose from 'acorn/dist/acorn_loose';
import * as walk from 'acorn/dist/walk';
import * as path from 'path';
import * as fs from 'fs';
import * as text2jsvar from 'text2jsvar';
class RefPosition {
public start: number;
public end: number;
const... |
import { css, cx } from 'emotion';
import React, { PureComponent } from 'react';
import { MetadataInspectorProps } from '@grafana/data';
import { GraphiteDatasource } from './datasource';
import { GraphiteQuery, GraphiteOptions, MetricTankSeriesMeta } from './types';
import { parseSchemaRetentions, getRollupNotice, get... |
import React, { useState, useMemo } from 'react';
import { Button, Icon, Form } from 'semantic-ui-react';
import { ObjectItemInput, ObjectItem, ObjectComment } from '../types';
import { reportError } from '../utils';
import dayjs from 'dayjs';
import { Link } from 'react-router-dom';
import { useUserPublicInfo } from '... |
// Copyright IBM Corp. 2017,2018. All Rights Reserved.
// Node module: @loopback/core
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
import {
Binding,
BindingScope,
Constructor,
Context,
createBindingFromClass,
} from '@loopback/context';
impo... |
<reponame>knaitas/playwright
/**
* Copyright (c) Microsoft 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 ... |
<reponame>yangfengzzz/Oasis-WebGPU
import {BindGroupInfo, WGSL} from "./WGSL";
import {ShaderMacroCollection} from "../shader/ShaderMacroCollection";
import {
WGSLBeginNormalVert,
WGSLBeginPositionVert,
WGSLBlendShapeInput,
WGSLBlendShapeVert,
WGSLColorShare,
WGSLColorVert,
WGSLCommon,
W... |
<filename>kernel/packages/gif-processor/processor.ts
import { GIF_WORKERS } from 'config'
import { GifAsset, ProcessorMessageData, WorkerMessage, WorkerMessageData } from './types'
declare const Worker: any
// @see https://github.com/decentraland/unity-renderer/blob/bc2bf1ee0d685132c85606055e592bac038b3471/unity-rend... |
import { EventEmitter } from 'events';
import assert from "assert";
import { ObjectModel } from "objectmodel";
import path from 'path';
import fs from 'fs-extra';
const openpgp = require('openpgp'); // Only works with require :(
import JSZip from 'jszip';
const execShellCommand = require("../../cli/execShellCommand");... |
/**
* Sigma.js WebGL Renderer Node Program
* =====================================
*
* Program rendering nodes using GL_POINTS, but that draws an image on top of
* the classic colored disc.
* @module
*/
import { Coordinates, Dimensions, NodeDisplayData } from "../../../types";
import { floatColor } from "../../.... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license terms.
*-----------------------------------------------------------... |
<gh_stars>0
/*
@license
Copyright 2019 Google LLC. All Rights Reserved.
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.