text stringlengths 3.08k 15.5k |
|---|
<reponame>CodeChain-io/codechain-primitives-js
import { BigNumber } from "bignumber.js";
import { toLocaleString } from "../utility";
import { U64, U64Value } from "./U64";
export type U128Value = U128 | U64Value;
/**
* @hidden
*/
const RLP = require("rlp");
/**
* Handles 128-bit unsigned integers. Used to expre... |
import React, { memo, useState, useEffect } from 'react'
import Button from '@material-ui/core/Button'
import ButtonGroup from '@material-ui/core/ButtonGroup'
import Dialog from '@material-ui/core/Dialog'
import DialogActions from '@material-ui/core/DialogActions'
import DialogContent from '@material-ui/core/DialogCont... |
<reponame>makimenko/angular-template-for-threejs
import {moduleMetadata} from '@storybook/angular';
// NOTE: Do direct import instead of library (allows to watch component and easy to develop)
import {AtftModule} from '../../../projects/atft/src/lib/atft.module';
import {AfterViewInit, Component, OnDestroy, QueryList, ... |
<filename>bindings/angular2/schematics/src/ng-add/setup-project.ts
import { parseJson } from '@angular-devkit/core';
import { chain, Rule, SchematicContext, Tree, SchematicsException } from '@angular-devkit/schematics';
import {
addModuleImportToRootModule,
getProjectFromWorkspace,
getProjectMainFile,
getProjec... |
// Packages imports
import { useContext, useState } from "react";
import { View, StyleSheet, ScrollView, RefreshControl } from "react-native";
// Local components imports
import AppButton from "../../components/AppButton";
import AppText from "../../components/AppText";
import BuySellAPI from "../../api/BuySellAPI";
i... |
<filename>packages/win32-def/src/lib/win-model/struct.ts
import {
ATOM,
BYTE,
DWORD,
HANDLE,
HBRUSH,
HCURSOR,
HICON,
HINSTANCE,
HWND,
INT,
LONG,
LPARAM,
LPCTSTR,
UINT,
ULONG,
ULONG_PTR,
USHORT,
VOID,
WCHAR_String,
WNDPROC,
WORD,
WPARAM,
PVOID,
} from './common'
import { RID... |
import { IonContent,
IonHeader,
IonPage,
IonTitle,
IonToolbar,
IonCard,
IonCardHeader,
IonCardTitle,
IonCardContent,
IonGrid,
IonRow,
IonCol,
IonButton,
IonButtons,
IonIcon
} from '@ionic/react';
import React, { useState, useEffect } from 'react';
import { Bar } from 'react-chartjs-2';... |
// @ts-nocheck
import { createElement, patch } from '../src/index';
import Chart from 'chart.js/auto';
import confetti from 'canvas-confetti';
import appendManyRowsToLargeTable from './suites/appendManyRowsToLargeTable';
import clearRows from './suites/clearRows';
import createManyRows from './suites/createManyRows';... |
<filename>packages/docs/docsite/src/components/splash/splash.hooks.ts
/*!
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project.
*/
import { useEffect, useState, RefObject, useCallback } from 'react'
import { randomBetween } from '../../util/util'
import {... |
<reponame>DimitryRd/harp.gl
/*
* Copyright (C) 2017-2019 HERE Europe B.V.
* Licensed under Apache 2.0, see full license in LICENSE
* SPDX-License-Identifier: Apache-2.0
*/
import {
BooleanLiteralExpr,
CallExpr,
CaseExpr,
Env,
Expr,
ExprScope,
ExprVisitor,
HasAttributeExpr,
Liter... |
<gh_stars>1-10
// @ts-ignore: Missing module declaration
import {CheckboxElement} from '@vaadin/vaadin-checkbox/src/vaadin-checkbox';
// @ts-ignore: Missing module declaration
import {VerticalLayoutElement} from '@vaadin/vaadin-ordered-layout/src/vaadin-vertical-layout';
// @ts-ignore: Missing module declaration
import... |
// import { TextDocument } from 'vscode-languageserver-textdocument';
import { CSpellUserSettings } from './cspellConfig';
import { RegExpWorker, TimeoutError } from 'regexp-worker';
import { RegExpPatternDefinition } from 'cspell-lib';
export type Range = [number, number];
export interface RegExpMatch {
regexp: ... |
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are per... |
"use strict";
// Do this as the first thing so that any code reading it knows the right env.
process.env.BABEL_ENV = "production";
process.env.NODE_ENV = "production";
// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
//... |
<reponame>HuangLuGuang/ghkjsdfsd
import { Component, OnInit } from '@angular/core';
import { EquipmentBoardService } from '../../../../serivice/equipment-board.service';
let equipment_four_road = require('../../../../../../../assets/eimdoard/equipment/js/equipment-four-road');
declare var $;
@Component({
selector: '... |
function unit_convert(usertyped: string){
const ucs_data = usertyped.split(' ');
if(ucs_data.length == 4){
let uVal = parseFloat(ucs_data[1]);
let uValLeng = String(uVal).replace('.', ' ').length
let uUnit = ucs_data[1].slice(uValLeng);
TheConverter(uVal , uUnit , ucs_data[3]);
}
else{
talk... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<gh_stars>0
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------... |
<filename>packages/hippy-react/src/modules/ui-manager-module.ts
/*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2017-2019 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* y... |
import React, {
useMemo,
useRef,
useImperativeHandle,
forwardRef,
useContext,
useState,
useCallback,
} from 'react';
import { useTranslation } from 'react-i18next';
import {
EditLayoutItemOptions,
GridLayoutColumn,
} from '@ballware/meta-interface';
import DataGrid, { Editing } from 'devextreme-reac... |
<filename>src/tx/index.ts
const sig = require('@kava-labs/sig');
import axios, { AxiosError } from 'axios';
import { URL } from 'url';
const api = {
getAccount: '/auth/accounts',
postTx: '/txs',
};
/**
* Sends an HTTP GET request to Kava
* @param {String} path the request's url extension
* @param {String} base... |
<filename>src/find.ts
import j, { ASTPath, ASTNode, Collection, Statement } from 'jscodeshift'
import mapValues from 'lodash/mapValues'
import compileMatcher, {
CompiledMatcher,
MatchResult,
mergeCaptures,
} from './compileMatcher'
export type Match<Node extends ASTNode> = {
type: 'node'
path: ASTPath<Node>
... |
import { Map, OrderedSet, getIn, get } from 'immutable';
import { toKeyPathSeq } from './keypath';
import { IterableKeyPath, RegisTreeMap } from '../types';
/** @hidden */
const LISTENER_KEY = {};
/** @hidden */
const NOT_SET = {};
/** @hidden */
export class RegisTree<T = any> {
private registry: RegisTreeMap<T>... |
import sharp from 'sharp';
import { Dimensions, ResizeArgs } from './types';
import { clamp } from './utils/fp';
import { smartCrop } from './utils/smart-crop';
interface ResizeResult {
image: Buffer;
info: sharp.OutputInfo;
original: sharp.Metadata;
}
/**
* Calculate a default compression value based on a log... |
<reponame>chrisvire/bloom-player
import { ActivityContext } from "../ActivityContext";
// The value we store to indicate that at some point the user
// chose this answer. We don't really need the value, because if the key for
// that answer has a value, it will be this. But may as well
// be consistent, in case w... |
import React, { useState, useEffect } from 'react';
import { Container, Title, Subtitle, CardContainer, ButtonContainer } from './styles';
import { useParams } from 'react-router-dom';
import { useAuth } from '../../hooks/auth'
import AddCollaboratorToProject from './AddCollaboratorToProject';
import AddCollaboratorToT... |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, NO_ERRORS_SCHEMA, LOCALE_ID, ErrorHandler } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http'... |
<reponame>Adroit360/XipTv<gh_stars>1-10
import { HttpClient } from "@angular/common/http";
import { Component, ViewContainerRef } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
import { ModalDialogService, RouterExtensions } from "nativescript-angular";
import { MiscService } from "~/services/m... |
/* eslint no-console: 0 */
import { EventEmitter } from 'events';
import { Entry } from '../server/protocol';
import { BaseClient, Game } from './base-client';
import { ThingInfo, MatchInfo, MouseInfo, SoundInfo, SeatInfo } from './types';
export class Client extends BaseClient {
match: Collection<number, MatchI... |
import { Gamestates } from 'morpheus/gamestate/isActive';
import { ImageDrawable, VideoRef } from './types';
import {
MovieCast,
Scene,
Cast,
SupportedSoundCasts,
MovieSpecialCast,
ControlledMovieCast,
} from 'morpheus/casts/types';
import { useMemo } from 'react';
import { or, and, Matcher } from 'utils/ma... |
<filename>src/db.ts
import { AuthCredentials, withCredentials } from './auth';
import { DesignDocOptions, doc, DocManager } from './doc';
import { DocId, MultipleQueryOptions } from './internal';
import { Manager } from './manager';
import { Selector, SortBy } from './query';
import {
appendPath,
Destroy,
get,
... |
import * as fs from "fs";
import * as path from "path";
import * as url from "url";
import * as vscode from "vscode";
import { AtelierAPI } from "../api";
import { getFileName, getFolderName } from "../commands/export";
import { config, FILESYSTEM_SCHEMA, FILESYSTEM_READONLY_SCHEMA, OBJECTSCRIPT_FILE_SCHEMA } from "..... |
<reponame>sebastianroming/license-report-generator
/**
* Copyright 2020
* <NAME> <<EMAIL>>
**/
interface ILicenseReportOptions {
include?: Array<string>,
useDevDependencies?: boolean,
packagePath: string,
packageName: string,
depth?: number,
template?: string
};
interface INpmPackageJson {
dependenci... |
<reponame>cjh1/stemclienttest
import { call, put, takeEvery, takeLatest, all } from 'redux-saga/effects';
import { ActionType } from 'deox';
import { decodeStream } from '@msgpack/msgpack';
import { IImage, ImageData, FrameType, GirderFile, FieldStatus } from '../../types';
import { ImageSize } from '../../stem-image/... |
import {
createSlice,
createSelector,
// createAsyncThunk
PayloadAction
} from '@reduxjs/toolkit';
import { RootState, StoreDispatch, StoreGetState } from '../configureStore';
import { Covid19TrendName } from 'covid19-trend-map';
import {
updateTrendCategoriesInURLHashParams,
updateIsGridListV... |
import * as React from 'react'
import { Theme, WithStyles, createStyles, withStyles } from '@material-ui/core/styles'
import AccountCircle from '@material-ui/icons/AccountCircle'
import AppBar from '@material-ui/core/AppBar'
import Badge from '@material-ui/core/Badge'
import IconButton from '@material-ui/core/IconBut... |
import { LoadoutParameters, UpgradeSpendTier } from '@destinyitemmanager/dim-api-types';
import { t } from 'app/i18next-t';
import { DimItem, PluggableInventoryItemDefinition } from 'app/inventory/item-types';
import { DimLoadoutItem, Loadout } from 'app/loadout-drawer/loadout-types';
import raidModPlugCategoryHashes f... |
/// <reference path="../../../jqwidgets-ts/jqwidgets.d.ts" />
//defining instances
let jqxTreeInstance;
let feedContentExpanderInstance;
let feedListExpanderInstance;
let feedItemContentInstance;
let feedListContainerInstance;
function createSplitter(mainSplitterSelector, contentSplitterSelector, feedExpanderSelecto... |
<filename>experimental/traffic-portal/src/app/models/server.ts<gh_stars>1-10
/*
* 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 req... |
/*
* Copyright 2021 Zindex Software
*
* 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... |
import * as Discord from 'discord.js';
import * as format from './format';
import * as util from './util';
import * as youtubedl from 'youtube-dl';
const maxVideoLength = 60 * 3; // 3 mins
const wantedVideoHeight = 480; // 720, 1080, etc
export async function fetchAttachment(msg: Discord.Message, acceptedFiletypes = ... |
import React, { useState } from 'react';
import * as ImagePicker from 'expo-image-picker';
import {
ScrollView,
View,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
Alert,
Image,
} from 'react-native';
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
import { Feathe... |
import {
instantiateDOMComponent,
VdomType,
DOMTextComponent,
DOMComponent,
} from './vdom';
import { dash2camel, propName2eventName } from './util/util';
import { SandPropsType, SandChildType, DoneType } from './type';
import { SandElement } from './element';
import { Transaction, globalTaskQueue } fro... |
<reponame>ExodusMovement/neon-js
import {
WitnessScope,
parse as parseWitnessScope,
toString,
} from "./WitnessScope";
import {
StringStream,
num2hexstring,
HexString,
deserializeArrayOf,
serializeArrayOf,
} from "../../u";
export interface SignerLike {
/* account scripthash in big endian */
accoun... |
import * as _ from 'lodash';
import i18next from 'i18next';
import {
K8sKind,
k8sGet,
k8sList,
k8sPatch,
k8sKill,
K8sResourceKind,
modelFor,
referenceFor,
} from '@console/internal/module/k8s';
import {
ImageStreamModel,
BuildConfigModel,
ServiceModel,
DeploymentConfigModel,
DeploymentModel,
... |
import { BrandedButton } from '@covid/components';
import { ClearButton } from '@covid/components/buttons/ClearButton';
import ProgressStatus from '@covid/components/ProgressStatus';
import Screen, { Header, ProgressBlock } from '@covid/components/Screen';
import { ErrorText, HeaderText } from '@covid/components/Text';... |
<reponame>channg/zcoil
import assign = require('lodash/assign');
import cloneDeep = require('lodash/cloneDeep');
import forIn = require('lodash/forIn');
import merge =require('lodash/merge');
import {getTimestamp, isPromise,isFunction} from './utils'
import {coil} from './coil'
import {coilConif} from './interface/co... |
/* eslint-disable require-await */
import { ActionTree, GetterTree, MutationTree } from "vuex";
import { ZkSyncTransaction } from "zksync-checkout/build/types";
import { closestPackableTransactionAmount, closestPackableTransactionFee, RestProvider } from "zksync";
import { TokenSymbol, Address } from "zksync/build/type... |
<reponame>wanghongyan/ckman-fe
import { isEmpty } from 'lodash-es';
import 'reflect-metadata';
import Vue, { ComponentOptions, CreateElement, PropOptions, VNode, WatchOptions, WatchOptionsWithHandler } from 'vue';
import { LIFECYCLE_HOOKS } from 'vue/src/shared/constants.js';
import { hasOwn } from './helpers/hasOwn';... |
<reponame>emptycoder/nativescript-signalr-core
import {BehaviorSubject} from 'rxjs';
import {SignalRCoreRHeaders} from "../signalr-core.common";
declare var WebSocket;
export class SignalrCore {
private isConnected: BehaviorSubject<any> = new BehaviorSubject<any>(null);
private _status: BehaviorSubject<Statu... |
/* eslint @typescript-eslint/no-explicit-any: off */
/**
* A sequence of atoms identified by atom identifiers.
*
* Across all replicas, a sequence is guaranteed to converge to the same value
* given all operations have been received in causal order.
*/
// Copied and modified from https://github.com/usecanvas/logoo... |
import React, { PureComponent } from 'react';
import {
Image,
ImageURISource,
StyleProp,
Text,
TextStyle,
TouchableOpacity,
View,
ViewStyle
} from 'react-native';
// @ts-ignore TODO: Update react-native-masked-text to support typing
import { TextInputMask } from 'react-native-masked-text';
import { styl... |
import { Injectable } from '@angular/core';
import { JsonApiService } from './json-api.service';
import { Observable, of } from 'rxjs';
import { OfflineService } from './offline.services'
import { archivedLeads } from '../models/archivedLeads.model';
import { ApiService } from './api.service';
const routes = {
arch... |
import { useNavigation } from '@react-navigation/native';
import React, { FC, useState } from 'react';
import {
Keyboard,
Pressable,
StyleSheet,
Text,
View,
Image,
} from 'react-native';
import { BasicButton } from '../components/BasicButton';
import { Input } from '../components/Input';
import { ScreenWrap... |
import React, { useState, useRef, useEffect } from 'react';
import styles from './Resizer.scss';
import { getHoveredDisplayBounds } from '../../utils/window';
const handleSize = 10;
const opposite: any = {
'top-left': 'bottom-right',
'top-right': 'bottom-left',
'bottom-right': 'top-left',
'bottom-left': 'top-... |
import {
HtmlMetaDescriptor,
LinkDescriptor,
Links,
LinksFunction,
LiveReload,
LoaderFunction,
Meta,
MetaFunction,
Outlet,
Scripts,
useCatch,
useLoaderData
} from 'remix';
import config from '~/config';
import globalLargeStylesUrl from '~/styles/global-large.css';
import globalMediumStylesUrl f... |
import * as mongoose from 'mongoose';
import filesToJson from './adapters/files.adapter';
import MongooseModels from './models/mongoose-models';
import mongoInit from './services/mongoose-connection.service';
import argv from './services/cli.service';
import getMitreData from './services/mitre-data.service';
import St... |
import { handleClick, HomeAssistant, computeDomain } from 'custom-card-helpers';
import {
css,
CSSResult,
customElement,
html,
LitElement,
property,
TemplateResult,
PropertyValues,
} from 'lit-element';
import {
GoogleHomeGridItemConfig,
GoogleHomeGridItemActionConfig,
} from '.... |
import React, { Component } from 'react';
import {
Frame,
GetSDK,
initComponents,
SceneComponent,
ISceneNode,
ComponentInteractionType,
orientedBoxType,
slotType,
OrientedBox,
IComponentEventSpy,
IInteractionEvent,
sdkKey,
} from '@mp/common';
import { AppState } from '../AppState';
import { Sce... |
import { ethers } from "ethers";
import { getAddresses } from "../../constants";
import { AnkhTokenContract, SAnkhTokenContract } from "../../abi/";
import { setAll } from "../../helpers";
import { createSlice, createSelector, createAsyncThunk } from "@reduxjs/toolkit";
import { JsonRpcProvider, StaticJsonRpcProvider ... |
<reponame>microsoft/flow2dts
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
/* @relayHash 21d594d051bec4d80410900460cda305 */
import { ConcreteRequest } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type Show2HoursTestsQueryVariables = {
showID: string;
};
export type Show2Ho... |
import { Location } from "history"
import React, { createContext, FC, useContext } from "react"
import { RouteComponentProps } from "react-router"
import { matchRoutes, RouteConfig } from "react-router-config"
import { Link, match } from "react-router-dom"
import { IStory, TBranchItem } from "story"
import { DataRoutes... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { XMessageComponent } from './message.component';
import { Component, DebugElement } from '@angular/core';
import { By } from '@angular/platform-browser';
import { XMessageModule } from '@ng-nest/ui/message';
import { XButtonModule } from... |
import {AuthenticationType} from '../../types';
import type {ExecutionContext} from '../../api_types';
import type {FetchRequest} from '../../api_types';
import type {FetchResponse} from '../../api_types';
import type {FormulaSpecification} from '../types';
import {FormulaType} from '../types';
import type {MetadataFor... |
<gh_stars>0
import List from "./List";
import FSymbol from "./Symbol";
import { getDefinition, getPropertyNames, NonDeclaredType, Type } from "./Util";
export class MemberInfo {
public name: string;
public index: number;
public declaringType: any;
public propertyType: any;
public unionFields: any[];
const... |
<filename>src/taskpaper/index.ts
'use strict';
import { Registrator } from '../app';
import Application from '../app/application';
// @flow
import { createHash } from 'crypto';
import { AlfredItemsSet } from '../alfred';
import { GetMainMenu, GetTasks, OpenApp, ResolveTaskItem } from '../events';
const APP_IDENTIFIE... |
<gh_stars>0
import { ILines } from '../../../../compiler.types';
import { hasChildNodes } from '../../../../../../../light-dom/node/state/has-child-nodes';
import { hasAttribute } from '../../../../../../../light-dom/attribute/has-attribute';
import { extractRXAttributes, IMappedAttributes } from '../helpers/extract-rx... |
import { useState, useEffect } from "react";
import { FaPlus, FaTrash } from "react-icons/fa";
import {
InputGroup,
Input,
Checkbox,
SelectPicker,
Panel,
TagGroup,
Tag,
PanelGroup,
IconButton,
Button,
Modal,
} from "rsuite";
import styled from "styled-components";
import { System, SystemEntity } f... |
/**
* This file is part of the drip-table project.
* @link : https://drip-table.jd.com/
* @author : <NAME> (<EMAIL>)
* @modifier : <NAME> (<EMAIL>)
* @copyright: Copyright (c) 2020 JD Network Technology Co., Ltd.
*/
import classnames from 'classnames';
import React from 'react';
import { DripTableColumnSc... |
import { Directive, Host, Input, ElementRef, HostBinding, HostListener, Renderer2, OnInit, OnChanges } from "@angular/core";
import { DateUtil, DatePrecision } from "../../../misc/util/internal";
import { SuiLocalizationService } from "../../../behaviors/localization/internal";
import { PopupTrigger } from "../../popu... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Red Hat. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-----------------------------------------------------------------------------... |
import {
Book,
createBookFromParseServerData,
ArtifactType,
} from "../model/Book";
import { axios } from "@use-hooks/axios";
import { getArtifactUrl } from "../components/BookDetail/ArtifactHelper";
import { getBloomApiUrl } from "../connection/ApiConnection";
const FileSaver = require("file-saver");
expo... |
<filename>packages/codegen/src/builder.ts
import {
Schema,
DeriveDefinition,
TypeDefinition,
CallDefinition,
Type,
PrimitiveType,
SpecialType,
LiteralType,
ListType,
ObjectType,
TupleType,
RecordType,
UnionType,
IntersectType,
NameType,
PrimitiveTypeEnum,
SpecialTypeEnum,
} from 'jc-sc... |
import { satoshisPerBTC } from './../../mobxstore/UnitsStore'
const btcNonBech = /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/
const btcBech = /^(bc1|BC1|[13])[a-zA-HJ-NP-Z0-9]{25,87}$/
const lnInvoice = /^(lnbcrt|lntb|lnbc|LNBCRT|LNTB|LNBC)([0-9]{1,}[a-zA-Z0-9]+){1}$/
const lnPubKey = /^[a-f0-9]{66}$/
/* testnet */
const btcN... |
/**
* 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 required by applicable law or agreed t... |
import * as tf from '@tensorflow/tfjs-node';
export function getConstants() {
const yolo_tiny_anchors1 = tf.div(tf.tensor([
[81, 82], [135, 169], [344, 319]], [3, 2], 'float32'), 416);
const yolo_tiny_anchors2 = tf.div(tf.tensor([[10, 14], [23, 27], [37, 58]], [3, 2], 'float32'), 416);
const yolo_tiny_... |
<reponame>tacerus/matrix-appservice-irc
import logger from "../logging";
import { IrcBridge } from "./IrcBridge";
import { IrcServer } from "../irc/IrcServer";
import { Queue } from "../util/Queue";
const log = logger("PublicitySyncer");
// This class keeps the +s state of every channel bridged synced with the RoomVi... |
import Url, { URLPart } from 'url-parse'
// Utilities
// -----------
export type Optional<T> = { [key in keyof T]?: T[key] }
// Timer
// -----------
/** 定时器时钟接口 */
export type TimerClock = {
/** 唯一ID */
id: symbol
/** 时间 */
time: number
/** 间隔执行 */
interval: number
/** 间隔回调 */
callback: (millisecond... |
import { ConsoleLogger } from '@nestjs/common'
import {
Args,
Field,
InputType,
Mutation,
Parent,
Query,
ResolveField,
Resolver
} from '@nestjs/graphql'
import { UserRole } from '@server/constants/enum.config'
import { CurrentUser } from '@server/decorators/current-user.decorator'
import... |
import { Random } from "koishi-utils";
function generateRawMaze<T extends string>(width: number, height: number, ringProb: number = 0, roomProb?: Record<T, number>) {
if (width < 2 || height < 2) {
throw Error("Height and width must be greater than 2");
}
width = width * 2 + 1;
height = height ... |
/*
* Please refer to the terms of the license
* agreement.
*
* (c) 2021 Feedzai, Rights Reserved.
*/
/// <reference types="cypress" />
/// <reference types="@testing-library/cypress" />
/// <reference types="../../../support" />
/**
* route-announcer.test.tsx
*
* @author <NAME> <<EMAIL>>
* @since 1.0.0
*/
imp... |
import chalk from 'chalk';
import fs from 'fs';
import rimraf from 'rimraf';
import shell from 'shelljs';
import path from 'path';
import nodePlop, { PlopGenerator as PG } from 'node-plop';
import { BACKUPFILE_EXTENSION } from '../generators/plopfile';
import { ComponentProptNames } from '../generators/component';
imp... |
import React from "react";
import { NotificationManager } from "react-notifications";
import { serveFile } from "./utils";
import SubmitButton from "./subcomponents/submitbutton";
import BackButton from "./subcomponents/backbutton";
import ColumnSpecification from "./subcomponents/columnspecification";
import InputFil... |
<gh_stars>1-10
import { ParameterDefinition } from "@typescript-eslint/scope-manager";
import { TSESTree } from "@typescript-eslint/utils";
import { getModuleScope } from "../../ast/get-module-scope";
import {
isArrayPattern,
isArrowFunctionExpression,
isCallExpression,
isFunctionDeclaration,
isFunctionExpre... |
<gh_stars>0
import { Inject, Injectable, OpaqueToken, Optional } from '@angular/core';
import { Http as HttpAngular, Response } from '@angular/http';
import { Config } from '@mbamobi/configuration';
import { Request } from '@mbamobi/url-resolver';
import 'rxjs/add/observable/defer';
import 'rxjs/add/observable/throw';
... |
import sourceIcon from '../assets/icon-ads.png'
import sourceLogo from '../assets/source-ads.png'
import { POLICY_ADS_OAUTH_SERVICE } from '../bib_config'
import { DataError, encodeQueryData, QueryError } from '../bib_lib'
import { api_bucket } from '../leaky_bucket'
import { AdsToPaper } from './AdsFromJson'
import { ... |
import { combine, err, ok, Result } from 'neverthrow'
import {
BytesT,
Ins_DOWN,
Ins_END,
Ins_HEADER,
Ins_LDOWN,
Ins_MSG,
Ins_SIG,
Ins_SYSCALL,
Ins_UP,
Ins_VREAD,
Ins_VDOWN,
InstructionT,
InstructionType,
SubstateIdT,
TXSig,
} from './_types'
import { Bytes } from './bytes'
import { TxSignature } from '.... |
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
import { ElementDefinition, SearchParameter, StructureDefinition } from '@medplum/fhirtypes';
import { capitalize } from './utils';
/**
* List of property types.
* http://www.hl7.org/fhir/valueset-defined-types.html
* The list here includes additions found from StructureDefinition resources.
*/
export enum Propert... |
import React, { forwardRef, useRef, useState, useCallback } from "react";
import cn from "classnames";
import { Dialog, DialogProps } from "@react-md/dialog";
import { bem, LabelRequiredForA11y } from "@react-md/utils";
import { DEFAULT_SHEET_TIMEOUT, DEFAULT_SHEET_CLASSNAMES } from "./constants";
type AllowedDialogPr... |
<reponame>electrovir/pdf-text-reader
import {getDocument} from 'pdfjs-dist/legacy/build/pdf';
import {
DocumentInitParameters,
PDFDataRangeTransport,
PDFPageProxy,
TextItem,
TypedArray,
} from 'pdfjs-dist/types/display/api';
export type Page = {
lines: string[];
};
export type ProgressData = {... |
import { fixedSVD, transpose } from './svd-fix'
export interface MCAOptions {
skipBenzecri:boolean
skipGreenacre:boolean
tolerance:number
numComponents:number
// pass in a value here to do a self integrity check on SVD-js. if > 0, then do a sanity check
svdTolerance:number
epsilon:number
... |
import createDebugLogger from "debug"
export enum ColumnType {
Any = "any",
Array = "array",
Boolean = "boolean",
Date = "date",
Enum = "enum",
JSON = "json",
Number = "number",
Object = "object",
String = "string"
}
interface ObjectShape {
[propName: string]: ColumnDescription<any, any, any, any>... |
<gh_stars>0
// tslint:disable:no-submodule-imports ban-types
import * as cv from 'class-validator'
import { ConstraintMetadata } from 'class-validator/types/metadata/ConstraintMetadata'
import { ValidationMetadata } from 'class-validator/types/metadata/ValidationMetadata'
import * as _ from 'lodash'
import { SchemaObje... |
<filename>src/display/composer/composer.ts
import $ = require("jquery");
import { Person, mixIds } from "../../data";
import { PersonNode, HorizontalLink, VerticalLink } from "../elements";
import style from "../../gen/style-defs";
import { Layout, Solver } from "../../layouts";
import { Viewport } from "./viewport";
i... |
<gh_stars>1-10
import { Engine } from './engine';
interface Vec3 {
x: number,
y: number,
z: number,
}
interface GreekVec3 {
alpha: number;
beta: number;
gamma: number;
}
export type MobileEventType
= 'touchstart'
| 'touchmove'
| 'touchend'
| 'touchcancel'
| 'devicemotio... |
import { Range, XYZ } from '../collections'
export function *walk(xInclusiveRange: Range<number>, yInclusiveRange: Range<number>, zInclusiveRange: Range<number>): IterableIterator<XYZ> {
for (var x = xInclusiveRange.min; x <= xInclusiveRange.max; x++)
for (var y = yInclusiveRange.min; y <= yInclusiveRange.max;... |
import { BaseArgs } from "../types";
import chalk from "chalk";
import { spinnerWithText, stopSpinner } from "./spinner";
import { Client, Model } from "@core/types";
import { spawn } from "child_process";
import { isAlive, stop, dispatchCore, fetchState } from "@core/lib/core_proc";
import { getCoreProcAuthToken } fro... |
<reponame>NotWoods/wheres-the-beep
import * as THREE from 'three';
import { domeRadius } from '../consts';
import { IndicatorCone } from './cone';
import { ControllerManager } from './controller';
import { Dome } from './dome';
import { WorkerThread } from './push-from-worker';
import { Score } from './score';
import {... |
<gh_stars>0
import { checkQuery } from "./classes/Functions";
import {
defaultSettings,
getSettings,
setSettings,
Settings,
} from "./classes/Settings";
import { undoIcon } from "./config/icons";
import { ELP } from "./config/main";
import checkQueryTest from "./tests/checkQuery";
import "./css/settings.scss";
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.