text stringlengths 3.08k 15.5k |
|---|
import { ChainId } from '@lychees/uniscam-sdk';
import { Configuration } from './basis-cash/config';
import { BankInfo } from './basis-cash';
const configurations: { [env: string]: Configuration } = {
development: {
chainId: ChainId.BSC_TESTNET,
etherscanUrl: 'https://testnet.bscscan.com',
defaultProvide... |
<reponame>mlev/gae-js
import { Datastore, Transaction } from "@google-cloud/datastore";
import { entity as Entity } from "@google-cloud/datastore/build/src/entity";
import { OrderOptions, RunQueryInfo } from "@google-cloud/datastore/build/src/query";
import DataLoader from "dataloader";
import * as _ from "lodash";
imp... |
<gh_stars>0
import { performance } from 'perf_hooks';
type BigOSetupFunction<T> = (interval: number) => T;
type BigOExecFunction<T> = (data: T, interval: number) => void;
interface BigOOptions {
readonly startInterval?: number;
readonly endInterval?: number;
readonly intervalStep?: number;
// To allow for compil... |
<reponame>winnerineast/facets
/**
* @license
* Copyright 2017 Google 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
*
* Unle... |
<reponame>deifactor/typed-ast-util
import * as estree from "estree";
import * as walker from "estree-walker";
declare module "estree" {
export interface BaseNode {
inferredType?: any;
}
}
// We export the internal walking logic because some rules may want to start a
// 'sub-walker'. For example, a rule might ... |
<filename>sdk/nodejs/opensearchservice/domain.ts
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs, enums } from "../types";
imp... |
import React, { Component, ReactNode } from 'react';
import { connect } from 'react-redux';
import { toggleRelativeScaleAction } from 'src/model/actions/sidebar';
import { getIsRelativeScaleEnabled } from 'src/model/selectors/sidebar';
import { setScrollHistoryAction, setReviewPeriodAction } from 'src/model/actions/dat... |
<reponame>oaki/chess-analysis-api
import {pieceTypes} from "./encoding";
const Uint64BE = require("int64-buffer").Uint64BE;
const EventEmitter = require('events');
const Chess = require('chess.js').Chess;
const Transform = require('stream').Transform;
const utils = require("./utils.js");
const files = utils.board.FILE... |
<filename>src/rules/no-path-concat.ts<gh_stars>0
import path from 'path';
import type { TSESTree } from '@typescript-eslint/typescript-estree';
import { ASTUtils } from '@typescript-eslint/utils';
import type { TSESLint } from '@typescript-eslint/utils';
import { createRule } from '../util/create-rule';
/**
* Get t... |
import { log } from "./log";
import { Context, Contract } from 'fabric-contract-api';
import { Iterators } from 'fabric-shim-api';
import { IPaging, IResult } from "../interfaces/IEntitys";
import { entityType } from "../interfaces/enums";
import { Timestamp } from "fabric-shim";
import { isObject, types } from "util"... |
<gh_stars>0
import { layerManager } from "@/game/layers/manager";
import { Shape } from "@/game/shapes/shape";
import { visibilityStore } from "../store";
import { getBlockers } from "../utils";
import { CDT } from "./cdt";
import { IterativeDelete } from "./iterative";
export enum TriangulationTarget {
VISION = "... |
<gh_stars>1-10
import {Collection as CollectionV3, CollectionV2, Manifest as ManifestV3, ManifestV2, ResourceV2, ImageV2, SequenceV2,
CanvasV2, AnnotationV2, RenderingV2, Canvas as CanvasV3, Annotation as AnnotationV3, Resource as ResourceV3,
MediaSequenceV2, Base as BaseV3, BaseV2, Service as ServiceV3, AuthSe... |
<filename>lib/partials.ts
/*
* Copyright (C) Balena.io - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
*/
import Debug from 'debug';
import { fs } from 'memfs';
import path from 'path';
import Handlebars from 'handlebars';
import att... |
import isEmpty from 'lodash/isEmpty';
import { ActionsObservable, ofType, StateObservable } from 'redux-observable';
import { of, timer } from 'rxjs';
import { delayWhen, filter, map, mergeMap } from 'rxjs/operators';
import {
EGEType,
betTableTypes,
getCurrentRoundStatus,
getPlayerBalance,
IGEAuthMessageAct... |
import prisma from '@lib/prisma';
import { Comment, Post } from '@prisma/client';
import { FC } from 'react';
import Head from 'next/head';
import Link from 'next/link';
import { useRouter } from 'next/router';
import { useSession } from 'next-auth/react';
import { GetServerSideProps, NextPage } from 'next';
import {... |
const popupS = require('popups');
import * as Redux from 'redux';
import * as React from 'react';
import { connect } from 'react-redux';
import { withRouter, RouteComponentProps } from 'react-router-dom';
import { NAV_PAGE } from '../app/app';
import Navbar from './Navbar';
import { httpGetPublicAccountInfo, httpGetGam... |
<filename>test/fixtures/app-ts/app.ts<gh_stars>100-1000
import * as assert from 'assert';
import * as path from 'path';
const EGG_LOADER = Symbol.for('egg#loader');
const EGG_PATH = Symbol.for('egg#eggPath');
import { BaseContextClass, EggCore, EggCoreOptions, EggLoader, EggLoaderOptions } from '../../..';
// normal
c... |
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
import ContentEditable, { ContentEditableEvent } from 'react-contenteditable';
import styled from 'styled-components';
import { encode, decode } from 'html-entities';
import { MenuItemProps } from '../../../inspector/comp... |
import { CheckoutSelectors, CustomerRequestOptions, PaymentInitializeOptions, PaymentMethod, PaymentRequestOptions } from '@bigcommerce/checkout-sdk';
import { number } from 'card-validator';
import { noop, some } from 'lodash';
import React, { Component, Fragment, ReactNode } from 'react';
import { withCheckout, Chec... |
import functionArguments from 'function-arguments'
import { Injectable, InjectableArray, InjectableClass, InjectableFunction, isArray, isFunction, isInjectable, Service } from './utils'
export interface Provider {
$get(...args: any[]): any
}
export interface ProviderClass {
new ($injector: Injector, serviceName: ... |
import * as b from "bobril";
import { List } from "./list";
export interface IMenuItemControllerChild extends b.IBobrilCtx {
focused: boolean;
owner: IMenuController;
_disabled: boolean;
handleAction(): void;
}
export interface IMenuController {
childRender(ctx: IMenuItemControllerChild, disabled:... |
import { Component, ChangeDetectionStrategy, OnInit, OnDestroy, ElementRef, HostListener } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { DataStructure } from '@typings/typings/DataStructure';
import { Observable, Subject } from 'rxjs';
import { delay, filter, map, mergeAll, swi... |
import { ElementProperties, Subscriber, Template } from './types';
/**
* An element creation helper.
* @param {string} eltInfo Basic information about the element.
* `eltInfo` should be a string of the format `tagName#id.class1.class2`.
* Each part (tag name, id, classes) is optional, and an infinite number of
* c... |
/* eslint-disable @typescript-eslint/no-this-alias */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { VuexModule, Module, Mutation, Action } from 'vuex-module-decorators'
import { LegendItem } from '@/interfaces/LegendItem'
import { ObjectItem } from '@/interfaces/ObjectItem'
import { Announcemen... |
import 'react-toastify/dist/ReactToastify.css';
import 'bootswatch/dist/slate/bootstrap.css';
import 'react-bootstrap-typeahead/css/Typeahead.css';
import { Component, ComponentPropsWithoutRef } from 'react';
import { Button, Col, Container, Row, Spinner } from 'react-bootstrap';
import { Typeahead } from 'react-bootst... |
import {
Component,
ViewEncapsulation,
AfterViewInit,
AfterViewChecked,
ChangeDetectionStrategy,
ElementRef,
ViewChild,
OnInit,
forwardRef,
ContentChildren,
QueryList,
ChangeDetectorRef,
Renderer2,
Input,
OnDestroy
} from '@angular/core';
import { ToolbarItemD... |
import type { ZPackage } from '../packages';
import type { ZCall } from '../plan';
import type { ZTask, ZTaskSpec } from '../tasks';
import { ZBatchDetails } from './batch-details';
import type { ZBatchPlanner } from './batch-planner';
import { batchZTask } from './batcher.impl';
import { ZBatching } from './batching';... |
// https://github.com/meshakeeb/StoreJS
//
// // Store 'Shakeeb' at 'username'
// store.set('username', 'Shakeeb')
//
// // Get 'username'
// store.get('username')
//
// // Remove 'username'
// store.remove('username')
//
// // Store an object literal - store.js uses JSON.stringify under the hood
// store.set('user', {... |
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/prefer-namespace-keyword */
/* spellchecker: disable */
import { vec3 as vec3_glm, ReadonlyVec3, ReadonlyVec4 } from 'gl-matrix';
export declare type vec3 = vec3_glm;
import { fract } from './auxiliaries';
import { logArrayAsMa... |
import * as React from 'react';
import r from 'refluent';
import css from '../../css';
import Div from '../../div';
import Txt from '../../txt';
import { restyle } from '../../utils';
import Label from '../components/Label';
import checkFile from './checkFile';
import uploaders from './uploaders';
const hiddenStyle... |
import {BehaviorSubject} from "rxjs"
import {Vector3} from "three"
import {IGotchiFactory} from "../gotchi/gotchi"
import {LocalStorage} from "../storage/local-storage"
import {Hexalot, hexalotTreeString} from "./hexalot"
import {IslandMode, IslandState} from "./island-state"
import {ADJACENT, BRANCH_STEP, HEXALOT_SH... |
<filename>src/logic/player.ts
import Entity from './entity';
import { TILE_SIZE } from '../constants';
import Bomb from './bomb';
import { $bombs } from '../state';
import { lerp } from '../lib/utils';
class Player extends Entity {
movement = { left: false, up: false, right: false, down: false };
force = { dx: 0, ... |
import * as Debug from "debug";
const debug = Debug("zamza:zamza");
import { KafkaConsumerConfig, KafkaProducerConfig } from "sinek";
import MongoWrapper from "./db/MongoWrapper";
import MongoPoller from "./db/MongoPoller";
import Discovery from "./kafka/Discovery";
import HttpServer from "./api/HttpServer";
import Me... |
const request = require('request').defaults({timeout: 5000});
const async = require('async');
const initialPortTest = 4370;
export class SpotifyService {
protected https = false;
protected foundPort = false;
protected port : number;
protected portTries = 15;
protected albumImagesCache = {};
p... |
<filename>src/Documents/Commands/QueryCommand.ts
import { HttpRequestParameters } from "../../Primitives/Http";
import { RavenCommand } from "../../Http/RavenCommand";
import { QueryResult } from "../Queries/QueryResult";
import { DocumentConventions } from "../Conventions/DocumentConventions";
import { IndexQuery,... |
import { useEffect, useRef, useState } from 'react';
import { DocumentNode, gql, useLazyQuery } from '@apollo/client';
import { useSession } from 'next-auth/react';
import { NextRouter, useRouter } from 'next/router';
import ChatBubble from '@/icons/ChatBubble';
import { extractHashRoute } from '@/libs/route';
impor... |
<reponame>ccimage/tsbuffer
/*!
TSBuffer
解决TCP网络分包和粘包的问题
Mr.che (ccimage)
时间 2018-1-16 16:02:56
*/
export enum BufferHeaderType{
longLE, // 32 Little Edian
longBE,
shortLE,
shortBE
}
export default class TSBuffer{
constructor(type:BufferHeaderType = BufferHeaderType.longBE){
... |
import { IResource } from './resource';
import { ISite } from './site';
import { IEnhancedJSONSchema } from './scenario';
import SchemaHelper from './schema/SchemaHelper';
import { IModuleStorage } from './storage';
export interface IPluginStorage extends IModuleStorage {
scenarioId?: number;
}
export interface IPl... |
import { SchemaType, SPEC_VERSION } from 'components/PluginJSONCreator/constants';
import { fromJS, List, Map } from 'immutable';
import fileDownload from 'js-file-download';
import uuidV4 from 'uuid/v4';
function getJSONOutput(widgetData) {
const {
displayName,
emitAlerts,
emitErrors,
configurationG... |
<filename>BrightID/src/utils/WISchnorrClient.ts
/**
-- WISchnorrClient.js --
Author : <NAME> <<EMAIL>>
Date : September 2016
* */
import modPow from 'react-native-modpow';
import CryptoJS from 'crypto-js';
import { BigInteger } from 'jsbn';
if (!__DEV__) {
console.log(`Monkey-patching BigNumber.modPow to use re... |
import React, { useEffect } from "react";
import { useHistory } from "react-router-dom";
import { Alert, Badge, Button, Card, Modal } from "react-bootstrap";
import { RouteComponentProps } from "react-router";
import { Socket } from "socket.io-client";
import { DefaultEventsMap } from "socket.io-client/build/typed... |
import fs from 'fs-extra';
import path from 'path';
import yargs from 'yargs/yargs';
import { camelize, decamelize, ObjectOf } from '@upradata/util';
import { fromDir, findUp } from '../find-up';
import { red } from '../template-style';
import {
Arguments,
BuilderCallback,
CommandHandler,
CommandModule,... |
import inquirer from 'inquirer';
import { Command } from 'commander';
import { DISABLE_INTERACTIVITY } from './prompts/prompt';
import { Choice } from './prompts/choices';
import Telemetry from './telemetry';
export function generateSignature(name: string, args: Arg[]): string {
return [name, ...args.map(a => `[${a... |
<gh_stars>1-10
import Papa from 'papaparse';
import log from '@/transitional/log';
import { ClientPropValidationError } from '@/backend/constants';
import { loadFile, getExtension } from './file_utils';
interface LoadedClient {
name?: string;
username?: string;
password?: string;
}
type ClientProps = keyof Load... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you ... |
import {
FromTo,
Reverse,
AllTypes,
RangeObject,
CharCodeRange,
FromToCharRange,
} from "./interface";
export const MAX_CHAR_CODE = 1114112;
export function processTaggedTemplate(strings: string[], values: any[]) {
values.push("");
return strings.reduce((res, str, idx) => res + str + values[idx], "");... |
import { select } from 'd3';
import { TrackOptions, Transform, OnMountEvent, OnUnmountEvent, OnUpdateEvent, OnRescaleEvent } from './interfaces';
import { D3Selection, Scale } from '../common/interfaces';
import { LegendTriggerFunction } from '../utils/legend-helper';
/**
* Default options
*/
const defaults = {
wid... |
import React from 'react';
import { FaDownload, FaEllipsisV, FaThumbsDown, FaThumbsUp, FaTrashAlt } from 'react-icons/fa';
import { deleteSubmission, getSubmissionMeta, updateSubmission } from '../services/SubmissionService';
import { getUser } from '../services/UserService';
import { Meta } from '../types/Meta';
impor... |
interface DagNodeModuleOptions extends DagNodeModuleInfo {
headNode: DagNodeIn,
tab: DagTabUser
}
class DagNodeModule extends DagNode {
public linkIns: Map<DagNodeId, DagNodeDFIn>;
public linkOuts: Map<DagNodeId, DagNodeDFOut>;
public headNode: DagNodeIn;
public tab: DagTabUser;
private _he... |
/* eslint-disable react/no-danger */
import React, {
DetailedHTMLProps,
FC,
InputHTMLAttributes,
useEffect,
useRef,
useState,
} from "react"
import Head from "next/head"
import { Svg } from "react-optimized-image"
import Link from "next/link"
import { useRouter } from "next/router"
import SearchIcon from ".... |
/* eslint-disable @typescript-eslint/no-unused-vars-experimental */
/*!
* V4Fire Client Core
* https://github.com/V4Fire/Client
*
* Released under the MIT license
* https://github.com/V4Fire/Client/blob/master/LICENSE
*/
/**
* [[include:traits/i-lock-page-scroll/README.md]]
* @packageDocumentation
*/
import... |
<filename>src/taskbuilder/Processor.ts<gh_stars>0
import * as async from 'async';
import * as shortId from 'shortid';
import * as _ from 'lodash';
import { TaskGraphNode, ParentWorkflowDetails } from '../deciders/TaskGraph';
import { TaskGraphBuilder, TaskGraphNodeDeps } from './TaskGraphBuilder';
import { genUtil } ... |
import { t, Trans } from "@lingui/macro";
import { Box, Divider, Link, Paper, SvgIcon, Typography } from "@mui/material";
import { styled } from "@mui/material/styles";
import { Icon, NavItem } from "@olympusdao/component-library";
import React from "react";
import { NavLink } from "react-router-dom";
import { sortByDi... |
<filename>src/platform/elements/simple-table/pagination.ts<gh_stars>0
import {
ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter,
Input, OnDestroy, OnInit, Output, ViewEncapsulation,
} from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { NovoSimplePaginationEvent }... |
import { Component, Input, DebugElement } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { AuthService, RoutingService, UserToken } from '@spartacus/core';
import { of, Observable } from 'rxjs';
import createSpy =... |
/**
* Copyright 2020 Splunk, 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 applicable law or agreed to in... |
<reponame>sermmor/from-spotify-list-to-youtube-list
import { youtube_v3 } from "googleapis";
import { PlaylistSong } from "./spotify-get-playlist";
import { writeFileSync } from "fs";
const fetch = require("node-fetch");
const secondsWaiting = 5;
const millisecondsBetweenSearchs = secondsWaiting * 1000;
let youtubeA... |
//still in progress...
const c: any = {
s: "string",
o: "object",
b: "boolean",
i: "integer",
n: "number",
a: "array",
fn: "function",
sp: "super",
c: "color",
t: "type",
d: "defaut",
u: "undefined",
v: "value",
svgNs: "http://www.w3.org/2000/svg"
};
export { c as consts };
export const t... |
import * as React from "react";
import * as PropTypes from "prop-types";
import * as invariant from "invariant";
import {
RosaClient,
Query,
QueryDefinition,
ActionDefinition
} from "rosa-client";
import { MapQueriesToProps } from "../types/queries";
import { MapActionsToProps } from "../types/actions";
import... |
/**
* 对象存储签名的类
* @file Sign
*/
import assert from "assert";
import * as utils from "./utils";
/** 实例化签名 配置项 */
interface IOption {
/** 默认过期时间(毫秒,默认30s) */
expire?: number;
/** 默认上传路径前缀(末尾包含 / ) */
defaultDir?: string;
/** 默认最大文件大小(字节) */
maxSize?: number;
/** 存储桶的名称 */
bucket: string;
/** 访问地址的端... |
<filename>packages/contracts/test/integration/twoPartyPayments.spec.ts
import * as ethers from "ethers";
import { AbstractContract, expect } from "../../utils";
import * as Utils from "../../utils/misc";
const web3 = (global as any).web3;
const { unlockedAccount } = Utils.setupTestEnv(web3);
const [A, B] = [
// 0x... |
<filename>src/app/home-setting/ledger/ledger.component.ts<gh_stars>1-10
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarRef, SimpleSnackBar } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
im... |
import { join } from 'path'
import { optimize } from 'svgo'
import fs from 'fs-extra'
import cleanupIDs from 'svgo/plugins/cleanupIDs.js'
import removeAttrs from 'svgo/plugins/removeAttrs.js'
import removeDimensions from 'svgo/plugins/removeDimensions.js'
import removeViewBox from 'svgo/plugins/removeViewBox.js'
import... |
import {
Panel,
Group,
vlayout,
layoutConfig,
Gravity,
navbar,
stack,
RemoteResource,
imageDecoder,
} from "doric";
import { dangleView, DangleWebGLRenderingContext, vsync } from "dangle";
const global = new Function("return this")();
global.window = {
devicePixelRatio: 1,
addEventListener: (() =... |
import * as React from "react"
import { isMobile } from "react-device-detect"
import { StyleContext } from "../contexts/StyleContext"
import { ThemeContext } from "../contexts/ThemeContext"
import { TerminalContext } from "../contexts/TerminalContext"
import TextareaAutosize from 'react-textarea-autosize';
export co... |
<filename>packages/backend/src/usagers/custom-docs/buildCustomDoc.service.ts
import { USAGER_DECISION_STATUT_LABELS } from "./../../_common/labels/USAGER_DECISION_STATUT_LABELS.const";
import { generateMotifLabel } from "./../services/generateMotifLabel.service";
import { UsagerDecision } from "./../../_common/model/us... |
import { isPlatformServer } from '@angular/common';
import {
Inject,
Injectable,
OnDestroy,
Optional,
PLATFORM_ID,
} from '@angular/core';
import {
makeStateKey,
Meta,
MetaDefinition,
Title,
TransferState,
} from '@angular/platform-browser';
import { ActivatedRoute, Data, Router } from '@angular/rou... |
import { ControllerAbstract } from './lib'
import { PrompterViewInner, PrompterConfigMode } from '../PrompterView'
const LOCALSTORAGEMODE = 'prompter-controller-arrowkeys'
/**
* This class handles control of the prompter using Keyboard keys sent from an xkeys
* Up: control + alt + [1-7]
* Down: control + alt + [1-... |
require('source-map-support').install();
import test from 'tape';
import { Graph, GraphNode, GraphEdge } from '../';
interface ITestNode {
nodes: TestNode[];
}
/**
* Simple test implementation of GraphNode.
*/
class TestNode extends GraphNode<ITestNode> {
propertyType = 'test';
getDefaults(): ITestNode {
retu... |
/* eslint-disable no-console */
import {
createRxDatabase,
addRxPlugin,
RxDatabase,
RxJsonSchema,
checkAdapter,
} from "rxdb";
import { timeStart, timeEnd } from "../utils/helper";
import {
UserCollection,
UserDocType,
UserCollectionMethods,
MyDatabaseCollections,
MyDatabase,
IAdapter,
} from "../... |
import * as svgPathParser from 'svg-path-parser';
import { SVGNodeTransformer } from '../types';
import { createFeature, svgPointToCoordinate } from '../utils';
import Vector2 from '../Vector2';
import * as mathUtils from '../math-utils';
// Command types are missing x0, y0 properties
interface EllipticalArcCommand ex... |
import { Injectable } from '@angular/core';
const getTagName = (src: string): string => src.replace(/[<>:/]/g, ' ').trim().split(' ')[0];
const parseAttribute = (src: string): string[] => src.replace(/[:]/g, '~').replace(/"/g, '').split('~');
export interface IPolicy {
checks: {
[key: string]: INessusItem
},
... |
import {
Component,
ElementRef,
Input,
OnInit,
OnDestroy,
ChangeDetectorRef,
ViewChild,
ViewChildren
} from '@angular/core';
import { ActivatedRoute, Params, Router, UrlSegment } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { Subscription } from 'rxjs/Subscription';
impor... |
<filename>client/ts/client.ts
import { v4 as uuid } from "uuid";
import { Connection, ConnectionInterface } from "./connection";
import { Console } from "./console";
import { Color } from "./color";
import { CRDT } from "./crdt";
import { Editor, EditorInterface } from "./editor";
import { ConnectionError } from "./er... |
<reponame>olaki-android/olaki
import appConfig from '../../../appConfig.json';
import logger from '../../logger';
import { CodenameToDeviceSummary, DeviceSummary } from './model';
import { fetchUrl, normaliseCodename, removeVendorPrefixFromModelAndTrim } from './util';
import { AxiosResponse } from 'axios';
import { lo... |
import {Injectable} from '@angular/core'
import {hexToBytes} from '../crypto'
import {
Schema, MethodData, ConstructorData,
VECTOR_CTOR, TRUE_CTOR, FALSE_CTOR
} from './types'
const SUCCESS = true
const BASE_TYPES = {
'#' : 'putInt',
'int' : 'putInt',
'long' : 'putLong',
'int128' : 'putInt128',
... |
import React, { Component } from 'react';
import {autorun} from 'mobx'
import {Button,Input,Spin} from 'antd';
import { async } from 'q';
import { any, number } from 'prop-types';
import NeoHelper from '../Tools/neoHelper'
import NNSHelper from '../Tools/nnsHelper'
import {inject,observer} from 'mobx-react'
interface ... |
<filename>src/lib/churn/xwalk.ts
/// <reference path='../../../third_party/ipaddrjs/ipaddrjs.d.ts' />
/// <reference path='../../../third_party/typings/index.d.ts' />
import * as caesar from '../transformers/caesar';
import * as candidate from '../churn/candidate';
import * as churn_types from '../churn/churn.types';
... |
<reponame>debaraj-barua/GNUI<gh_stars>10-100
export const color = {
background: {
body: "var(--background-body)",
ui01: "var(--background-ui01)",
ui02: "var(--background-ui02)",
ui03: "var(--background-ui03)",
ui04: "var(--background-ui04)",
ui05: "var(--background-ui05)",
error: "var(--ba... |
<filename>app/src/plasma/plasma.reducer.ts
import { ActionReducer, Action } from '@ngrx/store';
import { PlasmaBlock } from './models/plasmablock';
import { Configuration } from './models/configuration';
import { PlasmaActions, PlasmaActionTypes, NumberOfUTXOs } from './plasma.actions';
import { PlasmaState } from './p... |
import { captionOption, Caption } from './caption';
import * as DataModel from '../data-models/translation';
import { isComment } from '../data-models/comment';
import { log, init as loggerInit } from '../logger';
export type address = [string, number, number];
export interface translationOption extends captionOption... |
<gh_stars>1-10
'use strict'
import * as fs from 'fs'
import { app, protocol, BrowserWindow, ipcMain as ipc, dialog } from 'electron'
import {
createProtocol,
installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
import got from 'got'
const isDevelopment = process.env.NODE_ENV !== 'production'
import puppe... |
import styled, { css } from 'styled-components'
import { cssGetMainColor } from '../../../utils'
import { cssBox } from '../../Box/Box'
import { BoxWrapperProps } from '../../Box/BoxTypes'
import { Text } from '../../Text/Text'
import { Box, BoxProps } from '../..'
import React, { FC, useContext } from 'react'
import ... |
import React, { useState, useEffect } from "react";
import {
FormControlLabel,
Checkbox,
Link,
Grid,
Typography,
Container,
IconButton,
Icon,
} from "@material-ui/core";
import CheckRoundedIcon from "@material-ui/icons/CheckRounded";
import CheckBoxOutlineBlankIcon from "@material-ui/icons/CheckBoxOutli... |
import fs from 'fs'
import path from 'path'
import _ from 'lodash'
import Listr from 'listr'
import AWS from 'aws-sdk'
import Errors from '@tradle/errors'
import {
confirmOrAbort,
confirm,
} from './prompts'
import { TRADLE_ACCOUNT_ID, BIG_BUCKETS } from './constants'
import { logger, colors } from './logger'
impo... |
/* eslint-disable @typescript-eslint/no-misused-new */
/* eslint-disable @typescript-eslint/ban-types */
import * as Clutter from 'clutter';
import { AppLaunchContext } from 'gio';
import * as GLib from 'glib';
import * as GObject from 'gobject';
import * as Meta from 'meta';
import * as Shell from 'shell';
import { Ms... |
<filename>years/2021/09/index.ts<gh_stars>0
import _ from "lodash";
import * as util from "../../../util/util";
import * as test from "../../../util/test";
import chalk from "chalk";
import { log, logSolution, trace } from "../../../util/log";
import { performance } from "perf_hooks";
const YEAR = 2021;
const DAY = 9;... |
import React, { useContext, useMemo } from 'react';
import { AxisBottom, AxisLeft } from '@vx/axis';
import { AxisScale, AxisEncoding } from '../common/types';
import { ThemeContext } from '../themes';
/**
* Returns the number of ticks on the axis based on the length of data and the axis
* @param axisLength - lengt... |
import * as ndarray from 'ndarray';
let emlapack = require('emlapack');
export function dlarrd(RANGE: string,
ORDER: string,
N: number,
VL: number,
VU: number,
IL: number,
IU: number,
GERS: ndarray<number>,
RELTOL: number,
D: ndarray<number>,
E: ndarray<number>,
E2: ndarray... |
import { BigNumber } from 'ethers'
import {
indexerError,
IndexerErrorCode,
QueryFeeModels,
AllocationReceiptAttributes,
ensureAllocationSummary,
} from '@graphprotocol/indexer-common'
import { NativeSignatureVerifier } from '@graphprotocol/indexer-native'
import { Address, Logger, timer, toAddress } from '@g... |
/* eslint-disable @typescript-eslint/no-explicit-any */
import { html, LitElement, property, customElement } from "lit-element";
export type Pojo = { [key: string]: any }
import { isbasic } from "./mb-form-field";
import "./mb-form-object";
const addedprops = ["group","tab", "abstract","readonly","hidden"]
/*... |
import * as React from 'react'
import { groupBy, keyBy } from 'lodash'
import { GetStaticProps } from 'next'
import Link from 'next/link'
import { useRouter } from 'next/router'
import {
AspectRatio,
Divider,
Flex,
Heading,
Icon,
Image,
Link as ChakraLink,
Modal,
ModalBody,
ModalCloseButton,
Modal... |
<gh_stars>10-100
import { Router, Request, Response } from 'express';
import * as Debug from 'debug';
import { Source, ISourceDocument } from '../models/SourceModel';
import { Message, IMessageDocument } from '../models/MessageModel';
import { SerializedPushSubscription, ISerializedPushSubscriptionDocument } from '../m... |
<reponame>zhang0ZGC/web-alioss-uploader<gh_stars>1-10
import sinon from "sinon";
import Client from "../src";
import {ClientOptions, PostObjectOptions} from "../src/Client";
const defaultOptions = {
region: 'oss-cn-hangzhou',
accessKeyId: 'testKeyId',
accessKeySecret: 'testKeySecret',
bucket: 'test-bucket',
}... |
import * as jsforce from 'jsforce';
import { ConfigData, CustomScript, CustomScriptFile } from '../models';
import { initConnection, queryAllRecords, queryRecordsById, queryAllRecordsWithoutCode } from '../common/sfdc-utils';
import { copyFile, saveRecordsToConfig, fileExists, getPathWithFileName, isStringSame } from '... |
import {Immediate, isTnumber, Relative, SIZE, Tnumber, TOperand} from '../../operand';
import {TRexDefinition} from "./table";
import {IVexDefinition} from "./parts/PrefixVex";
import {IEvexDefinition} from "./parts/PrefixEvex";
import {EXT, MODE, MODES} from "./consts";
import Mnemonic from "../../Mnemonic";
import {d... |
import { UUID } from "@codewithkyle/uuid";
export type NetworkType = "4g" | "3g" | "2g" | "slow-2g";
export type DOMState = "loading" | "idling" | "booting";
export type Browser = "chrome" | "safari" | "edge" | "chromium-edge" | "ie" | "firefox" | "unknown" | "opera";
class Environment {
public connection: Netw... |
import * as React from 'react'
import { observer, inject } from 'mobx-react'
import { observable, computed } from 'mobx'
import { remote } from 'electron'
import { join } from 'path'
import { existsSync } from 'fs'
import rimraf from 'rimraf'
import { valid } from 'semver'
import { autobind } from 'core-decorators'
imp... |
import { Directive, ElementRef, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core';
import { GestureController } from '@ionic/angular';
export type gestureNames = 'tap' | 'doubleTap' | 'press' | 'swipe';
export type directionNames = 'up' | 'down' | 'left' | 'right';
export type reportInterval = 's... |
import React from 'react';
import {
ByElement,
AutoComplete,
withStaticProps,
} from '../../common/by-element';
import { Loading } from '../loading';
import SelectCss from './select.module.css';
import { Icon } from '../icon';
import { useRefElement } from '../../hooks/ref';
import { createEvent } from '../../eve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.