text stringlengths 3 1.05M |
|---|
import errorHandler from '../../lib/error-handler'
import { cloneMock } from './mocks/entities'
import { describe, test } from 'mocha'
import { expect } from 'chai'
describe('A errorHandler', () => {
// Best case scenario where an error is a known and expected situation and the
// server returns an error with a JS... |
import pandas
def convert_column_cells_to_string(
column: str,
dataframe: pandas.DataFrame) -> str:
column_cells_as_string = \
''.join(dataframe[column].astype(str).tolist())
return \
column_cells_as_string
|
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("language","it",{button:"Imposta lingua",remove:"Rimuovi lingua"}); |
# Generated by Django 3.0.5 on 2020-04-27 16:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pages', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='invite',
name='notes',
field=... |
const express = require('express');
const app = express();
// Sets up a self-contained environment (think - biodome)
const port = process.env.PORT || 5050;
// this catches every route request - every time location bar changed, function runs
app.use((req, res, next) => {
console.log('incoming request');
cons... |
import { ConcurrentError } from 'resolve-storage-base'
import createStorageAdapter from '../src/index'
const TIMESTAMP_1 = Number.MAX_SAFE_INTEGER - 6
const TIMESTAMP_2 = Number.MAX_SAFE_INTEGER - 5
const TIMESTAMP_3 = Number.MAX_SAFE_INTEGER - 4
const TIMESTAMP_4 = Number.MAX_SAFE_INTEGER - 3
const TIMESTAMP_5 = Numb... |
// Card Characters
function drawCardImage(card, isPlayer, returnOnly=false) {
let cardHTML = '<span class=" pokercard ' + (card.isRed ? 'redcard':'') + '">' + card.char + '</span>';
if(returnOnly)
return cardHTML;
if(isPlayer)
$('#playerHandDiv').html($('#playerHandDiv').html() + cardHTML);
else
$('#dealerHan... |
/**
* @author: tipe.io
*/
const helpers = require('./helpers');
const buildUtils = require('./build-utils');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev
/**
* Webpack Plugins
*/... |
window.onload = function () {
// p90
let latency_none_mtls_both_p90_trending = constructDataSeries(latency_none_mtls_both_p90, latency_none_mtls_base_p90)
let latency_none_plaintext_both_p90_trending = constructDataSeries(latency_none_plaintext_both_p90, latency_none_mtls_base_p90)
let latency_v2_stats_nullvm_b... |
#!/usr/bin/env python
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import sys
import json
import threading
import logging as log
import urllib2
from argparse import ArgumentParser
import subprocess
import time
CLONE_VM = '/usr/bin/VBoxManage clonevm OVX --snapshot Master --mode machine --... |
# Generated by Django 2.2.4 on 2019-08-27 17:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hie', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='hieprofile',
name='organization_name',
... |
##
## This script is used to compare the outputs generated by the ESRI geometry engine and
## GeographicLib when doing geodesic densification.
##
import arcpy
import math
from geographiclib.geodesic import Geodesic
# generic parameters
canberra = {'x':149, 'y':-35}
perth = {'x':115, 'y':-32}
ds = 100000 ... |
import setuptools
with open("README.md", "r", encoding = "utf-8") as file_object:
long_description = file_object.read()
setuptools.setup(
name = "color_text",
version = "4.0.1",
author = "A Chinese that likes programming 一个热爱编程的中国人",
author_email = "colortextpackage@yandex.com",
description = "A library for p... |
//// [tests/cases/compiler/declarationEmitInferredTypeAlias2.ts] ////
//// [0.ts]
{
type Data = string | boolean;
let obj: Data = true;
}
export { }
//// [1.ts]
let v = "str" || true;
function bar () {
return v;
}
export { v, bar }
//// [0.js]
"use strict";
exports.__esModule = true;
{
var... |
GENOMES_DIR='/home/cmb-panasas2/skchoudh/genomes'
OUT_DIR = '/staging/as/skchoudh/rna/public_HuR/GSE62129'
RAWDATA_DIR ='/home/cmb-06/as/skchoudh/dna/public_HuR/GSE62129'
GENOME_BUILD = 'mm10'
GENOME_FASTA = GENOMES_DIR + '/' + GENOME_BUILD + '/fasta/'+ GENOME_BUILD+ '.fa'
SRC_DIR = '/home/cmb-panasas2/skchoudh/github_... |
var style = {
}
export default style
|
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const TerserJSPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')... |
#encoding:utf-8
subreddit = 'cricket'
t_channel = '@r_cricket'
def send_post(submission, r2t):
return r2t.send_simple(submission)
|
import React, { useState, useContext } from 'react';
import styled from 'styled-components';
import { axiosWithAuth } from '../helpers/axiosWithAuth';
import UserContext from '../contexts/userContext';
import MyPlantDataContext from '../contexts/myPlantDataContext';
//STYLING
const AddPlantContainer = styled.div`
... |
import Cookies from "js-cookie";
export const setCookies = () => {
try {
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments)
}
gtag('js', new Date());
gtag(
'config',
'UA-161400643-2',
... |
// src/app/reducers/router.js
export default (state = {route:'/'}, action) => {
switch (action.type) {
case "UPDATE_ROUTE":
// console.info('Case "UPDATE_ROUTE"');
const nextState = {
...state,
route: action.route
};
return nextState;
default:
return state
}
}... |
from flask import Flask
app = Flask(__name__)
app.config.from_object('config')
import index
|
/*!
* OpenUI5
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['./ShellHeader','./ShellLayout','./library','./ShellRenderer'],function(S,a,l,b){"use strict";var c=a.extend("sap.ui.unified.Shell",{metadata:{library:"sa... |
/**
* Copyright 2013-2018 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
import datetime
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from .models import Question
def create_question(question_text, days):
time = timezone.now() + datetime.timedelta(days=days)
return Question.objects.create(question_text=question_text, pub_date=t... |
"""
Pandora API Exceptions
This module contains the API exceptions from the Pandora API. The exception
classes are automatically generated from the API spec below and are added to
this module at first import. Exceptions will always be a sub-class of the base
PandoraException.
The name of the exception class is the me... |
let _ = require("lodash");
var BOOLEAN = {
__one_of: [true, false]
};
module.exports = function (api) {
api.addEndpointDescription('_get_mapping', {
methods: ['GET'],
priority: 10, // collides with get doc by id
patterns: [
"{indices}/_mapping",
"{indices}/_mapping/{types}",
"{indice... |
/**
* Copyright 2019 The AMP HTML Authors. 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 require... |
/*
* jQuery One Page Nav Plugin
* http://github.com/davist11/jQuery-One-Page-Nav
*
* Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
* Dual licensed under the MIT and GPL licenses.
* Uses the same license as jQuery, see:
* http://jquery.org/license
*
* @version 3.0.0
*
* Example usage:
* $('#nav').... |
"""
Comments area plugin.
This plugin package is not called "comments" as that conflicts
with the `django.contrib.comments` appname. Hence, "commentsarea" it is.
The plugin displays the form and messagelist that ``django.contrib.comments`` renders.
Hence, it depends on a properly configured contrib module.
The least ... |
const debug = require('debug')('ssb-chat-core')
const pull = require('pull-stream')
const unique = require('pull-stream/throughs/unique')
const connect = require('./connect')
const state = require('./state')
const events = require('./state/events')
const constants = require('./util/constants')
const processor = require... |
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... |
const express = require('express');
const personalSnippetsRouter = express.Router({mergeParams: true});
const Keycloak = require('keycloak-connect');
const PersonalSnippetsService = require('./personal-snippets.service');
const SnippetsSearchService = require('../../../common/snippets-search.service');
const UserIdVal... |
defineSuite([
'Scene/Model',
'Core/Cartesian3',
'Core/Cartesian4',
'Core/CesiumTerrainProvider',
'Core/ClippingPlaneCollection',
'Core/Color',
'Core/combine',
'Core/defaultValue',
'Core/defined',
'Core/defineProperties',
... |
# import sys
import EncryptionSystems.Atbash as Atbash
import EncryptionSystems.Bifido as Bifido
import EncryptionSystems.Blowfish as Blowfish
import EncryptionSystems.Cesar as Cesar
import EncryptionSystems.ChaffingAndWinnowing as ChaffingAndWinnowing
import EncryptionSystems.DES as DES
import EncryptionSystems.Expon... |
/* eslint-disable func-style */
/* eslint-disable max-len */
/* eslint-disable require-jsdoc */
function addToolbox () {
return `
<category name="%{BKY_EITGHTTIMESEIGHTMATIRXDISPLAY_CATEGORY}" id="EITGHTTIMESEIGHTMATIRXDISPLAY_CATEGORY" colour="#CE0000" secondaryColour="#AE0000">
<block type="eitghtTimesEightMa... |
import React from "react";
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react'
import store, { persistor } from './redux/store';
import { render } from "react-dom";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import * as serviceWorker from ... |
import dotenv from 'dotenv';
dotenv.config();
const { Derrick,Aline,Regis,Admin } = process.env;
export async function up(queryInterface) {
return queryInterface.bulkInsert(
'users',
[
{
username:'derrick',
password: Derrick,
role:'COOK',
createdAt: new Date(),
... |
import os
import threading
import json
import requests
from common.params import Params
from common.basedir import BASEDIR
from selfdrive.version import comma_remote, tested_branch
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars
from selfdrive.car.vin import get_vin, VIN_UNKNOWN
from ... |
/*! For license information please see 2.9bb25706.chunk.js.LICENSE.txt */
(this["webpackJsonppod-website"]=this["webpackJsonppod-website"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(113)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var ... |
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(expor... |
/* global assert, setup, suite, test */
require('aframe');
require('../index.js');
var entityFactory = require('./helpers').entityFactory;
suite('aframe-soundscape component', function () {
var component;
var el;
setup(function (done) {
el = entityFactory();
el.addEventListener('componentinitialized', f... |
module.exports = function parseStringAsArray(arrayAsString){
return arrayAsString.split(',').map(string => string.trim());
} |
console.log('hi from node ' + process.version);
|
########################################################################
# Note: keep classes flat so dict unpacking (fromdict) continues to work
########################################################################
class PackageInstall:
def __init__(
self,
*,
package,
name="pac... |
const options = [
{ value: 'add', label: 'add' },
{ value: 'commit', label: 'commit' },
{ value: 'revert', label: 'revert/reset' },
{ value: 'initialize', label: 'initialize' },
{ value: 'modify', label: 'modify' },
{ value: 'show', label: 'show/view' },
{ value: 'delete', label: 'delete/remove' },
{ va... |
from summarize.nn.beam_search.length_penalizers.length_penalizer import LengthPenalizer
from summarize.nn.beam_search.length_penalizers.average import AverageLengthPenalizer
from summarize.nn.beam_search.length_penalizers.wu import WuLengthPenalizer
|
class Solution:
def increasingTriplet(self, nums: List[int]) -> bool:
first = second = math.inf
for num in nums:
if num <= first:
first = num
elif num <= second:
second = num
else:
return True
return False
|
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[... |
({"months-format-abbr":["جنو","فبروری","مارچ","اپریل","مـی","جون","جول","اگست","سپتمبر","اکتوبر","نومبر","دسم"],"months-format-wide":["جنوری","فبروری","مارچ","اپریل","می","جون","جولای","اگست","سپتمبر","اکتوبر","نومبر","دسمبر"],"months-format-narrow":["ج","ف","م","ا","م","ج","ج","ا","س","ا","ن","د"],"months-standAlone-w... |
import { html } from 'https://unpkg.com/lit-html?module';
const aboutus = () => {
return html`
<footer id="about-us">
Sharity is a meeting place for those interested in helping and those who
help every day.
<br />
<div id="developed">Developed by: MeredixStudio</div>
</footer>
`;
};... |
import pickle
import sys
import os
import urllib
import gzip
import cPickle
import time
import lasagne
import theano
import numpy as np
import theano.tensor as T
from lasagne import layers
from lasagne.updates import nesterov_momentum
from nolearn.lasagne import NeuralNet
from nolearn.lasagne import BatchIterator
from... |
/* eslint-disable import/no-extraneous-dependencies */
const { pathsToModuleNameMapper } = require("ts-jest/utils");
// Load the config which holds the path aliases.
const { compilerOptions } = require("../../tsconfig.json");
const path = require('path');
module.exports = {
preset: "ts-jest",
moduleNameMapper: {
... |
import $ from 'jquery';
$(() => {
let sessionL = 25;
let breakL = 5;
let hasStart = false;
let isSession = true;
let isPaused = false;
let currentTimer;
let animation;
const fill = document.getElementById('fill');
const keyFrames = [{ height: '0' }, { height: '100%' }];
const timingOptions = {
... |
var json = require('json-file');
var file = json.read('./pageObjects/footerLink.page.json');
class footerLink {
get PrivacyPolicylink() { return $(file.get('footerLink.selector.PrivacyPolicylink')); }
get PrivacyPolicyHeadertag() { return $(file.get('footerLink.selector.PrivacyPolicyHeadertag')); }
get Te... |
/*
* Copyright (c) 2022 Anton Bagdatyev (Tonix)
*
* 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, modify,... |
import { useWeb3React } from '@web3-react/core'
import { useContext, useState, useCallback, useEffect } from 'react'
import debounce from 'lodash.debounce'
import PureContext from '../components/context/Pure'
import Layout from '../components/Layout'
import Input from '../components/Input'
import Button from '../compon... |
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = false;
});
$(document).ready(function(){
if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
alert('There is a problem, please contact us at contact@eslam.me');
}
//Open all external links in the browser
$('a[href^=http]').c... |
// browser support list see here: https://github.com/ai/browserslist#queries
module.exports = {
plugins: [
require('postcss-import')(),
require('autoprefixer')({
browsers: [
'> 1%',
'last 2 versions',
'Chrome >= 15',
'Explorer >= 9',
'Firefox >= 12',
'Safa... |
var path = require('path');
module.exports = {
entry: {
app: ['@babel/polyfill', './src/main/frontend/index.js']
},
devtool: 'sourcemaps',
cache: true,
mode: 'development',
output: {
path: __dirname,
filename: './src/main/resources/static/built/bundle.js'
},
modu... |
'use strict';
const { EOL } = require('os');
const path = require('path');
const Manifest = require('../../lib/manifest');
const Browserconfig = require('../../lib/browserconfig');
module.exports = {
description: 'Generates a configuration for web app manifest.',
normalizeEntityName() {},
locals(options) {
... |
import { computed, reactive, ref, toRefs, watch } from '@vue/composition-api';
import { CustomLink } from '~/base/index.js';
import { useRipplePlugin } from '~/ripple/ripple-plugin.js';
export default {
name: 'mcw-fab',
inheritAttrs: false,
props: {
icon: String,
mini: Boolean,
exited: Boolean,
l... |
'use strict';
if ( ! window.baseURL) {
window.baseURL = "https://www.sciencebase.gov";
}
//angular does not check for null
function isDefined(obj) {
return angular.isDefined(obj) && obj !== null;
}
var GLRICatalogApp = angular.module('GLRICatalogApp', ['ui.bootstrap','ngSanitize', 'ui.select']);
GLRICatalogAp... |
// Copyright OHMEC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
function featureStyle(feature) {
// default styles
let strokeOn = true; // hides feature boundaries if false
let strokeOpacity = 1.0;
let strokeColor ... |
var loadDatafileSteps = function(){
this.Given(/^the command as (.*)$/, function (command, callback) {
// Write code here that turns the phrase above into concrete actions
callback();
});
this.When(/^I add the parameters as (.*)$/, function (parameters, callback) {
// Write code he... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from parlai.core.build_data import DownloadableFile
import parlai.core.build_data as build_data
RESOURCES = [... |
var MailGrabberMessageInlineAttachments = {
/**
* Render inline images of the message. Change the cid:something12345 with
* the encoded image content.
*
* @param {Object} messageParts - the parts of the message
* @param {Object} messageHtmlPart - the HTML part of the message
*
* @return {Object} ... |
'use strict'
require('./check-versions')()
const config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
}
const opn = require('opn')
const path = require('path')
const express = require('express')
const webpack = require('webpack')
const proxyMiddlewar... |
export default {
entry: 'dist/esm/plugins/bootstrap/index.js',
dest: '.tmp/angular2-modal.bootstrap.umd.js',
format: 'umd',
moduleName: 'angular2Modal.plugins.bootstrap',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platf... |
var device__interface_8h =
[
[ "halide_device_interface_impl_t", "structhalide__device__interface__impl__t.html", "structhalide__device__interface__impl__t" ],
[ "halide_default_device_and_host_malloc", "device__interface_8h.html#a0d16a7c74441060c469123b0d943dda2", null ],
[ "halide_default_device_and_h... |
"use strict"
const const_strings = {
AppName: 'WowApp',
TipCalculator: 'TipCalculator',
TipKey: 'Tip',
BroadcastEvenetName: 'LocalStorageModule.notification.setitem'
};
var tipCalculator = function ($scope, localStorageService) {
//I define an object with set method
var tip = {
bill: un... |
import ChessRules from "/base_rules.js";
import PiPo from "/utils/PiPo.js";
import Move from "/utils/Move.js";
export default class AtomicRules extends ChessRules {
static get Options() {
return {
select: C.Options.select,
input: [
{
label: "Balanced",
variable: "rempawn"... |
const websiteSiteSections = require('./website-site-sections');
/**
* Each function will receive the following args:
*
* The object that contains the result returned from the resolver on the parent field
* The current operation values object - includes query and sort.
* The GraphQL variables object.
* The GraphQ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LevelItem = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const LevelItem = (_a) => {
var { children = null } = _a, props = tslib_1.__rest(_a, ["children"]);
return (React.creat... |
import React, { useState } from "react";
import "./WorkAndEducationComponentSection.css";
import _ from "lodash"
import { WorkAndEducationComponentAddButton } from "../WorkAndEducationComponentAddButton";
import { WorkAndEducationComponentNotNullSection } from "../WorkAndEducationComponentNotNullSection";
impo... |
var exec = require('./exec');
module.exports = function tag(version) {
var history = require('./history')(version);
var tagname = 'v' + version;
exec('git tag -a "' + tagname + '" -m "' + history + '"');
};
|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
'use strict';
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
mocha = require('gulp-mocha'),
coverage = require('gulp-coverage'),
exec = require('child_process').exec,
rs = require('run-sequence');
gulp.task('lint', function () {
return gulp
.src(['lib/**/*', ... |
# Generated by Django 4.0.2 on 2022-02-26 14:16
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='image',
name='image'... |
import Vue from 'vue'
import Vuex from 'vuex'
import manage from './modules/manage.js'
const debug = process.env.NODE_ENV !== 'production'
Vue.use(Vuex)
Vue.config.debug = debug
//导出store对象
export default new Vuex.Store({
//组合各个模块
modules:{
manage
},
strict: debug
})
|
/**
* Toolbars and menus: Reorderable Toolbars
* tested on:
* desktop:
* Chrome 49, 51
* Firefox 38, 45
* IE 11
* Opera 36
* tablet:
* Chrome 49
* Edge 13
* Safari 7
* mobile:
* ... |
// @flow
import type {
QueryIdType,
} from '../types';
import createUlid from './createUlid';
export default (): QueryIdType => {
// eslint-disable-next-line no-extra-parens, flowtype/no-weak-types
return (createUlid(): any);
};
|
import React from 'react';
import {StyleSheet, TouchableOpacity} from 'react-native';
import {colors} from '../utils/colors';
import ArrowUpSvg from '../../assets/svg/arrow-up.svg';
export default ({onPress}) => (
<TouchableOpacity onPress={onPress} style={styles.backButtonContainer}>
<ArrowUpSvg color={colors.B... |
import { fromJS } from 'immutable';
import uploadDocumentsReducer from '../reducer';
describe('uploadDocumentsReducer', () => {
it('returns the initial state', () => {
expect(uploadDocumentsReducer(undefined, {})).toEqual(fromJS({}));
});
});
|
JobEntryTableExistsDialog = Ext.extend(KettleDialog, {
title: '检查表是否存在',
width: 450,
height: 210,
initComponent: function() {
var me = this,cell = getActiveGraph().getGraph().getSelectionCell();
var wConnection = new Ext.form.ComboBox({
flex: 1,
displayField: 'name',
valueField: 'name',
typeAhead: t... |
draft.types.Color = class Color {
constructor(color) {
color = new RegExp(`^(?:${this.regex})$`, 'i').exec(
isNaN(color) ? color : color.toString(16));
if (color !== null) {
this.color = color[0].toLowerCase();
for (let i = 1; i <= 3; i++) {
color[i] = parseInt(color[i] ||
... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: [
'./src/index.js',
],
},
output: {
filename: '[name]-dist.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.(css|scss)$/... |
/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.5
Version: 1.8.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin-v1.8/admin/
*/
// white
var white = 'rgba(255,255,255,1.0)';
var fillBlack = 'rgba(45, 53, 60, 0.6)';
var fillBlackLight = 'rgba... |
var scienceQuestions = [
{
title: "Which of the following is NOT an arachnid?",
choices: ["Mite", "Spider", "Wasp", "Scorpion"],
answer: "Wasp"
},
{
title: "Which of the following whales is the smallest?",
choices: ["Blue Whale", "Humpback Whale", "Sperm Whale", "Be... |
import React from "react"
import styled from "styled-components"
import {Router} from "@reach/router"
const Container = styled.div`
background-color: #d7d7d7;
width: 100%;
height: 100vh;
`
const One = () => <div>One</div>
const Two = () => <div>Two</div>
const Map = () => {
return (
<div>
... |
/*!
* apiai
* Copyright(c) 2015 http://api.ai/
* Apache 2.0 Licensed
*/
'use strict';
var util = require('util');
var TextRequest = require('./text_request').TextRequest;
var VoiceRequest = require('./voice_request').VoiceRequest;
var UserEntitiesRequest = require('./user_entities_request').UserEntitiesRequest;... |
"""
Face detection using dlib CNN face detector using a pre-trained model (712 KB)
from http://dlib.net/files/mmod_human_face_detector.dat.bz2.
"""
# Import required packages:
import cv2
import dlib
from matplotlib import pyplot as plt
def show_img_with_matplotlib(color_img, title, pos):
"""Shows an image using ... |
import {request} from "./request";
export function getHomeMultidata(){
return request({
url: '/home/multidata'
})
}
export function getHomeGoods(type, page){
return request({
url: '/home/data',
params: {
type,
page
}
})
} |
const express = require("express");
const app = module.exports = express.Router();
const Joi = require("joi");
const { r } = require("../ConstantStore");
const Util = require("../Util");
app.use(async (req, res, next) => {
const token = req.headers.authorization;
if (!token) return res.status(400).json({error: ... |
// Load modules
var Hoek = require('hoek');
var Reporters = require('./index');
// Declare internals
var internals = {};
exports = module.exports = internals.Reporter = function (options) {
var self = this;
self._reporters = [];
options.reporter.forEach(function (reporter, index) {
var repo... |
'use strict'
const deepSeal = require('deep-seal')
const dotProp = require('dot-prop')
let globalState
const GlobalState = {
reset() {
globalState = deepSeal({
galleryUrl: '',
galleryData: {
title: '',
items: [],
actualGalleryUrl: '',
},
aria2: {
sessionF... |
"""Bootleg data utils."""
import os
from bootleg.symbols.constants import FINAL_LOSS, SPECIAL_TOKENS
from bootleg.utils import utils
def correct_not_augmented_dict_values(gold, dict_values):
"""
Correct gold label dict values in data prep.
Modifies the dict_values to only contain those mentions that are... |
/*******************************************************************************
* Copyright (c) 2016, Institute for Pervasive Computing, ETH Zurich.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... |
import {Bend} from '../../src/Cirsim/Bend';
describe('Bend', function() {
it('Construct', function() {
var b = new Bend();
expect(b.x).toBe(0);
expect(b.y).toBe(0);
});
});
|