text stringlengths 3 1.05M |
|---|
import * as SvgIconsComponent from '../components/icons';
/**
* Icons Component map.
*
* @param {string} name Icon name.
* @returns {*}
*/
export const getIconComponentByName = ( name ) => {
const ComponentsMap = {
facebook: SvgIconsComponent.Facebook,
twitter: SvgIconsComponent.Twitter,
... |
/**
* @license
* Copyright Google LLC 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://angular.io/license
*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = fact... |
import Ember from 'ember';
import layout from './template';
const {
htmlSafe
} = Ember.String;
const {
Component,
computed
} = Ember;
function numberToOpacity(number) {
let r = number % 255;
if (r === 0) {
return 1;
}
if (r === 254) {
return 0;
}
return (255 / r).toFixed(3);
}
export def... |
from __future__ import annotations
import enum
import typing
from concurrent.futures import CancelledError
from typing import Any, Optional
if typing.TYPE_CHECKING:
from erised.proxy import Connector
class FutureState(enum.Enum):
PENDING = "PENDING"
RUNNING = "RUNNING"
CANCELLED = "CANCELLED"
CA... |
// 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... |
from setuptools import find_packages, setup
version = "1.2.9"
setup(
name="holland.backup.example",
version=version,
description=" Example Backup Plugin",
long_description="""\
An example backup plugin
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_... |
/**
* Custom Javascript functions added as part of the S3 Framework
* Strings are localised in views/l10n.js
*/
// Global variable to store all of our variables inside
var S3 = Object();
S3.gis = Object();
S3.JSONRequest = Object(); // Used to store and abort JSON requests
S3.TimeoutVar = Object(); // Used to stor... |
const config = require('./webpack.shared')()
config.output.filename = 'js/[name].js'
config.output.pathinfo = false
config.devtool = 'cheap-module-eval-source-map'
config.optimization = {
removeAvailableModules: false,
removeEmptyChunks: false,
splitChunks: false
}
module.exports = config
|
!function(t){function i(t,i,e){xh.ec(this),this.yB=t,this.Qb=i,this.BG=e}function e(){this.wB=[]}function n(){}function o(t){void 0===t&&(t=42),this.seed=t,this.Rx=48271,this.uu=2147483647,this.gB=this.uu/this.Rx,this.aG=this.uu%this.Rx,this.WF=1/this.uu,this.random()}function r(){}function s(t){this.key=-1,this.value=... |
// Animations v1.0, Copyright 2014, Joe Mottershaw, https://github.com/joemottershaw/
// ==================================================================================
// Visible, Sam Sehnert, samatdf, TeamDF, https://github.com/teamdf/jquery-visible/
// ========================================================... |
"TextEncoder" in self && "TextDecoder" in self
|
name = "qt"
version = "5.12.6"
authors = [
"The Qt Company"
]
description = \
"""
Qt is a free and open-source widget toolkit for creating graphical user interfaces as well as cross-platform
applications that run on various software and hardware platforms such as Linux, Windows, macOS, Android or
... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
var _... |
export default class Transcript {
constructor (fetchResultJson) {
this.value = this.toString(fetchResultJson)
}
toString (fetchResultJson) {
const transcripts = fetchResultJson.results.map(result => result.alternatives[0].transcript)
return transcripts.join('').replace(/\u0020/g, '')
}
normalize... |
import { subjects } from './selectOptions';
export function convertClockTimeToMinutes(clockTime) {
const [hours, minutes] = clockTime.split(':').map( value => +value );
const totalTimeInMinutes = hours * 60 + minutes;
return totalTimeInMinutes;
}
export function replaceSubjectIdBySubjectName(proffyData) ... |
// @flow
import JsonRpc, { Transport } from './jsonrpc';
import EthRpc from './ethrpc';
class FakeTransport implements Transport {
request(req) {
return Promise.resolve(req);
}
}
describe('EthApi', () => {
test('estimateGas should convert numbers to hex', () => {
let args;
const ethRpc = new EthR... |
/*! For license information please see component---node-modules-lekoarts-gatsby-theme-emilia-core-src-templates-projects-query-tsx-1dfd290186d2bf1e990c.js.LICENSE.txt */
(self.webpackChunkemilia=self.webpackChunkemilia||[]).push([[540],{8926:function(t){function e(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(l){ret... |
import DS from 'ember-data';
import JamSerializer from '../mixins/jam-serializer';
import JamDocumentSerializer from '../mixins/jam-document-serializer';
export default DS.JSONAPISerializer.extend(JamSerializer, JamDocumentSerializer, {
modelName: 'config',
});
|
import React from 'react';
import { Alert, Text, StyleSheet, StatusBar } from 'react-native';
import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';
import SelectableCard from './compoenents/SelectableCard';
import Header from './compoenents/Header';
import MultiSelectSo... |
import sys
import time
from collections import defaultdict
from functools import wraps
from typing import Optional
from .logger import JinaLogger
from ..helper import colored, get_readable_size, get_readable_time
from ..importer import ImportExtensions
def used_memory(unit: int = 1024 * 1024 * 1024) -> float:
""... |
# Django core
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.base_user import BaseUserManager
from django.dispatch import receiver
from django.db.models.signals import post_save
class UserManager(Bas... |
const IsPlainObject = Phaser.Utils.Objects.IsPlainObject;
const GetValue = Phaser.Utils.Objects.GetValue;
const UUID = Phaser.Utils.String.UUID;
var AddPage = function (key, tabGameObject, pageGameObject) {
if (IsPlainObject(key)) {
var config = key;
key = GetValue(config, 'key');
tabGameOb... |
/* global D3 */
// Initialize a histogram. Modeled after Mike Bostock's
// Reusable Chart framework https://bost.ocks.org/mike/chart/
function histogram() {
// set the dimensions and margins of the graph
let margin = {
top: 10,
left: 45,
right: 20,
bottom: 30
},
width = 400 - margin.left - margin.right,... |
// ==UserScript==
// @name Saliens bot
// @namespace http://tampermonkey.net/
// @version 35.2
// @description Beat all the saliens levels
// @author https://github.com/meepen/salien-bot
// @match https://steamcommunity.com/saliengame
// @match https://steamcommunity.com/saliengame/... |
'use strict';
exports.calculate = function(req, res) {
req.app.use(function(err, req, res, next) {
if (res.headersSent) {
return next(err);
}
res.status(400);
res.json({ error: err.message });
});
var operations = {
// Added + sign to coerce variables to numbers to avoid string concat... |
import Head from "next/head";
import { Button, Card, Badge } from "react-bootstrap";
import { AiOutlineLoading3Quarters } from "react-icons/ai";
import now from "performance-now";
export default function Home({ userInfo, timeTaken }) {
return (
<>
<Head>
<title>Fetch a User with React.js - Next.js<... |
const Sequelize = require("sequelize")
const CONFIG = require("./config")
const urlModule = require("url")
// To keep DRY and maintain compatibility with heroku we parse the database
// initialization data from the DATABASE_URL variable.
const databaseUrl = urlModule.parse(CONFIG.DATABASE_URL)
const databaseUsername =... |
(function(e){function t(t){for(var r,a,s=t[0],u=t[1],i=t[2],d=0,b=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&b.push(o[a][0]),o[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);l&&l(t);while(b.length)b.shift()();return c.push.apply(c,i||[]),n()}function n(){for(var e,... |
"""
Created on Mon Apr 02 16:34:45 2018
@author: WeiJin,PoHan
"""
# Import tools
import numpy as np
# Define a class called Consumer to simulate the consumption preferences and factor supply of each consumer in the economy
class Consumer(object):
def __init__(self,c,g,f,A,B,T):
# c: Number ... |
import mongoose from 'mongoose'
import { communityRelations, occupations } from '../helpers/enums'
const peopleSchema = new mongoose.Schema({
token: {
type: String
},
name: {
type: String,
required: true
},
communityCode: {
type: String,
required: true
},
slug: {
type: String,
... |
# 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 writing, software
# d... |
Page({
/**
* 页面的初始数据
*/
data: {
showUploadTip: false,
haveGetOpenId: false,
envId: '',
openId: ''
},
onLoad(options) {
this.setData({
envId: options.envId
})
},
getOpenId() {
wx.showLoading({
title: '',
})
wx.cloud.callFunction({
name: 'quickstar... |
import wrap from './wrap';
import error from '../util/error';
/**
* Escape a function or value to prevent it from being parsed and recompiled.
* This helper can be used in lieu of single-table table expressions (which
* are internally parsed and rewritten) to apply a JavaScript function as-is,
* including support ... |
"""
Module for reusable classes extending and easing chalice and peewee functionality.
"""
import importlib
import inspect
import os
from app import app
import peewee
from playhouse import postgres_ext, shortcuts
class DatabaseHandle:
def __init__(self, app=None):
self.handle = None
self.app = a... |
const type = Object.freeze({
empty: 0,
block: 1,
corner: 2,
edge: 3,
});
const piece = [
[type.corner, type.edge, type.corner],
[type.edge, type.block, type.edge],
[type.corner, type.edge, type.corner],
];
function getAllLabels(piece) {
const pieces = new Set();
return getPotentialSymmetries(piece)
... |
const { NotImplementedError } = require('../extensions/index.js');
/**
* Given a number, replace this number with
* the sum of its digits until we get to a one digit number.
*
* @param {Number} n
* @return {Number}
*
* @example
* For 100, the result should be 1 (1 + 0 + 0 = 1)
* For 91, the result should be 1... |
from pokemongo_bot.human_behaviour import sleep
from pokemongo_bot.base_task import BaseTask
class IncubateEggs(BaseTask):
SUPPORTED_TASK_API_VERSION = 1
last_km_walked = 0
def initialize(self):
self.ready_incubators = []
self.used_incubators = []
self.eggs = []
self.km_w... |
define(
({
documentTypes: {
data: {
caption: "试_ISO 19115 (Data)______验",
description: ""
},
service: {
caption: "试_ISO 19119 (Service)_______验",
description: ""
},
gmi: {
caption: "试_ISO 19115-2 (Imagery and Gridded Data)____________验",
descripti... |
/**
* @copyright Copyright (c) 2020 Maxim Khorin <maksimovichu@gmail.com>
*/
'use strict';
const Base = require('evado/component/base/BaseModule');
module.exports = class NavigationApiModule extends Base {
};
module.exports.init(module); |
import { find, max, extend } from 'lodash';
class Rule {
constructor(cb){
this.cond = cb;
this.thenCb = [d => d]
}
test(token){
return this.cond(token)
}
then(cb){
this.thenCb.push(cb)
return this
}
scan(token){
return (this.cond(token)) ? 1 : 0
}
map(token){
let res = token
this.thenC... |
import { constant } from "../../config";
var initial_state={
status:401,
data:[]
}
export default function reducer(state=initial_state, action) {
switch(action.type)
{
case constant.redux.frontend_type.zone_list :{
return Object.assign({},state,action.response)
}
... |
module.exports = {
name: 'uiSelectAsync2',
wrapper: ['validation', 'horizontalBootstrapLabel', 'bootstrapHasError'],
template: require('./uiSelectAsync.html')
}; |
/*
___ ___ ___ _ _ _ ___ ___
| __/ __| ___| _ \___ _ _ _ __ (_) |_ /_\ | _ \_ _|
| _|\__ \ / -_) _/ -_) '_| ' \| | _| / _ \| _/| |
|_| |___/ \___|_| \___|_| |_|_|_|_|\__| /_/ \_\_| |___|
*/
//*******************************************************************
'use strict';
... |
# -*- coding: utf-8 -*-
"""Views for creating, editing and viewing site-specific user profiles."""
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from django.contrib import messages
from django.contrib.auth import logout
from django.contrib.auth.decorators impo... |
'use strict';
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Show grunt task time
require('time-grunt')(grunt);
// Configurable paths for the app
var appConfig = {
app: '.',
dist: './dist'
};
// Grunt confi... |
const db = require('../db/database');
const Base = require('./base.model');
const User = require('./user.model');
const Asueto = require('./asueto.model');
const AppError = require('../utils/appError');
/** Class for the Vacation resource */
module.exports = class Vacation extends Base {
static table = 'vacaciones... |
(app => {
app.controller("OpenTabController", ["TabService", "$state", function (TabService, $state) {
const vm = this;
vm.openTab = function (clientName) {
const newTabId = guid();
TabService.openTab(newTabId, clientName, () => $state.go("bar", { tab: { id: newTabId, clientName: clientName } }... |
document.addEventListener("turbolinks:load", function() {
const elements = document.querySelectorAll("[data-action~='load-snippet']")
elements.forEach((element) => element.removeEventListener("click", loadSnippet))
elements.forEach((element) => element.addEventListener("click", loadSnippet))
})
function loadSni... |
/*
Copyright 2017 New Vector 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 in writing, software... |
import { H1 } from '@meetfranz/ui';
import { inject, observer } from 'mobx-react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { defineMessages, intlShape } from 'react-intl';
import injectSheet from 'react-jss';
import { state as ModalState } from './store';
import { sendAuthRe... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see license.txt or http://cksource.com/ckfinder/license
*/
(function() {
var a = (function() {
var h = {
jY: 'E03L22F',
_: {},
status: 'unloaded',
basePa... |
"use strict";
// Copyright 2019 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 agre... |
const Datastore = require('nedb')
class Database {
init() {
this.users = new Datastore({ filename: './db/users.db', autoload: true });
this.audios = new Datastore({ filename: './db/audios.db', autoload: true });
}
}
module.exports = new Database
|
/** @format */
import {AppRegistry} from 'react-native';
import App from './src/main/App';
import {name as appName} from './src/main/app.json';
AppRegistry.registerComponent(appName, () => App);
|
AR = 'arm-none-eabi-ar'
ARFLAGS = 'rcs'
AS = 'arm-none-eabi-gcc'
BINDIR = '/usr/local/bin'
BUILD_DIR = 'basalt'
CC = ['arm-none-eabi-gcc']
CCLNK_SRC_F = []
CCLNK_TGT_F = ['-o']
CC_NAME = 'gcc'
CC_SRC_F = []
CC_TGT_F = ['-c', '-o']
CC_VERSION = ('4', '7', '2')
CFLAGS = ['-std=c99', '-mcpu=cortex-m3', '-mthumb', '-ffunct... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'smiley', 'fi', {
options: 'Hymiön ominaisuudet',
title: 'Lisää hymiö',
toolbar: 'Hymiö'
} );
|
var songs=[
{"id":"1","year":"1967","album":"Sgt. Pepper's Lonely Hearts Club Band","artist":"The Beatles","genre":"Rock"},
{"id":"2","year":"1966","album":"Pet Sounds","artist":"The Beach Boys","genre":"Rock"},
{"id":"3","year":"1966","album":"Revolver","artist":"The Beatles","genre":"Rock"},
{"id":"4","year":"196... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _tsyringe = require("tsyringe");
var _ICacheProvider = _interopRequireDefault(require("../../../shared/container/providers/CacheProvider/models/ICacheProvider"));
var _IAppointmentsRepositories = _interopReq... |
import datetime
import glob
import json
from pathlib import Path
from pprint import pprint
EXPORT_DIRECTORY = "export"
PULL_DIRECTORY = f"{EXPORT_DIRECTORY}/pulls"
REVIEW_DIRECTORY = f"{EXPORT_DIRECTORY}/reviews"
def main():
report = {
"count": 0,
"approves": {},
"reviewers": {},
}
... |
from re import search
from karp.domain.models.search_service import IndexEntry, SearchService
def test_create_empty_object_returns_index_entry():
search = SearchService()
index_entry = search.create_empty_object()
assert isinstance(index_entry, IndexEntry)
assert index_entry.id == ""
assert inde... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'contextmenu', 'en', {
options: 'Context Menu Options'
} );
|
$(document).ready(function() {
var discard = true;
$('#raise-delete-modal').avgrund({
showClose: true, // switch to 'true' for enabling close button
closeByEscape: true, // enables closing popup by 'Esc'..
closeByDocument: false, // ..and by clicking document itself
template: $('... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{Xzuj:function(t,n,e){"use strict";e.r(n),function(t){e.d(n,"getAppPluginPageError",(function(){return w}));var o=e("q1tI"),r=e.n(o),a=e("0cfB"),i=e("/MKj"),u=e("ZGyg"),c=e("okuo"),l=e("Vw/f"),p=e("Obii"),s=e("kYMR"),f=e("lJbD"),b=e("HJRA");function y(t){return(y=... |
import mongoose from 'mongoose'
mongoose.Promise = Promise
import slug from 'slugs'
import sanitizeHTML from 'sanitize-html'
const storeSchema = new mongoose.Schema({
name: {
type: String,
trim: true,
required: 'Please enter a store name'
},
slug: String,
description: {
... |
import sys, os
import time
import random
import csv
from pathlib import Path
import logging
import numpy as np
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence
import torch.nn.init as init
import torch.nn.functional as F
from nltk.translate.bleu_score import corpus_bleu
class Ble... |
/* parser generated by jison 0.4.18 */
/*
Returns a Parser object of the following structure:
Parser: {
yy: {}
}
Parser.prototype: {
yy: {},
trace: function(),
symbols_: {associative list: name ==> number},
terminals_: {associative list: number ==> name},
productions_: [...],
perfo... |
const xstate = require('xstate')
const _ = require('lodash/fp')
const actionEmitter = require('../../action-emitter')
const KEY = 'idCardPhoto'
const idPhotoMachine = xstate.Machine({
key: KEY,
initial: 'idle',
strict: true,
states: {
idle: {
on: {
START: 'scanPhotoCard',
START_MANU... |
'use strict';
describe('Inquilinos E2E Tests:', function () {
describe('Test inquilinos page', function () {
it('Should report missing credentials', function () {
browser.get('http://localhost:3001/inquilinos');
expect(element.all(by.repeater('inquilino in inquilinos')).count()).toEqual(0);
});
... |
import * as React from "react"
import { Link } from "gatsby"
import { StaticImage } from "gatsby-plugin-image"
import Layout from "../../../components/layout"
import Seo from "../../../components/seo"
const SecondPage = () => (
<Layout
siteTitle="Outils d'Appel"
image="map.jpg"
language="fr"
>
<Se... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const ReactComponent = props => (react_1.default.crea... |
import React, { Component } from 'react';
export default class Second extends React.Component {
render() {
return (
< div className="search" >
<h1>Tes</h1>
<header className="search-header">
[Search Title]
</header>
<div className="search-results">
{this.pr... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... |
/*! For license information please see 2.e650732d.chunk.js.LICENSE.txt */
(this.webpackJsonpclient=this.webpackJsonpclient||[]).push([[2],[function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"d",(funct... |
"use strict";
define(['ably', 'shared_helper', 'async'], function(Ably, helper, async) {
var exports = {},
_exports = {},
displayError = helper.displayError,
utils = helper.Utils,
closeAndFinish = helper.closeAndFinish,
createPM = Ably.Realtime.ProtocolMessage.fromDeserialized,
monitorConnection = helper.... |
import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'
import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/dragWidth'
import dialogDragHeight from './dialog/dragHeight'
const install = function(Vue) {
Vue.directive('hasRole', hasRole)
Vue.directive(... |
# coding: utf-8
import wx
import wx.lib.newevent
from itertools import chain
import bookworm.typehints as t
from bookworm.structured_text import SemanticElementType
from bookworm.logger import logger
log = logger.getChild(__name__)
ContextMenuEvent, EVT_CONTEXTMENU_REQUESTED = wx.lib.newevent.NewCommandEvent()
Conte... |
const db = require('./database/dbConfig');
const Users = require('./users-model');
describe('users-model', () => {
afterEach(async () => {
await db('users').truncate();
})
describe('find', () => {
it('returns list of all users in db', async () => {
await Users.add({
username: 'Patrick',
... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10zm0 18c-4.4... |
var assert = require('assert')
var base58check = require('../src/base58check')
var bs58check = require('bs58check')
var sinon = require('sinon')
describe('base58check', function() {
var param
beforeEach(function() {
param = {}
})
it('wraps bs58check.decode', sinon.test(function() {
var expectation = ... |
var webpack = require('webpack');
var path = require('path');
var htmlPlugin = require('html-webpack-plugin');
var SRC = path.resolve(__dirname, 'src');
var OUT = path.resolve(__dirname, 'dist');
var html = new htmlPlugin({
hash: true,
template: 'src/client/index.html',
favicon: 'src/client/favicon.ico'
}... |
// @flow
//
// Copyright 2019 Ivan Sorokin.
//
// 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... |
import pytest
import json
from dbcc import app
class TestFlaskExample:
app.testing = True
client = app.test_client()
exampleJson = {"text":"hello 2 times "}
def test_flaskBase(self):
assert self.client.post('/analyze', json=self.exampleJson).status_code == 200
def test_flaskWordCount... |
import torch.nn as nn
import math
import torch
import torchvision.models as torchmodels
import re
from torch.autograd import Variable
import torch.optim as optim
import torch.nn.functional as F
import numpy as np
import random
import torch.nn.utils as torchutils
from torch.nn import init, Parameter
clas... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link, Route } from 'react-router-dom';
import { inject } from 'mobx-react';
import { withJob } from 'react-jobs';
import isEmpty from 'lodash/isEmpty';
import kebabCase from 'lodash/kebabCase';
import scrollToElement from 'utils/scro... |
var express = require('express');
var app = express(); // une instance d'express
app.set('port',(process.env.PORT || 5000));
var server = require('http').Server(app);
var io = require('socket.io')(server);
var path = require('path');
var routes=require('./routes');
var drivers = {};
var service = {};
var bookid;
//Tem... |
!function(n){var e={};function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d... |
/**
@module ngular
@submodule ngular-htmlbars
*/
import Ngular from "ngular-metal/core"; // Ngular.warn, Ngular.assert
import { read } from "ngular-metal/streams/utils";
import { readViewFactory } from "ngular-views/streams/utils";
import View from "ngular-views/views/view";
import mergeViewBindings from "ngular-htmlb... |
// @flow
import * as db from '../common/database';
import type { BaseModel } from './index';
export const name = 'Cookie Jar';
export const type = 'CookieJar';
export const prefix = 'jar';
export const canDuplicate = true;
export type Cookie = {
id: string,
key: string,
value: string,
expires: Date | string |... |
module.exports = {
development: {
client: "mysql",
connection: "mysql://root:1234@localhost:3306/testdb",
migrations: {
directory: __dirname + "/knex/migrations"
},
seeds: {
directory: __dirname + "/knex/seeds"
}
},
production: {
client: "mysql",
connection: "mysql://root:1234@localhost:3306/t... |
/**
*
* Identity
*
*/
import React from 'react';
import PropTypes from 'prop-types';
function Identity(props) {
return <h5>Public Key: {props.address}</h5>;
}
Identity.propTypes = {
address: PropTypes.string,
};
export default Identity;
|
/*
* @flow strict-local
* Copyright (C) 2020 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/
import * as React from 'react';
import Medium... |
/*
* @Description: 前端错误日志
* @FilePath: \DTSMv3\src\store\modules\errorLog.js
* @Date: 2022-02-11 11:11:07
* @LastEditors: Lin_kangjing
* @LastEditTime: 2022-02-11 11:19:04
* @author: Lin_kangjing
*/
const errLog = {
state: {
logs: []
},
mutations: {
ADD_ERROR_LOG: (state, log) => {
state.logs... |
const constants = {
ENVIRONMENT: {
INTEGRATION: "integration",
PRODUCTION: "production",
LOCAL: "local"
},
LOCALE: {
UK: ".co.uk",
AU: ".au",
IE: ".ie",
US: ".com"
}
};
export default constants;
|
function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Obj... |
import React from 'react'
import PropTypes from 'prop-types'
import { kebabCase } from 'lodash'
import { graphql, Link } from 'gatsby'
import Layout from '../components/Layout'
import Content, { HTMLContent } from '../components/Content'
export const BlogPostTemplate = ({
content,
contentComponent,
description,
... |
(function(){function C(){var a="{}";if("userDataBehavior"==f){g.load("jStorage");try{a=g.getAttribute("jStorage")}catch(b){}try{r=g.getAttribute("jStorage_update")}catch(c){}h.jStorage=a}D();x();E()}function u(){var a;clearTimeout(F);F=setTimeout(function(){if("localStorage"==f||"globalStorage"==f)a=h.jStorage_update;e... |
from spaceone.inventory.libs.schema.dynamic_field import TextDyField, SearchField, DateTimeDyField, EnumDyField, \
ListDyField
from spaceone.inventory.libs.schema.resource import CloudServiceTypeResource, CloudServiceTypeResponse, \
CloudServiceTypeMeta
cst_api = CloudServiceTypeResource()
cst_api.name = 'API... |
import Boot from './boot.js';
import End from './end.js';
import Level from './level.js';
let config = {
type: Phaser.AUTO,
width: 1000,
height: 500,
scale: {
// mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_HORIZONTALLY
},
pixelArt: true,
scene: [Boot, Level, En... |
import React from "react"
import BigNumber from 'bignumber.js'
import { connect } from "react-redux"
import * as ethUtil from 'ethereumjs-util'
import { throwError, emptyForm, nextStep, previousStep, resetStep } from "../../actions/exchangeFormActions"
import { updateAccount, incManualNonceAccount } from "../../action... |