text stringlengths 3.08k 15.5k |
|---|
<gh_stars>0
import { AudioRecord, IChatChannel } from "@dasha.ai/platform-sdk";
import * as fs from "fs";
import * as readline from "readline";
import Path from "path";
export function createLogger(options?: {
log?: typeof console.log;
logFile?: string;
}) {
const appendLog = async (str: string) => {
if (opt... |
import _ from 'lodash-es';
import {
IAggregationData,
IMetricsCollection,
} from 'types/services/models/metrics/metricsAppModel';
import { IAggregateGroupDataParams } from 'types/utils/aggregateGroupData';
import { ScaleEnum } from './d3';
import { IMetric } from 'types/services/models/metrics/metricModel';
expor... |
import ExampleObject from '../objects/exampleObject';
import Beam from '../objects/beam';
const DEFAULT_WIDTH = 256;
const DEFAULT_HEIGHT = 272;
export default class MainScene extends Phaser.Scene {
private exampleObject: ExampleObject;
background: Phaser.GameObjects.TileSprite;
ship1: Phaser.GameObjects.Sprite... |
import React, { Component, ComponentClass, MouseEvent } from 'react';
import moment, { Moment } from 'moment';
import classNames from 'classnames';
import omit from 'lodash/omit';
import isFunction from 'lodash/isFunction';
import Button from '../button';
import Icon from '../icon';
import Input from '../input';
import... |
import { createCss } from '@stitches/react'
import type {
AlignItemsProperty,
BorderRadiusProperty,
MarginTopProperty,
MarginLeftProperty,
PaddingTopProperty,
WidthProperty,
BackgroundProperty,
} from '@stitches/react/types/css-types'
import { tailwindColors } from './tailwindColors'
type TLength = (stri... |
<filename>body-segmentation/src/selfie_segmentation_tfjs/segmenter.ts
/**
* @license
* Copyright 2021 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*... |
<filename>packages/embed/src/factories/create-sidetab/create-sidetab.ts
import {
createIframe,
setElementSize,
handleCustomOpen,
unmountElement,
setAutoClose,
addCustomKeyboardListener,
getTextColor,
isOpen,
isInPage,
} from '../../utils'
import { SidetabOptions } from './sidetab-options'
export typ... |
<reponame>kelvinator07/galoy
type LedgerError = import("./errors").LedgerError
type LedgerServiceError = import("./errors").LedgerServiceError
declare const liabilitiesWalletId: unique symbol
type LiabilitiesWalletId = string & { [liabilitiesWalletId]: never }
type LedgerTransactionId = string & { readonly brand: uni... |
<gh_stars>1-10
import * as fs from "fs";
import * as iconv from "iconv-lite";
import {
advanceOneIf,
advanceUntil,
advanceWhile,
isEmpty,
parseMetadata,
startWith,
} from "../util";
export interface Recipe {
title: string | undefined;
recipeBy: string | undefined;
servingSize: strin... |
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { ChefSessionService } from 'app/services/chef-session/chef-session.service';
import { MockChefSessionService } from 'a... |
import React, { useEffect, useState, useRef } from 'react';
import styles from './styles.module.sass';
import { IArticle } from '../../models/domain';
import { IAppState } from '@models/AppState';
import { connect } from 'react-redux';
import { NavLink, Redirect, useParams } from 'react-router-dom';
import { IBindingCa... |
<filename>packages/core/src/bot.ts
import { Dict, Logger, makeArray, Random, sleep } from '@koishijs/utils'
import { Adapter } from './adapter'
import { App } from './app'
import { Session } from './session'
import Schema from 'schemastery'
const logger = new Logger('bot')
export interface Bot extends Bot.BaseConfig,... |
import { readFileSync, writeFileSync, existsSync } from 'fs';
import { join, dirname } from 'path';
import * as parser from '@babel/parser';
import traverse from '@babel/traverse';
import generate from '@babel/generator';
import * as t from '@babel/types';
import { winPath, createDebug } from '@umijs/utils';
import pre... |
<reponame>Ardrete/nightswitch
"use strict";
import { workspace, window, commands, ExtensionContext } from "vscode";
const SunCalc = require("suncalc");
const geoip = require("geoip-lite");
const publicIp = require("public-ip");
const os = require("os");
const darkMode = require("dark-mode");
var wbconfig = workspace.... |
import { Store } from "./Store";
import { HttpService } from "modules/services";
import type { Executor, VirtualEnvironment } from "./types";
/** Maps scripts to the module they're loading, like a history of `[script who loaded]: module` */
const currentlyLoading = new Map<VirtualScript, VirtualScript>();
/**
* Chec... |
<filename>src/store/modules/platform/platform.ts
import { Module } from 'vuex'
import { RootState } from '@/store/types'
import { ava, avm, infoApi, pChain } from '@/AVA'
import { AvaNetwork } from '@/js/AvaNetwork'
import { explorer_api } from '@/explorer_api'
import BN from 'bn.js'
import {
GetPendingValidatorsR... |
import * as _ from 'lodash';
const trimEnd = _.trimEnd;
import tokenTypes from './tokenTypes';
import Indentation from './Indentation';
import InlineBlock from './InlineBlock';
import Params from './Params';
import Tokenizer from './Tokenizer';
import {Token, config} from './types';
export default class Formatter {
... |
<reponame>alonmor1/searchblock2
import { ClientApplication } from '../../client';
import { ActionSet } from '../helper';
import { ActionSetProps, Group, MetaAction } from '../types';
export declare enum Action {
OPEN = "APP::RESOURCE_PICKER::OPEN",
SELECT = "APP::RESOURCE_PICKER::SELECT",
CLOSE = "APP::RESO... |
/********************************************************************************
* Copyright (C) 2019 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* Th... |
<reponame>lazytype/ent<filename>ts/src/core/query/assoc_query.ts
import {
ID,
Ent,
Viewer,
LoadEntOptions,
EdgeQueryableDataOptions,
} from "../base";
import { AssocEdge, loadEnts } from "../ent";
import { AssocEdgeCountLoaderFactory } from "../loaders/assoc_count_loader";
import { AssocEdgeLoaderFactory } fr... |
import {
AfterContentInit,
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
Directive,
ElementRef,
forwardRef,
Input,
OnDestroy,
QueryList,
ViewEncapsulation
} from '@angular/core';
import { FocusKeyManager } from '@ptsecurity/cdk... |
<gh_stars>0
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
import { Subscription } from 'rxjs';
import { Router, ActivatedRoute, Params } from '@angular/router';
import {
CalendarEvent,
CalendarEventAction,
CalendarEventTimesChangedEvent,
CalendarMonthViewDay
} from 'angular-calendar';
imp... |
<filename>tensorboard/webapp/metrics/views/card_renderer/scalar_card_component.ts
/* Copyright 2020 The TensorFlow Authors. 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
... |
<gh_stars>0
import { readFileSync } from 'fs';
import {
PrefetchAotGraph,
PrefetchAotNeighbor,
PrefetchAotPluginConfig
} from './declarations';
import { join } from 'path';
import { table } from 'table';
import chalk from 'chalk';
import {
buildMap,
defaultPrefetchConfig,
getCompilationMapping,
stripExte... |
import { TypeDeclaration, Type, Parameter, EnumType, StringDeclaration, EnumDeclaration, getReferencesInType } from './utils'
export function generateGraphqlRootType(declarations: TypeDeclaration[], getReferenceTypeImports: (referenceTypes: ReferenceType[]) => string) {
const rootTypes: string[] = []
const nonRoot... |
<reponame>ensomata/fhir-works-on-aws-persistence-ddb
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import uuidv4 from 'uuid/v4';
import {
BatchReadWriteRequest,
BatchReadWriteResponse,
TypeOperation,
SystemOperation,
} from 'fhir-w... |
<reponame>amiralies/reanalyze
/* TypeScript file generated from ImportJsValue.re by genType. */
/* eslint-disable import/first */
import {round as roundNotChecked} from './MyMath';
import {area as areaNotChecked} from './MyMath';
import {returnMixedArray as returnMixedArrayNotChecked} from './MyMath';
import {useC... |
import { Injectable } from '@angular/core';
import { UserService } from 'ngx-login-client';
import { BehaviorSubject, Observable, of } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
import { AreaQuery } from '../models/area.model';
import { IterationQuery } from '../mo... |
// stolen from github's source code :p
import autosize from "@github/textarea-autosize";
import { observe } from "selector-observer";
export function fire(target: Element, name: string, detail?: any) {
return target.dispatchEvent(new CustomEvent(name, { bubbles: true, cancelable: true, detail }));
}
type UpdatedTex... |
import { Rule, RuleProps } from "./Rule";
import { ClassRule } from "./ClassRule";
import { fixPropertyValue, fixPropertyValueAsString } from "./tools";
import { camelCase } from "./utils";
export interface SheetOptions {
sheetName?: string;
media?: string;
content?: string;
props?: RuleProps;
}
export class... |
import classNames from "classnames";
import {
FocusEvent,
FocusEventHandler,
MouseEvent,
MouseEventHandler,
ReactNode,
SyntheticEvent,
useCallback,
useEffect,
useMemo,
useRef,
useState
} from "react";
import {CSSProp, useTheme} from "@focus4/styling";
impor... |
import * as os from "os";
import * as path from "path";
import * as fs from "fs";
import * as _ from "lodash";
import * as Environment from "yeoman-environment";
import * as inquirer from "inquirer";
import { WizAdapter } from "./wiz-adapter";
import { WizLog } from "./wiz-log";
import { RpcCommon } from "./rpc/rpc-com... |
<reponame>SSamDav/aim
import createModel from 'services/models/model';
import runsService from 'services/api/runs/runsService';
import {
adjustable_reader,
decode_buffer_pairs,
decodePathsVals,
iterFoldTree,
} from 'utils/encoder/streamEncoding';
import settings from './settings';
import {
TraceResponseData... |
<filename>src/app/dashboard/dashboard.component.ts
import { Component, OnInit, Output, EventEmitter, ViewChild } from '@angular/core';
import { NgxSpinnerService } from "ngx-spinner";
import { Router, ActivatedRoute, Params } from '@angular/router';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angu... |
<gh_stars>1-10
import { DebotModule, RegisteredDebot, CallSet } from '@eversdk/core';
import store from '/src/store';
import EventBus, { TDebotDispatchType } from '/src/EventBus';
import WalletService from '/src/WalletService';
import TonClient from '/src/TonClient';
import { formDebotFunctionFromId, interfaceAddressT... |
<gh_stars>1-10
/// <reference path="../../../../typings/tsd.d.ts"/>
import spatialOptions = require("models/database/index/spatialOptions");
function labelMatcher<T>(labels: Array<valueAndLabelItem<T, string>>): (arg: T) => string {
return(arg) => labels.find(x => x.value === arg).label;
}
function yesNo... |
const { registerSuite } = intern.getInterface('object');
const { assert } = intern.getPlugin('chai');
import UrlSearchParams from '../../src/UrlSearchParams';
registerSuite('UrlSearchParams', {
construct: (function() {
function checkParams(params: UrlSearchParams) {
assert.deepEqual(params.getAll('foo'), ['bar',... |
export * from './methods'
const exponentSub = ["\u2070", "\u00b9", "\u00b2", "\u00b3", "\u2074", "\u2075", "\u2076", "\u2077", "\u2078", "\u2079"];
export default new (class MathiumJS {
constructor() {
if(!(this instanceof MathiumJS)) {
return new MathiumJS()
};
}
/**
*
... |
import { Component, OnInit, OnChanges, SimpleChanges, Input, Output, EventEmitter, ViewEncapsulation } from '@angular/core';
import * as moment from 'moment-timezone';
import { GridOptions } from 'ag-grid-community';
export interface IGridData {
id: number;
startTime: number;
path: string;
endpoint: st... |
import { IPost, IPostDayReference, IPostElementType, isValidPostElement } from 'oftheday-shared';
import * as React from 'react';
import { Custom } from '@/areas/posts/elements/custom';
import { Image } from '@/areas/posts/elements/image';
import { Music } from '@/areas/posts/elements/music';
import { Quote } from '@/a... |
import {Config} from './Ocean.types';
type Fish = {
cyclesSinceReproduce: number;
};
type Shark = {
cyclesSinceReproduce: number;
energy: number;
};
export type Pet = Fish | Shark;
export type PetArr = (Pet | null)[]; // The key contains both x and y coordinates by combining in one big binary nymber
export f... |
<reponame>ajitbohra/headless-framework
import { QueryResult, useQuery } from '@apollo/client';
import { useRouter } from 'next/router';
import { useContext, useEffect } from 'react';
import {
ContentNodeOptions,
getContentNodeQuery,
GET_URI_INFO,
} from '../api/queries';
import { headlessConfig } from '../config'... |
/**
* @license
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/IDuxFE/idux/blob/main/LICENSE
*/
import type { UploadDrag } from '../composables/useDrag'
import type { UploadToken } from '../token'
import type { UploadFile, UploadFileSta... |
import { useQuery } from '@apollo/react-hooks'
import {
CardElement,
Elements,
useElements,
useStripe,
} from '@stripe/react-stripe-js'
import { loadStripe, StripeCardElementChangeEvent } from '@stripe/stripe-js'
import { useFormik } from 'formik'
import gql from 'graphql-tag'
import _get from 'lodash/get'
impo... |
import Head from 'next/head';
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';
import { Svg } from 'react-optimized-image';
import { AnimateSharedLayout, AnimatePresence, motion } from 'framer-motion';
import ArrowsIcon from 'assets/svg/app/arrows.svg';
import { zIndex } from 'co... |
import React, { Component } from 'react'
import {
StyleSheet,
Text,
View,
TouchableNativeFeedback,
ActivityIndicator,
Animated,
FlatList
} from 'react-native'
import UserGameItem from '../../component/UserGameItem'
import {
standardColor,
idColor
} from '../../constant/colorConfig'
declare var globa... |
<gh_stars>0
import { resolve, join, dirname } from 'path';
import { existsSync } from 'fs';
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const autoprefixer = require('autoprefixer');
const postcssSimpleVars = require('postcss-simple-vars');
const postcssImport = require(... |
import React, { useMemo, useRef, useState, useEffect } from "react";
import _orderBy from "lodash/orderBy";
import { useDebouncedCallback } from "use-debounce";
import _isEmpty from "lodash/isEmpty";
import { useTheme, Grid, CircularProgress } from "@material-ui/core";
import "react-data-grid/dist/react-data-grid.cs... |
// tslint:disable
import * as path from 'path';
import * as fs from 'fs';
import * as ts from 'typescript';
import { NodeTransformer, walker } from './util';
console.log('[power-di] load transformer: class metadata.');
export default function transformer(program: ts.Program) {
const typeChecker = program.getTypeChe... |
<reponame>kisixing/LUNA_FontEnd<filename>modules/packages/components/src/Theme/util.ts
import BezierEasing from 'bezier-easing';
import tinycolor from 'tinycolor2';
import cssContent, { configDark, DARK_COLOR, FUCK_COLOR } from './theme';
import { darken, lighten } from './colorManipulator';
const tonalOffset = 0.2
/*... |
import {Form, Input, Modal, Select, Tag} from 'antd';
import React, {useEffect, useState} from "react";
import {useSelector} from 'react-redux';
import {addSubscribe, getTargetName, updateSubscribe} from 'src/api/config';
import {InputTag} from 'src/component/inputTag';
import {platformConfSelector} from 'src/store/glo... |
import {
InjectedAccountWithMeta,
InjectedExtension,
InjectedMetadataKnown,
MetadataDef,
} from '@polkadot/extension-inject/types';
import {
web3Accounts,
web3Enable,
web3AccountsSubscribe,
} from '@polkadot/extension-dapp';
import { ApiPromise } from '@polkadot/api';
import { reactive } from 'vue';
impor... |
<reponame>Leksat/berry
import {PnpApi} from '@yarnpkg/pnp';
import type {OnLoadArgs, OnLoadResult, OnResolveArgs, OnResolveResult, Plugin, PluginBuild} from 'esbuild';
import * as fs ... |
import YAML from 'yaml';
import {Logger} from './logger';
import {getLabel} from './utils';
export const hackyBoolString = "fe6edaed2a: 1f4b9:'b989659b53d86025c";
const simplifyRam = (input: string): string => {
const units = 'kmgtp';
const inNum = parseInt(input.match(/^\d+/)?.shift() || '0');
const inUnit = i... |
/**
* @license
* Copyright Google LLC 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 * as core from '../../core';
import {DEFAULT_INTERPOLATION_CONFIG} from '../../ml_parser/interpolation_config';... |
import * as React from 'react';
import { BasePicker, IBasePickerProps, IPickerItemProps } from 'office-ui-fabric-react/lib/Pickers';
import { IPickerTerm, IPickerTerms } from './ITermPicker';
import SPTermStorePickerService from './../../services/SPTermStorePickerService';
import styles from './TaxonomyPicker.module.sc... |
<gh_stars>0
import { afterEach, describe, expect, it } from 'vitest';
import { faker } from '../dist/cjs';
const seededRuns = [
{
seed: 42,
expectations: {
color: 'grey',
department: 'Tools',
productName: 'Fantastic Soft Sausages',
price: '375.00',
productAdjective: 'Fantastic',... |
<filename>main-process/main.ts
import path from "path";
import {
app,
BrowserWindow,
ipcMain,
Menu,
MenuItemConstructorOptions,
PopupOptions,
} from "electron";
import { createMenu } from "./createMenu";
import { getWindowData, setWindowData } from "./fragmemoSettings/window";
import {
getEditorSettings,
... |
<reponame>cassianorsd/react-openlayers-styled-map<gh_stars>1-10
import { Feature, Map, MapBrowserEvent, Overlay } from 'ol';
import LineString from 'ol/geom/LineString';
import Polygon from 'ol/geom/Polygon';
import { Vector as VectorSource } from 'ol/source';
import { getLength, getArea } from 'ol/sphere';
import Draw... |
import { resolve, basename, relative } from 'upath'
import aliasPlugin from '@rollup/plugin-alias'
import commonjsPlugin from '@rollup/plugin-commonjs'
import jsonPlugin from '@rollup/plugin-json'
import replacePlugin, { Replacement } from '@rollup/plugin-replace'
import nodeResolvePlugin, {
RollupNodeResolveOptions... |
import React, { useState, useEffect } from 'react';
import { Modal, Button } from 'antd';
import * as _ from 'lodash';
import TimeAndMilliPicker from '../TimeAndMilliPicker';
import useModalState from '../../hooks/useModalState';
import useNativeState from '../../hooks/useNativeState';
import { InteractNode } from '../... |
declare var Blazor: IBlazor;
declare var DotNet: IDotNet;
interface IBlazor {
platform: IBlazorPlatform;
}
interface IBlazorPlatform {
toJavaScriptString(pointer: any): string;
toDotNetString(jsString: string): any;
toUint8Array(pointer: any): Uint8Array;
}
interface IReadFileParams {
fileRef: n... |
/*
Copyright (C) 2017 Red Hat, 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 ... |
<filename>src/index.ts
import * as github from '@actions/github'
import * as core from '@actions/core'
import * as artifact from '@actions/artifact'
import AdmZip from 'adm-zip'
import fs from 'fs'
import * as output from './output'
export type Follower = {
login: string
avatarUrl: string
url: string
name?: st... |
import * as React from 'react'
import { SynapseConstants } from '../../utils/'
import { isTableEntity } from '../../utils/functions/EntityTypeUtils'
import {
insertConditionsFromSearchParams,
parseEntityIdFromSqlStatement,
SQLOperator,
} from '../../utils/functions/sqlFunctions'
import { useGetEntity } from '../.... |
import React, { ReactElement } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { RootState } from '../store/reducers';
import { getSelectedEventsEventListener, getChangeEventListenerDisabled, getSelectedEventsAvailableEventListeners } from '../store/selectors/layer';
import { setEventDrawer... |
import React, { useMemo, MouseEvent, DetailedHTMLProps, HTMLAttributes } from 'react';
import URL from 'url-parse';
import Dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import minMax from 'dayjs/plugin/minMax';
import relativeTime from 'dayjs/plugin/relativeTime';
import { EnrichedUser, UR } from 'getstream';... |
<filename>packages/core/src/portable-plugin-config.ts
import resolve from 'resolve';
import { compile } from './js-handlebars';
import mapValues from 'lodash/mapValues';
import assertNever from 'assert-never';
export const protocol = '__embroider_portable_plugin_values__';
const { globalValues, nonce } = setupGlobals(... |
import { h, Component } from "preact";
import { css, cx } from "emotion";
import { IPlayerStore, IProperties, IPlugin } from "../interface";
import { connect } from "unistore/preact";
import { parsePercent } from "../utils";
import { colorPrimary, styleToolbarButtonIcon, colorDefault } from "../utils/style";
import { ... |
import { Game } from "./core/Game";
import { MeshSystem, LightSystem, MaterialSystem, InputSystem, Camera, Mesh, MeshTypes, Material, Transform, Light, Input } from "@megavr/ecsy-babylon";
// start app by call game instance
const game = Game.instance();
// init game canvas, add systems, add scene T
game.start(documen... |
/**
* This file provides combining functions for displaying `Activatable`
* entries.
*
* @file src/Utilities/activatableActiveUtils.ts
* @author <NAME>
* @since 1.1.0
*/
import { fmap } from "../../../Data/Functor"
import { List } from "../../../Data/List"
import { liftM2, liftM4, mapMaybe, Maybe } from "../../... |
import { NgxLoggerLevel } from './types/logger-level.enum.js';
import { LoggerConfig } from './logger.config.js';
import { NGXLoggerConfigEngine } from './config.engine.js';
import { NGXLoggerUtils } from './utils/logger.utils.js';
import { NGXLogInterface } from './types/ngx-log.interface.js';
export const Levels = [... |
import Queue from './queue';
import COFetch from './cofetch';
import * as EventEmitter from 'events';
interface IGallery {
gid: string;
token: string;
}
export interface IPage {
filename?: string;
imgsrc?: string;
failnl?: Set<string>;
style?: string;
url?: string;
imgkey?: string;
page?: number;
}
... |
import { Address, BigDecimal, BigInt } from '@graphprotocol/graph-ts';
////////////////////////
///// Schema Enums /////
////////////////////////
// Using Coingecko slugs
export namespace Network {
export const ARBITRUM = "arbitrum-one";
export const AVALANCHE = "avalanche";
export const AURORA = "aurora";
ex... |
import * as React from 'react'
import { Utils, HTMLContainer } from '@tldraw/core'
import { TDShapeType, TDMeta, VideoShape, TDVideoAsset } from '~types'
import { GHOSTED_OPACITY } from '~constants'
import { TDShapeUtil } from '../TDShapeUtil'
import {
defaultStyle,
getBoundsRectangle,
transformRectangle,
trans... |
/**
* @example
* toFixed('111', 5)
* // '00111'
* toFixed('3456111', 5)
* // '56111'
* @param {String/Number} str is a string
* @param {Number} count is number, the length of the return string
* @returns {String}
*/
const toFixed: (str: string | number, count: number) => string = (str, count) => {
return `${... |
import 'mousetrap';
import { MSTeamsIcon, MSTeamsIconType, MSTeamsIconWeight } from 'msteams-ui-icons-react';
import { dropdown } from 'msteams-ui-styles-core/lib/components/dropdown';
import * as React from 'react';
import { connectTeamsComponent, ITeamsThemeContextProps } from '../teams-context';
import classes from ... |
import { botParams, getKeyboard } from "../../../config.js";
import {
MenuTemplate,
MenuMiddleware,
createBackMainMenuButtons,
deleteMenuFromContext
} from "grammy-inline-menu";
import { withdraw, getTransactionCost } from "../../network/accountHandler.js";
import { amountToHumanString, bigNumberArithmetic, big... |
/**
* @description Ecosystem Vote Form
* @todo 送信時のデータ加工処理
* @todo クレジットコンポーネント
* @todo インクリメント・デクリメントのボタン制御
* */
import React, { useMemo, useState } from "react";
import { routerPush } from "@/architecture/application/routing";
// i18n
import { useTranslation } from "next-i18next";
// component
import { AtH2, AtB... |
import { isRegExp } from 'util';
import { generate } from 'escodegen';
import { parseScript } from 'esprima';
import { visit, namedTypes as n, builders as b } from 'ast-types';
import { Context, RunningScriptOptions } from 'vm';
import { VM, VMScript } from 'vm2';
/**
* Compiles sync JavaScript code into JavaScript w... |
/**
* MIT License
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
... |
/*
Copyright 2021 Merck & Co., Inc. Kenilworth, NJ, USA.
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 A... |
<gh_stars>0
import { vol } from "memfs";
import { corePkg, fsRoot, nodecgPackageJsonStr, twitchChatPkg, validDevInstall, validProdInstall } from "../test.util";
import { SemVer } from "semver";
import * as path from "path";
import * as installation from "../../src/utils/installation";
import * as fsUtils from "../../sr... |
import {
EngineType,
IacFileData,
IacFileParsed,
TerraformPlanJson,
TerraformPlanResource,
ResourceActions,
VALID_RESOURCE_ACTIONS_FOR_DELTA_SCAN,
VALID_RESOURCE_ACTIONS_FOR_FULL_SCAN,
TerraformScanInput,
TerraformPlanResourceChange,
IaCErrorCodes,
TerraformPlanReferencedResource,
TerraformPla... |
<reponame>qteatime/crochet
import * as FS from "fs";
import * as Path from "path";
import * as Express from "express";
import * as Package from "../../../build/pkg";
import * as Packager from "../../../build/node-cli/package";
import * as Spec from "../../../build/utils/spec";
import { CrochetForNode, build_file } from... |
<filename>src/pages/profile/user-search/user-search.ts
import { Component, NgZone, ViewChild } from "@angular/core";
import { AuthService, UserProfileService, Impression, ImpressionType, PageId, Environment, Visit, TelemetryService } from "sunbird";
import { NavController, NavParams, LoadingController, ToastController ... |
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map, tap, catchError, mergeMap } from 'rxjs/operators';
import { HttpClient } from '@angular/common/http';
export interface Player { name: string; id: string; power: boolean; volume: number; }
export interface Genre { name: string... |
'use strict';
import vscode from 'vscode';
import binarySearch from 'binary-search';
// A ruler in VS Code settings can either be a number or an object mapping strings to numbers/strings
// e.g. 90
// e.g. {"column": 90, "color": "#000"}
export type Ruler = number | RulerObject;
export interface RulerObject {
colu... |
import React, { useContext, useEffect, useMemo, useState } from "react";
import { BlockTag } from "@ethersproject/providers";
import ContentFrame from "../ContentFrame";
import InfoRow from "../components/InfoRow";
import TransactionValue from "../components/TransactionValue";
import ETH2USDValue from "../components/ET... |
import { ChildProcess } from 'child_process';
import * as Debug from 'debug';
import * as fs from 'fs';
import { ERROR_IPC_UNKNOWN_PROCEDURE, IPCError } from '../errors';
import { fork } from './shell';
const debug = Debug('ionic:cli-framework:utils:ipc');
export interface RPCRequest<P extends string, A extends any... |
import * as fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
console.log('[GENERATING docs/REPORTS.md]');
const loc = JSON.parse(fs.readFileSync(`${__dirname}/sloc-report.json`, 'utf8')); // this file is generated (see package.... |
import { Global as _ } from "../lib/global";
import { ChannelObjectDefinition, DeviceObjectDefinition, PeripheralObjectStructure, Plugin, StateObjectDefinition } from "./plugin";
/**
* Checks if two buffers or arrays are equal
*/
function bufferEquals(buf1: Buffer | number[], buf2: Buffer | number[]): boolean {
if... |
import Vue, { PropType } from "vue";
import { BreakdownArray, Breakdown } from "EventReporter";
import { Chart } from "chart.js";
Vue.component("breakdown-chart", {
props: {
src: { type: Object as PropType<BreakdownArray>, required: true },
ShowAll: { type: Boolean, required: false, default: false... |
<reponame>eGangotri/eGangotri-upload-monitor<gh_stars>0
import * as fs from 'fs';
import { getAllPngs } from '../utils/ImgUtils';
import * as path from 'path';
import { addReport } from '../index';
import { PDF_EXT } from './constants';
import { FOOTER_LINK, FOOTER_TEXT, INTRO_BANNER, INTRO_TEXT, PDF_FONT } from './Pdf... |
<filename>src/core/Telemetry.ts
import axios from 'axios'
import { v4 as uuid } from 'uuid'
import { version } from '../../package.json'
import { Config } from './Config'
import { Log } from '~/utils'
import { isDev, isProd, isTest } from '~/env'
import { Global } from '~/extension'
import { LocaleTreeItem, ProgressSub... |
import { useEffect, useState } from 'react'
import { ChainId } from '@dcl/schemas'
import { ProviderType } from 'decentraland-connect/dist/types'
import { connection } from 'decentraland-connect/dist/ConnectionManager'
import { setCurrentIdentity } from '../utils/auth/storage'
import segment from '../utils/development/... |
<reponame>c4spar/deno-cli
import { getDefaultValue, getOption, paramCaseToCamelCase } from "./_utils.ts";
import {
ConflictingOption,
DependingOption,
MissingOptionValue,
MissingRequiredOption,
OptionNotCombinable,
UnknownOption,
} from "./_errors.ts";
import { IParseOptions } from "./types.ts";
import type... |
import axios from '../../../axios';
import axiosRaw from 'axios';
import { AuthAction } from '../../../models/AuthAction';
import {
initAuthSaga,
authCheckStateSaga,
initLogoutSaga,
} from '../../../store/sagas/auth';
import {
authStart,
authSuccess,
authFail,
logoutComplete,
initLogout,... |
/*!
* @license
* Copyright 2021 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
*
* Unless required by applicable law or... |
import * as assert from "assert";
import * as crypto from "crypto";
import * as fs from "fs";
import * as hashUtils from "../script/hash-utils";
var mkdirp = require("mkdirp");
import * as os from "os";
import * as path from "path";
import * as q from "q";
var yauzl = require("yauzl");
import PackageManifest = hashUti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.