text stringlengths 3.3k 33k |
|---|
<reponame>webhacking/rxdb<filename>src/util.ts
/**
* this contains a mapping to basic dependencies
* which should be easy to change
*/
import randomToken from 'random-token';
import {
default as deepClone
} from 'clone';
import {
PouchDBInstance
} from './types';
/**
* Returns an error that indicates that ... |
import * as THREE from "three"
import SceneRoot from "./sceneRoot"
import Park from "./park"
import Building from "./building"
import BaseObject from "./baseObject"
import ClassType from "./classType"
import LevelEventType from "./levelEventType"
import App, { TreeStruct } from "./app"
import { EventEmitter } from "eve... |
<reponame>GabrielInTheWorld/oauth-authorization-server<gh_stars>0
import express from 'express';
import shajs from 'sha.js';
import url from 'url';
import { Constructable, InjectService, Inject } from '../../core/modules/decorators';
import { Generator } from '../interfaces/generator';
import { Modules } from '../../m... |
// -*- mode: typescript; typescript-indent-level: 2; -*-
import {BasicREPL} from './repl';
import {emptyEnv} from './compiler';
import {GlobalEnv} from './env';
import {Value, Type} from './ast';
import {valueToStr, i64ToValue, NONE_BI} from './common';
import {prettifyWasmSource} from './linter';
import {NUM, BOOL, ... |
import stripJsonComments from 'strip-json-comments';
import { getOptions, urlToRequest, stringifyRequest } from 'loader-utils';
import validateOptions from 'schema-utils';
import deepmerge from 'deepmerge';
import webpack from 'webpack';
import { Schema } from 'schema-utils/declarations/validate';
import { VENDORS } f... |
<reponame>programmersstudio/nimbella-cli
/*
* Copyright (c) 2019 - present Nimbella Corp.
*
* 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/licens... |
import { Connection, connection } from "./connection";
import { proxyLens, ProxyLens } from "./proxy-lens";
import { ProxyValue, proxyValue } from "./proxy-value";
import { ReactDevtools } from "./react-devtools";
import { createRootStoreFactory } from "./store";
import { Update, Updater } from "./types";
type State =... |
<filename>src/controllers/tx-fee.controller.ts<gh_stars>0
import {inject} from '@loopback/core';
import {repository} from '@loopback/repository';
import {getModelSchemaRef, post, requestBody, response} from '@loopback/rest';
import Big from 'big.js';
import {config} from 'dotenv';
import {getLogger, Logger} from 'log4j... |
<gh_stars>0
import yargs = require('yargs')
import glob = require('glob')
import execa = require('execa')
import invariant from 'invariant'
import * as admin from 'firebase-admin'
import cosmiconfig from 'cosmiconfig'
import rootLogger from './log'
import { join } from 'path'
import { readFileSync } from 'fs'
import { ... |
import { Message, MessageContent, Client, GuildTextableChannel } from 'eris'
import { DB, Command as IveBotCommand, IveBotCommandGenerator, Context, CommandResponse } from './imports/types.js'
import { Db } from 'mongodb'
import { getInsult } from './imports/tools.js'
import botCallback from './events.js'
function isE... |
/* eslint-disable prettier/prettier */
import db from './firestore'
const apiKey = process.env.NEXT_PUBLIC_TARDIS_API_KEY as string
const updateDB = process.env.NEXT_PUBLIC_UPDATE_DB === 'true'
export function getFairSqueethMarkBefore(price: number, timeElapsedInDay: number, vol: number, power = 2) {
const vDaily ... |
var indiceSecoes: number = 0;
var indiceSubSecoes: number = 1;
var indiceFormulas: number = 1;
// Valores globais
var fatorSeguranca = 1;
function secao(descricao: string, ehsubsecao: boolean = false) {
if (ehsubsecao) {
indiceSubSecoes += 1;
console.log(`\n${indiceSecoes}.${indiceSubSecoes} ${desc... |
import { EditOutlined } from '@ant-design/icons';
import { Button, Input, Tabs, Form, message, Modal, Card, Radio, Descriptions, Avatar } from 'antd';
import { FormattedMessage } from 'umi';
import React, { useState, useEffect } from 'react';
import { ExclamationCircleOutlined } from "@ant-design/icons/lib";
import sty... |
import childProcess from 'child_process'
import 'core-js/proposals/reflect-metadata'
import { LookupAddress, promises as dns } from 'dns'
import http from 'http'
import Koa from 'koa'
import koaBody from 'koa-body'
import koaCompress from 'koa-compress'
import koaConvert from 'koa-convert'
import koaError from 'koa-err... |
import { Subscriber , Subject , BehaviorSubject , Subscription } from 'rxjs';
import {
Component,
ElementRef,
forwardRef,
NgModule,
Input,
Output,
Directive,
SimpleChange,
SimpleChanges,
OnChanges,
ViewChild,
ContentChild,
AfterViewInit,
ModuleWithProviders,
AfterContentInit,
Self,
... |
<gh_stars>1-10
import { CancellationToken, CodeAction, CodeActionContext, CodeActionKind, commands, CompletionContext, CompletionItem, CompletionItemKind, ConfigurationTarget, ExtensionContext, Hover, languages, Position, Range, Selection,SignatureHelp, SignatureHelpContext, SignatureInformation, TextDocument, window, ... |
import Queue from "./Queue.js";
import { EntryDisplayState } from "./data";
import type { TreeObj } from "./data";
type EntryId = number;
export type FlowyTreeNode = OrderedTreeNode<EntryId>;
export interface FlowyTreeMarkupEntry {
type: "markup-text";
text: string;
displayState?: EntryDisplayState;
headingS... |
import * as React from 'react';
import { useContext, useEffect, useState } from 'react';
import {
useHistory,
useLocation,
useParams,
useRouteMatch
} from 'react-router';
import { toast } from 'react-toastify';
import { Button } from 'reactstrap';
import { Context } from '../../Context';
import { IKeyInfo } fro... |
<reponame>fchavant/lisk-sdk
/*
* Copyright © 2018 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 cop... |
<gh_stars>0
import commander from "commander";
import { InterfaceDeclaration, Project } from "ts-morph";
import { format } from "prettier";
function generate(protoPath: any, server: any, outputPath: any, client: any) {
let project = new Project();
project.addSourceFileAtPath(protoPath);
let serverFile = project... |
/**
* @file Defines {@link ContactForm}
*/
import "./ContactForm.scss";
import clsx from "clsx";
import React, { createRef, FormEvent, useEffect, useState } from "react";
import Recaptcha from "react-google-recaptcha";
import {
FaCheck,
FaEnvelope,
FaExclamationCircle,
FaSpinner,
} from "react-icons/... |
import {Lexer,Token} from './lexer';
import {Expression, Chain, ValueConverter, Assign,
Conditional, AccessScope, AccessMember, AccessKeyed,
CallScope, CallFunction, CallMember, PrefixNot,
Binary, LiteralPrimitive, LiteralArray, LiteralObject, LiteralString} from './ast';
var EOF = new Token(-1... |
import path from "path";
import Joi from "@hapi/joi";
import fs from "fs";
import bus from "../../event-bus";
import { Collection, MongoClient } from "mongodb";
import Application, { schema as applicationSchema } from "../application";
import ApplicationVersion, {
schema as applicationVersionSchema,
} from "../appli... |
<reponame>slamby/slamby-insight<filename>src/app/app.component.ts
import { Component, OnInit, NgZone, ViewChild, ChangeDetectorRef, ViewContainerRef } from '@angular/core';
import { Http } from '@angular/http';
import { Endpoint } from './models/endpoint';
import { Globals } from './models/globals';
import { WelcomeC... |
import React, {
useState,
useRef,
useEffect,
useMemo,
useLayoutEffect,
} from "react";
import { EnvManagerComponent } from "@ui_types";
import { Client, Model } from "@core/types";
import * as g from "@core/lib/graph";
import { style } from "typestyle";
import * as ui from "@ui";
import { getValDisplay } from... |
<filename>src/extension.ts
'use strict';
// 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 child_process from 'child_process';
import * as path from 'path';
import * as fs from 'fs';
... |
/* eslint-disable */
import * as React from 'react';
import {ReactNode, useState} from 'react';
import {NavLink, Redirect, Route, Switch} from 'react-router-dom';
import {Button, Col, Dropdown, Form, Input, Layout, Menu, message, Modal, Row, Tooltip} from 'antd';
import LogoutOutlined from '@ant-design/icons/lib/icon... |
import { Explore, Info, LastPage, LocalPolice, NewReleases, Report, SportsMma } from "@mui/icons-material";
import { Box, Button, Container, Paper, Tooltip, Typography, useTheme } from "@mui/material";
import React, { useEffect, useState } from "react";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { Se... |
<filename>app/server/scheduler.ts
import dotenv from 'dotenv';
import schedule from 'node-schedule';
import mailgun from 'mailgun-js';
import PgStore from './pg-store';
import 'isomorphic-fetch';
import {
createClient,
createSubscriptionBillingAttempt,
getSubscriptionContract,
updateSubscriptionContract,
upda... |
// Import here Polyfills if needed. Recommended core-js (npm i -D core-js)
// import "core-js/fn/array.find"
// ...
import { fromBase64, toBase64, toHex } from '@cosmjs/encoding'
import { sleep } from '@cosmjs/utils'
import {
DirectSecp256k1Wallet,
encodePubkey,
makeSignDoc,
Registry,
TxBodyEncodeObject,
En... |
import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts"
import {
Account as AccountEntity,
AccountLiquidity as AccountLiquidityEntity,
Burn as BurnEntity,
Market as MarketEntity,
Mint as MintEntity,
Pair as PairEntity,
PairSnapshot as PairSnapshotEntity
} from "../../genera... |
<gh_stars>1-10
import { IList } from "./collections";
import "./computation/math/Declaration";
import { IObjectDictionary } from "./core";
import "./linq/Declaration";
import { IParallelQueryable, IQueryable } from "./linq/index";
import "./parallels/Declaration";
import { ExtendedPromiseOptions } from "./parallels/Dec... |
import React, {
forwardRef,
useCallback,
useEffect,
useImperativeHandle,
useRef,
useState
} from 'react';
import JSZip from 'jszip';
import simplify from 'simplify-js';
import type { SketchElementProps } from '../../types';
interface SketchProps {
sketchElementProps: SketchElementProps;
}
type Coordinat... |
<gh_stars>0
function firstIndexOf(buf: Buffer, arr: Buffer[]) {
for (let i = 0; i < arr.length; i++) {
if (buf.equals(arr[i])) {
return i;
}
}
return -1;
}
let debug = false;
// Protection against second preimage attacks
// See https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-... |
<reponame>xformation/xformation-compliancemanager-service<filename>compliancemanager-web-interface/src/views/logic/aggregationbuilder/AggregationWidgetConfig.ts
/*
* Copyright (C) 2020 Graylog, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Publ... |
<gh_stars>1-10
/*
YouTube related utility methods
Some of the packages that are used for YouTube integration
require some setup before running (e.g. ffmpeg, googleapis).
Moving all of them to this file helps centralize the setup
code, and avoid duplication across the codebase.
*/
import ffmpegPath from '@ff... |
<gh_stars>1-10
import { Actor } from 'UE/Actor';
import { BP_Saucer } from 'UE/BP_Saucer';
import { EAttachLocation } from 'UE/EAttachLocation';
import { GameplayStatics as KGameplay } from 'UE/GameplayStatics';
import { HitResult } from 'UE/HitResult';
import { MathLibrary as KMath } from 'UE/MathLibrary';
impor... |
<reponame>peter-ls/kylo
import * as angular from 'angular';
import * as _ from "underscore";
import {VisualQueryPainterService} from '../../visual-query/transform-data/visual-query-table/visual-query-painter.service';
import {DOCUMENT} from '@angular/platform-browser';
import {Component, ElementRef, HostListener, Injec... |
/*
********************************************
Copyright © 2021 Agora Lab, Inc., all rights reserved.
AppBuilder and all associated components, source code, APIs, services, and documentation
(the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
accessed, used, modified, or di... |
<reponame>OliverBrotchie/pgc4d<gh_stars>10-100
import { connectPg, PgConn } from '../src/connection.ts'
import { testOptions } from './env.ts'
import { assertEquals, unreachable, encode } from '../src/deps.ts'
import { ColumnValue } from '../src/types.ts'
const { test } = Deno
testType('bool', 'true', ... |
/* tslint:disable */
/***
description: An session handler that works without cookie (and with cookie too).
version: 2.0.1
keywords:
- session
- session handler
- session without cookie
- restful session
- express session
dependencies:
"@coolgk/token": "^2"
"@coolgk/jwt": "^2"
"cookie": "... |
<gh_stars>0
import { createSlice, PayloadAction, createAsyncThunk, createSelector, ThunkDispatch } from '@reduxjs/toolkit';
import axios, { AxiosError } from 'axios';
import { Post } from '../api/e621/interfaces/posts';
import PostAPI from '../api/e621/posts';
import { RootState, AppThunk, AppThunkDispatch } from '../a... |
<reponame>git-truck/git-truck
import { promises as fs } from "fs"
import {
GitBlobObject,
GitCommitObject,
GitCommitObjectLight,
GitTreeObject,
AnalyzerData,
AnalyzerDataInterfaceVersion,
TruckUserConfig,
TruckConfig,
} from "./model"
import { log, setLogLevel } from "./log.server"
import { describeAsyn... |
import { Option } from "fp-ts/Option"
import { Either } from "fp-ts/Either"
import RDF from "rdf-js"
import { DataFactory, Store } from "n3"
import { v4 as uuid } from "uuid"
import ShExUtil from "shex/packages/shex-util"
import ShExValidator, {
SuccessResult,
FailureResult,
} from "shex/packages/shex-validator"
... |
<filename>src/boc/serializer.ts
/* eslint-disable @typescript-eslint/naming-convention */
import { Cell } from './cell'
import {
Bit,
BitArray
} from './bit-array'
import {
uintToHex,
hexToBits,
hexToBytes,
bytesToUint,
bytesCompare
} from '../utils/helpers'
import { crc32cBytesLe } from '.... |
/*
* BASTET Program Analysis and Verification Framework
*
* Copyright 2019 by University of Passau (uni-passau.de)
*
* Maintained by <NAME> (<EMAIL>),
* see the file CONTRIBUTORS.md for the list of contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use t... |
interface Map<K, V> {
clear(): void;
delete(key: K): boolean;
entries(): any;
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
get(key: K): V;
has(key: K): boolean;
keys(): any;
set(key: K, value?: V): Map<K, V>;
size: number;
values(): any;... |
import { PlusOutlined } from "@ant-design/icons";
import { Button, Input, Popconfirm, Switch, Table, Tooltip } from "antd";
import { ColumnsType, ColumnType } from "antd/lib/table";
import { GetRowKey } from "antd/lib/table/interface";
import React, { useCallback } from "react";
import { executeUiCmd } from "../../../f... |
// Copyright 2015-2021 Nkisi 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... |
<gh_stars>10-100
/**
* Copyright (c) 2019 <NAME>.
* @license MIT
*/
import { RGBA8888, RGBColor } from './Types';
// FIXME: cleanup this mess, move things either to decoder/encoder, keep only shared things
// system endianess
export const BIG_ENDIAN = new Uint8Array(new Uint32Array([0xFF000000]).buffer)[0] === ... |
import * as React from "react";
import {
ScrollView,
StyleSheet,
Text,
View,
SectionList,
TouchableOpacity,
ActivityIndicator,
} from "react-native";
import {
Nav, Footer, Header, BookList
} from "../components";
import { queryBooks } from "../libs";
const blocks = [
{
title: "日点击榜",
sort: "dayvisit",
},... |
import calendar, {Calendar} from 'calendar'
import findIndex from 'lodash.findindex'
export interface DateObject {
year: number;
month: number;
day: number;
isLeapMonth: boolean;
isLunarCalendar: boolean;
}
export interface ColumnItem {
label: string;
value: number;
}
export interface MonthColumnItem e... |
<filename>src/core/eme/types.ts
/**
* Copyright 2015 CANAL+ Group
*
* 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 requir... |
import React from "react";
import { Dimensions, PanResponderInstance, Platform, StyleSheet, Text, View } from "react-native";
import { TouchableOpacity } from "react-native-gesture-handler";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import * as config from "../Config.json";
import { CachableI... |
import m from 'mithril';
import classnames from 'classnames';
import PopperJS, { Boundary } from 'popper.js';
import { Classes, IAttrs, Style, safeCall, getClosest, elementIsOrContains } from '../../_shared';
import { AbstractComponent } from '../abstract-component';
import { IOverlayableAttrs, Overlay } from '../overl... |
// src/containers/Toolbar/StateActionsDialog/StateUpdatersView/StateUpdatersView.tsx
import * as React from 'react';
import {withStyles, WithStyles, createStyles} from '@material-ui/core/styles';
import {connect} from 'react-redux';
import {Dispatch} from "redux";
import {FieldSelectorOnSelectFunc, StoreState, Toolbar... |
<reponame>tw7613781/bittorrent
import * as crypto from "crypto"
import * as dgram from "dgram"
import * as fs from "fs"
import { getLogger } from "log4js"
import * as net from "net"
import { URL } from "url"
import { Message } from "./message"
import { Pieces } from "./pieces"
import { Queue } from "./queue"
import { T... |
<gh_stars>1-10
import {
InspectionStatus,
InspectionFlyreelType,
InspectionPolicyType,
ValidCountry
} from './types'
export const FLYREEL_STATUS = [
{ label: 'Abandoned', value: InspectionStatus.ABANDONED },
{ label: 'Cancelled', value: InspectionStatus.CANCELLED },
{ label: 'Completed', value: Inspectio... |
import * as React from "react";
import Svg, {
Defs,
LinearGradient,
Stop,
G,
Path,
SvgProps,
} from "react-native-svg";
interface Props extends SvgProps {
size?: number;
color?: string;
}
function HashMarkLogo({ size = 24, color = "white", ...props }: Props) {
return (
<Svg
data-name="Grou... |
interface TransferData {
id: number; // Just increment by one
playerId: number;
fromClubId: number;
toClubId: number;
date: string; // Either date only (2016-12-13) or if possible with time (2016-12-13T16:30:00Z)
// See https://en.wikipedia.org/wiki/ISO_8601
}
... |
<reponame>nilsmoh/fkb
/**
* Typen um Fahrplaene einzugeben
*/
export interface SingleDirectionScheduleInput {
route1900: string | number;
comment?: string;
todo?: string;
seite: number; // seite in FKB wie gedruckt
klassen?: string;
caption: string;
zeilen: Array<Array<(string | number |... |
/* IMPORT */
import * as _ from 'lodash';
import * as vscode from 'vscode';
import stringMatches from 'string-matches';
import Config from '../../../config';
import Consts from '../../../consts';
import Abstract, { pathNormalizer } from './abstract';
const metadataParser = require('markdown-yaml-metadata-parser');
co... |
<filename>src/sharding/Shard.ts<gh_stars>1-10
import { EventEmitter, resolve as pathResolve, ChildProcess } from "../../deps.ts";
import { DJSError } from "../errors/mod.ts";
import Util from "../util/Util.ts";
import ShardingManager from "./ShardingManager.ts";
let childProcess = null;
let Worker = null;
export clas... |
import { Vue, Component, Prop, Watch } from 'vue-property-decorator';
import ActionSheet from '../actionsheet';
import LoadMore from '../loadmore';
import './styles/index';
export type CascadeSelectTree = {
key: string | number;
label: string;
children?: CascadeSelectTree[] | ((parendKey: string | number) => Cas... |
#!/usr/bin/env node
/*
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
/* eslint-disable no-underscore-dangle */
import { exec } from 'chi... |
import React from 'react'
import QRCode from 'qrcode.react'
import CSSTransition from 'react-transition-group/CSSTransition'
import { translate } from 'react-i18next'
import { TranslationFunction } from 'i18next'
import { AppConfig } from '@/app-config'
import { updateConfig } from '@/_helpers/config-manager'
import { ... |
import * as React from "react";
import { RouteComponentProps } from "react-router";
import { Link } from "react-router-dom";
import "../../scss/modules/_template-history.scss";
import "../../scss/modules/_template-show.scss";
import Select, { ISelectValue } from "../basicComponents/select";
import TextArea from "../bas... |
import * as ts from "typescript"
import * as fs from "fs"
// given an import, returns if it imports the given module.
function createModuleImportMatcher(moduleName: string) {
return (node: ts.Node): node is ts.ImportDeclaration =>
ts.isImportDeclaration(node) &&
ts.isStringLiteral(node.moduleSpecif... |
<gh_stars>0
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { readFile } from 'fs';
import { xhr, getErrorStatusDescription } from 'request-light';
import URI from 'vscode-uri';
import { IConnection, TextDocuments } from 'vscode-languageserver';
import {
TextDocument,
Diagnostic,... |
import { ISolution, InputFile } from '../shared';
type Attack = 'cold' | 'bludgeoning' | 'slashing' | 'radiation' | 'fire';
type Team = 'reindeer' | 'virus';
type Winner = { teamName: Team | null, units: number };
class Group {
constructor(
public teamIndex: number,
public teamName: Team,
public... |
<reponame>gai6948/edgecv-datalake-for-pose-estimation<gh_stars>1-10
import * as cdk from "@aws-cdk/core";
import * as s3deploy from "@aws-cdk/aws-s3-deployment";
import * as glue from "@aws-cdk/aws-glue";
import * as iam from "@aws-cdk/aws-iam";
import * as s3 from "@aws-cdk/aws-s3";
import * as ec2 from '@aws-cdk/aws-... |
import { RouteProp } from '@react-navigation/native'
import { firestore } from 'firebase'
import React, { useEffect, useRef, useState } from 'react'
import { Animated, FlatList, Keyboard, LayoutChangeEvent, SafeAreaView, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native'
import FastImage from 're... |
import * as request from 'request';
import * as fs from 'fs';
import * as path from 'path';
interface Property {
type?: string;
enum?: string[];
items?: Property;
format?: string;
description?: string;
$ref?: string;
}
interface Definition {
properties: {[name: string]: Property};
}
interface Tag {
n... |
import React, { useRef, useEffect } from 'react';
import * as d3 from 'd3';
import { AxisPropsList, TrialData, PCPAxisData } from '../trial_visualization';
interface Props {
width: number;
height: number;
axisPropsList: AxisPropsList;
trialDataList: TrialData[];
axisDataList: PCPAxisData[];
selectedMetricF... |
<reponame>jvillane/chilean-public-data-compilation<filename>src/senadores.proyectos.ts
import {writeFile} from "fs";
import {
Comparado,
Indicacion,
Informe,
Oficio,
ProyectoLey,
ProyectosLey,
Tramite,
Urgencia,
Votacion
} from "./senadores.model";
import axios from "axios";
import {parseStringPromise... |
// 处理 sku选择问题
import { composeMN, composeMArrN, uniqueArr, intersectionSortArr, intersectionArr } from './util'
// #region interface
interface ISkuRankListItem {
spuDId: string
paramIdJoin: string
priceRange: Array<string>
count: number
}
interface ISkuParamItem {
paramId: string
paramValue: string
valueL... |
<gh_stars>10-100
import { Point, DiffResultGroup, Area, Image, Options } from "./types";
import * as crypto from "crypto";
import { diff } from "./diff";
import * as Path from "path";
export function compareImage(
left: Image,
right: Image,
options: Options
): DiffResultGroup[] {
if (options.shiftAware) {
... |
const fs = require('fs')
const UNKNOWN = 'UNKNOWN';
let ZERO = UNKNOWN; //will eventually have a value like 'ab'
let ONE = UNKNOWN;
let TWO = UNKNOWN;
let THREE = UNKNOWN;
let FOUR = UNKNOWN;
let FIVE = UNKNOWN;
let SIX = UNKNOWN;
let SEVEN = UNKNOWN;
let EIGHT = UNKNOWN;
let NINE = UNKNOWN;
// 0
// 1 |-| 2
// ... |
<reponame>strautomator/core<filename>src/strava/athletes.ts
// Strautomator Core: Strava Athletes
import {StravaActivity, StravaRecords, StravaGear, StravaProfile, StravaProfileStats, StravaRecordDetails, StravaTotals, StravaTokens, StravaTrackedRecords, StravaAthleteRecords} from "./types"
import {toStravaGear, toStr... |
import { firestore } from "firebase-admin";
import { cleanRegex } from "../utils/functions";
import cache from "memory-cache";
const customEmojiRegex = /<(([a-z])?:[\w]+:)([\d]+)>/gim;
const channelMentionRegex = /<#(\d+)>/gm;
const mentionRegex = /<@([\W\S])([\d]+)>/gm;
const HTMLStripRegex = /<[^:>]*>/gm;
impo... |
<reponame>forsigner/stook
import { useRef, useState } from 'react'
import { request, Options as RequestOptions } from '@peajs/request'
import { useEffect } from 'react'
import { useStore, Storage } from 'stook'
import compose from 'koa-compose'
import { fetcher } from './fetcher'
import {
FetchResult,
Refetch,
Op... |
import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from "react-native";
import React, {useContext, useEffect, useRef, useState} from "react";
import {connect} from "react-redux";
import {State} from "../../redux/store";
import {
primaryScheduleThunk,
secondaryScheduleThunk,
} from ... |
<filename>src/mahoji/mahojiSettings.ts<gh_stars>0
import { Guild, Prisma, User } from '@prisma/client';
import { Guild as DJSGuild, MessageButton, TextChannel } from 'discord.js';
import { Time } from 'e';
import { KlasaUser } from 'klasa';
import {
APIInteractionDataResolvedGuildMember,
APIUser,
ApplicationCommandO... |
import * as React from 'react'
import {
URLDescriptor,
createURLDescriptor,
joinPaths,
modifyTrailingSlash,
} from 'navi'
import { NaviContext } from './NaviContext'
import {
HashScrollContext,
HashScrollBehavior,
scrollToHash,
} from './HashScroll'
export interface UseLinkPropsOptions {
children?: any... |
// @ts-ignore
import { think } from 'thinkjs'
// @ts-ignore
import svgCaptcha from 'svg-captcha'
import sharp from 'sharp'
export interface IConf {
cachePrefix: string
codePool: string
ipMaxNum: number
ipBlackMaxNum: number
ipBlackTime: number
imgTimeout: number
imgMaxNum: number
imgLen: number
codeT... |
<filename>jupyterlab-visualization-engine/src/widget/views/widget/body/chart/StringLineChart.tsx
import * as Plottable from "plottable";
import {
BucketForChart,
Datasets,
StringStats,
} from "../../../../common/DataModel";
import * as utils from "../../../../common/utils";
import * as d3 from "d3";
import "plott... |
import * as fs from 'fs';
import * as path from 'path';
import * as rimraf from 'rimraf';
import { promisify } from 'util';
import { URL } from 'url';
import * as decompress from 'decompress';
const decompressUnzip = require('decompress-unzip');
const http = require('follow-redirects/http');
import libsodiumTypes fro... |
/**
* Copyright 2022 Google LLC
*
* 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... |
import { EventEmitter } from './event';
import { QueryFilter } from './filter';
import {
ClientConfig,
ClientMessage,
ClientRequest,
ClientSubscription,
QueryParams,
RequestConfig,
RequestOptions,
RequestQueue,
Requests,
ServerEvent,
ServerMessage,
ServerResponse,
Subscriber,
SubscriptionHan... |
<filename>index.ts
let Nightmare = require('nightmare');
let cheerio = require('cheerio');
let moment = require('moment');
let async = require('async');
const schedule = require('node-schedule');
let _ = require('underscore');
const Hapi = require('hapi');
// let nightmare = Nightmare({ show: false });
let cincyAuction... |
<reponame>bhbr/minter<gh_stars>0
import { addPointerDown, remove, removePointerDown, addPointerMove, removePointerMove, addPointerUp, removePointerUp, logInto, isTouchDevice, pointerEventVertex, LocatedEvent } from './modules/helpers'
import { Vertex } from './modules/vertex-transform'
import { Mobject, MGroup } from '... |
<filename>src/vscobolscanner.ts<gh_stars>0
import { VSCodeSourceHandler } from "./vscodesourcehandler";
import { FileSystemError, FileType, TextDocument, Uri, window, workspace } from 'vscode';
import COBOLSourceScanner, { EmptyCOBOLSourceScannerEventHandler, SharedSourceReferences } from "./cobolsourcescanner";
import... |
import {Day} from "../day";
import {Injectable} from "@angular/core";
import {Action, createSelector, Selector, State, StateContext, Store} from "@ngxs/store";
import {AddVacation, LoadVacation, RemoveVacation, SaveVacation} from "../actions/calendar.actions";
import {AskResultDto, VacationDay, VacationDto, VacationTyp... |
<reponame>nikhilgoud/ngx-translate-utils
import * as vscode from 'vscode';
import * as fs from 'fs';
export interface ConfigurationSettings extends vscode.WorkspaceConfiguration {
includeAll: boolean;
defaultLang: string;
autocapitalize: boolean;
caseMode: string;
replaceOnTranslate: boolean;
translatePipe... |
<filename>src/swipl/lib/swipl.ts
import { NewType, wrap } from "../../util/newtype"
const filterNumericKeys = <T>(obj: T): Omit<T, number> =>
Object.fromEntries(
Object.entries(obj).filter(([key]) => Number.parseInt(key) !== Number.NaN)
) as any
export enum TermType {
VARIABLE = 1,
ATOM = 2,
... |
import * as React from "react";
import { Group, Layer, Stage, Rect } from "react-konva";
import Replica from "./Replica";
import Operation from "./Operation";
import visualizer from "../classes/visualizer";
import Update from "./Update";
import RemoveUpdate from "./RemoveUpdate";
import TooltipForState from "./ToolTipF... |
<reponame>pikkle/vexmxl
import * as mxl from "musicxml-interfaces";
import "vexflow";
import Renderer = Vex.Flow.Renderer;
import {Tablature, TimeSignature, Chord, Duration, Measure, Note, Rest} from "./vexmxl.tab";
const timeMap: { [key: number]: Duration } = {
4: Duration.WHOLE, // = HALF * 2
3: Duration.HALF_DOT,... |
// Code generated by GENERATOR. DO NOT EDIT.
import * as jspb from "google-protobuf"
import * as gogoproto_gogo_pb from '../../../../../gogoproto/gogo_pb';
export class Point extends jspb.Message {
getLat(): number;
setLat(value: number): void;
getLng(): number;
setLng(value: number): void;
serializeBina... |
export interface MathMLNowOptions {
/**
* The format of the math input
*/
formatName: "TeX" | "inline-TeX" | "AsciiMath" | "MathML";
/**
* Use to set the effective font-size (in pixels) of the maths expression (defaults to 18)
*/
fontSize?: number;
/**
* Use to set the colo... |
<gh_stars>1-10
// Constants
import Vect, { Point } from "./vect";
/** Path to image assets */
export const PATH_IMG = "assets/img/";
/** Horizontal multiplier for grid positions */
export const GMULTX = 30;
/** Vertical multiplier for grid positions */
export const GMULTY = 36;
/** Z-index to place objects beneath th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.