text stringlengths 3 1.05M |
|---|
const http = require("http");
const map = require('through2-map');
const port = process.argv[2];
const server = http.createServer((req, res) => {
req.pipe(map(chunk => chunk.toString().toUpperCase())).pipe(res)
})
server.listen(port) |
# ======================================================================
# Copyright TOTAL / CERFACS / LIRMM (02/2020)
# Contributor: Adrien Suau (<adrien.suau@cerfacs.fr>
# <adrien.suau@lirmm.fr>)
# Siyuan Niu (<siyuan.niu@lirmm.fr>)
# This software is governed by the CeCILL-B l... |
#
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2020 PyMeasure Developers
# pyvirtualbench library: Copyright (c) 2015 Charles Armstrap <charles@armstrap.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... |
'use strict';
var path = require('path');
var express = require('express');
var ejs = require('ejs');
var api = require('./api.js').api;
var app = api.app;
var status = api.status;
// nice stack traces
process.on('unhandledRejection', r => console.log(r));
app.set('view engine', 'html');
app.engine('html', ejs.ren... |
import { toArray } from 'util'
import { DefinedPropertiesKey } from '../WrappedObject'
import { Artboard } from './Artboard'
import { Rectangle } from '../models/Rectangle'
import { Types } from '../enums'
import { Factory } from '../Factory'
import { wrapObject } from '../wrapNativeObject'
import { Override } from '..... |
import dayjs from "dayjs";
import advancedFormat from "dayjs/plugin/advancedFormat";
import relativeTime from "dayjs/plugin/relativeTime";
import localizedFormat from "dayjs/plugin/localizedFormat";
import isToday from "dayjs/plugin/isToday";
import isYesterday from "dayjs/plugin/isYesterday";
dayjs.extend(localizedFo... |
const { Plane } = require('./Planes/Plane');
const { MilitaryPlane } = require('./planes/MilitaryPlane');
const { PassengerPlane } = require('./planes/PassengerPlane');
const { Airport } = require('./Airport');
const MILITARY_TYPE = require('./models/MilitaryType');
const { ExperimentalPlane } = require('./planes/Exper... |
"""
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docu... |
import {Router, Link} from 'preact-router';
import {createHashHistory} from 'history';
import EnvironmentContext from './EnvironmentContext';
import PackageDetail from './PackageDetail';
import PackageList from './PackageList';
import Summary from './Summary';
function uniqAdd(arr, value) {
if (!arr.includes(value... |
/**
* Kendo UI v2016.3.914 (http://www.telerik.com/kendo-ui)
* Copyright 2016 Telerik AD. All rights reserved. ... |
import Adafruit_WS2801
import RPi.GPIO as GPIO
import Adafruit_GPIO.SPI as SPI
class PixelsManager:
PIXEL_COUNT = 32
SPI_PORT = 0
SPI_DEVICE = 0
pixels = None
@staticmethod
def setup():
PixelsManager.pixels = Adafruit_WS2801.WS2801Pixels(PixelsManager.PIXEL_COUNT,
... |
(function ($) {
'use strict';
$.getMultiScripts = function (arr, path) {
var _arr = $.map(arr, function (scr) {
return $.getScript((path || "") + scr);
});
_arr.push($.Deferred(function (deferred) {
$(deferred.resolve);
}));
return $.when.apply(... |
'use strict';
/*
Скрипт для инструмента ластик.
*/
let eraser = document.getElementById('eraser');
let isErasing = false;
let end, strt, type, value, index = 0, Path1, Path2, currentPath,pathColor;
const startErasing = () => {
if (!eraser.checked)
return;
isErasing = true;
};
const dist = (x1, ... |
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopReq... |
var o_writer = require('./o-writer.js');
var o_reader = require('./o-reader.js');
module.exports = function (key, def) {
def = def || {};
def.writer = def.writer || o_writer( key, def );
def.reader = def.reader || o_reader( key, def );
return function (val) {
if (val !== undefined) return def.... |
'''
'''
from app import mongod
from app.city import city_api
from flask import jsonify
import os
import json
@city_api.route('/', methods=['GET'])
def index():
return "city index"
@city_api.route('/add', methods=['GET'])
def add_data():
# 获取当前文件路径
current_path = os.path.abspath(__file__)
parent_path = os.path.... |
import { useState, useEffect } from 'react';
import styles from './GalleryScrollProjector.module.scss';
import { containRect, scaleRectToArea } from './utils';
import { normalize } from '@danehansen/math';
import ease from 'eases/cubic-in';
import Indicator from './Indicator/Indicator';
import { STORE } from 'utils/co... |
import React, { useState, useEffect } from "react"
import styled from "styled-components"
import { isEmpty, get } from "lodash"
import { colors } from "theme"
import { getProposal } from "apis/proposals"
import { convertJSONtoString } from "utils"
import proposal from "assets/icons/proposal.svg"
import OverlaySpinner f... |
const UAParser = require('ua-parser-js/dist/ua-parser.min');
export const UA = new UAParser();
export const browser = UA.getBrowser();
export const cpu = UA.getCPU();
export const device = UA.getDevice();
export const engine = UA.getEngine();
export const os = UA.getOS();
export const ua = UA.getUA();
export const se... |
const dbm = global.dbm || require('db-migrate');
const type = dbm.dataType;
exports.up = function (db, callback) {
db.runSql('ALTER TABLE site ADD COLUMN domain text, ADD COLUMN config text', (err) => {
if (err) throw err;
callback();
});
};
exports.down = function (db, callback) {
db.runSql('ALTER TAB... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
// This file has been autogenerated.
exports.setEnvironment = function() {
process.env['AZURE_BATCH_ACCOUNT'] = 'test3';
process.env['AZURE_BATCH_ENDPOINT'] = 'https://test3.westcentralus.batch.azure.com';
process.env['AZURE_SUBSCRIPTION_ID'] = 'f30ef677-64a9-4768-934f-5fbbc0e1ad27';
};
exports.scopes =... |
from avcv import *
import openpifpaf
import numpy as np
import mmcv
import torch
import timm
import logging
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
def get_cif_field_generator(vis_indices=[0, 1], bmin=0.1, backbone_num_out_channels=2048):
cif_head_meta = openpifpaf.headmeta.Cif('cif', 'pa... |
var namespaceEnergyPlus_1_1WaterThermalTanks =
[
[ "HeatPumpWaterHeaterData", "structEnergyPlus_1_1WaterThermalTanks_1_1HeatPumpWaterHeaterData.html", "structEnergyPlus_1_1WaterThermalTanks_1_1HeatPumpWaterHeaterData" ],
[ "StratifiedNodeData", "structEnergyPlus_1_1WaterThermalTanks_1_1StratifiedNodeData.html",... |
const AWSXRay = require("aws-xray-sdk-core");
const { DynamoDBClient, GetItemCommand } = require("@aws-sdk/client-dynamodb");
const tableSuffix = process.env.JOKE_TABLE_SUFFIX
? process.env.JOKE_TABLE_SUFFIX
: "";
// share the db connection between invocations
const ddb = AWSXRay.captureAWSv3Client(new DynamoDBCl... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = linesDirectionResponse;
var _axios = require('axios');
var _axios2 = _interopRequireDefault(_axios);
var _constants = require('../constants');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj :... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... |
import axios from 'axios'
import { MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies ... |
from Analysys.pnn import Stalin3000_anal_probe
from tqdm import notebook
import torch
import torch.utils.data as utils_data
import numpy as np
import matplotlib.pyplot as plt
import csv
import pprint
from math import *
BS = 4
class NumDs(utils_data.Dataset):
def __init__(self, inp, outp):
self.data = list... |
// @flow
import path from "path";
import * as React from "react";
import ReactDOMServer from "react-dom/server";
import { match, RouterContext } from "react-router";
import { createRouteFromReactElement } from "react-router/lib/RouteUtils";
import createURL from "@phenomic/api-client/lib/url";
import Provider from "... |
module.exports = {
/**
* @param {*} ctx
*
* @api {post} /jobs
* @apiGroup Jobs
* @apiName CreateJob
* @apiParam {String} title User must need to provide the job title
* @apiParam {Number} CompanyId User must need to provide the CompanyId
* @apiParamExample {String} Request Pa... |
/**
* @license Angular v5.2.10
* (c) 2010-2018 Google, Inc. https://angular.io/
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/platform-browser-dynamic/testing"),require("@angular/platform-browser/animations... |
//Create Audio Context
const AudioContext = window.AudioContext || window.webkitAudioContext;
const context = new AudioContext();
let o = null;
let g = null;
//Sound Storage
const soundObj = {
bump:["triangle",100,0.8,333,0.2,100,0.4,80,0.7],
buzzer:["sawtooth",40,0.8, 100,0.3 ,110, 0.5],
zip:["sawtooth",75,0.8,... |
/// <reference types="cypress"/>
describe('Login n Logout Test', () => {
const url = 'http://zero.webappsecurity.com/';
let userName;
let password;
before(() => {
cy.visit(url + 'index.html');
cy.get('#signin_button').click();
cy.get('h3').contains('Log in to ZeroBank');
... |
"""
@brief test log(time=100s)
@author Xavier Dupre
This tesdt must be run last because it screws up with
*test_convert_doc_helper* and *test_full_documentation_module_template*.
"""
import os
import unittest
import logging
from pyquickhelper.loghelper.flog import fLOG
from pyquickhelper.pycode import get_t... |
/*! Built with http://stenciljs.com */
(function(Context,namespace,hydratedCssClass,resourcesUrl,s){"use strict";
s=document.querySelector("script[data-namespace='o-content-placeholder']");if(s){resourcesUrl=s.getAttribute('data-resources-url');}
(function(window, document, Context, namespace) {
'use strict';
/**
... |
import hashlib
import random
def generate_confirmation_token(email_address):
salt = hashlib.sha1(str(random.random()).encode('ascii')).hexdigest()[:5]
email_salt = email_address
return str(hashlib.sha1(str(salt + email_salt).encode('ascii')).hexdigest()) |
"""
Base class for GUI components.
@author Ben Giacalone
"""
from tools.envedit.gui.bounding_box import BoundingBox
class GUIComponent:
def __init__(self):
self.bbox = BoundingBox()
self.clip_region = BoundingBox()
self.child = None
self.gui_system = None
self.receive_eve... |
/*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/license
*/
CKEDITOR.lang['ko']={"editor":"리치 텍스트 편집기","editorPanel":"리치 텍스트 편집기 패널","common":{"editorHelp":"도움이 필요하면 ALT 0 을 누르세요","browseServer":"서버 탐색","url":"URL","protocol":"프로토콜","u... |
const router = require('express').Router();
const { Product, Category, Tag, ProductTag } = require('../../models');
// The `/api/products` endpoint
// get all products
router.get('/', async (req, res) => {
try{
const product_data = await Product.findAll({
include: [{model: Category}, {model: Tag}]
... |
import React from 'react';
const FormContainer = ({ children }) => {
return <div className='form-container'>{children}</div>;
};
export default FormContainer;
|
import itertools
import numpy as np
class FuzzySet:
def __init__(self, size, data, degree):
self.size = size
self.data = data
self.memb_degree = degree
def display(self):
for (a, b) in zip(self.data, self.memb_degree):
print('(' + str(a) + ', ' + str('%.3f'... |
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/globals/Layout"
const about = () => {
return (
<Layout>
<h1>About Us</h1>
<Link to="/">Return Home</Link>
</Layout>
)
}
export default about
|
import React, { useContext, useState } from 'react'
import DisableUserData from './DisableUserData';
import DisableUserForm from './DisableUserForm';
import { useFlashMessage } from '../../../../CustomHooks';
import UserContext from '../../../../context/user';
const DisableUserConfig = () => {
const { user, getU... |
# BUG: creating DF from series with non exact categorical indices created from pd.cut #42424
import pandas as pd
print(pd.__version__)
ser = pd.Series(range(0, 100))
ser1 = pd.cut(ser, 10).value_counts().head(5)
ser2 = pd.cut(ser, 10).value_counts().tail(5)
result = pd.DataFrame({"1": ser1, "2": ser2})
print(resul... |
# -*- coding: utf-8 -*-
"""The ZIP file entry implementation."""
from dfdatetime import time_elements as dfdatetime_time_elements
from dfvfs.lib import definitions
from dfvfs.lib import errors
from dfvfs.path import zip_path_spec
from dfvfs.vfs import attribute
from dfvfs.vfs import file_entry
from dfvfs.vfs import z... |
import { useSelector, useDispatch } from "react-redux";
import { useState, useCallback, useEffect } from "react";
import { compose, eq, get } from "fp";
import * as ca from "actions/ControlActions";
import * as sel from "selectors";
export const useTicketAutoBuyer = () => {
const configuredVsps = useSelector(sel.con... |
$(document).ready(function () {
var time1 = 0;
var show = false;
var names = new Array(); //文章名字等
var urls = new Array(); //文章地址
$(document).keyup(function (e) {
var time2 = new Date().getTime();
if (e.keyCode == 17) {
var gap = time2 - ti... |
#!/usr/bin/python
#
# Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
// Problem 1:
function problem1() {
var a = document.getElementById('first-number').value,
b = document.getElementById('second-number').value,
temp;
document.getElementById("pr1answer").style.color = "#FF0000";
if (!isNaN(a) && !isNaN(b) && a !== '' && b !== '') {
if (a > b) ... |
const localstModule = (function (){
const create = function(name, data){
if(typeof(data) == "object"){
console.log("Hey, du skriver et object!")
data = JSON.stringify(data);
}
localStorage.setItem(name, data)
}
const read = function(name){
let read... |
import numpy as np
import xml.etree.ElementTree as ET
from matplotlib.patches import Ellipse
import warnings
import inspect
from py_wake.wind_turbines.power_ct_functions import PowerCtFunctionList, PowerCtTabular, SimpleYawModel, CubePowerSimpleCt
import xarray as xr
from numpy import newaxis as na
class WindTurbines... |
exports.register = function (server, options) {
server.route(require('./create'))
server.route(require('./read'))
server.route(require('./token'))
server.route(require('./view'))
server.route(require('./update'))
server.route(require('./delete'))
}
exports.name = 'http-resource-kiosk'
|
import React, { useState } from "react";
import { Form, Button, Input, Message } from "semantic-ui-react";
import Layout from "../../components/Layout";
import factory from '../../ethereum/factory';
import web3 from '../../ethereum/web3';
import {Router} from '../../routes';
const CampaignNew = () => {
const [minimu... |
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
(function (factory) {
// AMD. Register as an anonymous module.
module.exports = factory(require('../datepicker'));;
}(function (datepicker) {
datepicker.regional['fr-CH'] = {
... |
/// Copyright (c) 2012 Ecma International. All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms"). Any redistribution of this code must retain the above
/// copyright an... |
/**
* ErrorCode mapping:
* 0: Type of createElement should not be null or undefined.
* 1: Hooks can only be called inside a component.
* 2: Invalid element type.
* 3: ref: multiple version of Rax used in project.
* @param errCode {Number}
*/
export function invokeMinifiedError(errCode) {
throw new Error('... |
import * as THREE from "three";
import {ClipTask, ClipMethod} from "./defines.js";
import {Box3Helper} from "./utils/Box3Helper.js";
import {Potree} from "./potreeBase";
import {BinaryHeap} from "../libs/other/BinaryHeap"
export function updatePointClouds(pointclouds, camera, renderer){
for (let pointcloud of point... |
$(function () {
//加载用户的信息
$.ajax({
type: "post",
url: "/getLoginCustomer",
data: {},
dataType: "json",
async: false,
success: function (data) {
var customer = data.loginCustomer;
if (customer != null) {
$(".nav-login-title... |
function HttpConnection(baseurl) {
this.baseurl = baseurl;
}
HttpConnection.prototype = {
send: function(action, url, params, cb) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
var parser = new DO... |
(function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):e(jQuery,moment)})(function(e,t){var n="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");(t.defineLocale||t.lang).call(t,"es",{months:"enero_febrero_marz... |
jQuery(function(a){a.datepicker.regional.tr={closeText:"kapat",prevText:"<geri",nextText:"ileri>",currentText:"bug\u00fcn",monthNames:["Ocak","\u015eubat","Mart","Nisan","May\u0131s","Haziran","Temmuz","A\u011fustos","Eyl\u00fcl","Ekim","Kas\u0131m","Aral\u0131k"],monthNamesShort:["Oca","\u015eub","Mar","Nis",... |
/**
* @license Angular v8.2.9
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
import { getDebugNode, RendererFactory2, InjectionToken, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, ɵNG_COMPONENT_DEF, ɵRender3NgModuleRef, LOCALE_ID, ɵDEFAULT_LOCALE_I... |
/**
* Copyright 2012-2020, Plotly, Inc.
* 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.
*/
'use strict';
exports.getDimIndex = function getDimIndex(trace, ax) {
var axId = ax._id;
var axLetter = axId.charAt(0)... |
// compare matrix() strings with some slop on really small values
function floatingPointEqual(a, b)
{
const kEpsilon = 1e-4;
return (Math.abs(a - b) < kEpsilon);
}
function compareMatrices(a, b)
{
if (a == "none" && b == "none")
return true;
var matrixRegex = /matrix(?:3d)?\((.+)\)/;
var resultA = ma... |
from io import BytesIO
from unittest import TestCase
from block import Block
from helper import (
hash256,
int_to_little_endian,
little_endian_to_int,
)
from script import Script
from tx import Tx
def is_coinbase(self):
if len(self.tx_ins) != 1:
return False
first_input = self.tx_ins[0]
... |
/**
* This source file is part of Cube.
* https://shixincube.com
*
* The MIT License (MIT)
*
* Copyright (c) 2020-2021 Shixin Cube Team.
*
* 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 Sof... |
// @flow
import React, { Component } from 'react';
import { set } from 'lodash';
import styles from './DaedalusMenuStyles';
import {
themeNames,
localeNames,
osNames,
getInitialState,
} from '../../stories/_support/config';
/* eslint-disable no-restricted-globals */
type Props = {
api: Object,
};
export ty... |
var rp = require('request-promise');
var moment = require('moment');
const getApiUrl = (symbol, date) => {
// replace all the dots in stock codes with underscore
symbol = symbol.replace(/\./g, "_");
return `https://www.quandl.com/api/v3/datasets/WIKI/${symbol}\
.json?order=asc&column_index=4&start_date=${date}&... |
import pyaudio
import threading
import time
import argparse
import wave
import torchaudio
import torch
import numpy as np
from neuralnet.dataset import get_featurizer
from threading import Event
class Listener:
def __init__(self, sample_rate=8000, record_seconds=2):
self.chunk = 1024
self.sample_... |
const qrcode = require("qrcode-terminal");
const moment = require("moment");
const cheerio = require("cheerio");
const imageToBase64 = require('image-to-base64');
const get = require('got')
const fs = require("fs");
const dl = require("./lib/downloadImage.js");
const fetch = require('node-fetch');
const urlenco... |
import { strict as assert } from "assert"
import { parse, global_flag_index } from "../../index.js"
export const id = "Invalid Tokens with Token Options"
const invalid_token_name = "bogus"
export const assertions = {
"Should be able to pass an invalid token out of 1 token possibility with a toggle option using th... |
import Dispatcher from '../dispatcher'
import Constants from '../constants'
import {EventEmitter2} from 'eventemitter2'
import assign from 'object-assign'
import data from '../data'
import Router from '../services/router'
import isRetina from 'is-retina'
function _getContentScope(route) {
return Store.getRoutePath... |
export const inputDefault = [
{
"name": "name",
"label": "Name"
},
{
"type": "group",
"name": "emails",
"validation": "min:2,length",
"repeatable": true,
"add-label": "+ Add email",
"value": [
{
"email": "mantovaniarts@gmail.edu"
},
{
"email": "ma... |
const MiniCSSExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCSSExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 1,
},
},
'postcss-loader',
'sass-loader',
... |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_pre... |
const mongoose = require("mongoose");
const techonologiesSchema = mongoose.Schema(
{
name: String,
image: String,
},
{
timestamps: true,
}
);
module.exports = mongoose.model("techonologiesModel", techonologiesSchema);
|
moment.parseZone("2013-01-01T00:00:00-13:00").utcOffset(); // -780 ("-13:00" in total minutes)
moment.parseZone("2013 01 01 05 -13:00", "YYYY MM DD HH ZZ").utcOffset(); // -780 ("-13:00" in total minutes)
moment.parseZone("2013-01-01-13:00", ["DD MM YYYY ZZ", "YYYY MM DD ZZ"]).utcOffset(); // -780 ("-13:00" in total ... |
/**
* @version 0.9
*/
import '@app/services/GlobalExceptionHandler/GlobalExceptionHandler'
import { Text } from 'react-native'
import Orientation from 'react-native-orientation'
import walletDS from '@app/appstores/DataSource/Wallet/Wallet'
import NavStore from '@app/components/navigation/NavStore'
import { setFi... |
from flask import render_template,request,redirect,url_for,abort
from . import main
from ..models import User,Pitch,Comment
from .. import db
from .forms import UpdateProfile,PitchForm,CommentForm
from flask_login import login_required,current_user
# Views
@main.route('/')
def index():
'''
View root page fun... |
from item import Item
from orderitem import OrderItem
from payment import Payment
from customer import Customer
class Order():
def __init__(self):
self.orderitems=[]
def addOrderItems(self, orderitem):
self.orderitems.append(orderitem)
def getOrderItems(self):
return self.orderite... |
class Recipe:
def __init__(self, title, ingredients, directions, source="https://example.com", author="", cuisines=[]):
self.title = title
self.ingredients = ingredients
self.directions = directions
self.source = source
self.author = author
self.cuisines = cuisines |
// Copyright Joyent, Inc. and other Node contributors.
//
// 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... |
import unittest
from pyunitreport import HTMLTestRunner
from selenium import webdriver
class HelloWorld(unittest.TestCase):
def setUp(self):
self.driver=webdriver.Chrome(executable_path=r"./chromedriver")
driver=self.driver
driver.implicitly_wait(10)
def test_hello_world(s... |
{
var i,
n = shuffle((L = slice.call(L))).length,
B = [],
p,
e,
dirty = false;
do {
for (i = 0, dirty = false; i < n; ++i) {
p = L[i];
if (!(e && enclosesWeak(e, p)))
(e = encloseBasis((B = extendBasis(B, p)))), (dirty = true);
}
} while (dirty);
return e;
}
|
//
// Vivado(TM)
// rundef.js: a Vivado-generated Runs Script for WSH 5.1/5.6
// Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.
//
echo "This script was generated under a different operating system."
echo "Please update the PATH variable below, before executing this script"
exit
var WshShell = new ActiveXObjec... |
# coding: utf-8
from io import StringIO
import re
import sys
import datetime
import unittest
import tornado.escape
from tornado.escape import utf8
from tornado.util import (
raise_exc_info, Configurable, exec_in, ArgReplacer,
timedelta_to_seconds, import_object, re_unescape, is_finalizing
)
import typing
from... |
import cv2
import torch
import numpy as np
import sys
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from .baseline.utils.tensorboard import TensorBoard
from .baseline.Renderer.model import FCN
from .baseline.Renderer.stroke_gen import *
from argparse import Namespace
torch.manual_... |
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import AxesGrid
def get_demo_image():
import numpy as np
from matplotlib.cbook import get_sample_data
f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False)
z = np.load(f)
# z is a numpy array of 15x15
return z, (-3,4,... |
import React, { Component } from 'react';
import { Resizable } from 're-resizable';
import Highcharts from 'highcharts';
import {
HighchartsChart, Chart, HighchartsProvider, XAxis, YAxis, Title, Subtitle, SplineSeries
} from 'react-jsx-highcharts';
import ExampleCode from '../utils/ExampleCode';
import code from './e... |
var dir_c19771d322d1b8069c28774675c1eb44 =
[
[ "decay.h", "decay_8h_source.html", null ],
[ "entry_type_of.h", "entry__type__of_8h_source.html", null ],
[ "has_addition_operator.h", "has__addition__operator_8h_source.html", null ],
[ "has_contiguous_storage.h", "has__contiguous__storage_8h_source.html",... |
from .defaults import * # noqa
VARNISH_SERVERS = ['http://127.0.0.1:8080']
ENABLE_VARNISH = True
ENABLE_ESI = False
REST_FRAMEWORK['DEFAULT_THROTTLE_RATES'] = {
'user': '1000000/second',
'non-cookie-auth': '1000000/second',
'add-contributor': '1000000/second',
'create-guid': '1000000/second',
'... |
/**
* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*------------------------------------------------------------... |
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2018 (ita)
"""
Configuration system
A :py:class:`waflib.Configure.ConfigurationContext` instance is created when ``waf configure`` is called, it is used to:
* create data dictionaries (ConfigSet instances)
* store the list of modules to import
* hold config... |
export { BackdropLogo } from './src/BackdropLogo.js';
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
class Validator {
static isEmail(value) {
var re = /\S+@\S+\.\S+/;
return re.test(value);
}
static isPhone(value)
{
var re = /\+?\d{10,}/;
return re.test(value);
}
static isPassword(value) {
return (value.length >= 6);
}
}
class Inp... |
/**
* @author mrdoob / http://mrdoob.com/
* @author Mugen87 / https://github.com/Mugen87
*
* modify to player movement controller:
* @author evilkuma / https://github.com/evilkuma
*/
import { Euler } from 'three'
import { Vector3 } from 'three'
import { EventDispatcher } from 'three'
var PointerLockControls = ... |
// Frontend
$(document).ready(function() {
show_page_one();
$('select').material_select();
$('ul.tabs').tabs();
$(document).on('click','input[type=number]',function(){ this.select(); });
});
var groups = {};
var groupnum = 1;
var names;
function show_page_one() {
$("#page-1").show();
$("#page-2").... |