text stringlengths 3.08k 15.5k |
|---|
// Calculations
import {regionDataTable, regions, days} from "./DataSource";
export interface CalcParms { // calculation parameters
caseDeathTimeLag: number; // time lag between reported cases and reported deaths, in days
dailyAvgDays: numb... |
import { CIELab, CMYK, HSL, HSV, Options, RGB, XYZ } from "../colorTypes";
import { cssValues, round } from "../utils";
import { xyzToCIELab } from ".";
import { InvalidColorError, isValidRgb } from "../validators";
const validator = <T, V>(
rgb: RGB,
converter: (color: V, options?: Options
) => T): (color: V, op... |
<gh_stars>10-100
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import {
ITreeShapeProducer,
ITreeShapeConsumer,
ITreeShapeReader,
TreeNode,
TreeNodeHandle,
TreeNodeLocation,
ITreeShapeWriter,
} from "./types";
import {
FrugalList... |
<reponame>quantumlyy/eth-wallet-graph
/**
* List of all the networks supported by the Uniswap Interface
*/
export enum SupportedChainId {
MAINNET = 1,
POLYGON = 137,
FANTOM = 250,
AVALANCHE = 43114,
OPTIMISM = 10,
ARBITRUM = 42161,
BOBA = 288
}
export const ALL_SUPPORTED_CHAIN_IDS: SupportedChainId[] = Obje... |
import AppBar from '@material-ui/core/AppBar';
import Avatar from '@material-ui/core/Avatar';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import IconButton from '@material-ui/core/IconButton';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@mat... |
import * as React from 'react';
import { Sidebar } from './Sidebar';
import { EditorContent } from './EditorContent';
import { CHANGE, UPDATE_TIMER } from './constants';
import { WithEditorActions, EditorContext } from '@atlaskit/editor-core';
import { createDefaultTab } from './utils';
import { TabIdentifiers, FluffyT... |
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unused-vars */
import fetch from "node-fetch";
import path from "path";
import { MessageFinding } from "./messageParser";
import fuzzy from "fuzzysort";
export type PackedSearchData = [
Array<[
number, //... |
import React, { useEffect, useState } from 'react'
import DefaultNodeEditor from './DefaultNodeEditor'
import styled from 'styled-components'
import TransformPropertyGroup from './TransformPropertyGroup'
import NameInputGroup from './NameInputGroup'
import InputGroup from '../inputs/InputGroup'
import BooleanInput from... |
import {
heightFilter,
weightFilter,
typeFilter,
} from "./../functions/filterFunctions";
import { fetchPokemonData } from "../functions/fetchPokemonDataFunction";
// SEARCH INPUT ON CHANGE HANDLE ACTION
export const searchInputChange = (e: React.FormEvent<HTMLInputElement>) => ({
type: "INPUT_CHANGE",
sear... |
import * as Boxes from "../layout/box";
import { Param } from "../param";
import {
DisplayCell,
DisplayCellType,
Macro,
Primitives,
Scope,
Token,
TokenType
} from "./interface";
export class Compiler {
constructor(
private q: Token[],
private readonly macros: Scope<Boxes.Box>,
private r... |
// deno-lint-ignore-file
/*------------------Server-Side------------------*/
/*
- Catch the sent Input
- generate UUID (This is the primary Key of the JSON)
- save the UUID, Loc_ID & timestamp to GlobalDatabase.json
- respond the key of the JSON (UUID) back to the client
*/
/*------------------Set-Up S... |
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import {
DetailsList,
DetailsListLayoutMode,
FontIcon,
IColumn,
Modal,
} from '@fluentui/react'
import { useBoolean } from '@uifabric/react-hooks'
import { observer } from 'mobx-react-lite'
... |
import { join, isAbsolute, normalize, sep } from 'path';
import * as rollupBundler from 'rollup';
import { Logger } from './logger/logger';
import { ionicRollupResolverPlugin, PLUGIN_NAME } from './rollup/ionic-rollup-resolver-plugin';
import { fillConfigDefaults, getUserConfigFile, replacePathVars } from './util/con... |
/* eslint-disable @typescript-eslint/no-magic-numbers */
import {asUint32} from "./uint32";
/**
* Convert an integer into an array of 32 bits
*/
export const uint32ToBits = (value: number): Array<boolean> => [
Boolean(value & (1 << 0)),
Boolean(value & (1 << 1)),
Boolean(value & (1 << 2)),
Boolean(value & (1... |
<filename>backend/src/schemas/job.schema.ts
import {
index,
modelOptions,
mongoose,
plugin,
prop,
Ref,
Severity,
} from '@typegoose/typegoose';
import { v1 } from 'uuid';
import * as mongoosePaginate from 'mongoose-paginate-v2';
import { BaseModel, PaginateMethod } from './base.model';
imp... |
import * as _ from 'lodash';
import {
ValidationOutcome,
ValidationResult
} from './api-types';
import {Analytics} from './swagger-mock-validator/analytics';
import {FileStore} from './swagger-mock-validator/file-store';
import {MockParser} from './swagger-mock-validator/mock-parser';
import {ParsedMock} from '... |
import {Camera, PerspectiveCamera, Scene, WebGLRenderer} from 'three';
import {Size} from './size';
// resize help from https://jsfiddle.net/Q4Jpu/
export class FpsEvent extends CustomEvent<number> {
static readonly eventName = 'fpsCount';
constructor(fps: number) {
super(FpsEvent.eventName, {detail:... |
<reponame>tiku91/replos<filename>src/helpers/code.ts
import * as pluginTransformTypescript from '@babel/plugin-transform-typescript';
import * as transformModulesCommonJsBabelSimplePlugin from "babel-plugin-transform-es2015-modules-commonjs-simple";
import {transformSync} from "@babel/core";
import * as sourceMap from ... |
<filename>app/server/modules/home-detector/bot.ts
import chalk from 'chalk';
import { HOME_STATE } from './types';
import { BotState } from '../../lib/bot-state';
import { attachMessage, ResDummy } from '../../lib/logger';
import { APIHandler } from './api';
import { Detector } from './classes';
import { MatchParameter... |
<reponame>GuacLive/viewer-api
import * as express from 'express';
import * as socketIo from 'socket.io';
import {RedisAdapter, createAdapter} from 'socket.io-redis';
import {PlaybackEvent, ChannelEvent} from './constants';
import {Channel} from './types';
import {createServer, Server} from 'http';
// @ts-ignore
var cor... |
<reponame>ivandotv/graphql-no-alias
import {
ASTVisitor,
ConstDirectiveNode,
FieldNode,
GraphQLError,
GraphQLObjectType,
ValidationContext
} from 'graphql'
//https://graphql.org/graphql-js/language/#visitor
export type ErrorFn = typeof createErrorMsg
/**
* Configuration object for the createValidation f... |
/*
* MIT License
*
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
*
* 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 r... |
<gh_stars>100-1000
import {
LeveledCompactionStrategyOptions,
SizeTieredCompactionStrategyOptions,
TimeWindowCompactionStrategyOptions,
} from '@/services/datastores/cassandra/lib/modules/schema-builder/compaction';
import CompressionOptions from '@/services/datastores/cassandra/lib/modules/schema-builder/Compres... |
<reponame>siku2/InScripts
import Peer from "peerjs";
import { AsyncQueue } from "./async-queue";
declare const unsafeWindow: { jwplayer: jwplayer.JWPlayerStatic };
type Msg = string | number;
type MsgHandler = (msg: Msg) => void;
function sanitizeID(id: string): string {
return id
.replace(/[^a-zA-Z0-9-_]+/g, ... |
<filename>examples/line/multiple/demo/line-large-data.ts
import { Line } from '@antv/g2plot';
import { uniq, isNumber, isDate } from '@antv/util';
const dict = {
周一: 1,
周二: 2,
周三: 3,
周四: 4,
周五: 5,
周六: 6,
周日: 7,
周天: 7,
星期一: 1,
星期二: 2,
星期三: 3,
星期四: 4,
星期五: 5,
星期六: 6,
星期日: 7,
星期天: 7,
一月:... |
<reponame>LouWii/hosts-file-edit-2
import { accessSync, constants, readFile } from 'fs';
import * as sudo from 'sudo-prompt';
import type { Host } from '../../../types';
const hostsDelimiterStart = '# ----- HostsFileEdit config - Do not delete -----';
const hostsDelimiterEnd = '# ----- HostsFileEdit config - En... |
import DiscordJS, { Intents, MessageEmbed, Permissions, TextChannel, } from 'discord.js';
import dotenv from 'dotenv';
import { initializeApp } from "firebase/app";
import { doc, setDoc, getFirestore } from "firebase/firestore";
dotenv.config();
const firebaseConfig = {
apiKey: "<KEY>",
authDomain: "bottybot... |
import React, {forwardRef} from 'react';
import Style from '@ezcater/snitches';
import theme from './EzCheckbox.theme.config';
import EzLabel from '../EzLabel';
import {useUniqueId} from '../../utils/hooks';
import {domProps} from '../../utils';
const focusRing = theme.css({
':focus + &': {
boxShadow: '$focus-ri... |
import {Binding, defineBinding} from './define'
import {getComponentEarly} from '../component'
import type {Component, Context} from '../component'
import {on} from '../internals/dom-event'
/** All modifiers for model binding. */
const AllowedModelModifiers = ['lazy', 'number']
/**
* `:model` binding will bind in... |
import { Button, message } from 'antd';
import React, { FunctionComponent, useEffect, useRef, useState } from 'react';
import { RoomClient, TYPE_CHANGE_USER } from '../pages/services/RoomClient';
import './index.css';
import VideoContainer from './video-container';
import { AudioMutedOutlined, AudioOutlined, CloseOutli... |
import { css } from '@linaria/core'
// export javascript colours for the SVG background in the button
export const intentPrimary = '#0061a8'
export const intentSecondary = '#23a4de'
export const intentCritical = '#ffb71b'
export const intentSuccess = '#a0c862'
export const intentDanger = '#d3033d'
export const colorB... |
import * as React from "react";
import * as _ from "lodash";
import { BaseWidget, BaseWidgetProps } from "../common/BaseWidget";
import { Toolkit } from "../Toolkit";
import { BaseMouseAction } from "../common/actions/BaseMouseAction";
import SelectionGridCard from "./SelectionGridCard";
export interface SelectionGri... |
<gh_stars>0
import gql from "graphql-tag";
import { ApolloClient } from "apollo-boost";
import { ValidationResult } from "./codemirror-yaml/mode";
import {
ConfigEditorPipelineFragment,
ConfigEditorPipelineFragment_configTypes_CompositeConfigType_fields_configType_ListConfigType_innerTypes
} from "./types/ConfigEdi... |
import { useState, useEffect } from 'react';
import { useWeb3React } from '@web3-react/core';
import { encrypt } from '@metamask/eth-sig-util'
import Deb0x from "../ethereum/deb0x"
import { create } from 'ipfs-http-client'
import SendIcon from '@mui/icons-material/Send';
import {
Box, TextField, Button, Typography
... |
import data from '../data';
import utils from '../utils';
import type {
AstTokenNode as AstTokenNodeType,
AstErrorNode as AstErrorNodeType,
} from '../AstNode';
import type { Token, ParserOptions } from '../parser';
import * as sm from './sm';
import * as Utils from './utils';
import type { Unit, PredictParam } fro... |
import { Int, ObjectDict } from './types'
import { DBInstance, migrateUp } from 'better-sqlite3-schema'
import { KeyCache } from './key-cache'
import { Statement } from 'better-sqlite3'
import {
fromSqliteValue,
SqliteValue,
SqliteValueType,
toSqliteValue,
} from './sqlite-value'
function migrate(db: DBInstanc... |
import React from 'react'
import { action } from '@storybook/addon-actions'
import { storiesOf } from '@storybook/react'
import Button from '@pluralsight/ps-design-system-button'
import * as Text from '@pluralsight/ps-design-system-text'
import { HTMLPropsFor } from '@pluralsight/ps-design-system-util'
import Dialog... |
/* eslint func-names: ["error", "as-needed"] */
import * as SipLib from 'plivo-jssip';
import * as C from '../constants';
import { Logger } from '../logger';
// eslint-disable-next-line import/no-cycle
import { Client, PlivoObject } from '../client';
import { FeedbackObject } from '../utils/feedback';
export interface... |
import React, { useState, useEffect, Component, FC } from 'react';
import { Icon, Popup, Grid, Label, Header } from 'semantic-ui-react';
import { useLocation } from 'react-router';
import { List } from 'react-bootstrap-icons';
import { ReactComponent as CogIcon } from '../../asset/cog.svg';
import { ReactComponent as ... |
<reponame>F-Madruga/RAFT_FCUL
import Promise from 'bluebird';
import yargs from 'yargs';
import inquirer from 'inquirer';
import chalk from 'chalk';
import { nanoid } from 'nanoid';
import load from '../utils/env.util';
import logger from '../utils/log.util';
import { RaftClient } from './client';
const { argv } = ya... |
<filename>src/schemas/main/Etheremon/index.ts<gh_stars>10-100
import { promisify } from 'typed-promisify';
import * as Web3 from 'web3';
import {
EventInputKind,
FunctionInputKind,
FunctionOutputKind,
Schema,
StateMutability,
} from '../../../types';
import * as Names from './names.json';
import * as Thumbn... |
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import styled from 'styled-components';
import { events } from '../../services';
import { hGiftsCreatePressedEvent, hGiftsOpenMuseumGiftPressedEvent } from '../../event-definitions';
import { museum } from '../../data';
import { global ... |
<reponame>renovate-bot/rushstack<filename>stack/eslint-plugin-packlets/src/Path.ts
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import * as path from 'path';
import * as fs from 'fs';
export type ParsedPa... |
<reponame>gentksb/blog
import functions from "firebase-functions"
import "firebase-functions/lib/logger/compat"
import fetch from "node-fetch"
import { JSDOM } from "jsdom"
import amazonPaapi from "amazon-paapi"
// // Start writing Firebase Functions
// // https://firebase.google.com/docs/functions/typescript
//
inter... |
/* tslint:disable interface-over-type-literal variable-name */
import 'reflect-metadata';
type _ = {};
type ClassN<N, T> = { new (...a: N[]): T };
type FN8<A, B, C, D, E, F, G, H, R> = (a?: A, b?: B, c?: C, d?: D, e?: E, f?: F, g?: G, h?: H) => R;
type CLS8<A, B, C, D, E, F, G, H, R> = { new (a?: A, b?: B, c?: C, d?... |
import _ from "lodash";
import Parser from "./parser";
// base menu string for initial document creation
const docStr =
"<document><menuBarTemplate><menuBar></menuBar></menuBarTemplate></document>";
// indicate whether the menu was created
let created = false;
// few private instances
const doc = Parser.dom(docStr... |
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// No Node.js APIs are available in this process because
// `nodeIntegration` is turned off. Use `preload.js` to
// selectively enable features needed in the rendering
// process.
"use strict";
let feed = ... |
import { SlashCommandBuilder } from "@discordjs/builders";
import { ImageManager } from "../../../image/ImageManager";
import { Logger } from "../../../utils/Logger";
import { Grab } from "../../../database/models/grab";
import filetype from "file-type";
import { toDatetimeString } from "../../../utils/time";
import { ... |
import * as monaco from "monaco-editor";
import * as alltypes from './typings.js';
import 'bootstrap';
alltypes.alltypes.forEach(element => {
var content = atob(element.value);
var name = element.name;
monaco.languages.typescript.typescriptDefaults.addExtraLib(content, name);
});
monaco.languages.typescript.ty... |
import { HttpClient } from 'hap-controller'
import { Logging } from 'homebridge'
import { GetCharacteristicsOptions } from 'hap-controller/lib/transport/ip/http-client'
import HttpConnection from 'hap-controller/lib/transport/ip/http-connection'
import { CharacteristicDescription, PairingData } from './Interfaces'
con... |
<filename>packages/ol5/src/renderer.ts
import { FrameState } from 'ol/PluggableMap';
import { Coordinate } from 'ol/coordinate';
import { State } from 'ol/layer/Layer';
import MapRenderer from 'ol/renderer/Map';
import { transform } from 'ol/proj';
// for CanvasLayerRender is not export, instead of CanvasImageLayerRend... |
import * as core from '@actions/core'
import * as github from '@actions/github'
import * as io from '@actions/io'
import {MdHeading, MdHeadingLevel} from './markdown'
import {MdDocumentBuilder} from './markdown/Builders'
async function run(): Promise<void> {
try {
const token = core.getInput('repo-token', {requi... |
<gh_stars>10-100
import { Term } from "./ast";
import { parseFunctionType } from "./parse";
import { TypeMap } from "./reified";
import { addDeclaration, lookup, mangleName, newScope, rootScope, DeclarationFlags, Scope } from "./scope";
import { Function, Type } from "./types";
import { boxed, call, callable, expr, rea... |
import * as React from "react";
import { IconButtonLineComponent } from "../../../lines/iconButtonLineComponent";
import { IActionableKeyFrame } from "./animationCurveEditorComponent";
interface IGraphActionsBarProps {
addKeyframe: () => void;
removeKeyframe: () => void;
frameSelectedKeyframes: () =... |
import { CeloTxReceipt, EncodedTransaction } from '@celo/connect'
import { Account } from '../../../lib/accounts/accounts'
import { TXFinishFunc, TXFunc } from '../../components/app-definition'
import { WalletConnect } from './def'
import * as React from 'react'
import {
Button, List, TextField,
ListItem, ListItemT... |
<reponame>airhorns/together-apart-outaouais
import Webflow from "webflow-api";
import algoliasearch, { SearchIndex } from "algoliasearch";
import { assert } from "./utils";
import { keyBy, pick, omit, compact, uniq, filter, keys } from "lodash-es";
import { CurrentSite } from "./sites";
interface WebflowItem {
_id: ... |
import React, {CSSProperties} from 'react';
import P5 from 'p5';
import {connect} from 'react-redux';
import {RootReducer} from '../../../../store/root-reducer';
import {JWTPayload} from '../../../../global';
import {Tools} from './CanvasWrapper';
type Line = {
x: number;
y: number;
pX: number;
pY: num... |
<gh_stars>1-10
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from "vscode";
import * as fs from "fs";
import * as path from "path";
import { Terminal, TerminalGroup } from "./Terminal";
import { Configurati... |
import { css } from "@emotion/css";
import { ChangeEvent, FC, memo, useCallback, useMemo, useState } from "react";
import UUIDClass from "uuidjs";
import { ModelType } from "graphql-ts-client-api";
import { ERROR_CSS, FORM_CSS } from "../common/CssClasses";
import { Dialog } from "../common/Dialog";
import { ErrorText ... |
export const toBase64 = (str: string) => Buffer.from(str).toString('base64');
export const fromBase64 = (str: string) =>
Buffer.from(decodeURIComponent(str), 'base64').toString();
export const csvJSON = (csv: string) => {
const lines = csv.split('\n');
const result = [];
// NOTE: If your columns contain commas ... |
import got from 'got';
import { Tweet } from './tweet';
import { logger } from './logger';
/**
* TweetStreamConfig
*/
export interface TweetStreamConfig {
maxQueueSize: number;
streamUrl: string;
authToken: string;
};
/**
* TweetStream
*
* see https://developer.twitter.com/en/docs/twitter-api/tweet... |
<filename>src/app/youtube/PlayerListenable.ts
import { Event } from '../libs/events/Event';
import { Disposable } from '../libs/Disposable';
import { ListenerMap } from '../libs/events/ListenerMap';
import { Listenable, addImplementation } from '../libs/events/Listenable';
import { ListenableKey } from '../libs/events/... |
/*
* According to http://www.levibotelho.com/development/commit-a-file-with-the-github-api
* Base on https://github.com/orta/memfs-or-file-map-to-github-branch
*/
import { Octokit } from '@octokit/rest';
/**
* The file map contains files content as a value and path as a key.
* For example:
* {
* 'packages/ex... |
<reponame>AwesomeHamster/koishi
import { GuildMember, integer, Internal, snowflake, User } from '.'
/** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
export interface Emoji {
/** emoji id */
id?: snowflake
/** emoji name */
name?: string
/** roles allowed to use this emo... |
<filename>src/sdk/components/mapsystem/modules/MapPositionModule.ts
import { GeoPoint, GeoPointSubject, MagVar, Subject, UnitType } from '../../..';
import { ADCEvents, GNSSEvents } from '../../../instruments';
import { MapProjectionParameters } from '../../map';
import { AbstractMapModule } from './AbstractMapModule';... |
<gh_stars>0
import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Subject } from 'rxjs';
import { Router, ActivatedRoute } from '@angular/router';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { CommonapiService } from '../../../dashboard/_services/co... |
/* tslint:disable */
/* eslint-disable */
/**
* Lob
* The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
*
* The version of th... |
import React from "react";
import classnames from "classnames";
import { FeedbackIndicator, Indicator } from "../FeedbackIndicator";
import "./slider.scss";
import { randomId } from "@sebgroup/frontend-tools/randomId";
// This solution is meant to fix Gatsby build which complains that window doesn't exist in server-si... |
import * as xss from 'xss';
import bcryptjs from 'bcryptjs';
import validator from 'validator';
import { JwtService } from '@nestjs/jwt';
import { Injectable, UnauthorizedException, BadRequestException } from '@nestjs/common';
import { Repository, In } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';... |
import { DownOutlined, PlusOutlined } from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import {
Avatar,
Button,
Card,
Col,
DatePicker,
Dropdown,
Input,
List,
Menu,
Modal,
Progress,
Radio,
Row,
Select,
... |
import { Callback, FunctionVA, Pair } from '@steelbreeze/types';
import { Axes, Cube } from '@steelbreeze/pivot';
/** Styling information for rendering purposes. */
export interface Style {
/** The class name to use in the final table rendering. */
style: string;
/** Optional text to display in place of Pair.value... |
import { Element, Position, Tuple, Types } from 'types';
import { SelectableValue } from '@grafana/data';
var _ = require('lodash');
export function getOverview(width: number, namespaceCount: number, serviceCount: number, podCount: number, containerCount: number) {
let element: Element[] = new Array();
cons... |
<gh_stars>0
import { createEntries, snakeCase } from './tools'
export const createAccommodationTypes = async (context) => {
const accommodationTypes = await context.db.query(`
SELECT * FROM accommodation_types
WHERE deleted_at IS NULL;
`)
const accommodationTypesEntries = await createEntries(
contex... |
import { maybeDo, writeFile } from "./util";
import * as cmnds from "../docs/redis-doc/commands.json";
import * as path from "path";
import * as jsonSchema from "json-schema";
import * as commandTypes from "./command";
import { fixupSchema } from "./patches/schema";
import { JsonSchemaCommand } from ".";
export const ... |
import * as vscode from "vscode";
import * as path from "path";
import * as fs from "fs";
import * as Webpack from "webpack";
import * as WebpackDevServer from "webpack-dev-server";
import getWebviewOptions from "./utils/getWebviewOptions";
import createJSTemplate from "./utils/createJSTemplate";
import createWebpackC... |
<reponame>rawbdor/pf-core
import {
AssetEnablement,
DillDetails,
DillWeek,
JarDefinition,
} from "../model/PickleModelJson";
import { BigNumber, ethers } from "ethers";
import { Contract as MulticallContract } from "ethers-multicall";
import dillAbi from "../Contracts/ABIs/dill.json";
import feeDistributorAbi f... |
<reponame>haniot/dashboard
import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { PageEvent } from '@angular/material/paginator';
import { ToastrService } from 'ngx-toastr';
import { ISubscription } from 'rxjs/Subscription';
import { TranslateService } from '@ngx-transl... |
<filename>src/index.ts<gh_stars>10-100
import { validate } from "schema-utils";
import { Schema } from "schema-utils/declarations/validate";
import sharp from "sharp";
import { loader } from "webpack";
import { getOptions } from "@calvin-l/webpack-loader-util";
import getMaxDensity from "./helpers/getMaxDensity";
imp... |
import {Vector3} from "@math.gl/core";
export interface RGBValue {
r: number;
g: number;
b: number;
}
export interface HSLValue {
h: number;
s: number;
l: number;
}
export interface HSVValue {
h: number;
s: number;
v: number;
}
// constants
const HEX_REGEX = /^#?([a-f\d]{2})([a-... |
/* eslint-disable react/no-array-index-key */
import './index.scss';
import { Button, Typography } from '@material-ui/core';
import { Done } from '@material-ui/icons';
import React, { useCallback, useEffect, useState } from 'react';
import {
Card,
GAME_STAGE, GameState, PlayerId,
} from '../../types';
import ... |
import React, { useState, useEffect, useRef } from 'react';
import cx from 'classnames';
import { find, isEmpty, trim, omit } from 'lodash';
import { Magnifier, Close } from '@kubed/icons';
import { useClickOutside } from '@kubed/hooks';
import forwardRef from '../utils/forwardRef';
import { Tag } from '../Tag/Tag';
im... |
// cicular linked list element with links up, down, left and right
class Data {
left: Data;
right: Data;
up: Data;
down: Data;
column: Column | null;
guess: Guess | null;
constructor(column: Column = null, guess: Guess = null) {
this.column = column;
this.guess = guess;
// start of pointing at... |
/**
* External dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import {
Button,
Spinner,
TextControl,
withSpokenMessages,
} from '@wordpress/components';
import {
useState,
useMemo,
useEffect,
useCallback,
Fragment,
} from '@wordpress/element';
import { Icon, info } from '@wordpress/icons';
im... |
import { InfoCircleOutlined } from '@ant-design/icons';
import { Button, Popover, Modal, message } from 'antd';
import React, { useCallback, useContext, useEffect, useState } from 'react';
import QRCode from 'qrcode.react';
import { useAsyncFn } from 'react-use';
import styled from 'styled-components';
import { Console... |
<reponame>IssacMM6/romanjs-v1
type value_option = string | number;
type convert_option = 0 | 1 | 2;
function romanList(): any[] {
const roman_letter: string[] = [
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XX",
"XXX",
"XL",
... |
import { HttpClientApp } from './../../service/httpclient.service';
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { trigger, state, style, animate, transition } from '@angular/animations';
import { HttpClient, HttpR... |
/* eslint-disable*/
import 'mocha';
import { expect } from 'chai';
import { spawnSync, exec as childProcessExec } from 'child_process';
import { writeFileSync } from 'fs';
import { promisify } from 'util';
import stringify = require('json-stable-stringify');
import temp = require('temp');
/* eslint-disable import/firs... |
import { SubmitErrorHandler, SubmitHandler, useForm } from "react-hook-form";
import * as yup from 'yup';
import { yupResolver } from '@hookform/resolvers/yup';
import {
Center,
Spinner,
Text,
Stack,
HStack,
useToast,
} from "@chakra-ui/react";
import {
ButtonSecondary,
ButtonPrimary,
Input... |
/*
* Copyright 2022 IROHA LAB
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
<filename>src/index.ts
import { TranslationMessages } from 'ra-core';
const swedishMessages: TranslationMessages = {
ra: {
action: {
add: 'Lägg till',
add_filter: 'Lägg till filter',
back: 'Gå tillbaka',
bulk_actions: '1 objekt valt |||| %{smart_count} objekt... |
<reponame>mysticatea/fs-watcher<filename>src/internal/regular-directory-watcher.ts
/**
* @author <NAME> <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
import { EventEmitter } from "events"
import fs from "fs"
import path from "path"
import debounce from "debounce"
import de... |
import { EasyFlow, from, on, to, finish, whenEnter } from './easy-flow-v2';
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
class AtmFlow extends EasyFlow {
constructor() {
super();
const SHOWING_WELCOME = 'SHOWI... |
import { CoreSdk } from '@fugle/trade-core';
import { Streamer } from './streamer';
import { Order } from './order';
import { PlacedOrder } from './placed-order';
import { loadCredentials, removeCredentials } from './utils';
import { ClientConfig } from './interfaces/client-config.interface';
import { ParsedCertInfo, C... |
import { async, ComponentFixture, TestBed, fakeAsync,tick } from '@angular/core/testing';
import {Location} from "@angular/common";
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from "@angular/common/http";
import {RouterTestingModule} from "@angular/router/testing";
imp... |
import * as path from 'path';
import { UniDataset, DataLoader, generateId } from '@pipcook/pipcook-core';
import Debug from 'debug';
import { IPCInput } from '../protocol';
import { PluginPackage } from '../index';
import loadPlugin from './loaders';
const debug = Debug('costa.client');
const previousFlag = '__pipco... |
<filename>src/modes/send.ts<gh_stars>0
/// <reference types="node" />
// The MIT License (MIT)
//
// node-send-file (https://github.com/mkloubert/node-send-file)
// Copyright (c) <NAME> <<EMAIL>>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associ... |
/*
* 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, { useState, Fragment } from 'react';
import styled from 'styled-... |
import React from 'react'
import { MessageMap, PlayerUi, MappingConstraints, ChannelTypes, ChannelUI, ChannelMapping } from '@serge/custom-types'
import {
FORCE_LAYDOWN,
PERCEPTION_OF_CONTACT,
STATE_OF_WORLD,
CREATE_TASK_GROUP,
LEAVE_TASK_GROUP,
HOST_PLATFORM,
SUBMIT_PLANS,
DELETE_PLATFORM,
VISIBILITY... |
import { Injectable, ServiceUnavailableException } from '@nestjs/common';
import { DeFiService } from './defi.service';
import { HttpService } from './http.service';
interface CfpResponse {
number: number;
title: string;
html_url: string;
labels: { name: string }[];
}
interface CommentsResponse {
body: stri... |
<reponame>cloud-hybrid/cloud-factory
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
/**
* AWS WorkSpaces
*/
export interface DataAwsWorkspacesWorkspaceConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https:/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.