text stringlengths 3.08k 15.5k |
|---|
import * as fs from 'fs';
import * as child_process from 'child_process';
import watch from 'node-watch';
import _flow from 'lodash/fp/flow';
import _orderBy from 'lodash/fp/orderBy';
import _map from 'lodash/fp/map';
import * as debugUtils from './debug-utils';
import * as util from 'util';
import readdir from 'recurs... |
import { JWPlayerConfig } from './jwplayer-config';
import { JWPlayerEvent } from './jwplayer-event';
import { JWPlayerListItem } from './jwplayer-list-item';
export interface AdProgressParam {
client: 'vast' | 'googima';
creativetype: string;
tag: string;
}
export interface AdCompanionsParam {
companions: any[];... |
<filename>packages/clarity-js/src/data/metadata.ts
import { BooleanFlag, Constant, Dimension, Metadata, MetadataCallback, Metric, Session, Setting } from "@clarity-types/data";
import * as core from "@src/core";
import config from "@src/core/config";
import hash from "@src/core/hash";
import * as dimension from "@src/d... |
<filename>src/main.ts
import * as faker from "faker";
import { createObjectCsvWriter } from "csv-writer";
import { PRODUCTS } from "./products";
faker.setLocale("de");
interface User {
id: number;
first_name: string;
last_name: string;
city: string;
age: number;
gender: string;
}
interface Order {
id: ... |
import React from 'dom-chef';
import cache from 'webext-storage-cache';
import {isChrome} from 'webext-detect-page';
import elementReady from 'element-ready';
import * as pageDetect from 'github-url-detection';
import {GitPullRequestIcon} from '@primer/octicons-react';
import features from '.';
import * as api from '.... |
import * as L from "lonna"
import { globalScope } from "lonna"
import { AppEvent, BoardAccessPolicy, EventUserInfo, Id, UIEvent } from "../../../common/src/domain"
import { GoogleAuthenticatedUser, GoogleAuthUserInfo, googleUser, signIn, refreshUserInfo } from "../google-auth"
import { ServerConnection } from "./server... |
<gh_stars>0
import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
import { AlertController } from '@ionic/angular'
import { AccountShareResponse, AirGapMarketWallet, IACMessageDefinitionObject, IACMessageType, supportedProtocols } from 'airgap-coin-lib'
import { DataService, DataServiceKe... |
<reponame>gmsoft-happyCoding/gm-express<gh_stars>0
/**
* 获取表达式的宽泛区间
*/
import { isArray, memoize } from 'lodash';
import { lt, gt, lte, gte } from '@gmsoft/tools';
import { transExpression } from './translate';
import { EXPRESSION_TRANS_MAP } from './configs/marks';
import { getExpressStatic, CompareStaticMap } from... |
//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
import { Response, NextFunction } from 'express';
import { redirectToReferrer, storeReferrer } from '../utils';
import { getProviders } from '../transitional';
import { ReposAppReque... |
<reponame>KnowledgeCanvas/knowledge-canvas
/**
Copyright 2022 <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 by applicable ... |
/* eslint-disable max-len */
import { getConverterBlockchainId as getEosConverterBlockchainId, getReserveBlockchainId as getEosReserveBlockchainId, getReserves as getEOSReserves, getReservesCount as getEOSReservesCount } from './blockchains/eos';
import { getReserves as getEthReserves, getConverterBlockchainId as getEt... |
<reponame>delesseps/mocha-typescript
import { suite, test, slow, timeout, pending, only } from "./index";
import { assert } from "chai";
import { spawnSync } from "child_process";
import * as path from "path";
import * as rimraf from "rimraf";
var chai = require("chai");
var fs = require("fs");
function assertOutput(... |
import React, {
FC,
useMemo,
useState,
useContext,
useRef,
useCallback,
} from 'react';
import { useDispatch } from 'react-redux';
import { useTranslation } from 'react-i18next';
import { AnimatePresence, motion } from 'framer-motion';
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter';
i... |
<gh_stars>0
import _fetch, { Response } from 'node-fetch'
import { GatsbyCache, Reporter } from 'gatsby'
import md5 from 'md5'
import * as A from 'fp-ts/lib/Array'
import * as O from 'fp-ts/lib/Option'
import * as R from 'fp-ts/lib/Record'
import * as TE from 'fp-ts/lib/TaskEither'
import { Option } from 'fp-ts/lib/Opt... |
<reponame>Qolzam/telar-auth-ext
// Copyright (c) 2020 <NAME> (@qolzam)
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import hmacUtils from '@telar/core/utils/hmac-util';
import log from '@telar/core/utils/log-util';
import stringUtils from '@telar/core/utils/string-util'... |
import React, {Component} from 'react';
import {View, Dimensions, Animated, Easing} from 'react-native';
import OuterCircle from "./OuterCircle";
import InnerCircle from "./InnerCircle";
import CloseButton from "./CloseButton";
interface Props {
primaryColor: string,
secondaryColor: string,
cancelColor: string,
... |
<reponame>bbonkr/react-blog-frontend
import produce from 'immer';
import { ShowNotification } from '../components/ShowNotification';
import { actionTypes } from './actionTypes';
import { UserState } from '../typings/reduxStates';
import { BaseAction } from '../typings/BaseAction';
import { UserHandler } from './hanlder... |
import { Component, ViewEncapsulation, Inject, OnInit } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { DocsService } from './../../services/docs/docs.service';
import { FileSystemService } from './../../services/file-system/file-system.service';
import { NgDocxService } from '... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
Project,
PropertyDeclarationStructure,
ClassDeclaration,
SourceFile
} from "ts-morph";
import { ClientDetails } from "../models/clientDetails";
import {
addOperationSpecs,
writeOperations,
writeGetOperationOptions
} from ... |
import { Flip } from './Flip'
import { xor } from './Utils'
export type Elem = (VDOMObject | VDOMText)
export type Attributes = { [key: string]: string | EventListener }
export interface HTMLElementEvent<T extends HTMLElement> extends Event {
target: T
}
export class VDOMText {
el: Text
constructor(text: string = ... |
<gh_stars>0
import React from 'react';
import { Setup, TInternationalization } from '../../config/setup';
import { toast, ToastOptions, ToastContainerProps } from 'react-toastify';
//
import moment from 'moment';
// import moment_jalaali from "moment-jalaali";
// import 'moment/locale/fa';
// import 'moment/locale/ar';... |
import React, { useCallback, useEffect, useRef, useState } from "react";
// @ts-ignore
import { CategoricalChartWrapper } from "recharts";
import {
XAxis,
YAxis,
BarChart,
Bar,
Legend,
LabelList,
ResponsiveContainer,
CartesianGrid,
Tooltip,
} from "recharts";
import { useColors, useYAxisMetadata } fro... |
import React, { useState } from 'react'
import { Link, useNavigate } from 'react-router-dom'
import { getCSRFToken } from '../utils/csrfToken'
import PageLayout from './PageLayout'
import RequiredAuth from './RequiredAuth'
import TagList from './TagList'
import { ITask } from './TaskTable'
import Choice from './Choice... |
import { fork, ChildProcess } from 'child_process'
import chokidar from 'chokidar'
import glob from 'glob'
import path from 'path'
const kill = require('tree-kill')
import * as ipc from './utils/ipc'
import { Options } from './bin'
import { makeCfg } from './utils/cfg'
import { makeNotify } from './utils/notify'
impo... |
//<> with ❤️ by <NAME>
//Third Party
import dotenv from 'dotenv';
dotenv.config();
const Discord = require('discord.js');
const client = new Discord.Client();
const { Player } = require("discord-music-player");
//Imports
const Rr = require("./commands/rr");
const Stats = require("./commands/stats");
const Help = req... |
<reponame>CiaccoDavide/DefinitelyTyped
// Project: https://github.com/c0b41/musixmatch, https://www.npmjs.com/package/musicmatch
// Definitions by: <NAME> <https://github.com/DadUndead>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import Musicmatch, {
AlbumParams,
AlbumTracksParams,
A... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React, { useEffect, useState } from 'react';
import {
EuiButton,
E... |
import React, { useState, useEffect, useRef } from 'react';
import clsx from 'clsx';
import { withStyles, WithStyles, createStyles, Theme } from '@material-ui/core/styles';
import Snackbar from '@material-ui/core/Snackbar';
import Slide from '@material-ui/core/Slide';
import Collapse from '@material-ui/core/Collapse';
... |
<filename>vscode-pvs/server/src/common/colorUtils.ts<gh_stars>10-100
/**
* vscode-pvs colors.
*/
// based on the 256 color scheme, see colors at https://misc.flogisoft.com/bash/tip_colors_and_formatting
export enum PvsColor {
blue = "blue",
darkblue = "darkblue",
yellow = "yellow",
darkyellow = "darkyellow",
g... |
import * as multibase from "multibase";
import { sha256 } from "@noble/hashes/sha256";
import { ripemd160 } from "@noble/hashes/ripemd160";
import krc20ProtoJson from "./jsonDescriptors/krc20-proto.json";
import protocolJson from "./jsonDescriptors/protocol-proto.json";
import { Abi } from "./interface";
/**
* Conver... |
<reponame>Ore4444/stencil
import { attributeChangedCallback } from './attribute-changed';
import { ComponentInstance, HostElement, PlatformApi } from '../../util/interfaces';
import { connectedCallback } from './connected';
import { disconnectedCallback } from './disconnected';
import { HYDRATED_CSS, DID_LOAD_ERROR, QU... |
<gh_stars>1-10
import { parseParcelPosition } from './scene/parcel'
export type MappingsResponse = {
parcel_id: string
publisher: string
root_cid: string
contents: Array<ContentMapping>
}
export type ParcelInfoResponse = {
scene_cid: string
root_cid: string
content: MappingsResponse
}
export type Conte... |
<reponame>cdetrio/assemblyscript-rlp
import { RLPData } from "./type";
const hexAlphabet = '0123456789abcdef';
class Decoded {
data: RLPData;
remainder: Uint8Array;
constructor(data: RLPData, remainder: Uint8Array) {
this.data = data;
this.remainder = remainder;
}
}
/**
* Parse inte... |
import React, { useState } from "react";
import {
Button,
Classes,
Dialog,
Intent,
HTMLTable
} from "@blueprintjs/core";
import { messenger, emit, on } from '../messenger';
import { useAppStore } from '../store/app-store';
import { pickProps } from '../common/helpers';
import { mmm_dd_yyyy } from "../common/dayt... |
import type { FnU2, Tuple } from "@thi.ng/api";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
export type ColorMode =
| "rgb"
| "hcy"
| "hsv"
| "hsl"
| "hsi"
| "int"
| "css"
| "xyz"
| "ycbcr";
export type CSSColorName =
| "aliceblue"
| "antiquewhite"
| "aqua"... |
<gh_stars>100-1000
/*
QuillToolbar is deprecated. Consider switching to the official Quill
toolbar format, or providing your own toolbar instead.
See https://quilljs.com/docs/modules/toolbar
*/
'use strict';
/* eslint-disable react/prefer-es6-class */
let ReactDOMServer = require('react-dom/server');
let createClass... |
import * as React from 'react'
import styled, { css } from '../theme/styled-components'
import { T } from '../util'
export interface Props {
type?: 'default' | 'atlas' | 'album'
size?: 'small'
imgSrc?: string
imgAlt?: string
imgHeight?: number
imgPlaceHolder?: string
titlePosition?: 'bottom'
title?: st... |
import { Cursor, Db, MongoClient } from 'mongodb';
import { v1 as Neo } from 'neo4j-driver';
interface OFFProduct {
stores?: string;
product_name?: string;
quantity?: string;
code: string;
countries_tags?: string[];
packaging_tags?: string[];
categories_tags?: string[];
brands?: string;
}
enum Preserv... |
<gh_stars>100-1000
import * as vscode from 'vscode';
import * as fse from 'fs-extra';
import * as path from 'path';
import { checkPathExists, registerCommand } from '@appworks/common-service';
import { componentsPath, projectPath } from '@appworks/project-service';
import openEntryFile from '../utils/openEntryFile';
im... |
<reponame>HasanMothaffar/minesweeper
import {
createBoard,
revealTile,
markTile,
revealMine,
getMineTimeouts,
randomNumber,
TILE_STATUSES
} from './logic.js'
let BOARD_SIZE = 6, MINE_COUNT = 6
let time = 0, isPlaying = true, timeInterval: number
let board = createBoard(BOARD_SIZE, MINE_COUN... |
import { Component, Directive, Input, OnInit, ViewChild } from '@angular/core';
import { FirebaseListObservable,
FirebaseObjectObservable } from 'angularfire2';
import { Subscription } from 'rxjs/Subscription';
import { AuthService } from '../navbar/auth.service';
import {NgbTooltip} from '@ng-bootstrap/ng-bootstr... |
<gh_stars>1-10
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { ESLintUtils } from '@typescript-eslint/experimental-utils';
import { hoistJestMock } from './hoist-jest-mock';
const { RuleTester } = E... |
<gh_stars>0
import acornNode = require("acorn-node");
import walk = require("acorn-walk");
// based on: acorn-node/walk@1.8.2
//function xtend<T1, T2>(t1: T1, t2: T2): { [P in (keyof T1 | keyof T2)]: (T2[P & keyof T2] extends void ? T1[P & keyof T1] : T2[P & keyof T2]) };
function xtend(...args: any[]): any;
function... |
import React from 'react';
import { matchPath } from 'react-router-dom';
// import { ItemTable } from '../components/Item/ItemTable';
// import { LabelTable } from '../components/Label/LabelTable';
// import { ItemIndex } from '../components/Item/Index';
// import { OrderTable } from '../components/Order/OrderTable';
/... |
import {
GradientType,
SlideX,
ThemeTypes,
withGradient,
} from '@getstation/theme';
import * as classNames from 'classnames';
// @ts-ignore: no declaration file
import * as React from 'react';
// @ts-ignore: no declaration file
import injectSheet from 'react-jss';
import { MinimalApplication } from '../applica... |
import { adminOnly } from "@utils/auth-utils";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { GetServerSideProps } from "next";
import { useRouter } from "next/router";
import {
useApproveWithdrawMutation,
useWithdrawQuery,
} from "@graphql/withdraws.graphql";
import Loader f... |
<reponame>dcecile/wotan<filename>packages/wotan/src/services/default/file-filter.ts
import { injectable } from 'inversify';
import { FileFilterFactory, FileFilterContext, FileFilter } from '@fimbul/ymir';
import * as ts from 'typescript';
import { unixifyPath, mapDefined, addUnique, createParseConfigHost } from '../../... |
<gh_stars>0
import * as assert from 'assert';
import { exec } from 'child_process';
import * as fs from 'fs';
import { slow, suite, test, timeout } from 'mocha-typescript';
import * as path from 'path';
import { ArgumentConstants, CompatibleLevel, GenerateSdk, TargetMode } from '../plugins/models';
import { copyRecursi... |
<filename>src/extension.ts
"use strict";
import * as vscode from "vscode";
import * as path from "path";
import * as flags from "./flags.json";
import * as validators from "./validators.json";
export function activate(context: vscode.ExtensionContext) {
const collection = vscode.languages.createDiagnosticCollection(... |
import { Widget as WidgetConfig, TableListConfig, ZeroStateReason, ZeroState } from '@al/ng-visualizations-components';
import { getTotalForKeys, highlightSeverity, highlightValue, highlightRiskLevel } from '../transformation.utilities';
enum Column {
AccountId,
AccountName,
AvgDays,
Counts
}
interface Overal... |
import React from 'react';
import AppBar from '@mui/material/AppBar';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import Container from '@mui/material/Container';
import FormControlLabel from '@mui/material/FormControlLabel';
import IconButt... |
<filename>Ancorazor.API/ClientApp/src/app/shared/services/base.service.ts
import { Injectable, OnDestroy } from "@angular/core";
import { environment } from "src/environments/environment";
import { AxiosResponse } from "axios";
import { ResponseResult } from "../models/response-result";
import axios from "axios";
impor... |
/**
* @hidden
*/
import { warnID, warn, easing } from '../core';
import { ActionInterval } from './actions/action-interval';
import { ITweenOption } from './export-api';
import { legacyCC } from '../core/global-exports';
/** adapter */
function TweenEasinAdapter (easingName: string) {
let initialChar = easingNa... |
<filename>src/parser/parse.ts<gh_stars>0
import MultiMap from '@woubuc/multimap';
import { Section } from './Section';
import { Node } from './Node';
import { tokenise } from './tokenise';
import { Iterator } from '../utils/Iterator';
import { TokenType } from './TokenType';
import { isTokenType, Token } from './Token... |
import {
defineComponent,
nextTick,
ComponentPublicInstance,
ref,
reactive,
onMounted,
onUnmounted,
watchEffect,
provide,
} from 'vue';
import { ANCHOR_SHARP_REGEXP, ANCHOR_CONTAINER, getOffsetTop } from './utils';
import { on, off, getScroll, scrollTo, getScrollContainer as utilsGetScrollContainer } ... |
import { useState, useEffect } from 'react'
import { Styled, Box } from 'theme-ui'
import QRCode from 'qrcode.react'
import Copy from '../../public/img/copy.svg'
import Check from '../../public/img/check.svg'
import LinkIcon from '../../public/img/link.svg'
import { Transcoder, Delegator, ThreeBoxSpace } from '../../@t... |
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 appli... |
export type FunctionRule = (value: string | null | undefined) => boolean
export type NumberFunctionRule = (value: number | null | undefined) => boolean
export type ValidationRuleType<T extends string | number | boolean | RegExp | FunctionRule | NumberFunctionRule> = (
value: number | string | boolean | null | undefin... |
import { AuthStep } from './AuthStep'
// import { LoginMode } from './LoginMode'
import { AuthDisplayMode } from './AuthDisplayMode'
import { checkSession, getWxLoginCode } from '@/utils/wx'
import fuseLine from '../decorator/fuse-line'
import { storage } from '@/utils/storage'
import {
saveAuthToken,
getAuthToken ... |
import { ConstellationClient } from '../../Client';
import { Schema } from './Schema';
import { SchemaFolder } from './SchemaFolder';
import { SerializerUpdateContext, Serializer } from '../../structures/Serializer';
import { isNumber, isFunction } from '../../util/Utils';
export class SchemaEntry {
/**
* The Cons... |
<reponame>v1v/apm-agent-nodejs<gh_stars>100-1000
// Test the index.d.ts type file by exercising the API in TypeScript.
// `tsc` will error out of there is a type conflict.
//
// Note: This test file is the one intended to *fully* exercise the exported
// types. Any types changes should result in an update to this file.... |
<gh_stars>1-10
import { tryParseFloat, tryParseInt } from "./utility"
const LOOP_COUNT = 100000; // シミュレーションにおける反復回数
type REALITY = '☆1' | '☆2' | '☆3' | 'PU'; // レアリティ
/**
* 成功時の型
*/
type ResultA = {
result: 'OK',
data: {
line50: number,
line95: number,
line99: number,
max: number,
min: n... |
import { Balance, BigNumber, HasBalance } from '@rotki/common';
import { GeneralAccount } from '@rotki/common/lib/account';
import { Blockchain } from '@rotki/common/lib/blockchain';
import { SupportedAsset } from '@rotki/common/lib/data';
import { Eth2Validators } from '@rotki/common/lib/staking/eth2';
import { z } fr... |
<filename>libraries/tracker-core/src/payload.ts
/*
* Copyright (c) 2022 Snowplow Analytics Ltd, 2010 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source ... |
import * as React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
import { FormikYesOrNoQuestion } from '@navikt/sif-common-formik/lib';
import { fraværDagToFraværDateRange, fraværPeriodeToDateRange } from '@navikt/sif-common-forms/lib/fravær';
import FraværDagerListAndDialog from '@navikt/sif-com... |
<gh_stars>0
import { Component, OnInit, ViewChild, HostListener, ElementRef } from '@angular/core';
import { MatTableDataSource, MatSort, PageEvent, MatPaginator } from '@angular/material';
import * as moment from 'moment';
import { Router } from '@angular/router';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } fr... |
import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import * as FileSaver from 'file-saver';
import * as moment from 'moment';
import { map, withLatestFrom, switchMap, tap, skip } from 'rxjs/operators';
import { AppState } fr... |
// Copyright 2018-2020 @paritytech/substrate-connect authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
/* eslint-disable @typescript-eslint/camelcase */
import { WsProvider } from '@polkadot/api';
import { ProviderMe... |
<reponame>savitoj98/simplML
import { Component, OnInit, ViewChild, ElementRef, Input, Output, EventEmitter, AfterViewInit } from '@angular/core';
import { RoutingService } from 'src/app/services/routing-service.service';
import { NgControlStatus } from '@angular/forms';
import { GraphService } from 'src/app/services/gr... |
<reponame>MysteryPoo/authentication-server<gh_stars>0
import { expect } from "chai";
import { HandshakeHandler } from "../src/Protocol/GameClientInterface/Handlers/Handshake";
import { Handshake } from "../src/Protocol/GameClientInterface/Messages/Handshake";
import { ServerMock } from "./Mocks/ServerMock";
import { C... |
import { max } from 'lodash';
interface Dictionary<T> {
[key: string]: T;
}
interface NodeStat {
name: string;
statuses: ReqStatuses;
rps: number;
latencyp50: number;
latencyp99: number;
edges: Dictionary<EdgeStat>;
dpStatus: string;
dpOnline: number;
dpOffline: number;
dpTotal: number;
}
class... |
import { descriptives } from "./normalDist"
import { TooltipComponentOption,
} from 'echarts/components'
import { LineSeriesOption } from "echarts"
import { erf } from "mathjs"
export type ECOption = echarts.ComposeOption<TooltipComponentOption | LineSeriesOption>
export type ChartType = "AGE" | "BMI" | "ANTERIOR" ... |
import { Localized } from "@fluent/react/compat";
import cn from "classnames";
import { FORM_ERROR } from "final-form";
import React, { FunctionComponent, useCallback, useState } from "react";
import { Field, Form, FormSpy } from "react-final-form";
import { graphql } from "react-relay";
import { InvalidRequestError }... |
import {basename, dirname, extname, resolve, join, relative} from 'path';
import shell from 'shelljs';
import {copyFileSync, writeFileSync} from 'fs';
import {bold} from 'chalk';
import log from '@doc-tools/transform/lib/log';
import {ArgvService, LeadingService, TocService, PluginService} from '../services';
import ... |
<reponame>kupietools/Plotta.js-stockOptionsExtension
import Util from '../util';
import Axis from './axis';
import Tics from './tics';
const FONT = Symbol('Font');
const LEGEND_VISIBLE = Symbol('LegendVisible');
const TITLE = Symbol('Title');
const TITLE_COLOR = Symbol('TitleColor');
const TITLE_LOCATION = Symbol('Tit... |
<reponame>vestige06/shark_weight_electron<gh_stars>1-10
import { Transcoder } from "./base/Transcoder";
import {Socket} from "net";
const iconv = require('iconv-lite');
var transcoder = new Transcoder();
class Cmd{
socket:Socket;
trans:Transcoder;
constructor(socket:Socket,trans:Transcoder){
this.so... |
<reponame>Alcom1/Operation-Recycling-Bin<filename>src/game/gameobjects/character.ts
import GameObject, { GameObjectParams } from "engine/gameobjects/gameobject";
import { GMULTX, GMULTY } from "engine/utilities/math";
import Vect from "engine/utilities/vect";
import BrickHandler from "./brickhandler";
import Brick from... |
<reponame>pauloborba/academic-kickstart
import * as fs from "fs"; // https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_file_system
import * as deepEqual from "deep-equal";
// usage: node jsonMerge oldfilename newfilename outputfilename
// compilation: tsc
// instalation: npm install
/*
updates objects in n... |
<gh_stars>0
import {Injectable} from '@angular/core'
import {SubmoduleApiService} from '../../http/submodule-api.service'
import {NumberInput, TextInput, URLInput} from '../../generic-ui/create-dialog/input-text/input-text.component'
import {AutoCompleteInput} from '../../generic-ui/create-dialog/input-auto-complete/in... |
import React, { useRef } from 'react';
import {
StyleSheet,
View,
ScrollView as RNScrollView,
ViewStyle,
StyleProp,
ImageBackground,
PanResponder,
TouchableWithoutFeedback,
} from 'react-native';
import type {
LayoutChangeEvent,
NativeScrollEvent,
NativeSyntheticEvent,
} from 'react-native';
impor... |
<reponame>SourCreamCulture/Vade-Opensource
import { RunFunction } from "../../interfaces/Command";
import { GuildMember } from "discord.js";
const options: {
[flag: string]: {
alias: string;
message: string;
};
} = {
"--name": {
alias: "-n",
message: "Kicks all users whose name has the specified ... |
<filename>packages/ampgular/cli/helpers-amp/recreate-dynamic.ts<gh_stars>10-100
import { load } from 'cheerio';
import * as minimatch from 'minimatch';
import { AmpDescription } from '../models/interface';
import { Schema as FormPostComponentSchema } from '../schemas/component-form-post';
import { Schema as ListGetCo... |
import { Component, Host, h, State } from '@stencil/core';
import { ErrorType, GenericResponse, globalRoleTablePermissions } from '../../../../common/types';
import { fetchAs } from '../../../../common/utility';
import { globals } from '../../../../core/global.store';
type MutablePermissionsFields = Omit<globalRoleTab... |
<reponame>pirosikick/markuplint
import { ASTBlock, ASTNode, pugParse } from './pug-parser';
import {
MLASTDoctype,
MLASTNode,
MLASTNodeType,
MLASTParentNode,
MLASTPreprocessorSpecificBlock,
MLASTTag,
Parse,
} from '@markuplint/ml-ast';
import { parse as htmlParser, isDocumentFragment, removeDeprecatedNode } from... |
<reponame>rishabhnuevezo/user-interfaces<gh_stars>0
import { Injectable } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { BehaviorSubject } from 'rxjs';
import { first, shareReplay, switchMap } from 'rxjs/operators';
import { addMinutes, roundToNearestMinutes, isAfter, endOfDay } from 'date-f... |
import React, { useState, useCallback, useEffect, ReactElement } from "react";
import loadable from "@loadable/component";
import moment from "moment";
import { UCCBedRequestData } from "./UCCBedRequest";
import * as Notification from "../../Utils/Notifications.js";
import { statusType, useAbortableEffect } from "../.... |
<reponame>exdis/react-render-tracker<filename>src/ui/utils/subscription.ts
import * as React from "react";
import debounce from "lodash.debounce";
export type Subscriptions<T> = Set<{ fn: T }>;
export type SubscriptionsMap<I, T> = Map<I, Subscriptions<T>>;
const EmptySet = new Set();
export function subscribeById<I,... |
<reponame>MrHappyHam/TravBot-v3
import {NamedCommand, CHANNEL_TYPE} from "onion-lasers";
import {pluralise} from "../../lib";
import moment from "moment";
import {Collection, TextChannel} from "discord.js";
const lastUsedTimestamps = new Collection<string, number>();
export default new NamedCommand({
description:... |
import { Modal, App, Platform } from "obsidian";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import h from "vhtml";
import {
Chart,
BarElement,
BarController,
Legend,
Title,
Tooltip,
SubTitle,
ChartTypeRegistry,
CategoryScale,
LinearScale,
PieController,
... |
import { PlaylistModel } from '../database/playlist/playlist.model';
import { SongModel } from '../database/song/song.model';
import crypto from 'crypto';
// @ts-expect-error
import { song_types, youtube_download_url } from '../settings.js';
import Axios from 'axios';
import { generateQueue } from './queue';
export as... |
<reponame>knifecake/leapdna-js<filename>src/sequence.ts
import { Block, LeapdnaBlockCommonParams, LeapdnaBlockType } from "./block";
import { isdigit } from './utils';
export type SequenceParams = {
type?: LeapdnaBlockType.Sequence,
name?: string,
refseq_name?: string,
refseq_start?: string,
refseq_end?: st... |
import { map, each } from "lodash";
import d3 from "d3";
import React, { useState, useEffect } from "react";
import resizeObserver from "@/services/resizeObserver";
import { RendererPropTypes } from "@/visualizations/prop-types";
import box from "./d3box";
import "./renderer.less";
function calcIqr(k: any) {
return ... |
import { vultr } from "../vultr";
const resource = "server";
export default {
Query: {
server: async () => await vultr.query({ resource }),
appChangeListServer: async (_, args) =>
await vultr.query({ resource, action: "app_change_list", args }),
osChangeListServer: async (_, args) =>
await... |
<filename>lib/proposalService.ts
import { BigNumber } from "bignumber.js";
import { Address, Hash } from "./commonTypes";
import {
EntityFetcherFactory,
EventFetcherFactory,
TransformEventCallback,
Web3EventService
} from "./web3EventService";
import {
IntVoteInterfaceWrapper,
} from "./wrappers/intVoteInterf... |
<reponame>electricessence/TypeScript.NET
///<reference types="qunit"/>
///<amd-dependency path="QUnit"/>
import * as Text from "../../../dist/amd/System/Text/Utility";
import * as AU from "../../../dist/amd/System/Collections/Array/Utility";
import NotImplementedException from "../../../dist/amd/System/Exceptions/NotIm... |
import fs from 'fs-extra'
import glob from 'glob-promise'
import { join } from 'path'
import { promisify } from 'util'
import { uniq, isString, isObject, last } from 'lodash-es'
import {
SUPPORTED_LANGUAGES,
generateWrapperCode,
generateWrapperExt,
} from './handlers'
const mkdir = fs.mkdirpSync
const writeFile ... |
/* eslint-disable import/no-anonymous-default-export */
import React, { useEffect } from 'react';
import '../Styles/sMovieTile.css';
import Dialog from "@mui/material/Dialog";
import CloseIcon from '@mui/icons-material/Close';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import AddIcon from '@mui/icons-ma... |
import type { Entity, World } from 'ape-ecs'
import type { Direction, IGrid, IGridDirection } from '../typings'
import Map3D from '../common/map-3d'
import { createActor, addHopComponent } from './archetypes/actor'
/**
* Adds random actors to the world.
*
* @param world - The world instance to add actors to.
* @pa... |
<filename>src/parameterFormattingRule.ts
import * as Lint from 'tslint';
import * as ts from 'typescript';
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: 'parameter-formatting',
type: 'style',
description: 'Checks whether parame... |
import React from 'react';
import throttle from 'lodash/throttle';
// NOTE: prevent scrolling on main page
import useHideBodyScroll from '../helpers/useHideBodyScroll';
// NOTE drag with mouse
import useDrag from '../helpers/useDrag';
// NOTE hide scrollbar in _app.js
import { ScrollMenu, VisibilityContext } from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.