text stringlengths 3 1.05M |
|---|
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _toUpper=_interopRequireDefault(require("lodash/toUpper")),_middleware=_interopRequireDefault(require("./middleware")),middleware=function(e){... |
/* == PACOTES NODEJS ==
prompt-sync
express
nodemon
sequelize
mysql2
express-handlebars
*/
/*
let http = require(`http`)
http.createServer( (req, res) => {
res.end(`hello!`)
}).listen(8090)
console.log(`Servidor rodando`)
*/
const express = require(`express`)
const app = express()
app... |
import React, { useState } from 'react'
import { Link, useHistory } from 'react-router-dom'
import { FiLogIn } from 'react-icons/fi'
import api from '../../services/api'
import './styles.css'
import logoImg from '../../assets/logo.svg'
import heroesImg from '../../assets/heroes.png'
export default function Logon() ... |
'use strict';
// Setting up route
angular.module('core').config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
// Redirect to home view when route not found
$urlRouterProvider.otherwise('/');
// Home state routing
$stateProvider
.state('home', {
url: '/',
... |
'use strict';
var app = app || {};
(function (module) {
const restaurantView = {};
// LANDING PAGE VIEW
restaurantView.initIndexView = function () {
$('#home-video').show();
$('.home-about-container').show();
$('#about-button').show();
$('#home-button').show();
if (localStorage.ID) {
... |
const os = require('os')
const webpack = require('webpack')
const cfg = require('./webpack.config.production.js')
const packager = require('electron-packager')
const del = require('del')
const exec = require('child_process').exec
const argv = require('minimist')(process.argv.slice(2))
const devDeps = Object.keys(requir... |
/*!
* devextreme-angular
* Version: 20.1.3
* Build date: Fri Apr 24 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* h... |
/**
* 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.
*
* @flow
*/
// UpdateQueue is a linked list of prioritized updates.
//
// Like fibers, update queues come in pairs: a current queu... |
import React from 'react'
import Icon from './Icon'
const CommentIcon = (props) => (
<Icon
viewBox="0 0 20 20"
className={props.className}
width={props.width}
height={props.height}
>
<path d="M5.8 12.2v-6.2h-3.8c-1.1 0-2 0.9-2 2v6c0 1.1 0.9 2 2 2h1v3l3-3h5c1.1 0 2-0.9 2-2v-1.82c-0.064 0.014-0.1... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _pdfobject = _interopRequireDefault(require("../pdfkit/pdfobject"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const escapableRe = /[\n\r\t\b\f\(\)\\]/g;... |
from argparse import ArgumentParser
import os
import pickle
from pprint import pprint
import sys
import numpy as np
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from chemprop.data import MoleculeDataset
from chemprop.data.utils import get_data
BASE = '/data/rsg/chemistry/yangk/lsc_experiments_dump_s... |
import './welcome-screen.css';
import React from 'react';
import PropTypes from 'prop-types';
import { Intro } from '../data/screen-index';
import * as url from '../images/background-image - Kopie4.png';
const WelcomeScreen = ({ setPageIndex, vocabulary }) => (
<div className="welcome-screen">
<div className="... |
import { presetActions } from '../helpers/database';
export default [
// Bronze weaponry
{
id: 'bronze-sword',
name: 'Bronze Sword',
examine: 'A sword made of Bronze.',
price: 15,
type: 'weapon',
slot: 'right_hand',
wearable: 'sword',
stats: {
attack: {
stab: 4, slash:... |
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
parcelRequire = (function (modules, cache, entry, globalName)... |
/**
* jQuery EasyUI 1.5
*
* Copyright (c) 2009-2016 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function($){
function _1(_2){
var _3=$.data(_2,"combogr... |
import React from 'react';
import PropTypes from 'prop-types';
function Progress({ percentage }) {
return (
<div className='progress'>
<div
className='progress-bar progress-bar-striped bg-success'
role='progressbar'
style={{ width: `${percentage}%` }}
>
{percentage}%
... |
import React, { useState, useEffect } from 'react'
import axios from 'axios'
const useField = (type) => {
const [value, setValue] = useState('')
const onChange = (event) => {
setValue(event.target.value)
}
return {
type,
value,
onChange
}
}
const useCountry = (name) => {
const [country, ... |
import { __assign, __extends } from "tslib";
import { clamp, each, filter, get, mix } from '@antv/util';
import { ellipsisLabel } from '../util/label';
import { getMatrixByAngle, getMatrixByTranslate } from '../util/matrix';
import { getStatesStyle } from '../util/state';
import Theme from '../util/theme';
import Legen... |
const {createLogger, format, transports} = require('winston')
const {timestamp, label, printf} = format
const DailyRotateFile = require('winston-daily-rotate-file')
const fs = require('fs')
const path = require('path')
const pid = process.pid
const pname = path.basename(process.cwd())
const os = require('os')
const ... |
import createFacility from '../createFacility';
import { POST_ACTIVITY } from '../../src/actions/postActivity';
import * as ActivityClientState from '../../src/constants/ActivityClientState';
test('Post activity success', async () => {
const { actions, directLine, store } = await createFacility();
// Clear out a... |
/**
* jQuery EasyUI 1.5
*
* Copyright (c) 2009-2016 www.jeasyui.com. All rights reserved.
*
* Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php
* To use it on other terms please contact us: info@jeasyui.com
*
*/
(function ($) {
function _1(_2) {
$(_2).addClass("toolti... |
import apamax.log_analyzer
import io
import sys
import time
import logging
import os
log = logging.getLogger('test')
durationSecs = float(sys.argv[1])
mode = sys.argv[2]
analyzerArgs = sys.argv[3:]
with open('fake-correlator.log', 'w') as f:
pass
# monkey-patch io.open to allow us to fake the input/output without ... |
export const getDiscordInfo = () => {
return new Promise(resolve => {
fetch("https://discordapp.com/api/servers/161199619630563329/widget.json")
.then(res => resolve(res.json()));
});
};
|
# Copyright 2021 Huawei Technologies Co., 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 law or agreed to... |
module.exports={A:{A:{"2":"J D E F A B tB"},B:{"1":"K L G M N O P Q R S T U V W Z a b c d e f g h i j X k H","16":"C"},C:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB kB QB lB RB SB Y TB UB VB WB XB YB ZB aB bB cB dB eB fB gB P Q R mB S T U V W Z a b c d e f g h i j X k H","2":"0 uB jB I l J D... |
const express = require("express");
const db = require("./config/connection");
const path = require("path");
const app = express();
const PORT = process.env.PORT || 3001;
const { ApolloServer } = require("apollo-server-express");
const { typeDefs, resolvers } = require("./schemas");
const { authMiddleware } = require... |
/* istanbul instrument in package npmtest_pushover */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function () {
... |
import {request} from "./request";
export function getHomeMultData() {
return request({
url: '/home'
})
}
|
import { emailValidation } from "./emailValidation";
test("it should validate email correctly", () => {
expect(emailValidation("test@test.com")).toBeTruthy();
expect(emailValidation("test.com")).toBeFalsy();
expect(emailValidation("tes@test")).toBeFalsy();
expect(emailValidation("tes@test.")).toBeFalsy();
}... |
"use strict";
/**
* Copyright (c) 2013-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.
*
* @typechecks
*/
/**
* Simple function for formatting strings.
*
* Replaces placeholders with values passed as extra ... |
#!/usr/bin/env python
# coding: utf-8
# troduction
# -------------------
#
# Brzezniak (2000) is a great book because it approaches conditional expectation through a sequence of exercises, which is what we are trying to do here. The main difference is that Brzezniak takes a more abstract measure-theoretic approach to ... |
/*
* UltraCart Rest API V2
* UltraCart REST API Version 2
*
* OpenAPI spec version: 2.0.0
* Contact: support@ultracart.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.15-SNAPSHOT
*
* Do no... |
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2017 the original author or authors.
*
* 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/li... |
/*global defineSuite*/
defineSuite([
'Core/isCrossOriginUrl',
'ThirdParty/Uri'
], function(
isCrossOriginUrl,
Uri) {
"use strict";
it('returns false for relative urls', function() {
expect(isCrossOriginUrl('/some/url.jpg')).toEqual(false);
expect(i... |
/**
* Module dependencies.
*/
var passport = require('passport')
, util = require('util')
, BadRequestError = require('./errors/badrequesterror')
, Imap = require('imap');
/*
*The imap authentication strategy authenticates users using imap login information. The strategy requires some options like
*imaphost ... |
module.exports = {
siteMetadata: {
title: `AudioC0RE`,
description: `Audiocore is the leading headphones sharing app in the world`,
author: `rishika`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path:... |
define([
// Dojo
"dojo",
"dojo/_base/declare",
//CMS
"epi/_Module",
"epi/dependency",
"epi/routes"
], function (
// Dojo
dojo,
declare,
//CMS
_Module,
dependency,
routes
) {
return declare([_Module], {
initialize: function () {
this.inherited(arguments);
... |
const colors = require('vuetify/es5/util/colors').default
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
titleTemplate: '%s - ' + process.env.npm_package_name,
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', cont... |
import React from 'react'
import ReactDOM from 'react-dom'
import mapboxgl from 'mapbox-gl'
import Pagination from "./components/Pagination";
import {pages} from "./build/pages.scss"
mapboxgl.accessToken = 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4M29iazA2Z2gycXA4N2pmbDZmangifQ.-g_vE53SD2WrJ6tFX7QHmA';
class Application ex... |
"use strict"
function setNode(obj, node) {
if(node) {
obj.node = node
} else {
obj.node = null
}
}
function Closure(
name,
variables,
args,
closures,
entry,
exit,
raise,
blocks,
strict,
node) {
this.type = "Closure"
this.name = name
this.variables = variables
this.arguments =... |
//@ts-check
///<reference path="Email.d.ts" />
"use strict";
var formEmail = (function () {
"use strict";
async function onLoad(executionContext) {
}
async function onSave(executionContext) {
}
return {
OnLoad: onLoad,
OnSave: onSave
};
})();
var formEmail_for_Interactive_experience = (function () {
"use s... |
'use strict';
var L = require('../../node_modules/leaflet');
L.Icon.Default.imagePath = "../assets/images/";
require('leaflet-fullscreen');
let leafletMap = function () {
"ngInject";
return {
restrict: 'A',
scope: {
polygon: '@'
},
template: '<div local-map style="height: 300px;"></di... |
const pick = require('./pick')
const Logger = require('./logger')
const Base62 = require('./base62')
const deepFreeze = require('./deep-freeze')
const daysToSeconds = require('./days-to-seconds')
module.exports = {
pick,
Logger,
Base62,
deepFreeze,
daysToSeconds
}
|
import React from 'react';
import { createStackNavigator } from 'react-navigation-stack';
import MTestScreen from '../screens/MTestScreen';
import MWorksheetScreen from '../screens/MathsScreens/MWorksheetScreen';
import MLearnScreen from '../screens/MathsScreens/MLearnScreen';
export const AppStackNavigatorMath = crea... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.CameraEnhance = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "cur... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[208],{264:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return s})),n.d(t,"rightToc",(function(){return c})),n.d(t,"default",(function(){return u}));var a=n(2),r=n(6),o=(n(0),n(333)),i={id:"index",title:"... |
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@material-ui/unstyled';
import Tablelvl2Context from '../Table/Tablelvl2Context';
import useThemeProps from '../styles/useThemeProps';
import experimentalStyled from '.... |
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8504],{3495:function(b){function a(a){a.languages.sqf=a.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach... |
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics.pairwise import pairwise_distances
from sklearn.metrics.pairwise import cosine_similarity
from sklearn import metrics
from scipy.spatial.distance import cosine
from numpy import dot
from numpy.linalg import ... |
var __awaiter =
(this && this.__awaiter) ||
function(thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function... |
const Employee = require("./employee");
class Engineer extends Employee {
constructor(name, id, email, github) {
super(name, id, email);
this.github = github;
}
getGithub() {
return this.github;
}
getRole() {
return "Engineer";
}
}
module.exports = Engineer; |
import {
AmbientLight,
CubeTextureLoader,
DirectionalLight,
PerspectiveCamera,
Raycaster,
sRGBEncoding,
Vector2
} from "three";
import { ControlMode, SpatialControls } from "spatial-controls";
import { ProgressManager } from "../utils/ProgressManager";
import { PostProcessingDemo } from "./PostProcessingDemo";
... |
//tealium universal tag - utag.loader ut4.0.201902121218, Copyright 2019 Tealium.com Inc. All Rights Reserved.
if(typeof utag_err=='undefined')var utag_err=[];window._tealium_old_error=window._tealium_old_error||window.onerror||function(){};window.onerror=function(m,u,l){if(typeof u!=='undefined'&&u.indexOf('/utag.')>0... |
require('es6-promise').polyfill();
var m = require('mithril');
var renderToString = require('mithril-node-render');
var _mSC = m.startComputation;
var _mEC = m.endComputation;
var _mR = m.request;
function run(module) {
return new Promise(function(resolve, reject) {
var scope;
var pendingRequests = 0;
... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.cowListComplete = void 0;
const cowInformation_1 = require("./deciferDatastream/cowInformation")... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from abc import ABC, abstractmethod
from typing import Dict, Optional, Tuple, Union, cast
import gym
import gym.wrappers
... |
# Python program for project
import os
import sys
import time
import torch
import argparse
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as models
import matplotlib
matplotlib.use('Agg')
from torch.autograd import Va... |
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Tile/Image.js
*/
/**
* Constant: Op... |
const { expect } = require('chai')
const constants = require('../../src/constants')
describe('src/constants', () => {
it('has the constant ERROR_BUSY', () => {
expect(constants).to.have.property('ERROR_BUSY', 'EBUSY')
})
it('has the constant ERROR_NOT_DIR', () => {
expect(constants).to.have.property('E... |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2010, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of so... |
# Copyright 2018 The TensorFlow 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 required by applica... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'about', 'ko', {
copy: '저작권 © $1 . 판권 소유.',
dlgTitle: 'CKEditor 에 대하여',
help: '도움이 필요하시면 $1 를 확인하세요.',
moreInfo: '라이선스에 대한 정보는 저희 웹 사... |
const router = require('express').Router();
const { Tag, Product, ProductTag } = require('../../models');
// The `/api/tags` endpoint
router.get('/', (req, res) => {
// find all tags
// be sure to include its associated Product data
Tag.findAll(
{
include: {
model: Product,
a... |
# -*- coding: utf-8 -*-
from akad.ttypes import Message, Location
from random import randint
import json, ntpath
def loggedIn(func):
def checkLogin(*args, **kwargs):
if args[0].isLogin:
return func(*args, **kwargs)
else:
args[0].callback.other('You want to call the function... |
import { runGit, logPromise } from "../utils.js";
async function pushGit({ version }) {
await runGit(["commit", "-am", `Release ${version}`]);
await runGit(["tag", "-a", version, "-m", `Release ${version}`]);
await runGit(["push"]);
await runGit(["push", "--tags"]);
}
export default function pushToGit(params)... |
const { assert } = require('chai');
const UsersList = require('../src/users');
describe('UsersList', () => {
describe('constructor', () => {
it('should construct a UsersList object', () => {
const usersList = new UsersList('csv', './data/users.csv');
assert.equal(usersList.sourceType, 'csv');
... |
import React from 'react'
import '../../styles/common.less'
import './index.less'
import Navigation from '../../components/navigation/Navigation'
import InfiniteScroll from '../../components/InfiniteScroll'
import SliderMove from '../../components/Slider/touchMove'
import ImageCard from '../../components/Slider/imageCa... |
from tvm.contrib.download import download_testdata
from PIL import Image
import numpy as np
img_url = "https://s3.amazonaws.com/model-server/inputs/kitten.jpg"
img_path = download_testdata(img_url, "imagenet_cat.png", module="data")
# Resize it to 224x224
resized_image = Image.open(img_path).resize((224, 224))
img_da... |
import request from '@/utils/request'
const base_url = '/admin/dictionary/'
export function queryPageDictionaries(data) {
return request({
url: base_url + 'query-page',
method: 'post',
data
})
}
export function queryAllDictionaries(data) {
return request({
url: base_url + 'query-all',
metho... |
/**
* 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.
*
* @format
* @emails oncall+javascript_foundation
*/
import getGroup from '../../ios/getGroup';
const xcode = require('xcode');
... |
#define bunch of attributes and functions inside of a class and inherent their attributes
from Chef import Chef
from ChineseChef import ChineseChef
myChef = Chef()
myChineseChef = ChineseChef()
#myChef.make_chicken()
myChef.make_special_dish()
#myChef.make_salad()
myChineseChef.make_fried_rice() |
const airlines = [
{ mnemonic: "DL", name: "Delta Air Lines" },
{ mnemonic: "B6", name: "JetBlue Airways" },
{ mnemonic: "WN", name: "Southwest Airlines" },
{ mnemonic: "AS", name: "Alaska Airlines" },
{ mnemonic: "HA", name: "Hawaiian Airlines" },
{ mnemonic: "UA", name: "United Airlines" },
{ mnemonic:... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateOrder = exports.OrderOrSubClassJoiSchema = exports.OrderJoiSchema = void 0;
// This file was generated
const Joi = require("joi");
const oaValidationError_1 = require("../oaValidationError");
const oa = require("../oa");
const ... |
// Copyright(c) 2018 Lianjia, Inc.All Rights Reserved
const path = require('path')
const fs = require('fs')
const {
mkdirpSync,
writeFileWithTemplate
} = require('../utils')
module.exports = (appPath, name) => {
name = path.basename(name, '.js')
const apiPath = path.join(appPath, 'src/services/')
const tar... |
export { default } from 'ember-mdl/components/mdl-textfield'; |
const typeDefs = require('./typeDefs');
const resolvers = require('./resolvers');
module.exports = { typeDefs, resolvers }; |
/**
* Migration layout file.
* Assign your table name to the tableName variable.
* Remember, it's always in plural
*/
let tableName = "APLI_TIEL_TIPO_ELEMENTOS";
exports.up = function (knex) {
return knex.schema.createTable(tableName, (table) => {
table.uuid("UID").primary("PK_APLI_TIEL");
table.uuid("APL... |
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const HtmlwebpackPlugin = require('html-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const UglifyJsPlugin = require('... |
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import textwrap
import pytest
from pants.backend.go import target_type_rules
from pants.backend.go.goals.test import GoTestFieldSet
from pants.backend... |
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
public: "/",
src: "/_dist_",
},
plugins: [
"@snowpack/plugin-typescript",
[
"@snowpack/plugin-webpack",
{
extendConfig: (config) => {
... |
'use strict';
var assert = require('assert');
module.exports = function(App, options, runner) {
var app;
var Views = App.Views;
var views;
describe('app.collection.compile', function() {
beforeEach(function() {
views = new Views();
});
it('should throw an error when an engine cannot be fo... |
// r125
import { Matrix3 } from '../../math/Matrix3.js';
import { Plane } from '../../math/Plane.js';
function WebGLClipping( properties ) {
const scope = this;
let globalState = null,
numGlobalPlanes = 0,
localClippingEnabled = false,
renderingShadows = false;
const plane = new Plane(),
viewNormalMatri... |
# Generated by Django 2.0.7 on 2018-07-27 07:45
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('films', '0003_auto_20180727_1231'),
]
operations = [
migrations.AlterField(
model_name='film',
... |
#!/usr/bin/python3
import string
from collections import defaultdict
from collections import OrderedDict
# loop through all documents
list_of_documents = ["doc1.txt", "doc2.txt", "doc3.txt", "doc4.txt", "doc5.txt", "doc6.txt"]
# map to keep all the counts of words and sentences of those particular words.
word_count =... |
from flask import Blueprint
router = Blueprint("router", __name__)
@router.route("/check")
def check():
return "Congratulations! Your app works. :)"
@router.route("/hello")
def hello():
return "Hacktoberfest is cool!"
@router.route("/add", methods=["POST"])
def add():
# Add logic here
return
|
"use strict";
/*eslint no-console: 0 */
var _ = require('underscore');
var cliParameterParsing = require('../bbr/common/cliParameterParsing');
var proddb = require('./proddb');
var runScriptImpl = require('./run-script-impl');
var optionSpec = {
pgConnectionUrl: [false, 'URL som anvendes ved forbindelse til datab... |
import {Button, Form, Input, Layout, PageHeader, Tooltip, Typography, Spin, Radio} from "antd";
import React from "react";
import { useDispatch } from "react-redux";
import { Redirect } from "react-router-dom";
import { createAlert } from "../../../store/actions/generalActions";
import { useKeycloak } from "@react-keyc... |
// as it is a circular dependency, we need to keep `module.exports` on top.
module.exports = Elements;
var pushUniq = require('../utils/pushuniq');
var elementsPrototype = Elements.prototype = [];
var methods = require('../methods');
function Elements() {}
// Elements.queryAll(selector);
elementsPrototype.queryAll =... |
import { groupAnagrams } from '.'
test('', () => {
expect(groupAnagrams(['eat', 'tea', 'tan', 'ate', 'nat', 'bat'])).toEqual([
['eat', 'tea', 'ate'],
['tan', 'nat'],
['bat'],
])
})
|
import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/core';
import ContentWrapper from './contentWrapper';
import CO2 from './co2';
const Counter = ({
currentCo2, currentTemp, currentSlr, currentIceMelt,
}) => (
<ContentWrapper
style={`
padding: 0;
margin-top... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import numpy as np
from numpy.testing import *
class TestArrayRepr(object):
def test_nan_inf(self):
x = np.array([np.nan, np.inf])
assert_equal(repr(x), 'array([ nan, inf])')
class TestComplexArray(TestCase):
def test_str(self):
rva... |
import React from 'react';
import { Navbar, Container } from "react-bootstrap";
export default function Nav() {
return (
<>
<Navbar bg="dark" variant="dark">
<Container>
<Navbar.Brand href="#home">Navbar</Navbar.Brand>
<Nav className="me-... |
import React from 'react';
import UploadBox from './Upload';
import '../CSS/App.css';
import { simpleAction } from '../actions/simpleAction';
import { connect } from 'react-redux';
const mapDispatchToProps = dispatch => ({
simpleAction: () => dispatch(simpleAction())
})
/*
* mapStateToProps
*/
const ... |
"""
false_minimum
~~~~~~~~~~~~~
Plots a function of two variables with many false minima."""
#### Libraries
# Third party libraries
from matplotlib.ticker import LinearLocator
# Note that axes3d is not explicitly used in the code, but is needed
# to register the 3d plot type correctly
from mpl_toolkits.mpl... |
try:
import pylab
except RuntimeError:
import matplotlib
matplotlib.use("Agg",warn=False,force=True)
import pylab
from spiders import (
spider_axis,
spider_trace,
)
from colors import colors
import latex
from savefig import savefig
try:
from dock import PlotDock
exce... |
'use strict';
/**
* API Server Module
* @module src/app
*/
const cwd = process.cwd();
// 3rd Party Resources
const express = require('express');
const cors = require('cors');
const morgan = require('morgan');
// Esoteric Resources
const errorHandler = require( `${cwd}/src/middleware/500.js`);
const notFound = re... |
const Manager = require("./lib/Manager");
const Engineer = require("./lib/Engineer");
const Intern = require("./lib/Intern");
const Employee = require("./lib/Employee");
const inquirer = require("inquirer");
const path = require("path");
const util = require("util");
const fs = require("fs");
// promisify file writing... |
/* PrismJS 1.20.0
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript */
var _self =
'undefined' != typeof window
? window
: 'undefined' != typeof WorkerGlobalScope &&
self instanceof WorkerGlobalScope
? self
: {},
Prism = (function (u) {
... |
/*globals require*/
/*eslint-env node, mocha*/
/**
* @author ksmyth / https://github.com/ksmyth
* @author lattmann / https://github.com/lattmann
* @author pmeijer / https://github.com/pmeijer
*/
var testFixture = require('../../../_globals.js');
describe('GME authentication', function () {
'use strict';
... |
import React from 'react'
import PropTypes from 'prop-types'
import {Li, Text, Link, Checkbox, Card} from 'evergreen-ui'
export default function Destination({
destination,
preferences,
setPreferences
}) {
return (
<Li maxWidth={280} marginRight={20}>
<Card elevation={1} padding={20} paddingTop={8}>
... |