text stringlengths 3.3k 33k |
|---|
<gh_stars>1-10
import { cli } from 'cli-ux'
import chalk from 'chalk'
import { ethers } from 'ethers'
import * as emoji from 'node-emoji'
import * as fs from 'fs-extra'
import * as path from 'path'
import axios from 'axios'
import BigNumber from 'bignumber.js'
import { chainNames, etherscanDomains, chainIds } from '@... |
<gh_stars>0
import * as fs from "fs";
import * as path from "path";
import { CONFIG_FILE_NAME } from "./constants";
import { memoize } from "./memo";
import { camelCase } from "lodash";
// _7113_testB3_testA24
const MAX_LABEL_NAME_LENGTH = 40;
export type FileConfig = {
key: string;
version?: string;
};
export t... |
/*
* Copyright 2019 IBM Corporation
*
* 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 ... |
<reponame>joelyancey/neuroglancer
/**
* @license
* Copyright 2021 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... |
<reponame>inyutin-maxim/grammarkdown
/*!
* Copyright 2020 <NAME> (<EMAIL>)
*
* 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.... |
<reponame>addaleax/mongosh
import { MongoshInternalError, MongoshWarning } from '@mongosh/errors';
import { redactPassword } from '@mongosh/history';
import i18n from '@mongosh/i18n';
import { bson } from '@mongosh/service-provider-core';
import { CliOptions, CliServiceProvider, MongoClientOptions } from '@mongosh/serv... |
<gh_stars>1-10
import {
EditorState,
ContentBlock,
ContentState,
CharacterMetadata,
} from "draft-js"
import { List } from "immutable"
import { ATOMIC, UNSTYLED } from "../constants"
import {
preserveAtomicBlocks,
resetAtomicBlocks,
removeInvalidAtomicBlocks,
} from "./atomic"
import {
BlockTextRule,
... |
import { markdownCompiler } from './markdownCompiler';
import * as vscode from 'vscode';
import * as path from 'path';
import * as u from 'unist-builder';
import * as html from 'remark-html';
import * as parse from 'remark-parse';
import * as visit from 'unist-util-visit';
import * as unified from 'unified';
import * a... |
<filename>packages/runner/src/base/util.ts<gh_stars>0
import { RPC } from "ckb-js-toolkit";
import { HexString, Hash, Indexer } from "@ckb-lumos/base";
import TOML from "@iarna/toml";
import fs from "fs";
import path from "path";
import { GodwokenScriptsPath } from "./types/gw";
export function asyncSleep(ms = 0) {
... |
import {webLink} from "../util/webLink";
import { CronJob } from "cron";
import {PendingApprovalProjectDocument ,PendingApprovalProjectModel} from "../models/PendingApprovalProjectModel";
import {MolochProjectInfoModel,MolochProjectInfoDocument, ContractInfo} from "../models/MolochProjectInfoModel";
import {ContractJs... |
<filename>src/cache/cache.ts<gh_stars>0
import { existsSync } from 'fs';
import * as path from 'path';
import { Context } from '../core/context';
import { IBundleContext } from '../moduleResolver/bundleContext';
import { createModule, IModule, IModuleMeta } from '../moduleResolver/module';
import { createPackageFromCac... |
import { LitElement, html, customElement, property, css } from 'lit-element'
import '@vaadin/vaadin-date-picker'
import '@doubletrade/lit-datepicker'
const today = new Date()
const tomorrow = new Date(today)
tomorrow.setDate(tomorrow.getDate() + 1)
/**
* Direct Search Element for White Label Websites
*/
@customElem... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
import _ = require('lodash');
import { EventEmitter } from 'events';
import * as traverse from 'traverse';
import * as dbg from 'debug';
const debug = dbg... |
/** Resource Dialog Components **
********************************/
import {Component, OnInit, Inject} from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { Convert } from '../../lib/convert'
import { AppInfo } from '../../app.info'
/********* ResourceDialog **********
da... |
<reponame>DostalTomas/angularjs-splitter<filename>src/angularjs-splitter/splitter.component.ts
import {
IAugmentedJQuery,
ICompileService,
IDocumentService,
IOnDestroy,
IPostLink,
IScope,
ITranscludeFunction
} from 'angular';
import {PaneComponentController} from './pane.component';
import b... |
/**
* Created by d8q8 on 2015/1/19.
* @class JSSDK
* @constructor
**/
interface SignPackage {
appId:string;
nonceStr:string;
timestamp:number;
signature:string;
url:string;
}
class JSSDK extends BaseScreen {
public CLASS_NAME:string = "JSSDK";
private signPackage:SignPackage;
... |
// Copyright 2021 Prescryptive Health, Inc.
import React, { FunctionComponent, useState, useRef, useEffect } from 'react';
import {
View,
StyleProp,
ViewStyle,
Animated,
Dimensions,
Easing,
Platform,
ActivityIndicator,
Modal,
Keyboard,
ScrollView,
} from 'react-native';
import { smartpriceModalSty... |
import React, { Component } from 'react';
import { isNil } from 'lodash';
import { Grid, Button, Header, Segment, Image, Table } from 'semantic-ui-react';
import { toast } from 'react-toastify';
import * as moment from 'moment';
import { History } from 'history';
import { remote } from 'electron';
import { Observable }... |
import * as React from 'react';
import styled from 'styled-components';
import { Tabs } from '../common/Tabs';
import { SDGArray, deviceWidth } from '../../lib/commonData';
import MediaQuery from 'react-responsive';
import { Link, NavLink } from 'react-router-dom';
import { getCountryName } from '../../utils/formatters... |
<reponame>vanackej/risco-lan-bridge
/*
* Package: risco-lan-bridge
* File: Zones.js
*
* MIT License
*
* Copyright (c) 2021 TJForc
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in ... |
/*
* 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 { IScopedClusterClient } from 'kibana/server';
import {
firstNonNullV... |
// Copyright Node.js contributors. All rights reserved. MIT License.
import { Buffer } from "../buffer.ts";
import type Duplex from "./duplex.ts";
import { EventEmitter } from "../events.js";
import type Readable from "./readable.ts";
import type Writable from "./writable.ts";
import type { ReadableState } from "./read... |
<filename>diskreet-blockchain/ts/session/sending/MessageSender.ts
// REMOVE COMMENT AFTER: This can just export pure functions as it doesn't need state
import { RawMessage } from '../types/RawMessage';
import { SignalService } from '../../protobuf';
import { MessageEncrypter } from '../crypto';
import pRetry from 'p-r... |
<reponame>emitapp/emit-server-public
//These were the first cloud functions written for Emit
//We've gotten better since this, so if there are painful to work with, sorry!
import * as functions from 'firebase-functions';
import {handleError, successReport, errorReport} from './utils/utilities';
import admin = require('... |
/*
* The copyright in this software module is being made available under the BSD License, included
* below. This software module may be subject to other third party and/or contributor rights,
* including patent rights, and no such rights are granted under this license.
*
* Copyright (c) 2016, Orange
* All rights reserv... |
<reponame>akuntal/ng-xotb<gh_stars>1-10
import {
Directive,
Input,
ElementRef,
TemplateRef,
ViewContainerRef,
OnDestroy,
OnChanges,
SimpleChanges,
Output,
EventEmitter,
Renderer2,
HostListener
} from '@angular/core';
import {
OverlayRef,
Overlay,
FlexibleConnectedPositionStrategy
} from '@... |
import { Input } from 'antd';
import Form from 'antd/lib/form/Form';
import FormItem from 'antd/lib/form/FormItem';
import { ModalAntd } from 'app/components/ModalAntd';
import { StatisticDetail } from 'app/components/StatisticDetail';
import { useFirebaseRemove } from 'app/hooks/useFirebaseRemove';
import { useIframeL... |
#!/usr/bin/env node
import fs from 'fs';
import path from 'path';
const COLORS = {
reset: '\x1b[0m',
fgRed: '\x1b[31m',
fgYellow: '\x1b[33m'
}
const EMPTY_STR = '';
const NO = 'n';
const YES = 'y';
const INPUT_ARGS = {
params: '--params',
src: '--src',
dest: '--dest',
ext: '--ext',
debug: '--debug',... |
/* eslint-disable indent */
import { oneLine, stripIndents } from "common-tags";
import { Message, MessageEmbed } from "discord.js";
import pino from "pino";
import {
ButtonStyle,
CommandContext,
ComponentButton,
ComponentContext,
ComponentType,
} from "slash-create";
import { getCurrentTWAGame, setCurrentTWA... |
#!/usr/bin/env node
import os from "os";
import { resolve } from "path";
import semver from "semver";
import { Config, ConfigError } from "./config";
import { colorify } from "./log";
import type { NpmLogin } from "./npm";
import { NPM } from "./npm";
import { getDateTime } from "./utils";
function showHelp() {
... |
<filename>src/light.ts
// import { Service, Characteristic, Accessory } from "hap-nodejs";
import { Attributes, EMPTY_ATTRIBUTES, Configuration, ConcreteLightService } from "./lightservice";
import { Specs, MODEL_SPECS, EMPTY_SPECS } from "./specs";
import { Device } from "./yeedevice";
import { ColorLightService } fro... |
<reponame>lexsf/faros-community-edition
import Analytics from 'analytics-node';
import retry from 'async-retry';
import axios, {AxiosInstance} from 'axios';
import {program} from 'commander';
import fs from 'fs-extra';
import handlebars from 'handlebars';
import {find} from 'lodash';
import os from 'os';
import path fr... |
<filename>src/config/firebase.ts
import firebase, { firestore, storage } from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
import 'firebase/storage';
import 'firebase/performance';
import { prod } from './shared';
type ConfigModel = Record<'appId' | 'apiKey' | 'authDomain' | 'databaseURL' | 'pr... |
<filename>src/graylog.ts
import zlib from 'zlib';
import crypto from 'crypto';
import dgram from 'dgram';
import os from 'os';
import { promisify } from 'util';
import { GraylogGelfPayload, GraylogLevelEnum, GraylogGelfAdditionalField } from './definitions';
import { EventEmitter } from 'events';
import { ConnectionStr... |
import $ from 'jquery';
import M from 'materialize-css';
import 'STYLES/notes.scss';
import { MapStringTo } from 'SCRIPTS/types/Generic';
import {
workerStates,
clientActions,
NotePackage,
WorkspacePackage,
} from 'SCRIPTS/notes/worker-client-api';
import { initMarkdownIt, renderMarkdown } from 'SCRIPTS/notes/... |
import { useContext, useEffect, useRef, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { UserDataType } from '../../types/userData';
import * as ProfileAPI from '../../lib/api/profile';
import * as AuthAPI from '../../lib/api/auth';
import styled from 'styled-components';
imp... |
<gh_stars>1-10
import { Component, OnInit, ViewChild, ChangeDetectorRef } from '@angular/core';
import { GoogleAuthService } from '../services/google-auth.service';
import { ChessboardComponent } from '../chessboard/chessboard.component';
import { DataService } from '../services/data.service';
import { RecordService } ... |
import { Connection, ConnectionPool } from '..'
import { SchemaError, Parameter, Query } from '../../model'
import { Helper } from '../../manager/helper'
import { MappingConfig } from '../../manager'
// https://oracle.github.io/node-oracledb/doc/api.html#getstarted
// https://github.com/oracle/node-oracledb/tree/main... |
import { BoxProps, makeStyles, useTheme } from "@material-ui/core";
import classNames from "classnames";
import Alert from "components/Alert";
import Map from "components/Map";
import MapSearch from "components/MapSearch";
import {
GeoJSONSource,
LngLat,
MapMouseEvent,
MapTouchEvent,
} from "maplibre-gl";
impor... |
<gh_stars>0
/*
* Copyright 2017-18 IBM Corporation
*
* 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 la... |
<filename>src/app/pages/project/milestone/view-milestone/view-milestone.component.ts<gh_stars>1-10
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Milestone } from '../../../../shared/models/milestones/milestone';
import { TestR... |
import Image from "next/image";
import { Container, Layout } from "@/components";
import { COMMITTEE_MEMBERS, CommitteeMember } from "@/data";
const Member = ({ name, position, headshot, socials }: CommitteeMember): JSX.Element => (
<li>
<div className="space-y-4">
<div>
{headshot && (
<... |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
import { EuiDataGrid, Eui... |
/**
* deep copy
* @param {Object} p
* @param {Object} c
*/
function deepCopy(p: object, c: object = {}): object {
for (let i in p) {
if (typeof p[i] === 'object') {
c[i] = (p[i].constructor === Array) ? [] : {};
deepCopy(p[i], c[i]);
} else if (typeof p[i] === 'function') {
c[i] = p[i]... |
<gh_stars>0
// @ts-ignore
import difflib from 'difflib';
import * as itertools from 'iter-tools';
const { zip, zipLongest } = itertools;
export const isAcronym = (word: string) =>
// """Checks is the word is all caps (acronym) and/or contain numbers
// Parameters
// ----------
// word : str
// The word ... |
import { poseSimilarity } from "posenet-similarity";
import { Pose } from "posenet-similarity/dist/types";
import { getBody } from "./figure";
import { bodyParts } from "./fitness_constants";
interface PoseInfo {
body: Float32Array,
stamp: number
}
export class PoseSeries {
private cursorIdx: number = -1;... |
import debugFn from 'debug';
const debug = debugFn('peanar:worker');
import util from 'util';
import 'colors';
import { Transform, TransformCallback } from 'stream';
import PeanarApp, { IPeanarRequest, IPeanarJob } from './app';
import { IDelivery } from 'ts-amqp/dist/interfaces/Basic';
import PeanarJob from './job';... |
import { h, Component, render } from 'preact';
import { Knob } from './ui/Knob'
import { Select } from './ui/Select'
import { Fader } from './ui/Fader'
import Synth101 from '.';
// TODO put these in one spot and export them
let waves = ["sine", "square", "sawtooth", "triangle"]
let lfoWaves: OscillatorType[] = ["tria... |
<filename>client/XQDebugger/xqyRuntime.ts<gh_stars>10-100
import { EventEmitter } from 'events'
import { ResultProvider } from 'marklogic'
import { InitializeRequestArguments } from './xqyDebug'
import { sendXQuery, MarklogicClient, MlClientParameters } from '../marklogicClient'
import { parseString } from 'xml2js'
imp... |
import { Grid } from '../core';
import customEvent from '../custom-event';
import {
AnnotatedMouseEventUnion,
EventUnion,
GridCustomMouseEventTypes,
IAnnotatedEvent,
IAnnotatedMouseEvent,
IGridCustomMouseEvent,
IGridDragStartEvent,
ILoopEvent,
isAnnotatedMouseEvent,
isAnnotatedMouseEventOfType,
} fr... |
import React from 'react';
import styled from '@emotion/styled';
import {addErrorMessage, addSuccessMessage} from 'app/actionCreators/indicator';
import {openModal} from 'app/actionCreators/modal';
import {
installSentryApp,
uninstallSentryApp,
} from 'app/actionCreators/sentryAppInstallations';
import Button from... |
import React, { useEffect, useState } from 'react';
import { observer } from 'mobx-react';
import Editor from '@uiw/react-codemirror';
import { javascript } from '@codemirror/lang-javascript';
import { pick, get } from 'lodash';
import { useUpdateEffect } from 'react-use';
import cs from 'classnames';
import { toJS } f... |
<reponame>CyanoHao/ot-builder
import { Data } from "@ot-builder/prelude";
type DicingPlan = { cls: number; from: null | number; inSet: boolean };
export interface DicingStore<X, Y, D> {
get(x: X, y: Y): Data.Maybe<D>;
getByClass(cx: number, cy: number): Data.Maybe<D>;
getXClassDef(): X[][];
getYClassD... |
<reponame>MadCatX/molql
/*
* Copyright (c) 2017 MolQL contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
*/
const enum SSF {
None = 0x0,
// category
DoubleHelix = 0x1,
Helix = 0x2,
Beta = 0x4,
Turn = 0x8,
// category variant
LeftHanded =... |
import { cloneDeep, isEqual } from 'lodash'
import Delta from '../delta'
import { LeafBlot } from 'parchment'
import CursorBlot from '../blots/cursor'
import Block, { bubbleFormats } from '../blots/block'
import Break from '../blots/break'
import TextBlot from '../blots/text'
const ASCII = /^[ -~]*$/
export default c... |
import { FontLoader } from "./fonts/FontLoader";
import { BravuraFont } from "./fonts/bravura";
import { Theme } from "store/slices/theme";
import Page from "./Page";
export interface ColorScheme {
highColor: string,
noteColor: string,
noteErrColor: string,
mainColor: string,
porteLineColor: string,
ghostC... |
import clsx from "clsx";
import propTypes from "prop-types";
import { v4 as uuid } from "uuid";
import React, { PureComponent, createRef, CSSProperties } from "react";
import "styles/Styles.scss";
import StableListUtils from "./utils";
class List extends PureComponent<StableListProps, StableListState> {
private uti... |
// https://www.npmjs.com/package/react-typing-game-hook
// modified this typing hook for our game
import { Reducer, useReducer } from 'react';
enum ActionType {
RESET = 'RESET',
END = 'END',
TYPINGINSERT = 'TYPING/INSERT',
TYPINGDELETE = 'TYPING/DELETE',
SETCURRENTINDEX = 'SET/CURRENTINDEX',
}
type ActionI... |
<gh_stars>0
import moment, { Moment } from 'moment';
import { Frame, Page } from 'puppeteer';
import { BaseScraperWithBrowser, LoginOptions, LoginResults } from './base-scraper-with-browser';
import {
clickButton, elementPresentOnPage, pageEval, pageEvalAll, setValue, waitUntilElementFound,
} from '../helpers/element... |
import Wall from './agency/steering/wall';
import Agent from './agency/agent';
import CellSpacePartition, { Cell } from './agency/math/cell-space-partition';
import { createCircleVertices, isoscelesInscribedInCircle } from './agency/math/geometry';
import Obstacle from './obstacle';
import Wander from './agency/steerin... |
<gh_stars>1-10
import slugify from 'slugify';
import {
Collection,
CollectionAuthor,
CollectionPartner,
CollectionPartnershipType,
CollectionStatus,
CollectionStory,
CurationCategory,
IABCategory,
Image,
Prisma,
PrismaClient,
} from '@prisma/client';
import {
CollectionPartnerAssociation,
Coll... |
#!/usr/bin/env node
import { writeFile } from 'fs';
import { normalize, resolve } from 'path';
import axios, { AxiosResponse } from 'axios';
import yargs from 'yargs';
import stringify from 'csv-stringify';
import { XReport, Geometry, Association } from './xreport';
import { XReports } from './xreports';
const baseU... |
import { Button } from "primereact/button";
import { Dialog } from "primereact/dialog";
import { InputText } from "primereact/inputtext";
import { InputTextarea } from "primereact/inputtextarea";
import { Toast } from "primereact/toast";
import { classNames } from "primereact/utils";
import React, {
ChangeEvent,
Mo... |
/*
Date Format 1.2.3
(c) 2007-2009 <NAME> <stevenlevithan.com>
http://blog.stevenlevithan.com/archives/date-time-format
MIT license
Includes enhancements by <NAME> <scott.trenda.net>
and <NAME> <cixar.com/~kris.kowal/>
Accepts a date, a mask, or a date and a mask.
... |
import core = require('@actions/core');
import path = require('path');
import * as fs from "fs";
var shell = require('shelljs');
var minimatch = require('minimatch');
export function cp(source: string, dest: string, options?: string, continueOnError?: boolean): void {
if (options) {
shell.cp(option... |
<filename>sha256.ts
/** Initialization vector */
const IV = [
0x6a09e667,
0xbb67ae85,
0x3c6ef372,
0xa54ff53a,
0x510e527f,
0x9b05688c,
0x1f83d9ab,
0x5be0cd19,
] as const;
/** Round constants */
// deno-fmt-ignore
const K = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x9... |
<filename>launch/index.ts<gh_stars>0
import fs from 'fs'
import shell from 'shelljs'
import dotenv from 'dotenv'
import config from './config'
import { blake2AsU8a } from '@polkadot/util-crypto'
import { stringToU8a, bnToU8a, BN, u8aConcat, u8aToHex } from '@polkadot/util'
import { decodeAddress, encodeAddress } from '... |
<filename>mean-server/mean-web/src/app/charts/chart-provincias/chart-provincias.component.ts
import { Component, OnInit } from '@angular/core';
import { Chart } from 'node_modules/chart.js';
import { DataApiService} from 'src/app/services/data-api.service';
import { Provincias } from "src/app/models/provincias.model";
... |
import type {
RvdChildrenManager,
RvdChild,
RvdElementNode,
RvdStaticChild,
RvdCreatedFragment,
RenderElementCallback,
RvdFragmentNode,
RvdComponentNode
} from '../../shared/types'
// noinspection ES6PreferShortImport
import { RvdChildFlags, RvdNodeFlags } from '../../shared/flags'
import { isObservable... |
import {
copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync
} from 'fs';
import { copySync } from 'fs-extra';
import * as path from 'path';
import * as _ from 'lodash';
import { spawnSync } from 'child_process';
import * as rimraf from 'rimraf';
import * as prettier from 'prettier';
interface Depen... |
import { resolve, join } from 'path'
import webpack from 'webpack'
import merge from 'webpack-merge'
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import TerserPlugin from 'terser-webpack-plugin'
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'
import HtmlWebpackPlugin from 'html-webpack-plugi... |
// Type definitions for interact.js
// Project: http://interactjs.io/
// Definitions by: <NAME> <feature-space.com>
// <NAME> <taye.me>
import * as drag from '@interactjs/actions/drag'
import * as drop from '@interactjs/actions/drop'
import * as gesture from '@interactjs/actions/gesture'
import * as r... |
import 'reflect-metadata';
import { basename, dirname, isAbsolute, join, resolve } from 'path';
import { existsSync, readFileSync, unlinkSync, writeFileSync } from 'fs';
import { config } from 'dotenv';
import { get, has, merge, set, unset } from 'lodash';
import { DirectoryStorage, DirectoryStorageOptions } from './Di... |
<filename>src/index.ts
import { saveAs } from 'file-saver';
import Blob from 'blob';
type ByDay = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA';
interface RecurrenceeRule {
freq: 'YEARLY' | 'MONTHLY' | 'WEEKLY' | 'DAILY';
until: string;
count: number;
interval: number;
byday: ByDay[];
}
export const ics =... |
<reponame>simsapa/simsapa-electron-vue-legacy
/* eslint @typescript-eslint/camelcase: 0 */
// --- Author -----------------------------------------------------------
/////////////////////////////////////////////////////////////////////////
export interface Author {
id: number | null;
uid: string;
blurb: string;
... |
var rolls = [0]; //Array of which numbers are rolled, rolls[0] is 1 and [19] is 20
var dieSelected = 0; //initialized variable for which die is selected
var myChart;
var totRolls;
var ctx; //initialize chart
function init(){
dieSelected = 3; //defaults to d4
document.getElementById("rollBox") //get input box
... |
import React from "react"
import useId from "../hooks/useId"
const JetbrainsLogo: React.FC = (props) => {
const id = useId()
return (
<svg fill="none" viewBox="0 0 121 131" {...props}>
<path
fill={`url(#jetbrains1-${id})`}
d="M118.62 71.8a4.68 4.68 0 00-6.2-7l-83.8 45.9a10.07 10.07 0 00-... |
/**
* Copyright (c) 2019 <NAME>
* Copyright (c) 2019 <NAME>
*
* This software is proprietary and owned by <NAME>.
*
* This software was based on https://github.com/wrsulliv/NodeStarter,
* licensed under the MIT license.
*/
// TODO-CRITICAL-ALL: Convert from Joi to Yup validation for isomorphic JS.
import {... |
import * as dotenv from 'dotenv';
import IConfig from './interfaces/IConfig';
import Environment from './utils/Environment';
if (Environment.isDev(process.env.NODE_ENV)) {
dotenv.config();
}
const config: IConfig = {
endpoints: {
files: '/files',
health: '/healthz',
readiness: '/readiness'
},
file... |
/**
* @license
* Copyright <NAME>. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://rilke.ist/license
*/
import { Path, normalize , strings } from '@angular-devkit/core';
import { dasherize } from '@angular-devkit/core/src/uti... |
<filename>src/ParserData.ts
import {
Action,
Dictionary,
Text,
MagicVariable,
Variable,
List,
ContentItemFilter,
AdjustOffset,
RawParameter
} from "./OutputData";
import { ConvertingContext } from "./Converter";
import { Position } from "./Production";
import { CoercionTypeClass } from "./WFTypes/Types";
impo... |
<reponame>shayeLee/better-scroll<filename>packages/zoom/src/index.ts
import BScroll, { Behavior, TranslaterPoint } from '@better-scroll/core'
import propertiesConfig from './propertiesConfig'
import {
getDistance,
ease,
between,
offsetToBody,
getRect,
DOMRect,
style,
EventEmitter,
extend,
getNow,
... |
import { fromEvent, from, scheduled, asyncScheduler, merge, ConnectableObservable, Subscription, of } from 'rxjs'
import { tap, mergeMap, concatMap, map, mergeAll, publishReplay, mapTo, filter, catchError } from 'rxjs/operators'
import { FileDraggerOptions, TPromise, UploaderOptions } from '../../interface'
import { Lo... |
import {DiffNumStats} from '../model/models';
import {isGitProject, noSpacesProjectDir} from '../Util';
import {CacheManager} from '../cache/CacheManager';
import {execCmd} from '../managers/ExecManager';
const ONE_HOUR_IN_SEC = 60 * 60;
const ONE_DAY_IN_SEC = ONE_HOUR_IN_SEC * 24;
const cacheMgr: CacheManager = Cach... |
enum AdvertiseUntil {
none = 0,
first_hover,
infinite
}
interface GalleryOptions {
id?: string,
class?: string[],
hover_scroll: boolean,
click_full_screen: boolean,
click_change: boolean,
hover_zoom: boolean,
hover_zoom_level: number,
click_borders: number[],
advertise_un... |
<filename>src/app/db-handler/db-handler.component.ts
import { Component, OnInit } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from 'angularfire2/firestore';
import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import {... |
import React, { useEffect, useState } from "react"
import { AllContentsQql } from "../../interfaces/Contents"
import styled from "styled-components"
import Masonry from "react-masonry-css"
import { AllPostsGql } from "../../interfaces/Post"
import useMedia from "use-media"
import ContentBlock from "./ContentBlock"
impo... |
import * as test from "tape";
import caseOf from "../../function/caseOf";
import compose from "../../function/compose";
import fmap from "../../function/fmap";
import id from "../../function/id";
import Either from "../Either";
import Maybe, { eitherToMaybe, prop, pick } from ".";
// const laws: any = require("laws");... |
import {
D3DragEvent,
HierarchyPointLink,
HierarchyPointNode,
Selection,
drag,
hierarchy,
select,
tree as treeD3,
} from "d3"
import { UILink } from "./collapsible-tree-chart-ui-link"
import { UINode } from "./collapsible-tree-chart-ui-node"
import * as styles from "./collapsible-tree.module.css"
impor... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) 2020 <NAME>
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
... |
import * as core from "./core";
import { show as stringify } from "./stringify";
// Formality's runtime works by compiling normal Terms to a
// Runtime Terms (RtTerm), reducing, and decompiling back.
// A RtTerm is a map `{mem:[U32], ptr:U32}` containing the
// term data in a compressed form. It exists in a context of... |
/**
@license
Copyright 2018 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 applicable law or agr... |
import Link, { LinkProps } from 'next/link'
import React, { forwardRef, Fragment, useCallback, useState } from 'react'
import { bindActionCreators, Dispatch } from 'redux'
import { useRouter } from 'next/router'
import { connect } from 'react-redux'
import clsx from 'clsx'
import debounce from 'lodash.debounce'
import... |
import React, { FC, useEffect, useState } from "react";
import { Dropdown } from "pinus-ui-library";
import {
getPeopleKudos,
getPeopleFromKudoboardByYear,
} from "src/utils/contentful/kudo";
import ContentCard from "../../components/Kudos/ContentCard";
import styles from "./styles.module.css";
import SeniorCard, {... |
import React, { Component } from 'react'
import {
View,
Text,
StyleSheet,
TouchableOpacity,
SafeAreaView,
StatusBar,
Image,
ScrollView,
Platform,
ImageBackground,
} from 'react-native'
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp,
} from 'react-native-responsive-screen'
import ... |
/**
* @license
* Copyright 2016-2020 Balena Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... |
// Copyright 2020 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 in ... |
import { Subject, Observable, Subscription } from 'rxjs';
import ServiceElectronIpc, { IPCMessages, Subscription as IPCSubscription } from '../services/service.electron.ipc';
import { ControllerSessionTabSearch } from './controller.session.tab.search';
import { FilterRequest, IFilterUpdateEvent } from './controller.ses... |
import debug from './debug'
import './Symbol.asyncIterator'
import { Schema } from 'tdv'
import AWS from 'aws-sdk'
import { DocumentClient } from 'aws-sdk/clients/dynamodb'
const log = debug('db')
export const $put = Symbol.for('put')
export const $get = Symbol.for('get')
export const $query = Symbol.for('query')
exp... |
import { EventService, UserService, TwitchService, EventLogService, EventAggregator } from "../services";
import { AchievementType, IUser } from "../models";
import ParticipationEvent, { EventState } from "../models/participationEvent";
import { EventParticipant } from "../models/eventParticipant";
import { Logger, Log... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.