text stringlengths 3.08k 15.5k |
|---|
<reponame>riozec/miki-whatsappbot
import type * as Type from '../@types/types';
import * as __ from '../utils/methods';
import * as logger from '../utils/logger';
import * as constants from '../utils/constants';
import fs from 'fs';
import { exec } from 'child_process';
const supportedMimeTypes: string[][] = [
['imag... |
import open from 'open';
import { join } from 'path';
import {
captureException,
green,
hostName,
httpGetJson,
installExitHandler,
isPortTaken,
loadConfig,
log,
logError,
logWarn,
moveDistAngular,
openNavigator,
removeStaticDist,
ScullyConfig,
scullyDefaults,
ssl,
startScully,
waitFo... |
<filename>src/index.ts
import * as faker from 'faker';
import { mapValues } from 'lodash';
export type SequenceFunction = (counter: number) => unknown;
export interface SequenceGenerator {
generatorType: 'sequence';
userProvidedFunction: SequenceFunction;
call: (userProvidedFunction: SequenceFunction, counter: ... |
<gh_stars>0
import * as fs from "fs";
import { currentPlatform, spawnChecked } from "./utils";
const { uploadMetadata } = require("./src/metadata");
const Usage = `
Usage: ts-node run.ts options
Options:
--update Force update to playwright browser.
--recordings <path> File to store recording IDs.
--... |
<reponame>adam-saland/notifications-service
import 'jest';
import {Application, Window} from 'hadouken-js-adapter';
import {WindowEvent} from 'hadouken-js-adapter/out/types/src/api/events/base';
import {NotificationOptions, Notification, NotificationClosedEvent, NotificationCreatedEvent} from '../../src/client';
impo... |
// 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 path from 'path';
import * as cp from 'child_process';
import * as vscode_languageclient from 'vscode-languageclient/node';
import { ... |
<gh_stars>0
import { Component, OnDestroy, OnInit, ViewChild, AfterViewInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
//
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { MatPaginator } from '@angular/mat... |
import {
Fragment,
useState,
useContext,
useRef,
MutableRefObject,
} from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
import { supabase } from '../lib/supabase';
import { Dialog, Transition } from '@headlessui/react';
import { IAddEntryProps } from '../lib/interfaces';
import { val... |
import { groupBy } from "lodash-es";
import * as React from "react";
import { DragDropContext, Draggable, DragStart, Droppable, DropResult } from "react-beautiful-dnd";
import { connect } from "react-redux";
import { defaultMemoize } from "reselect";
import { KeyNavListActions } from "../../../actions/keyNavListActions... |
<gh_stars>0
import * as _ from 'lodash-es';
// Behaves like moment.js's fromNow
export const fromNow = (dateTime, now=undefined, options = { omitSuffix: false }) => {
if (!now) {
now = new Date();
}
dateTime = new Date(dateTime);
const secondsAgo = (now.getTime() - dateTime.getTime()) / 1000;
const minut... |
import { spawn } from 'child_process';
import copyTemplateDir from 'copy-template-dir';
import fs from 'fs';
import { Box, Color, render } from 'ink';
import TextInput from 'ink-text-input';
import Static from 'ink/build/components/Static';
import { kebabCase } from 'lodash';
import path from 'path';
import React from ... |
<filename>src/systems/methods/loading.ts
// Loading sheet
import { Assumptions, FrcsInputs, IntermediateVariables, MachineCosts } from '../../model';
function Loading(
assumption: Assumptions,
input: FrcsInputs,
intermediate: IntermediateVariables,
machineCost: MachineCosts
) {
const ExchangeTrucks = 5;
co... |
<filename>src/services/config/namespace.ts<gh_stars>1-10
import { IPlainAction, ICommunication, IAction, IPlainFailAction } from 'shared/types/redux';
import {
ICurrencyPair, ICountry, IAssetsInfoMap, IPresetLayouts, IAssetInfo, IUserConfig,
IMConfig,
} from 'shared/types/models';
import { ClientDeviceType, UITheme... |
/* eslint-disable no-plusplus */
import React from 'react';
import styled from 'styled-components';
import IconMap from 'lib/iconMap';
import { DEFAULT_PAGE_COUNT, DEFAULT_PAGE_NO } from 'lib/staticData';
import { makeUrl } from 'lib/helpers';
import { useRouter } from 'next/router';
interface StyledButtonProps {
is... |
import * as React from 'react'
import {
generateKeys,
} from '@celo/utils/lib/account'
import { privateKeyToAddress, trimLeading0x } from '@celo/utils/lib/address'
import { makeStyles } from '@material-ui/core/styles'
import Dialog from '@material-ui/core/Dialog'
import Button from '@material-ui/core/Button'
import D... |
<reponame>seungyonkim/aws-toolkit-vscode
/*!
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import * as child_process from 'child_process'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
/**
* This script uses... |
<filename>src/draco/3936424772/serializer.ts
import * as long from 'long';
import * as objects from './objects';
import * as enums from './enums';
import { classIds, primitiveIds } from './classes';
function findTypeId(type: string) {
for (const key in classIds) {
if (classIds[key] === type) return +key;
... |
<filename>src/util/commandline/option-decorators.ts
import { OptionsDescription, OptionDescription, PositionalOptionsDescription, PositionalOptionDescription } from "./option-parser";
import { inspect } from "util";
import { assign } from "lodash";
const debug = require("debug")("appcenter-cli:util:commandline:option-... |
import React, { useState, useEffect } from 'react';
import { withRouter } from 'react-router';
import { makeStyles } from '@material-ui/core/styles';
import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import TextField from '@material-ui/core/TextField... |
// Copyright (c) 2019 Uber Technologies, 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 a... |
<reponame>EstherPerelman/vscode-java-dependency<gh_stars>10-100
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import { EOL, platform } from "os";
import { posix, win32 } from "path";
import { commands, Extension, extensions, QuickInputButtons, QuickPick, QuickPickItem,... |
<gh_stars>0
import p5 from 'p5';
import {manager, Tool} from '../../../State';
import {getColour} from '../../../sys/util/Colour';
import Colour from '../../../sys/util/Themes';
import RenderComponent from '../../RenderComponent';
import {WireHandle} from './WireHandle';
import RenderObject from '../../../sys/componen... |
import { memo, useMemo, useReducer } from "react";
import type { ReactNode } from "react";
import { makeStyles } from "./theme";
import { breakpointsValues } from "./theme";
import { GlButton } from "./utils/GlButton";
import { motion } from "framer-motion";
import { useIntersectionObserver } from "./tools/useIntersect... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AnimationPlayer, Injectable} from '@angular/core';
import {StyleData} from '../common/style_data';
import {An... |
import * as React from 'react';
import classNames from 'classnames';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { ThunkDispatch } from 'redux-thunk';
import ProgressButton from '@department-of-veterans-affairs/formation-react/ProgressButton';
import * as actions from '../.... |
<filename>packages/graphic/src/util/bbox.ts
import Vector2 from './vector2';
const start = Vector2.create();
const end = Vector2.create();
const extremity = Vector2.create();
function getCubicBezierXYatT(startPt, controlPt1, controlPt2, endPt, T) {
const x = CubicN(T, startPt.x, controlPt1.x, controlPt2.x, endPt.x)... |
/*
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/terrain
Permission is ... |
import React, { FC } from 'react';
import ReactMarkdown from 'react-markdown';
import highlight from 'rehype-highlight';
import { APIDescription } from '../../../apiDefs/schema';
import { APISelector, CodeWrapper } from '../../../components';
interface RetrievingTokenProps {
options: APIDescription[];
selectedOpti... |
<reponame>fossabot/reaction-1
/* tslint:disable */
import { ConcreteRequest } from "relay-runtime";
import { FollowArtistPopover_suggested$ref } from "./FollowArtistPopover_suggested.graphql";
export type FollowArtistPopoverQueryVariables = {
readonly artistID: string;
};
export type FollowArtistPopoverQueryRespon... |
import { AppRoutingModule } from './app.routing.module';
import { TableModule } from 'primeng/table';
import { MessagesModule } from 'primeng/messages';
import { KeyFilterModule } from 'primeng/keyfilter';
import { AngularSvgIconModule } from 'angular-svg-icon';
/**
* @license
* Copyright 2016-2018 the original autho... |
<reponame>kewban/HerbyApp<filename>src/pages/pages.module.ts
import {IonicModule, Config, Platform} from 'ionic-angular';
import {NgModule} from '@angular/core';
import {Http} from '@angular/http';
import {CommonModule} from '@angular/common';
import _ from 'underscore';
// External Libs
import {MomentModule} from 'a... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import debounce from 'debounce-promise';
import AsyncSelect from 'react-select/async';
import {getStyleForReactSelect} from 'utils/styles';
import {isEpicNameField, isEpicIssueTy... |
// tslint:disable:no-console
import { Action, ActionParameters, chalk, Command, Program } from '@caporal/core';
import { globalConstants } from '@villedemontreal/general-utils';
import { IScriptConstructor, ScriptBase, TESTING_SCRIPT_NAME_PREFIX } from './scriptBase';
/**
* Run a script or display some help, given
*... |
<reponame>ObservedObserver/AVA
import { analyzeField, isUnique, GraphProps } from '../analyzer';
import { getNodeFields, getLinkFields, getAllFieldsInfo, getAllStructFeats, clusterNodes } from '../analyzer/graph';
import { assert, isArray, isObject, isBasicType } from '../utils';
import { NodeData, LinkData, GraphInput... |
/*
* Copyright © 2019 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
import React, { ErrorInfo } from 'react';
import {
StatusBar, StyleSheet, View, AppState, AppStateStatus, Alert,
} from 'react-native';
import { AppLoading } from 'expo';
import { observer, Provider as MobxProvider } from 'mobx-react';
import * as Font from 'expo-font';
import 'mobx-react/batchingForReactNative';
i... |
/* eslint-disable */
import React from 'react';
import {
Flex,
Box, FormControl, FormLabel,
Textarea, Button, useColorModeValue, useToast, Input as ChakraInput, FormErrorMessage
} from '@chakra-ui/react';
import Head from 'next/head'
import {
AiOutlineUserDelete,
AiOutlineMail,
AiFillFileText,
} from 'react... |
import React from "react";
import { connect } from "react-redux";
import { Link, useHistory, useParams } from "react-router-dom";
import formatDistance from "date-fns/formatDistance";
import AdminLayout from "../../../../components/admin/AdminLayout";
import State from "../../../../interfaces/State";
import {
getOffi... |
<gh_stars>0
import { Collection } from "discord.js";
import { JsonConvert } from "json2typescript";
import { MongoClient, MongoClientOptions } from "mongodb";
// import { Logger } from "winston";
// import { getlogger } from "../rando";
import { SmolPone } from "../text/commands/pony/pony";
import { GuildConfig, GuildL... |
import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { HDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader';
import { RGBMLoader } from 'three/examples/jsm/loaders/RGBMLoader';
const params = {
envMap: 'HDR',
roughness: 0.0,... |
<gh_stars>0
import { EventEmitter } from 'events';
type PoolState = 'CREATED' | 'STARTING' | 'STARTED' | 'SHUTTING_DOWN' | 'STOPPED';
type ObjectState = 'CREATED' | 'AVAILABLE' | 'RETURNED' | 'VALIDATING' | 'BORROWED' | 'INVALID' | 'DESTROYED';
type PoolEvent = 'poolDidStart' | 'poolDidStop' | 'factoryCreateError' |... |
import * as cdk from '@aws-cdk/core';
import * as events from '@aws-cdk/aws-events';
import * as targets from '@aws-cdk/aws-events-targets';
import * as lambda from '@aws-cdk/aws-lambda';
import * as codecommit from '@aws-cdk/aws-codecommit';
import * as ecs from '@aws-cdk/aws-ecs';
import * as core from "@aws-cdk/core... |
import { IconButton } from '@codecademy/gamut';
import { css } from '@codecademy/gamut-styles';
import styled from '@emotion/styled';
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import { useIsomorphicLayoutEffect } from 'react-use';
import { Avatar } from '../../../Avat... |
<filename>backend/src/extension.ts
import * as fs from 'fs';
import * as path from 'path';
import * as vscode from 'vscode';
import { Yowiz } from "./yowiz";
import { RpcExtenstion } from './rpc/rpc-extension';
import { WizLog } from "./wiz-log";
import { OutputChannelLog } from './output-channel-log';
export function... |
// Copyright 2020 - See NOTICE file for copyright holders.
//
// 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 ap... |
/*
* Copyright 2020 Salto Labs Ltd.
*
* 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 ... |
<gh_stars>0
const axios = require("axios").default;
const fs = require("fs");
import rinkebyTokens from "./rinkebyTokens.json";
require("dotenv").config();
const oceanAddresses = {
1: "0x967da4048cD07aB37855c090aAF366e4ce1b9F48",
4: "0x8967bcf84170c91b0d24d4302c2376283b0b3a07",
56: "0xdce07662ca8ebc241316a15b611... |
import {
Alert,
AlertActionLink,
AlertVariant,
Card,
CardBody,
DescriptionList,
DescriptionListDescription,
DescriptionListGroup,
DescriptionListTerm,
DrawerActions,
DrawerCloseButton,
DrawerHead,
DrawerPanelBody,
DrawerPanelContent,
Spinner,
Tab,
TabTitleText,
Tabs,
} from '@pattern... |
import {
Parser,
ParserDefinitionErrorType,
EMPTY_ALT
} from "./parse/parser/parser"
import { Lexer, LexerDefinitionErrorType } from "./scan/lexer_public"
import {
createToken,
createTokenInstance,
EOF,
tokenLabel,
tokenMatcher,
tokenName
} from "./scan/tokens_public"
import {
Ea... |
import G6, { Graph as GraphType } from '@antv/g6';
import { GraphinProps, ExtendedGraphOptions } from '../types';
export interface BehaviorModeItem {
type: string;
[key: string]: string | number | boolean | undefined;
}
interface BehaviorsMode {
[mode: string]: (BehaviorModeItem | string)[];
}
const ZOOM_RANGE... |
import { Injectable } from '@angular/core';
import { Challenge } from '../shared/challenge.model';
import { Sprite } from '../shared/sprite.model';
import { SpriteBlocks } from '../shared/sprite-blocks.model';
import { BlocklyConverter } from './blockly-converter';
import { BlocklyHelper } from './blockly-helper';
im... |
<gh_stars>1-10
import { InfuraProvider } from 'ethers/providers';
import dotenv from 'dotenv';
import cors from 'cors';
import fileUpload from 'express-fileupload';
import bodyParser from 'body-parser';
import express from 'express';
import AWSManager from './AWSManager';
import log from './common/Logger';
import Tok... |
import React, { createRef } from 'react'
import { updateGraph } from './PanelGraph/index'
import { PanelGraph, PanelChangeEvent, PanelDraggingNode } from '../types'
const getPercentChange = (previous: number, current: number) => ((current - previous) / previous * 100) / 100
export interface PanelManagerProps {
onPa... |
import * as React from 'react';
import { styled, useTheme } from '@material-ui/core/styles';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/core/Slider';
import IconButton from '@material-ui/core/IconButton';
import Stack from '@material-... |
<gh_stars>0
import { BaseSolution, Input } from '../solution';
import { max, min } from '../util/fp';
export class Solution extends BaseSolution {
public description = `
--- Day 9: Encoding Error ---
With your neighbor happily enjoying their video game, you turn your attention to an open data port on the ... |
import warning from 'tiny-warning'
import invariant from 'tiny-invariant'
import { loopAsync } from './AsyncUtils'
import {
createPath,
parsePath
} from './PathUtils'
import {
createLocation as _createLocation,
statesAreEqual,
locationsAreEqual,
defaultGetUserConfirmation
} from './LocationUtils'
import run... |
<reponame>uncharted-aske/grafer
import PicoGL, {App, Texture} from 'picogl';
import testVS from './shaders/GraphPoints.test.vs.glsl';
import testFS from './shaders/noop.fs.glsl';
import {GLDataTypes} from '../renderer/Renderable';
import {DataMappings, concatenateData, packData, printDataGL} from './DataTools';
import ... |
/*
* Copyright 2016 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
<filename>packages/search/__tests__/browser/search-tree.service.test.ts
import path from 'path';
import { Injector, Injectable } from '@opensumi/di';
import { IContextKeyService } from '@opensumi/ide-core-browser';
import { ILoggerManagerClient, Uri, URI } from '@opensumi/ide-core-common';
import { SearchSettingId } f... |
/* eslint-disable react-hooks/exhaustive-deps */
import React, {
FC,
createContext,
useReducer,
useContext,
useRef,
useEffect,
} from 'react';
import {
Authorizer,
User,
AuthToken,
ConfigType,
} from '@authorizerdev/authorizer-js';
import {
AuthorizerContextPropsType,
AuthorizerState,
Authori... |
import { NuxtConfig } from '@nuxt/types'
const version = require('./package.json').version
const isDevelopment = (process.env.NODE_ENV === 'development')
const isCI = (process.env.CI === 'true')
const baseURL = process.env.BASE_URL || process.env.DEPLOY_PRIME_URL || 'http://localhost:3000'
let envPrefix: string
if (p... |
/* eslint-disable complexity */
/* eslint-disable sonarjs/cognitive-complexity */
import { EJobTypes, IJobSchema, ECodeLanguage } from '@models';
import { base64encode, addTrace } from '@functions';
import { INodePyJob } from '../np.interfaces';
import { handleNodePyServicesCustomJob } from './nodepy.job.handlers/hand... |
import { performance } from "perf_hooks";
import { Request, Response, Handler } from "express";
import chalk from "chalk";
import * as bytes from "fmt-bytes";
import { RequestId } from "./RequestId";
import * as time from "./time";
enum NewLine {
/**
* Linux/Mac style new line.
*/
LF = "\n",
/**
* Windows sty... |
<filename>src/game/world/Unit.ts<gh_stars>0
import { nanoid } from "nanoid";
import { RenderOrder } from "../core/renderOrder";
import type Engine from "../core/Engine";
import type AssetLoader from "../loaders/AssetLoader";
import type {Position, Tribe, UUID, Skill} from "../core/types";
import type PlayerController f... |
<filename>packages/optional/__tests__/result-test.ts
/* eslint-disable @typescript-eslint/no-unused-vars */
import { err, NullError, ok, optional, whenErr, whenOk } from "../src";
import { otherwise, when } from "@opresults/match";
import { ExtendRuntimeError } from "@opresults/common";
class C1 {
public readonly nu... |
import type { RawPlugins, RawSpecs } from '@bangle.dev/core';
import {
chainCommands,
Command,
EditorState,
keymap,
Node,
Schema,
} from '@bangle.dev/pm';
import {
browser,
domSerializationHelpers,
filter,
insertEmpty,
createObject,
} from '@bangle.dev/utils';
import type Token from 'markdown-it/l... |
<gh_stars>0
import { reactive, ref } from 'vue'
import CelFormCreator from '../packages/form-creator/src/index.vue'
import { FormItemType } from '../packages/types/index'
export default {
component: CelFormCreator,
title: 'checc/element-plus/form-creator',
argTypes: {
'update:modelValue': {
table: { di... |
<gh_stars>10-100
/**
* @preserve
* Copyright 2015-2016 <NAME>
* All rights reserved. (MIT Licensed)
*
* palette.ts - part of Image Quantization Library
*/
import { Point } from "./point"
import { PointContainer } from "./pointContainer"
import { AbstractDistanceCalculator } from "../distance/abstractDistanceCalc... |
import React, { useState, useEffect } from 'react';
import { Card } from 'react-bootstrap';
import { useSelector } from 'react-redux';
import FilterControls from './FilterControls';
import CourseCardList from './CourseCardList';
import styles from '../../css/CourseSelectionList.module.scss';
import * as COURSE from ... |
<filename>src/specs/matrixSpec.ts<gh_stars>10-100
import { stateInfo } from '../data/regions';
import { ZERO_COLOR } from '../theme';
import type { RegionInfo } from '../data/regions';
import type { TopLevelSpec } from 'vega-lite';
import { BASE_SPEC } from './commonSpec';
export const state2TileCell: { id: string; x:... |
import { expect } from 'chai';
import * as TextRange from '../util/TextRange';
import { regExMatchUrls, regExMatchCommonHexFormats } from './RegExpPatterns';
import * as RegPat from './RegExpPatterns';
const matchUrl = regExMatchUrls.source;
const matchHexValues = regExMatchCommonHexFormats.source;
describe('Validate... |
<filename>src/index.ts
import { plugin } from "nexus";
import {
ArgsValue,
completeValue,
MaybePromise,
printedGenTyping,
printedGenTypingImport,
} from "nexus/dist/core";
import { join } from "path";
import { getType } from "jest-get-type";
import { mapObject } from "./utils";
import { MaybeNull, Resolver, ... |
<reponame>louisinger/liquidjs-lib<filename>ts_src/confidential.ts
import * as secp256k1 from 'secp256k1-zkp';
import * as bufferutils from './bufferutils';
import * as crypto from './crypto';
function nonceHash(pubkey: Buffer, privkey: Buffer): Buffer {
return crypto.sha256(secp256k1.ecdh.ecdh(pubkey, privkey));
}
... |
<reponame>tgamauf/spritstat<gh_stars>1-10
import {INVALID_COORDINATES, INVALID_LOCATION} from "../../../common/constants";
import {Coordinates, NamedLocation} from "../../../common/types";
let ready = false;
// This is the callback that is called by the Google Maps API loader script
// loaded in index.html.
window.... |
import {
Box,
Card,
CardProps,
MenuItem,
Typography,
useTheme,
} from '@mui/material';
import {
Dispatch,
Fragment,
ReactNode,
SetStateAction,
forwardRef,
useCallback,
useEffect,
useState,
} from 'react';
import ReloadIconButton from './ReloadIconButton';
export interface IDropdownOption {... |
<reponame>hagerupe/legend-studio
/**
* Copyright 2020 <NAME>
*
* 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 b... |
import { assert, assertEquals, fromFileUrl, resolve } from "../../deps.ts";
import { TABLE_MIGRATIONS } from "../../consts.ts";
import { Client as MySQL } from "https://deno.land/x/mysql@v2.8.0/mod.ts";
import { Client as PostgreSQL } from "https://deno.land/x/postgres@v0.4.6/mod.ts";
import { DB as SQLite } from "http... |
<filename>vendor/bower-asset/fullcalendar/packages/core/src/component/DateComponent.ts
import Component, { ComponentContext } from './Component'
import { EventRenderRange } from './event-rendering'
import { DateSpan } from '../structs/date-span'
import { EventInstanceHash } from '../structs/event'
import { rangeContain... |
import slugify from "@sindresorhus/slugify";
import { exec as _exec } from "child_process";
import { pathExists, readFile, readJson, remove, writeFile } from "fs-extra";
import got from "got";
import inquirer from "inquirer";
import ora from "ora";
import { join } from "path";
/** Carpent question (inquirer) type */
e... |
<gh_stars>100-1000
import * as React from 'react';
import * as draftjs from 'draft-js';
import { IContentStateConverter, HtmlEditorController, HtmlEditorPlugin } from "../HtmlEditor"
import { HtmlContentStateConverter } from '../HtmlContentStateConverter';
export interface ImageConverter<T extends object> {
up... |
import {createUser, fillAndSaveProfile, dumpProfile, dumpBot, waitFor} from './support/testuser'
import {IWocky} from '../../src/wocky'
import {IBot} from '../../src/model/Bot'
let user: IWocky, user2: IWocky
let bot, bot2: IBot
const icon = '\u00A9\uFE0F\u00A9'
describe('NewGraphQL tests', () => {
beforeAll(async... |
<reponame>endel/becsy
import {Bitset} from './datatypes/bitset';
import type {LogPointer} from './datatypes/log';
import type {Dispatcher} from './dispatcher';
import type {Entity, ReadWriteMasks} from './entity';
import {ENTITY_ID_BITS, ENTITY_ID_MASK} from './consts';
import {Query, QueryBox, QueryBuilder} from './qu... |
import { LockSearchService, Resources } from "@swipechain/core-api";
import { LocksController } from "@swipechain/core-api/src/controllers/locks";
import { Identifiers } from "@swipechain/core-api/src/identifiers";
import { Application, Container, Contracts, Providers } from "@swipechain/core-kernel";
import { Enums, U... |
import React, { FC, useState, useEffect } from 'react';
import {
SafeAreaView,
FlatList,
View,
Text,
Modal,
ImageBackground,
} from 'react-native';
import { useDispatch, useSelector } from 'react-redux';
import { rrulestr } from 'rrule';
import styles from './styles';
import {
SHELF_ACTION,
SHELF_FLOWE... |
<filename>crawler/crawler.ts
import axios from 'axios';
import * as AxiosTypes from 'axios';
import * as cheerio from 'cheerio';
import * as Entities from 'html-entities';
import * as _ from 'lodash';
//import * as fs from 'fs';
import * as mongoose from 'mongoose';
import * as redis from 'redis';
import * as bluebird... |
// Imports
import React, { useState, useRef, createRef, useEffect, useMemo } from 'react';
// Create interface for button properties
interface ButtonProps
extends Pick<
React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>,
'onKeyDown' | 'onClick' | 'tabIndex' | 'role' | 'aria-... |
import {
FguItemMap,
FvttItem,
isFguArmor,
isFguArtifact,
isFguCypher,
isFguEquipment,
isFguWeapon,
FguArmor,
FvttArmor,
ARMOR,
ARMOR_ICON,
FguArtifact,
FvttArtifact,
FguCypher,
FvttCypher,
CYPHER,
FguEquipment,
FvttEquipment,
FguWeapon,
FvttWeapon,
ARTIFACT,
EQUIPMENT,
ART... |
import React, { useCallback } from 'react';
import makeStyles from '@mui/styles/makeStyles';
import '@js-toolkit/utils/types';
import ReactModal from 'react-modal';
import { Flex, FlexComponentProps, GetStylesTransformers } from 'reflexy/styled';
import useUpdatedRefState from '@js-toolkit/react-hooks/useUpdatedRefStat... |
import * as React from 'react'
import { connect } from 'react-redux'
import { Dispatch } from 'redux'
import styled from 'styled-components'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faUpload, faDownload, faTrash } from '@fortawesome/free-solid-svg-icons'
import { saveAs } from 'file-sav... |
import React, {FormEvent, KeyboardEvent} from 'react';
import './App.scss';
import {BuildInfo, Repositories, Slug} from "./travis-api";
import {MapModifier, SetModifier} from "./state-modifier";
import {Caption} from "@material/react-typography";
import List, {ListItem, ListItemGraphic, ListItemMeta} from "@material/re... |
<reponame>unifiedinbox/uib-web2
/// <reference path="../typings/tsd" />
import arrayUtil = require('dojo/_base/array');
import core = require('./interfaces');
import has = require('./has');
import util = require('./util');
/**
* The Observable class is a base object class that provides the ability to use computed pr... |
const styles = `
.playgrid_wrapper {
position: relative;
}
table.playgrid_grid,
table.playgrid_grid tr,
table.playgrid_grid td {
border: none;
border-spacing: 0;
padding: 0;
margin: 0;
}
table.playgrid_grid {
width: 100%;
position: absolute;
top: 0;
left: 0;
}
.... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import {
FileValidation,
RemoteFuncValidation,
LocalFuncValidation,
NumberValidation,
StringArrayValidation,
StringValidation,
Validation,
Func
} from "./question";
import * as fs from "fs-extra";
import * as jsonschema from "js... |
<reponame>fangting1989/website
import { Routes, RouterModule } from '@angular/router';
import { CustommanagerMain } from './custommanager.main';
import {
TCustomerListComponent,
AlllistComponent,
FxcustomlistComponent,
ComcustomlistComponent,
HhrapplyComponent,
JlapprovedComponent,
ZxapprovedComponent,
... |
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { BufferReader } from "@node-lightning/bufio";
import bech32 from "bech32";
import { ADDRESS_VERSION } from "./address-version";
imp... |
<filename>frame/service/provider.ts<gh_stars>0
import * as express from "express";
import { ServiceContext } from "./context";
import { Events } from "../../src/util/events";
import { config } from "../../src/config/index";
import { ServiceMeta } from "./meta/meta";
import { StatusCode } from "./service/status.code";... |
<reponame>Stiivenson/React-MovieChatApp
const nameData: any = {
"firstName": [
"nar",
"An",
"Alfr",
"Alvi",
"Ari",
"Arinbjorn",
"Arngeir",
"Arngrim",
"Arnfinn",
"Asgeirr",
"Askell",
"Asvald",
"Bard",
"Ba... |
/**
Copyright 2021 Forestry.io Holdings, 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 writing,... |
<gh_stars>1-10
import { QuestionConfig, Questions } from '@navikt/sif-common-question-config';
import { AnnenForelderFormValues, AnnenForelderFieldNames } from './annenforelderFormTypes';
import { hasValue } from 'app/validation/fieldValidations';
import { YesOrNo } from '@navikt/sif-common-formik/lib';
import { SøkerR... |
<gh_stars>0
import {diffArrays} from 'diff';
import got from 'got';
import loadJson from 'load-json-file';
import {isEqual} from 'lodash';
import path from 'path';
import writeJson, {JSONStringifyable} from 'write-json-file';
const SCHEDULE_URL =
'https://gamesdonequick.com/tracker/search/?type=run&event=25';
const G... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.