text stringlengths 3.08k 15.5k |
|---|
<reponame>benibenj/vscode-pythonCpp
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
import {
LoggingDebugSession, TerminatedEvent
} from 'vscode-debugadapter';
import * as vscode from ... |
// Copyright 2018 Novo Nordisk Foundation Center for Biosustainability, DTU.
//
// 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... |
import { debug } from 'debug';
import { child, get, DatabaseReference } from 'firebase/database';
import type { HnCache } from './cache';
import { CommentModel, FeedType, StoryModel, UserModel } from '../models';
import { sampleData } from '../sample-data';
import { HN_API_URL } from '../config.server';
const logger ... |
import { SIZE_TREE_HEIGHT } from "@/ts/layout";
import { State, Tree } from "@/store/tree";
import viewStore, { Commit } from "@/store/view";
import { folderDelete } from "./folderController";
import {
lastSelect,
select,
childrenOpenArray,
treeToSelect,
orderByNameASC,
deleteByTree,
path,
pathOld
} fro... |
<filename>src/client/ui/components.ts
//
import * as Vts from 'vue-property-decorator'
import { mixins as Mixins } from 'vue-class-component'
import Vue from 'vue'
import Buefy from 'buefy'
import * as anime from 'animejs'
import * as _ from '../../common/lodash'
import * as core from '../../common/core'
import * as u... |
import React, {
ReactElement,
ReactNode,
useCallback,
useMemo,
useRef,
} from 'react'
import {
Context,
ContextValue,
DataRequest,
GetCachedData,
RequestGameData,
} from './context'
import {Data} from './data'
import {useAsyncDebounce} from './debounce'
const DEFAULT_DEBOUNCE_DELAY = 50
type ROUnk = readonl... |
import React, {Component} from 'react';
import {
View,
Text,
StyleSheet,
TextInput,
TouchableOpacity,
ActivityIndicator,
KeyboardAvoidingView,
ScrollView,
StatusBar,
Dimensions,
} from 'react-native';
import Svg, {Defs, Path, Stop, LinearGradient} from 'react-native-svg';
import {DispatchProp, conne... |
// Copyright (c) <NAME>
// Distributed under the terms of the Modified BSD License.
import {
DOMWidgetModel, DOMWidgetView, ISerializers
} from '@jupyter-widgets/base';
import {
MODULE_NAME, MODULE_VERSION
} from './version';
// Import the CSS
import '../css/widget.css';
// Import the underscore.js
import * as ... |
<reponame>jondot/hypertesting<filename>src/index.ts
import request from 'supertest'
import yaml from 'js-yaml'
import path from 'path'
import fs from 'fs'
import ejs from 'ejs'
import L from 'lodash'
import scrubber, { ScrubEntry } from './scrubber'
import stack from './stack'
interface Context {
vars: (p: string) =... |
import Taro from '@tarojs/taro';
import usePersistFn from '../../hooks/usePersistFn';
import { requestAnimationFrame, isNormalClass } from "../../utils";
const { useState, useEffect, useRef, useCallback } = Taro /** api **/;
export type MixinsTransitionProps = {
style?: React.CSSProperties;
show?: boolean;
durati... |
import React, { useEffect, useState } from 'react';
// import { StyleSheet} from 'react-native';
import { Text } from 'galio-framework';
import { StyleSheet, TextInput, TouchableOpacity } from 'react-native';
import { View } from './Themed';
import {YentenAPI} from '../logic/CoinManager'
import { FlatList } from 're... |
<gh_stars>1-10
import { DocumentNode } from 'graphql';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Om... |
<reponame>martijnthe/asciidoctor-gettext<gh_stars>1-10
import {
allBuiltinsAttributeKeys,
nonLocalizableBuiltinAttributeKeys,
} from './attributes';
import {
isNil,
} from './opal-utils';
import AbstractBlock = AsciiDoctorJs.AbstractBlock;
import Block = AsciiDoctorJs.Block;
import Cell = AsciiDoctorJs.Cell;
impo... |
import client, { DASHBOARD_API_URL } from '@/utils/client';
import { LogsearchTaskModel } from '@pingcap-incubator/dashboard_client';
import { Button, Card, Modal, Spin, Tree, Typography } from 'antd';
import { AntTreeNodeCheckedEvent } from 'antd/lib/tree/Tree';
import React, { Dispatch, SetStateAction, useEffect, use... |
import React from "react"
import * as d3 from "d3"
import styled from "styled-components"
class Force extends React.Component {
svgWidth = 700
svgHeight = 500
state = {
data: [
{
id: 2,
value: 2,
campus: "khaleel",
gender: "female",
role: "student",
},
... |
<gh_stars>10-100
import { join, Path, strings } from '@angular-devkit/core';
import { chain, Rule, Tree } from '@angular-devkit/schematics';
import {
addDecoratorToClassProp,
addEntryToObjctLiteralVariable,
addImports,
addPropToClass,
insertLinesToFunctionBefore,
} from '../../utils/ast-utils';
import { exist... |
import Head from "next/head";
import { Box, Flex, Heading, Image, Text, Tooltip } from "@chakra-ui/react";
import { InfoOutlineIcon } from "@chakra-ui/icons";
import { GetStaticPaths, GetStaticProps } from "next";
import { theme } from "../styles/theme";
import ReactCountryFlag from "react-country-flag";
import Header ... |
import React from 'react';
import { GenericOptionsProps } from '..';
import Slider, { SliderFormat, SliderMarks } from '../../../../components/Slider';
import { getMessage } from '../../../../public/i18n';
import { DefaultOptions } from '../../../../types';
import OptionToggle from '../../OptionToggle';
const marksPer... |
<reponame>leonard-IMBERT/StarlightMap<gh_stars>0
import Images from './drawer/Images';
import Survivor from './types/Survivor';
import Card from './components/Card';
import Requests from './Requests';
import StarMap from './StarMap';
// Variables initialisation
const canvas = document.querySelector<HTMLCanvasElement>(... |
import { rinfgraph } from 'rinf-data/rinfgraph.bundle';
import type { GraphNode, OpInfo, LineInfo, Location, PathElement } from 'rinf-data/rinfgraph.bundle';
interface Haltestelle {
EVA_NR: number;
DS100: string;
Verkehr: string;
}
// eslint-disable-next-line @typescript-eslint/no-var-requires
const g = r... |
const d3Scale = require("d3-scale");
export interface IToStringable {
toString(): string;
}
export interface IOrdinal<Domain extends { toString(): string }, Range> {
/** Given a value in the input domain, returns the corresponding value in
* the output range. If the given value is not in the scale’s do... |
<filename>app/plugins/modules/k8s/src/lib/util/help.ts
/*
* Copyright 2018 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.... |
/**
* From : https://raw.githubusercontent.com/Microsoft/vscode/master/extensions/json/server/src/jsonSchemaService.ts
*
* The original has a lot of code (around XHRs and looking up schemas mainly) that we do not need
*
* We simply need the `JSONSchemaService.resolveSchemaContent`
* - And the class `ResolvedSchem... |
import { Room, Client, Delayed, matchMaker } from "colyseus";
interface PlayerLocation {
longitude: number;
latitude: number;
}
interface ClientStat {
client: Client;
options?: any;
userType: string;
name: string;
location: PlayerLocation;
}
interface Patient extends ClientStat {
availability: { star... |
// SPDX-FileCopyrightText: 2022 <NAME> (dv4all)
// SPDX-FileCopyrightText: 2022 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences
// SPDX-FileCopyrightText: 2022 <NAME> (GFZ) <<EMAIL>>
// SPDX-FileCopyrightText: 2022 dv4all
//
// SPDX-License-Identifier: Apache-2.0
import {Contributor} from '~/type... |
import * as React from 'react';
import { MetadataApi } from '../data/metadataApi';
import { LinkModel, ElementModel, sameLink } from '../data/model';
import { PLACEHOLDER_LINK_TYPE } from '../data/schema';
import { EditorController } from '../editor/editorController';
import { FatLinkType, LinkDirection } from '../di... |
<filename>src/market/TerminalNetwork.ts
/* tslint:disable:object-literal-sort-keys*/
export const RESOURCE_FLOAT: { [key in ResourceConstant]?: number } = {
H: 1000,
O: 1000,
K: 1000,
X: 1000,
L: 1000,
Z: 1000
}
export class TerminalNetwork {
public static readonly CREDIT_FLOAT = 10000;
... |
import React, { createContext, useContext } from 'react';
export type OnEnterDataResponse<D = unknown> = (data?: D) => void;
export type Transition<E = unknown> = {
id: string;
event: string;
onEnter?: OnEnterDataResponse<E>;
};
export type State<E = unknown> = {
id: string;
isPrivate?: boolean;
params?:... |
<filename>src/styles/theme/index.ts
import * as R from 'ramda';
import { ThemeOptions } from '@material-ui/core/styles';
import { darkThemeOverride } from './dark';
import { lightThemeOverride } from './light';
/** Common themes that don't change across light and dark theme */
export const common: ThemeOptions = {
... |
// Copyright 2017-2022 @polkadot/app-staking authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DeriveSessionProgress, DeriveUnlocking } from '@polkadot/api-derive/types';
import type { PalletNominationPoolsPoolMember, PalletNominationPoolsPoolRoles } from '@polkadot/types/lookup';
import type... |
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';
import { Component, OnInit, ViewEncapsulation, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { of } from 'rxjs/observable/of';
impo... |
<reponame>jeffijoe/snicket
import { StreamStore, ReadAllResult } from '../types/stream-store'
import {
StreamStoreNotifier,
SubscribeAt,
MessageProcessor,
AllSubscriptionOptions,
AllSubscription,
} from '../types/subscriptions'
import { createResetEvent } from '../utils/reset-event'
import { DisposedError } f... |
<gh_stars>1-10
import { ISequence, isSeqEmpty, empty } from '../internal';
import { colorPool } from './internal';
import type {
ICategoricalColumn,
ICategoricalDesc,
ICategoricalFilter,
ICategoricalsColumn,
ICategory,
ISetCategoricalFilter,
} from './ICategoricalColumn';
import { DEFAULT_COLOR } from './Co... |
<gh_stars>1-10
import * as core from '@actions/core'
import execa from 'execa'
import path from 'path'
import simpleGit, {Response, SimpleGit} from 'simple-git'
import fetch, {Response as FetchResponse} from 'node-fetch'
const git: SimpleGit = simpleGit()
type Cloc = Record<
string,
{
nFiles: number
blan... |
<gh_stars>0
import {pathVerticalDiagonal} from '@vx/shape';
import {
AssetGraphLiveQuery_assetsLatestInfo_latestRun,
AssetGraphLiveQuery_assetNodes_assetMaterializations,
AssetGraphLiveQuery,
} from './types/AssetGraphLiveQuery';
import {
AssetGraphQuery_assetNodes,
AssetGraphQuery_assetNodes_assetKey,
} fro... |
import { createReactiveState } from './createState'
import { globalState } from './globalState'
import { ComponentObject, Data, HandlerFunc, MemoizedHandlerFunc, RouterInstance } from './types'
import { compile, stringToDOM } from './compiler'
import { patch } from './patch'
import { makeFuncReactiveAndExecuteIt } from... |
<reponame>dipdup-net/dipdup-ts
import * as signalR from "@microsoft/signalr";
import {
EventsConfig,
Message,
OperationTypes,
OperationParameters,
BigMapParameters,
Params,
ResponseTypes,
CHANNEL,
channelToMethod,
paramsMatch,
EventType,
Event
} from './types';
import Obs... |
import { color, createEmbedScrolling } from "../../function.js";
import * as Discord from "discord.js";
import cheerio from "cheerio";
import { getFetch } from "../../function.js";
import { SlashCommand, NorthMessage, NorthInteraction } from "../../classes/NorthClient.js";
import { globalClient as client } from "../../... |
<filename>jovo-clients/jovo-client-web/src/JovoWebClient.ts
import {
AdvancedEventEmitter,
AssistantEvents,
AudioPlayer,
Component,
ComponentConstructor,
Config,
ConversationComponent,
InitConfig,
InputComponent,
Logger,
LoggerComponent,
LoggerEvents,
RequestComponent,
ResponseComponent,
S... |
import { useTraverseKeys } from '@smart-hooks/helper-traverse-scheme-keys';
import { useSmartMemo } from '@smart-hooks/use-smart-memo';
import type { FC } from 'react';
import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
import type { TrueObjectAssign } from './CommonType... |
import { WidgetBase } from "../WidgetBase";
import { Bar } from "./Bar";
import { Size } from "../Size";
import { Rect } from "../Rect";
import { BarLineBase } from "./BarLines/BarLineBase";
import { BarLine as CoreBarLine } from "../../Core/MusicTheory/BarLine";
import { HeightMap } from "./HeightMap";
import ... |
import { GetStaticProps } from 'next';
import { useState } from 'react';
import { loadYaml } from '../utils';
import cn from 'classnames';
import Link from 'next/link';
import Layout from '../components/layout';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import { useTranslation } from... |
import { BooleanInput } from '@angular/cdk/coercion';
import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component, EventEmitter,
HostListener,
Input,
NgZone,
OnDestroy,
OnInit,
Output,
ViewChild
} from '@angular/core';
import { MatDrawerMode, MatSidenav } from '@angular/materi... |
<reponame>justinmchase/github_webhooks<gh_stars>1-10
import {
createJWT,
encodeToString,
generatePass,
hmac,
WebhookEvent,
WebhookEventMap,
WebhookEventName,
} from "./deps.ts";
const GITHUB_URL = Deno.env.get("GITHUB_URL") || "https://api.github.com";
export type {
WebhookEvent,
WebhookEventMap,
... |
<filename>src/Prerenderer.ts
import { PrerenderResult } from './PrerenderResult';
import * as fs from 'fs';
import * as util from 'util';
import { minify }from 'html-minifier';
import * as cheerio from 'cheerio';
import * as mkdirp from 'mkdirp-promise';
import * as puppeteer from 'puppeteer';
import * as dbg from 'deb... |
<reponame>walf443/charcoal
import path from 'path'
import camelCase from 'camelcase'
import Figma from 'figma-js'
import { ensureDir, ensureFile, remove, writeFile } from 'fs-extra'
import got from 'got'
import { match } from 'path-to-regexp'
import { concurrently } from './concurrently'
const extracter = match<{ file... |
/* eslint-disable react/no-array-index-key */
import { isFunction, keys } from 'lodash';
import React, { useCallback, useMemo, useContext } from 'react';
import { Link } from '@gio-design/components';
import classNames from 'classnames';
import { DesignContext } from '@gio-design/utils';
import { EventData, EventPicker... |
import {
AfterViewInit,
Component,
ElementRef,
EventEmitter,
HostListener,
Input,
OnDestroy,
Output,
Renderer2,
ViewChild,
} from '@angular/core';
import { DesignTokenHelper } from '../../helpers';
export enum HorizontalDirection {
right = 'right',
left = 'left',
}
@Component({
selector: 'k... |
import { mat4, vec3 } from 'gl-matrix';
import BrushEngine from './brushEngine';
import Image, { ImageFormat, ImageStorage } from './loader/image';
import MeshData from './loader/meshData';
import Mesh from './mesh';
import Slate from './slate';
import type Widget from './widget';
const brushSize = 40.0;
const brushCo... |
<gh_stars>1-10
import { Pool, NodeConnection, MongoDB, BlockService } from '../lib/lib'
const network = 'testnet'
// NodeConnections hold connection information used by a pool
const bitcoind = new NodeConnection({ address: '127.0.0.1', network: network })
// NodeConnections can also use an internal bcoin instance
co... |
import { GraphQLResolveInfo } from "graphql";
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = {
[K in keyof T]: T[K];
};
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]?: Maybe<T[SubKey]>;
};
export type MakeMaybe<T, K extends keyof T> = Omit<... |
/**
* @license
* Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
import * as React from "react";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import {
Button,
Checkbox,
CheckboxProps,
Divider,
Dropdown,
DropdownProps,
Grid,
Label,
Loader,
Message,
Search,
SearchProps,
Segment,
} from "semantic-ui-react";
import { path } f... |
/*
* Project: ZilPay-wallet
* Author: Rinat(lich666dead)
* -----
* Modified By: the developer formerly known as Rinat(lich666dead) at <<EMAIL>>
* -----
* Copyright (c) 2020 ZilPay
*/
import React from 'react';
import {
View,
Text,
Dimensions,
TextInput,
StyleSheet,
ActivityIndicator,
LayoutAnimati... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) <NAME>. All rights reserved.
* Licensed under the GPLv3 License. See License.md in the project root for license information.
*--------------------------------------------------------------------------------... |
import { JsonAstArray, JsonAstObject, JsonParseMode, parseJsonAst, strings } from "@angular-devkit/core";
import { Rule, SchematicContext, SchematicsException } from "@angular-devkit/schematics";
import { Tree } from "@angular-devkit/schematics/src/tree/interface";
import { NodePackageInstallTask } from "@angular-devki... |
import React, { useState, useEffect } from "react";
import ReactGA from "react-ga";
import AwesomeDebouncePromise from "awesome-debounce-promise";
import { ManageAlert } from "./ManageAlertUI";
import getCsrf from "../../csrf";
import {
Alert,
AlertAction,
AlertRepeat,
SectionStatus,
TAlertSel,
} fr... |
<reponame>kalmasri123/JohnBot
import * as yts from 'youtube-search';
import { env } from './env';
import { isFunction, promisify } from 'util';
import { YouTubeSearchOptions } from 'youtube-search';
import * as ytdl from 'ytdl-core';
import { del, get, hGet, hSet, set } from '@util/redis';
import { PassThrough, Readabl... |
<filename>mod.d.ts
export declare const KEY_CANCEL = 3;
export declare const KEY_HELP = 6;
export declare const KEY_BACK_SPACE = 8;
export declare const KEY_TAB = 9;
export declare const KEY_CLEAR = 12;
export declare const KEY_RETURN = 13;
export declare const KEY_ENTER = 14;
export declare const KEY_SHIFT = 16... |
import { Media, Territory } from '@blockframes/utils/static-model';
import { createHoldback, Holdback } from '@blockframes/contract/contract/+state';
import { collidingHoldback, getCollidingHoldbacks } from '../avails';
import { Duration, Term, createTerm } from '../../term/+state/term.model';
// Territories
const n... |
<filename>src/hydrator-impl.ts<gh_stars>1-10
import { PropertyMetadata, Type } from './annotations/property';
import { InlineMetadata } from './annotations/inline';
import { HasManyMapMetadata } from './annotations/has-many-map';
import { markIdRev } from './utils/marks';
import { HydrateOptions, Hydrator } from './hyd... |
import React, {
ComponentType,
useContext,
WeakValidationMap,
ValidationMap,
ElementType,
} from "react";
import classnames from "classnames";
import { ClassValue } from "classnames/types";
import { GlobalClassNameProps, propTransformers } from "./propTransformers";
import { ClassNamesContext } from "./Class... |
// ~bb-viz~
// Spring Container
// Responsible for communication with SPRING instance that lives inside an iFrame.
// ~bb-viz~
import { Set } from 'immutable';
import * as React from 'react';
// tslint:disable:import-name match-default-export-name
import IframeComm, { IframeCommAttributes } from 'react-iframe-comm';
i... |
/*
Copyright (c) 2017-2018 brewlabs SAS
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, so... |
import { PluginObject } from 'vue';
import Component from 'vue-class-component';
import { Emit, Model, Prop, Watch } from 'vue-property-decorator';
import { I18N_NAME as FILTER_I18N_NAME } from '../../filters/filter-names';
import { i18nFilter } from '../../filters/i18n/i18n';
import { InputLabel } from '../../mix... |
import * as React from "react";
import { Component, ReactPortal, RefObject, useEffect } from "react";
import * as PropTypes from "prop-types";
import {
_,
BaseComponentWrapper,
ColumnApi,
ComponentType,
ComponentUtil,
FrameworkComponentWrapper,
Grid,
GridApi,GridCoreCreator,
GridOpti... |
/*
* Copyright (c) BrownBear, 2016-Present. All Rights Reserved.
*
* This file is a part of Tuleap.
*
* Tuleap is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at ... |
<reponame>Aivyss/Aiko
import { IHttpError, IResponseData, IGetResPacket } from 'src/interfaces';
import { ObjectType, getConnection } from 'typeorm';
import { HttpException } from '@nestjs/common';
import { Request, Response } from 'express';
import { AikoError, LinkedList } from './classes';
import { Grant } from 'src... |
import { StatusError } from "../errors";
import { DEBUG } from "../config";
function applyTransformers(text: string, transformers: ((text: string) => string)[]): string {
return transformers.reduce((currText, currTransformer) => currTransformer(currText), text);
}
const DEFAULT_FAVICON = "https://cdn.betterttv.ne... |
// Copyright 2022 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { APIContextInterface } from 'types/api';
import { ConnectContextInterface } from 'types/connect';
import {
PoolMembershipsContextState,
ActivePoolContextState,
PoolState,
} from 'types/p... |
import {
Box,
Divider,
HStack,
Icon,
Stack,
Stat,
StatGroup,
StatHelpText,
StatLabel,
StatNumber,
Table,
Tbody,
Td,
Text,
Th,
Thead,
Tr,
useToast,
} from '@chakra-ui/react';
import { PageHeading, VoltarButton } from '@/components/atoms';
import { gql, useQuery } from '@apollo/client'... |
<reponame>zw277856645/ngx-semantic
import {
AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, Input, OnChanges,
OnDestroy, OnInit, Output, Renderer2, SimpleChanges
} from '@angular/core';
import { Base } from '../base';
import { InputBoolean, InputNumber, waitFor } from '... |
<reponame>pzinn/Macaulay2Web<filename>src/client/autoRender.ts<gh_stars>1-10
// based on katex auto-render
// katex
import katex from "../../KaTeX/katex.js";
const katexMacros = {
"\\break": "\\\\",
"\\ZZ": "\\mathbb{Z}",
"\\NN": "\\mathbb{N}",
"\\QQ": "\\mathbb{Q}",
"\\RR": "\\mathbb{R}",
"\\CC": "\\mathbb... |
<reponame>memeoo/lions_back
import { Controller, Get, Post, Body, UseInterceptors, UploadedFile, Req, Delete, Param, Put} from '@nestjs/common';
import { UserService } from './user.service';
import { User } from './entities/user.entity';
import { CreateUserDto } from './entities/dtos/create-user.dto';
import { CoreOutp... |
<filename>src/hooks/useTradeCallback.ts<gh_stars>0
import { useCallback, useMemo } from 'react'
import { TransactionResponse } from '@ethersproject/abstract-provider'
import { BigintIsh, JSBI, Currency, CurrencyAmount, NativeCurrency, Token, ZERO } from '@sushiswap/core-sdk'
import useWeb3React from './useWeb3'
import... |
<reponame>ismail-codar/fjsx
import * as t from "@babel/types";
import { NodePath } from "babel-traverse";
import { fComputeParametersInExpression } from "./parameters";
// import generate from "@babel/generator";
export = function() {
return {
visitor: {
MemberExpression(path: NodePath<t.MemberExpression>,... |
<gh_stars>1-10
import HttpClient, { HttpClientOptions, Next, DownloadProgressEvent } from '../src';
import nock from 'nock';
const Exception = HttpClient.Exception;
const baseURL = 'https://merge.com/';
const scope = nock(baseURL).replyContentLength();
describe('url', () => {
const startURLServer = (url: string) =>... |
import React, { useEffect, useRef } from 'react';
import { useLatest, useStateRef } from 'src/utils/hooks/basic';
import { noop } from 'src/utils/functions';
import { SingleSelectBox } from 'src/components/Select/components/SingleSelectBox';
import { MultiSelectBox } from 'src/components/Select/components/MultiSelectBo... |
import { i2cBegin, i2cSetBaudRate, i2cSetSlaveAddress, i2cWrite } from 'rpio';
enum LightIndex {
AnalogInput1 = 0,
AnalogInput2 = 1,
AnalogInput3 = 2,
// AnalogInput4 = null, // has no light
DigitalInput1 = 14,
DigitalInput2 = 13,
DigitalInput3 = 12,
DigitalOutput1 = 3,
DigitalOutput2 = 4,
Digita... |
import { useRouter } from "next/router";
import { ExperimentInterfaceStringDates } from "back-end/types/experiment";
import useApi from "../../hooks/useApi";
import LoadingOverlay from "../../components/LoadingOverlay";
import { useState, ReactElement, useContext } from "react";
import { useAuth } from "../../services/... |
import { assert, expect } from 'chai'
import { mock, stub, spy, assert as sinonAssert, SinonStub, SinonExpectation } from 'sinon'
import { Flowie } from '../../runtime.types'
import createFlowie from '../createFlowie'
import { FlowResult } from '../flowieResult'
describe('reporting.createFlowie (integration tests as ... |
import axios from 'axios'
import dayjs, { Dayjs } from 'dayjs'
import Decode from 'frctl/Json/Decode'
import { nonEmptyString } from 'utils'
// @TODO find a way to declare variables in TS level
const API_URL = process.env.REACT_APP_API_URL || ''
const HTTP_TIMEOUT = Number(process.env.REACT_APP_HTTP_TIMEOUT)
const re... |
import { token } from '@formkit/utils'
import { FormKitContext, FormKitNode, isNode } from './node'
/**
* Event listener functions definition.
* @public
*/
export interface FormKitEventListener {
(event: FormKitEvent): void
receipt?: string
}
/**
* The internal structure of a FormKitEvent
* @public
*/
expor... |
<reponame>jgretz/coding-the-matrix
import {compose, withMemo} from '@truefit/bach';
import {mean, sum, mod, pow, range, setDistinct} from 'mathjs';
import {comprehension, zip} from 'fp-ts/lib/Array';
import {toArray} from 'fp-ts/lib/Set';
import {identity} from 'rxjs';
import {ordString} from 'fp-ts/lib/Ord';
import La... |
import * as ts from 'typescript'
import {
ConstList,
ConstMap,
ConstValue,
DoubleConstant,
FunctionType,
Identifier,
IntConstant,
ListType,
MapType,
SetType,
StringLiteral,
SyntaxType,
} from '@creditkarma/thrift-parser'
import { COMMON_IDENTIFIERS } from './identifiers... |
import { VALIDATORS_TABLE_ITEMS_PER_PAGE } from "./const/transactions";
import Big from "big.js";
import {
DEFAULT_VALID_UNTIL_FIELD,
TRANSACTIONS_TABLE_ITEMS_PER_PAGE,
MINIMUM_FEE,
} from "./const";
import { toNanoMINA } from "./mina";
import isElectron from "is-electron";
import { toast } from "react-toastify";... |
<gh_stars>1-10
/**
* FastLED Keywords for Monaco Editor
*
* Copyright (C) 2021, <NAME>
*/
import { fastledColors } from './fastled-colors';
export const dataTypes = [
'CFastLED',
'CHSV',
'CRGB',
'CRGBArray',
'LEDS',
'FastLED',
'FastPin',
'FastSPI',
'FastSPI_LED2',
'CRGBPalette16',
'CRGBPale... |
import React, { useState, useEffect } from 'react';
import useSWR from 'swr';
import Navbar from '@/components/navbar';
import { Player } from '@/domains/player';
import { fetcher } from '@/utils/functions';
import {
Table,
Thead,
Tbody,
Tr,
Th,
Td,
IconButton,
Heading,
Button,
useDis... |
import * as mat4 from 'toybox/math/mat4';
import * as vec3 from 'toybox/math/vec3';
import * as hacks from 'hacks';
import {GL} from 'toybox/gl/constants';
import {Context} from 'toybox/gl/context';
import {DynamicDraw} from 'toybox/gl/dynamic_draw';
import {ShaderProgram} from 'toybox/gl/shader';
import {Texture} fr... |
import { JupyterLab } from "@jupyterlab/application";
import { MainAreaWidget } from '@jupyterlab/apputils';
import { DOMWidgetView, ViewList, WidgetModel, WrappedError } from '@jupyter-widgets/base';
import { BoxModel} from '@jupyter-widgets/controls';
import { find } from '@phosphor/algorithm';
import { UUID } from... |
<filename>src/typedThingsManager.ts
import {ItemsRange,HttpFailResult, HttpRequestCanceler} from "./helpers";
import * as thingConstants from "./thingConstants";
import {ThingUserReadClaims, ThingUserChangeClaims} from "./thingConstants"
import {ThingPosition, ThingPositionRaw } from "./thingPosition"
import {ThingUser... |
import {
ChangeEvent,
Dispatch,
memo,
MutableRefObject,
ReactNode,
SetStateAction,
useEffect,
useRef,
useState
} from 'react';
import {
CheckIcon,
DeleteIcon,
EditIcon,
SmallCloseIcon
} from '@chakra-ui/icons';
import {
Box,
Checkbox,
FormControl,
FormHelperText,
HStack,
IconButton... |
import React, { Fragment, useEffect, useState } from "react";
import {
Box,
Card,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
Divider,
Fab,
FormControl,
InputAdornment,
InputLabel,
OutlinedInput,
Typography,
} from "@material-ui/core";
import { Link as RouterLink } from "react-rou... |
<filename>src/demo/draggle/deaggle.ts<gh_stars>0
/**
* @author heart
* @description
* @Date 2022-02-25
* 待设计:吸附的过程中添加吸附的参考线
* 以及 设计一个draggleOperation的一个dom元素 增加样式占位等
* 所有的拖放过程中都传递了一个数据的传递对象dataTransfer 用于在源数据和目标数据直接进行传递
* DataTransfer 对象用于保存拖动并放下(drag and drop)过程中的数据
* @see: https://developer.mozilla.org/zh-CN/... |
<reponame>positive-js/mosaic-builds
import { ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
import { DateAdapter, McDateFormats } from '@ptsecurity/cdk/datetime';
import { McFormFieldControl } fr... |
<filename>backend/src/interfaces/CievsCaseInterface.ts
export enum Classification {
Confirmed = "LNG_REFERENCE_DATA_CATEGORY_CASE_CLASSIFICATION_CONFIRMED",
Suspect = "LNG_REFERENCE_DATA_CATEGORY_CASE_CLASSIFICATION_SUSPECT",
Discarded = "LNG_REFERENCE_DATA_CATEGORY_CASE_CLASSIFICATION_NOT_A_CASE_DISCARDED"... |
import React, {
Children,
cloneElement,
forwardRef,
isValidElement,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import {
useFloating,
offset,
flip,
shift,
useListNavigation,
useHover,
useTypeahead,
useInteractions,
useRole,
useClick,
useDismiss,
autoUpdate,
safePolygo... |
<gh_stars>1-10
import { GfxBindingsDescriptor, GfxBindings, GfxDevice, GfxBufferBinding, GfxSamplerBinding, GfxRenderPipelineDescriptor, GfxRenderPipeline, GfxMegaStateDescriptor, GfxBindingLayoutDescriptor, GfxProgram, GfxInputLayoutDescriptor, GfxVertexAttributeDescriptor, GfxInputLayout } from "../platform/GfxPlatf... |
// - Impoer react components
import Button from '@material-ui/core/Button';
import ImageList from '@material-ui/core/ImageList';
import ImageListItem from '@material-ui/core/ImageListItem';
import LinearProgress from '@material-ui/core/LinearProgress';
import ImageListItemBar from '@material-ui/core/ImageListItemB... |
<reponame>DABH/terrain<gh_stars>1-10
/*
University of Illinois/NCSA Open Source License
Copyright (c) 2018 Terrain Data, Inc. and the authors. All rights reserved.
Developed by: Terrain Data, Inc. and
the individuals who committed the code in this file.
https://github.com/terraindata/terr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.