text stringlengths 3.08k 15.5k |
|---|
import React, { useEffect, memo } from "react";
import {
View,
TouchableOpacity,
StyleSheet,
Dimensions,
ScrollView,
Alert,
LayoutAnimation,
Platform
} from "react-native";
import { Text } from "../styles/components"
import PropTypes from "prop-types";
import { systemWeights } from "react-native-typography";
im... |
<reponame>wxiain/Im
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import {
IsInt,
IsEmail,
IsString,
IsEnum,
MinLength,
MaxLength,
IsNotEmpty,
IsUrl,
IsMobilePhone,
IsEmpty,
IsObject,
ValidateNested
} from 'class-validator';
import { Pag... |
import { camelCase } from 'camel-case'
import { Element, Parent, Properties, Text } from 'hast'
import {
defaultOpts,
defaultOptsKeepBaseURL,
defaultOptsKeepBaseURLByTagName,
defaultTrimBaseURLTagNames,
RehypeImageSaltOptions,
RehypeImageSaltOptionsNormalized
} from '../image-salt.js'
import { AttrsResultFr... |
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* 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 app... |
import { Injectable } from '@angular/core';
import { LocalStorage } from '@ngx-pwa/local-storage';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, Route } from '@angular/router';
import { Observable } from 'rxjs';
// import * as jwtDecode from 'jwt-decode';
// AWS
import { AmplifyService } ... |
<filename>stronghold-cli/src/commands/accounts/pay.ts
import cli from 'cli-ux'
import { flags } from '@oclif/command'
import { StrongholdCommand } from '../../command'
import { RemoteFlags } from '../../flags'
import {
displayStrnAmountWithCurrency,
strnToOre,
oreToStrn,
isValidAmount,
MINIMUM_STRN_AMOUNT,
}... |
import {
BadRequestException,
Injectable,
UnprocessableEntityException,
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { UserRepository } from './users.repository';
import { CreateUserDto } from './dto/create-user.dto';
import { User } from './entities/user.entity';
import { U... |
import { tokenMatcher } from "chevrotain";
import { match } from "ts-pattern";
import { createEmitter } from "ts-typed-events";
import { VariableRegister } from "../types";
import {
AdditionExpressionCstChildren,
AtomicExpressionCstChildren,
BracketExpressionCstChildren,
ExpressionCstChildren,
FunctionExpres... |
import {
Drawer,
DrawerOverlay,
DrawerContent,
DrawerCloseButton,
DrawerHeader,
DrawerBody,
DrawerFooter,
Button,
FormControl,
FormHelperText,
FormLabel,
Input,
FormErrorMessage,
Select,
useToast
} from "@chakra-ui/react";
import * as React from "react";
import { styled } from "renderer/u... |
<gh_stars>0
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
// import { RegisterationService, CompanyItem } from '../registeration.service';
import { MessageService } from 'primeng/api';
import { NgxSpinnerService } from 'ngx-spinner';
// import { PagerService } from '../../... |
<gh_stars>10-100
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*----------------------------------------------... |
import { dirname, relative } from "path";
import { isEmpty } from "lodash";
import {
TaskProvider,
Task,
ShellExecution,
ShellExecutionOptions,
ExtensionContext,
WorkspaceFolder,
window,
} from "vscode";
import { messages, taskProvidersMessages } from "../../i18n/messages";
import { getLogger } from "../.... |
import { Injectable } from '@angular/core';
import * as moment from 'moment';
import { BungieService } from './bungie.service';
import { DestinyCacheService } from './destiny-cache.service';
import { ItemDisplay, NameDesc, PublicMilestonesAndActivities } from './model';
@Injectable({
providedIn: 'root'
})
export cla... |
<filename>src/indexes.ts
export function bisect<T, E>(array: T[], e: E, cmp: (a: E, b: T) => number, l = 0, r = array.length) {
let mid: number;
let c: number;
while (l < r) {
mid = l + r >>> 1;
c = cmp(e, array[mid] as any);
if (c > 0) {
l = mid + 1;
} else {
r = mid;
}
}
re... |
import { DB } from "../db";
import { Model } from "./model";
import { Request, Response } from "express";
import { Product, IProduct } from "./product";
import { Account, IAccount } from "./account";
import { IncomingMessage } from "http";
import https from 'https';
import fs from "fs";
import path from "path";
import ... |
import React, { useState } from 'react';
import styled from 'styled-components';
import axios from 'axios';
import PostCard from '@/components/PostCard';
import { GetServerSideProps, NextPage } from 'next';
import Pagination from '@/components/Pagination';
import { useRouter } from 'next/router';
import {
YTransition... |
// eslint-disable-next-line
import * as loginService from '@/api/login'
// eslint-disable-next-line
// import { BasicLayout, BlankLayout, PageView, RouteView } from '@/layouts'
import BasicLayout from '@/layouts/BasicLayout.vue'
import BlankLayout from '@/layouts/BlankLayout.vue'
import RouteView from '@/layouts/RouteV... |
import * as proto from "./proto";
import { Client } from "../apiv2";
import { cloudTasksOrigin } from "../api";
import * as iam from "./iam";
import * as backend from "../deploy/functions/backend";
const API_VERSION = "v2";
const client = new Client({
urlPrefix: cloudTasksOrigin,
auth: true,
apiVersion: API_VE... |
<reponame>robustprotocol/robustswap-token-lists
import fs from "fs";
import path from "path";
import { request, gql } from "graphql-request";
import { getAddress } from "@ethersproject/address";
import slugify from "slugify";
const pathToImages = process.env.CI
? path.join(process.env.GITHUB_WORKSPACE, "packages", "... |
import React from "react";
import fs from "fs";
import fsp from "fs/promises";
import { Dirent } from "fs";
import Path from "path";
import Song from "./Song";
import { Toxen } from "../ToxenApp";
import ArrayX from "./ArrayX";
import ProgressBar from "../components/ProgressBar";
import { remote } from "electron";
impo... |
<gh_stars>10-100
/* eslint-disable no-labels */
/* eslint-disable no-console */
import * as fs from "fs";
import * as fsPromises from "fs/promises";
import * as Decode from "tiny-decoders";
import { isNonEmptyArray } from "../src/NonEmptyArray";
import * as Parser from "../src/Parser";
import { absolutePathFromString... |
import { apiBase, buildQueryParam, safeApiQuery } from "./util";
import { Student } from "../../../common/entity/Student";
import { ApiPupil, ApiResponse, ApiStudent } from "./api";
import { Pupil } from "../../../common/entity/Pupil";
import { getConnection, getManager } from "typeorm";
import { generateToken, se... |
<filename>core/geometry/src/topology/HalfEdgePositionDetail.ts
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------... |
const prettyMdPdf = require("./markdown/markdown-pdf")
import { spawn } from 'child_process';
import { copyFileSync, existsSync, fstatSync, lstatSync, mkdirSync, readdirSync, writeFileSync } from 'fs';
import { homedir } from 'os';
import { dirname, join, parse, resolve } from 'path';
import * as vscode from 'vscode';
... |
/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved.
*
* This software is licensed under the Apache License, Version 2.0 (the
* "License") as published by the Apache Software Foundation.
*
* You may not use this file except in compliance with the License. You may
* obtain a copy of the Lic... |
<reponame>ubikusss/vscode-azurefunctions<filename>src/commands/pickFuncProcess.ts
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for lice... |
<filename>lib/bus/rabbitMQ/pubsubQueue/index.ts
import { Channel, ConfirmChannel, Replies } from 'amqplib';
import { EventEmitter } from 'events';
import { IMessage, IPubSubQueueOptions } from '../../bus.types';
import { RabbitMQBus } from '../bus';
import { Correlator } from '../correlator';
export class PubSubQueue ... |
<reponame>deboer-tim/desktop
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*... |
import {
OptionGroup,
ShopArticle
} from './index';
import { BranchConfigConfig, PaymentProcessor, ProcessorOutput } from './branch';
import { ShopOfferCategory } from './offer';
export default interface SmartShopAdmin {
branch: ShopAdminBranch
accounting: ShopAdminAccounting;
article: ShopAdminArt... |
import { CompleteRequestParams } from '../src/helpers/request';
import * as collections from '../src/methods/collections';
import * as photos from '../src/methods/photos';
import * as search from '../src/methods/search';
import * as users from '../src/methods/users';
import { createApi } from '../src';
import { OrderBy... |
import { Vec3 } from '../../math/Vec3';
import { approximateEqual, sign, gPrecision } from "../../math/Math";
import { Segment } from './Segment';
import { Orientation } from '../data/type';
import { Triangle } from './Triangle';
class Plane {
normal: Vec3;
w: number;
origin: Vec3;
constructor(normal =... |
<reponame>mooyg/hydralite
/********************************************************************************
* Copyright (C) 2019 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.o... |
<reponame>patrickweiss/office2022<filename>src/server/officeone/gutschriftenFolderScannen.ts
import { BusinessModel } from "../../officeone/BusinessModel";
import { months, ServerFunction } from "../oo21lib/systemEnums";
import { checkParsedFile, netto, vorsteuer } from "./ausgabenFolderScannen";
import { getOrCreateFo... |
import { h } from "preact";
import { Renderer } from "./interface";
import { hierarchy, cluster as d3cluster, tree as d3tree, HierarchyPointNode } from "d3-hierarchy";
import { StateVisNode } from "./tree/stateVisNode"; // has or is using
export const RENDERER_PRESETS = {
"Tree": { layoutFn: TREE_LAYOUT, sortNodesFn... |
<filename>packages/stencil/src/generators/storybook-configuration/generator.ts
import {
convertNxGenerator,
formatFiles,
GeneratorCallback,
joinPathFragments,
logger,
readJson,
readProjectConfiguration,
Tree,
updateProjectConfiguration,
writeJson,
generateFiles,
offsetFromRoot, stripIndents
} fr... |
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update, render: render });
function preload () {
game.load.atlas('tank', '/resources/images/tanks.png', '/resources/atlas/tanks.json');
game.load.atlas('enemy', '/resources/images/enemy-tanks.png', ... |
import { Vector2, Vector3 } from "three";
import { Color4 } from "../../utils/Color";
import { Pool } from "../../utils/Pool";
import { Rect } from "../../utils/Rect";
import { lerp } from "../../utils/ToolSet";
/**
* 1---2
* | / |
* 0---3
* threejs anti-clockwise vertex order. ie 0-2-1, 0-3-2
*/
export class Ver... |
import {useLazyQuery, useMutation} from '@apollo/client'
import {Elements} from '@stripe/react-stripe-js'
import {loadStripe, Stripe} from '@stripe/stripe-js'
import {useStyletron} from 'baseui'
import {Block} from 'baseui/block'
import {Check} from 'baseui/icon'
import {useSnackbar} from 'baseui/snackbar'
import {H4, ... |
import { LayoutManager, Container, Component, ClosableComponent } from "./LayoutManagerV2";
import * as ace from "ace/ace";
export interface LangUi {
editorComponent: Component,
editor: AceAjax.Editor,
changeHandler: EditorChangeHandler,
statusBar: JQuery
astHandler: EditorChangeHandler,
astJs... |
<filename>src/builtin-template-pipes.ts
import moment from 'moment';
import typify from 'typify';
typify.instance('Date', Date);
function strpad(n, width, z = '0') {
n = n.toString();
while (n.length < width) {
n = z + n;
}
return n;
}
function getByteLength(str) {
let len = 0;
for (let i = 0; i <... |
<gh_stars>1-10
import * as express from 'express';
import { Request, Response } from 'express';
import dotenv from 'dotenv';
import { DB } from '../controller/db';
interface BusTime {
id: number;
stop_id: number;
route_id: number;
trip_id: string;
departure_time: string;
trip_headsign: string;
}
/**
* Defines ... |
import axios from 'axios'
import { GitHubIssue } from '../api/api'
import { normalizeIssue, safeLog } from '../common/utils'
import {
commonNames as _commonNames,
knownTranslations as _knownTranslations,
baseString,
} from './translation-data.json'
import { trackEvent } from '../common/telemetry'
const commonNames:... |
import { TrackAEP } from './events';
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
import { InsertSmartLinkAEP } from './smart-links';
export declare enum PANEL_TYPE {
INFO = "info",
SUCCESS = "success",
NOTE = "note",
WARNING = "warning",
ERROR = "error"
}
expor... |
<gh_stars>0
import {IBitVector, IStrVector} from './base';
export class NaiveBitVector implements IBitVector {
private ranks: Uint32Array = new Uint32Array();
// private ranks: number[];
data: Buffer = Buffer.alloc(0);
length = 0;
dump() {
const lengthBuffer = Buffer.allocUnsafe(4);
lengthBuffer.wri... |
import * as React from 'react';
import * as _ from 'lodash';
import { TrayWidget } from './TrayWidget';
import { Application } from '../Application';
import { TrayItemWidget } from './TrayItemWidget';
import { DefaultNodeModel } from '@projectstorm/react-diagrams';
import { CanvasWidget } from '@projectstorm/react-canv... |
/**
* Pizzly(JS) > Connect
*
* @param integration (string) - The integration to connect with
* @param options (object) - Connect options (see below)
*/
import Types from './types'
export default class PizzlyConnect {
private key: string
private integration: string
private options?: Types.ConnectOptions
p... |
import React, { useState, useLayoutEffect, useCallback } from 'react'
import styled, { css } from 'styled-components'
import { scrollToHandler } from '../Utils/scrollUtils'
import { NavigationLink } from './NavigationLink'
import { TiTicket } from 'react-icons/ti'
import { MdSpeakerNotes } from 'react-icons/md'
expor... |
<reponame>ratik21/algorand-builder
import debug from "debug";
import fsExtra from "fs-extra";
import { task } from "../internal/core/config/config-env";
import { BuilderError } from "../internal/core/errors";
import { ERRORS } from "../internal/core/errors-list";
import {
AlgobDeployerImpl,
AlgobDeployerReadOnlyIm... |
import BN from 'bignumber.js';
import ZWeb3 from './ZWeb3';
import decodeLogs from '../helpers/decodeLogs';
import { getSolidityLibNames, hasUnlinkedVariables } from '../utils/Bytecode';
interface ContractSchema {
contractName: string;
abi: any;
ast: any;
bytecode: string;
deployedBytecode: string;
}
export... |
/// <reference types="node" />
import { ByteString } from "node-opcua-basic-types";
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
import { NodeId } from "node-opcua-nodeid";
import { StatusCode } from "node-opcua-status-code";
import { TimeZoneDataType } from "node-opcua-types";
import... |
import { Component, ChangeDetectionStrategy, ViewChild, TemplateRef } from '@angular/core';
import { isSameDay, isSameMonth } from 'date-fns';
import { Subject } from 'rxjs';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { CalendarEvent, CalendarEventTimesChangedEvent, CalendarView } from 'angular-calen... |
import {Composer} from 'grammy'
import {html as format} from 'telegram-format'
import {MenuTemplate, Body, replyMenuToContext, deleteMenuFromContext, getMenuOfPath} from 'grammy-inline-menu'
import {StatelessQuestion} from '@grammyjs/stateless-question'
import {ContentReplace} from '../../hunter/index.js'
import {Cont... |
<filename>src/core/renderer/helpers.ts
import { Flow as VF } from "vexflow";
import { Clef, FractionalNote, Tuplet, Tuplets } from "../models";
export interface VfNoteAndTuplet {
vfNote: VF.StaveNote[],
tuplet: Tuplet;
}
interface DurationsAndTuplet {
durations: string[];
tuplet: Tuplet;
}
export cla... |
import { h } from 'vue'
import { NIcon, MenuOption } from 'naive-ui'
import { RouteLocationNormalizedLoaded, RouterLink } from 'vue-router'
import {
HomeOutline,
PersonOutline,
PeopleOutline,
SettingsOutline,
ConstructOutline,
GridOutline,
GlobeOutline,
CubeOutline,
BarChartOutline,
LayersOutline,
... |
<reponame>kunpengcompute/devkit-vscode-plugin
import { Component, OnInit } from '@angular/core';
import { I18nService } from '../../service/i18n.service';
import { VscodeService, COLOR_THEME } from '../../service/vscode.service';
import { TiTableColumns, TiTableRowData, TiTableSrcData, TiTableDataState, TiTableComponen... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
/**
* Copyright (c) 2016-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
///<reference path='../type-defs/jasmine.d.ts'/>
///<reference path='../type-defs/jasmine-test-additions.d.ts'/>
import * as CLangCommo... |
/*!
* @file gamePad/main.ts
* @brief DFRobot's gamer pad makecode library.
* @n [Get the module here]()
* @n This is the microbit dedicated handle library, which provides an API to
* control eight buttons, including an led indicator light and a vibrating motor.
*
* @copyright [DFRobot](http://www.dfrobot.com), ... |
<reponame>felixwolter/idai-field<gh_stars>0
import { Mapping, Predicate, isFunction, first, isNumber, rest, isObject, isArray, Pair, to, Path, is, Comparator,
identity } from 'tsfun';
import * as tsfun from 'tsfun';
import { Named } from './named';
export type Tree<T = any> = {
item: T,
trees: Forest<T>
}... |
import React, { useEffect, useState } from 'react'
import { useForm } from 'react-hook-form'
import { ErrorMessage } from '@hookform/error-message'
import HelpBox from '../../common/HelpBox'
import { GrantTypeDTO } from './../../../entities/dtos/grant-type.dto'
import { GrantType } from './../../../entities/models/gran... |
import { ttl2jsonld } from '../vendor/ttl2jsonld'
import { expand as JsonLdExpand } from 'jsonld'
import { ExpandedJsonLdObject } from '../types/ExpandedJsonLdObject'
import { lastPart } from '../helpers/lastPart'
import { expand } from '../helpers/expand'
import { CoreComponent } from '../types/CoreComponent'
import {... |
/*
* Copyright 2018 <NAME> <<EMAIL>>
* Copyright 2018 Institute of the Czech National Corpus,
* Faculty of Arts, Charles University
*
* 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 ... |
import { BettererError } from '@betterer/errors';
import assert from 'assert';
import { promises as fs } from 'fs';
import path from 'path';
import simpleGit, { SimpleGit } from 'simple-git';
import { createHash } from '../hasher';
import { normalisedPath } from '../utils';
import { BettererFileCacheΩ } from './file-c... |
import { Getter, NoValue } from './getter';
import { Observable, IObserver, isObserver } from './observable';
// determine whether a listener should be updated
export type UpdateComparer = (oldVal: any, newVal: any) => boolean;
interface parentObservable {
key: string;
parent: ObservableWrapper;
}
export class Ob... |
/*
The MIT License
Copyright (c) 2017-2019 EclipseSource Munich
https://github.com/eclipsesource/jsonforms
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includi... |
import {
ECalendarValue,
CalendarValue,
DateValidator,
SingleCalendarValue
} from '../common/models/calendar.model';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
EventEmitter,
forwardRef,
HostBinding,
Input,
OnChanges,
OnInit,
Output,
Simple... |
import axios from "axios";
import * as moment from "moment";
import ClientComponentFactory, { ClientAbstractComponent } from "./ClientComponentFactory";
import CLIENT_URLS from "./clientUrls";
import {callFormEndpoint, FormComponentContext} from "./formHelpers";
export enum RequestMethod {
GET = "get",
POST =... |
import React, { useState } from 'react';
import { Input, InputNumber, Icon, Select } from 'antd';
import 'antd/dist/antd.min.css';
import { createEditableTable, AweColumnProps } from './../../table';
import { generateGetRowSpan } from './../../table/utils';
import './../../table/style';
interface Record {
key: stri... |
import React, { useState } from 'react';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentT... |
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import * as exec from '@actions/exec'
import * as path from 'path'
import * as fs from 'fs'
import * as fse from 'fs-extra'
import * as os from 'os'
const CMDLINE_TOOLS_VERSION = '3.0'
const COMMANDLINE_TOOLS_VERSION = '6858069'
const COM... |
<reponame>alexnix/GitHub-Views
import { QueryCursor, AggregationCursor } from 'mongoose';
import { getUserReposAtPage } from "../controllers/GitHubApiCtrl";
import { createRepository, getRepoTraffic, updateRepoTraffic } from "../controllers/RepositoryCtrl";
import RepositoryModel, { Repository } from "../models/Reposit... |
import {
array,
memo,
constant,
constantFrom,
genericTuple,
shuffledSubarray,
oneof,
tuple,
sample,
Arbitrary
} from 'fast-check';
import { UnionGraph } from './internal/union-graph';
import { combinationCheck } from './internal/combination-checker';
import { BiMultiMap } from './inter... |
import { Component, OnInit, ViewChild } from '@angular/core';
import * as tf from '@tensorflow/tfjs';
import * as tfc from '@tensorflow/tfjs-core';
import { Router, ActivatedRoute } from '@angular/router';
import { SCAVENGER_CLASSES, DEMOCLASSES } from './SCAVENGER_CLASSES'
import { AuthService, GoogleLoginProvider, Fa... |
import Arweave from 'arweave';
import BigNumber from 'bignumber.js';
import * as clarity from '@weavery/clarity';
import {
ContractDefinition,
ExecutionContext,
ExecutorFactory,
InteractionTx,
LoggerFactory,
SmartWeaveGlobal
} from '@smartweave';
/**
* A handle that effectively runs contract's code.
*/
e... |
import * as Immutable from 'immutable';
import * as _ from 'lodash';
export interface ProjectionStage<TFromType, TResultType> {
override(props: {
fromProperty: (from: TFromType) => any,
toProperty: (to: TResultType) => any,
use: (from: any) => any,
when?: (from: any) => boolean
... |
import { GameBoard } from "../gamecore/game.class.GameBoard";
import { Tree, MCTSNode } from "./ai.class.MCTSNode";
import { State } from "./ai.class.State";
import { CoreLogic } from "../../util/core-logic.util";
import { Player } from "../gamecore/game.class.Player";
export class MonteCarlo {
WINSCORE = 10;
expl... |
<gh_stars>0
import { CommandInteraction, Message, TextBasedChannel, TextChannel } from 'discord.js';
import { Discord, Permission, Slash, SlashOption } from 'discordx';
import { Blacklist } from '../objects/Blacklist.js';
import { setGuildBlPrefix } from '../objects/GuildDataHandler.js';
import { CheckPermissions } fro... |
<gh_stars>0
import {
content_type, split_whitespace, path
} from "../src/da.ts";
import {
yellow, bold, green, bgRed, white,
join, sh, read
} from "../src/Shell.ts";
import {
Application,
Router,
send,
ServerSentEventTarget
} from "https://deno.land/x/oak/mod.ts";
import {writeAll} from 'https://deno... |
//Adapted from https://stackoverflow.com/a/34270811/10951033
import {ValetudoDataPoint} from "./api";
export function convertSecondsToHumans(seconds: number, showSeconds = true, showDays = true): string {
let levels;
if (showDays) {
levels = [
{
value: Math.floor(seconds / ... |
<filename>src/commands/xp-management/LeaderboardCommand.ts
import { Command } from "discord-akairo";
import {Message, MessageEmbed, TextChannel} from "discord.js";
import { LoggerClient } from "../../client/LoggerClient";
import XPData from "../../client/XPData";
import { embedColour } from "../../config/config";
impor... |
<reponame>varijkapil13/atlaskit<gh_stars>1-10
import { Node as PmNode } from 'prosemirror-model';
import { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state';
import {
TableMap,
columnResizingPluginKey as resizingPluginKey,
} from 'prosemirror-tables';
import {
findTable,
findParentDomRefOfT... |
import * as Amqp from 'amqplib'
import * as Process from 'process'
import {Config} from '../../systemInterfaces/config'
import {InternalSystem} from '../../systemInterfaces/internalSystem'
import {Dependencies as TDependencies, Dependencies as SystemDependencies} from '../../systemInterfaces/dependencies'
import {ApiSt... |
<gh_stars>0
import {
watch as w,
WatchCallback,
WatchOptions,
inject as inj,
reactive,
computed,
ComputedRef,
} from 'vue'
import { Module, Unref } from './type'
import { copy } from './util'
/**
* Define store
* @param modules Record<string, `store created with composition api`>
* @param getters (mod... |
import { ITemplateConfiguration } from './../templateManager';
export interface ViewerConfiguration {
// configuration version
version?: string;
extends?: string; // is this configuration extending an existing configuration?
pageUrl?: string; // will be used for sharing and other fun stuff. T... |
/**
* @packageDocumentation
* @module Verifier
*/
import { AttestedClaim, CType, SDKErrors, Identity } from '@kiltprotocol/core'
import { ConfigService } from '@kiltprotocol/config'
import type {
IPublicIdentity,
IAttestedClaim,
IRequestForAttestation,
IMessage,
IRequestClaimsForCTypesContent,
} from '@ki... |
import {OutgoingHttpHeaders} from 'http';
import Module from 'module';
import { dirname } from 'path';
import vm from 'vm';
import { TextDocument } from 'vscode';
import { DocumentCache } from '../../models/documentCache';
import { HttpRequest } from '../../models/httpRequest';
import { VariableType } from '../../mod... |
<reponame>williballenthin/lancelot
// add the given child as the first child in the given element.
export const pushChild = (el: Element, child: Element) => {
if (el.hasChildNodes()) {
el.insertBefore(child, el.firstChild);
} else {
el.appendChild(child);
}
};
// from: https://stackoverflow... |
<filename>src/Engine/Execute.ts
import { Result } from "../Result";
import { Value } from "../Value";
import { bot, le, lub } from "../Label";
import { SyntaxErrorObject } from "../Objects/SyntaxErrorObject";
import { isGuardedFunction, isClosure, WorkList, ValueStack } from "../Context";
import { expressiontbl } from ... |
/*
MIT License
Copyright (c) 2020 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi... |
<reponame>ClintH/ixfx
import {StateChangeEvent} from "~/flow/StateMachine.js";
import {waitFor} from "../flow/Timer.js";
import {string as randomString} from "../Random.js";
import * as BleDevice from "./BleDevice.js";
import {defaultOpts as NordicDefaults, NordicBleDevice} from "./NordicBleDevice.js";
/**
* Options ... |
import gql from "graphql-tag";
import React, {useState} from "react";
import {store} from "Store";
import {LogGroup} from "Store/main/logs/LogGroup";
import {Observer} from "web-vcore";
import {useSubscription} from "web-vcore/nm/@apollo/client.js";
import {observer} from "web-vcore/nm/mobx-react.js";
import {Button, C... |
<reponame>awto/kafka-workflow
import * as R from "@effectful/es-persist/index";
import * as S from "@effectful/serialization";
import * as RS from "@effectful/es-persist-serialization";
export {
all,
any,
allWithCancel,
anyWithCancel,
CancelToken,
cancel
} from "@effectful/es-persist/index";
type Handler =... |
import InfoIcon from "@mui/icons-material/Info";
import LoopIcon from "@mui/icons-material/Loop";
import Masonry from "@mui/lab/Masonry";
import { Chip, DialogContent, TextField } from "@mui/material";
import Autocomplete from "@mui/material/Autocomplete";
import Box from "@mui/material/Box";
import Button from "@mui/m... |
import * as _ from 'lodash';
import * as React from 'react';
import { withTranslation, WithTranslation } from 'react-i18next';
import { Header, Icon, SemanticICONS, Table } from 'semantic-ui-react';
import i18n from '../../services/i18n';
import { DataFieldRaw, DataTableRef, IdFunction } from '../../types';
import { h... |
<filename>nativescript-core/application/application.desktop.ts
// Definitions.
import {
DesktopApplication as DesktopApplicationDefinition,
ApplicationEventData,
CssChangedEventData,
OrientationChangedEventData
} from ".";
import {
displayedEvent,
getCssFileName,
hasLaunched,
hasListene... |
<reponame>jd1378/deno-fetch-goody<filename>fetch_wrapper.ts
import * as utils from "./utils.ts";
import { getHeader, setHeader } from "./header_utils.ts";
import { ExtendedRequestInit } from "./extended_request_init.ts";
/**
* Transforms data and adds corresponding headers if possible.
*/
function transformData(
d... |
/**
* Stollen shamelessly from the probot-messages npm package.
* https://github.com/dessant/probot-messages/blob/master/src/index.js
*
* Needed to modify the behavior so that the same issue is always used.
*/
import { Context } from 'probot'
import { Octokit } from '@octokit/rest'
import crypto from 'crypto'
im... |
import React from 'react'
import {ImageFit} from '../atoms/image'
import {Peer} from '../types'
import {Link, Route, AuthorRoute} from '../route/routeContext'
import {TagList} from '../atoms/tagList'
import {cssRule, useStyle} from '@karma.run/react'
import {ImageData, Author} from '../types'
import {getHumanReadableTi... |
import type { isuxportal } from "../pb_admin";
import { ApiError, ApiClient } from "../ApiClient";
import { AdminApiClient } from "./AdminApiClient";
import React from "react";
import { Link } from "react-router-dom";
import { useForm } from "react-hook-form";
import { Clarification } from "../Clarification";
import ... |
import { isEmpty, prop, pipe, findIndex, equals, curry, nth, map } from 'ramda';
import { EvaluateRuleSet } from './dt-common-lib';
import type { Feedback, Question, Option, Survey } from '../data';
/** @enum {'other'} */
export const QuestionBrandType = {
Other: 'other',
};
/** @enum {'Date'|'Name'|'Email'|'Phone'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.