text stringlengths 3 1.05M |
|---|
'use strict';
const schema = require('./categories-schema.js');
const Model = require('../mongo.js');
/**
* class that extends Model to wrap categories shcema with CRUD operations
*/
class Categories extends Model {
constructor() {
super(schema);
}
}
module.exports = new Categories(); |
import * as Routes from '../constants/routes';
import { GenericRestTemplate } from './base/genericTemplate';
const fuelClasses = new GenericRestTemplate(
'FUEL_CLASSES',
Routes.BASE_URL + Routes.CREDIT_CALCULATIONS.FUEL_CLASSES,
'fuelClasses'
);
export { fuelClasses };
|
// index.js
// (c) 2019 FSUInnovationHub
// Import Consants
const path = require('path');
const express = require('express');
const app = express();
const config = require("./config.json")
// Express Configuration
app.set('view engine', 'pug');
app.set('views');
app.set('views', path.join(__dirname, './views'));
app.... |
const Filme = require('../models/filmes')
const listaFilmes = async (req, res) => {
const filmes = await Filme.find()
res.status(200).json(filmes)
}
const listaUmFilme = async (req, res) => {
const filme = await Filme.findById(req.params.id)
if (filme == null) {
return res.status(404).json(... |
import Draw from './FI_Draw'
export const FI_Draw = Draw;
import Touchable from './FI_Touchable'
export const FI_Touchable = Touchable
import Text from './FI_Text'
export const FI_Text = Text
import Image from './FI_Image'
export const FI_Image = Image
import Mover from './FI_Mover'
export const FI_Mover = Mover
i... |
Gd.conn.connMQTT = function (opt) {
let me = {};
var mqtt = require('mqtt');
let client = me.client = mqtt.connect(opt.url, opt);
client.on('connect', function () {
Log.log(`Broker ${opt.url} connected.`);
});
client.on('message', function (topic, message) {
// mes... |
"""Depthsensor library for MS5803_02BA model, reads depth sensor and stores value of diving depth in mm.
COPY THIS LIBRARY VERSION TO BLUEBOT AND REMOVE ENDING "_02" IFF BLUEBOT HAS MS5803_02BA MODEL!
"""
import smbus
import time
class DepthSensor():
"""DepthSensor reads the pressure sensor and converts its value t... |
"use strict";
{
const BEHAVIOR_CLASS = SDK.Behaviors.Rex_Platform_MoveTo;
BEHAVIOR_CLASS.Type = class Rex_Platform_MoveToType extends SDK.IBehaviorTypeBase
{
constructor(sdkPlugin, iBehaviorType)
{
super(sdkPlugin, iBehaviorType);
}
};
}
|
const merge = require('webpack-merge');
const common = require('./webpack.common');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
hot: true,
headers: { 'Access-Control-Allow-Origin': '*' },
historyApiFallback: true,
},
});
|
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
import React from "react"
import { Fade } from "react-reveal"
const Reveal = ({ children }) => {
return <Fade duration={600}>{children}</Fade>
}
export default Reveal
|
import httplib, urllib, urlparse
from disco.comm import HTTPConnection
from disco.util import urlresolve
from core import DiscodexError
from objects import DataSet, Indices, Index, Results, Dict
from settings import DiscodexSettings
class ResourceNotFound(DiscodexError):
def __init__(self, resource):
sup... |
'use strict';
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else {... |
import './css/styles.css';
import "../node_modules/pnotify/dist/PNotifyBrightTheme.css";
import './js/find_country.js' |
(function($){$.extend($.summernote.lang,{"sk-SK":{font:{bold:"Tučné",italic:"Kurzíva",underline:"Podčiarknutie",clear:"Odstrániť štýl písma",height:"Výška riadku",strikethrough:"Prečiarknuté",size:"Veľkosť písma"},image:{image:"Obrázok",insert:"Vložiť obrázok",resizeFull:"Pôvodná veľkosť",resizeHalf:"Polovičná veľkosť"... |
define(function(require) {
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
PrettyXmlView = require('views/prettyxml');
var filterText = "";
var PrettyXmlsView = Backbone.View.extend({
initialize: function(options){
console.log("Initializing new Pretty... |
import store from '../store';
export default {
install: () => {
let updateSocketProtocol = 'ws://';
if (location.protocol == 'https:') updateSocketProtocol = 'wss://';
let updateSocketUrl = updateSocketProtocol + window.location.host + '/socket/';
let updateSocket = new WebSocket(updateSocketUrl);
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""\
Test matrix product AB = C by Freivalds
jill-jênn vie et christoph dürr - 2015-2020
"""
# snip{
from random import randint
from sys import stdin
# snip}
__all__ = ["freivalds"]
# snip{
def readint():
"""
function to read an integer from stdin
"""
r... |
import seren3
import pymses
from snapshot import Snapshot, Family
class PymsesSnapshot(Snapshot):
"""
Class for handling pymses snapshots
"""
def __init__(self, path, ioutput, ro=None, verbose=False, **kwargs):
super(PymsesSnapshot, self).__init__(path, ioutput, **kwargs)
from pymses i... |
/**
* Copyright 2016 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... |
import React from 'react';
import ReactDom from 'react-dom';
import AddValidateQuestion from './index';
//校对
export default function showValidateQuestion({ dataSource, callback }) {
let func = () => {
let element = document.getElementById('addValidateQuestion');
if (element) element.parentNode.removeChild(el... |
import React, {Component} from 'react'
import axios from 'axios'
import {get} from '../Auth/utils/localstorage'
import {Loader, Message, Button} from 'semantic-ui-react'
import {Link} from 'react-router-dom'
import WorkshopForm from '../WorkshopForm'
export default class EditWorkshop extends Component {
co... |
module.exports = {
populateErrors: (errors, fileName, type) => {
if (!errors || errors.length) return;
return errors.map((e) => ({
filename: fileName,
message: e.stack || "Unknown error",
type: type,
}));
},
};
|
import React from "react";
import { connect } from "react-redux";
import {
Container,
Header,
Text,
Content,
Form,
Item,
Input,
Label,
View,
Thumbnail,
Button,
Icon
} from "native-base";
import { StyleSheet, Image, Dimensions } from "react-native";
import Intl from "../../intl/intl";
import { BA... |
/* eslint-disable import/no-unresolved */
import {isFunction} from 'lodash';
import stringify from 'json-stable-stringify';
import {
createQueryPayload,
createQueryErrorPayload,
reduceQueryBy,
acceptLatest,
keepEarliest,
keepEarliestSuccess,
acceptWhenNoPending,
} from '../index.ts';
// type... |
import Controller from '@ember/controller';
import { or, lt } from 'ember-awesome-macros';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import { alias } from '@ember/object/computed';
import { A } from '@ember/array';
import EmberObject from '@ember/object';
export defa... |
import React, {Component} from "react";
import { render } from "react-dom";
import * as products from "./resources/products.json";
// import "./resources/products.json";
// import { quotes } from "./resources/quotes.json";
import "../styles/main.scss";
import Subtotal from "./components/Subtotal/Subtotal";
i... |
module.exports = {"2":"Scary Cult Movies from the 1980s","5":"Gay & Lesbian Psychological Movies","7":"Showbiz Movies based on real life","11":"Military Dramas","15":"Suspenseful British Independent Movies","16":"Understated Biographical Documentaries","21":"Romantic Comedies starring Doris Day","24":"Eastern Europ... |
macDetailCallback("ac5e14000000/24",[{"d":"2021-07-22","t":"add","s":"ieee-oui.csv","a":"No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park Dongguan CN 523808","c":"CN","o":"HUAWEI TECHNOLOGIES CO.,LTD"}]);
|
import { useCallback, useLayoutEffect } from 'react'
import fs from 'fs'
import countly from '../lib/countly.js'
import Hero from '../components/hero.js'
import HashLink from '../components/hashlink.js'
import Step from '../components/step.js'
import Link from 'next/link'
import Button from '../components/button'
impor... |
/**
* @license
* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
* Licensed under The Universal Permissive License (UPL), Version 1.0
* as shown at https://oss.oracle.com/licenses/upl/
* @ignore
*/
define(["exports","ojs/ojeventtarget","ojs/ojcachediteratorresultsdataprovider","ojs/ojdedupdataprovider","o... |
const largest_subarray = require('./largest_subarray');
describe('largest_subarray', () => {
describe('brute force method', () => {
it('should return the largest subarray', () => {
const array = [2, 1, 0, 1, 3, 4, 2, 2, 3, 1];
const result = largest_subarray.brute_force(array);
... |
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC10b2tlbi5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvc3JjL2F1dGgvdXNlci1hdXRoL21vZGVscy9hdXRoLXRva2VuLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI... |
/*页面转换*/
$(document).ready(init);
function init() {
/* ========== DRAWING THE PATH AND INITIATING THE PLUGIN ============= */
$.fn.scrollPath("getPath")
// Move to 'start' element
.moveTo(400, 50, {name: "start"})
// Line to '1' element
.lineTo(200, 800, {name: "number1"})
// Arc down and line to '2'
.... |
var w = document.getElementById('chart').offsetWidth,
h = window.innerHeight -70;
var colorscale = d3.scale.category10();
var data = [
[
{axis:"SECURE RANDOM (256B)",value:0.996,title:"1.28 ms"},
{axis:"SHA-1 hash (256B)",value:0.917,title:"5.73 ms"},
{axis:"SHA2-256 hash (256B)",value:0.933,title:"8.54 ms"},
{axis... |
const { decryptMessage } = require('@signumjs/crypto')
function extractMessage (transaction, agreementPrivateKey) {
const { attachment } = transaction
if (!attachment) return ''
if (attachment.message) {
return attachment.message
}
if (agreementPrivateKey && attachment.nonce && attachment.isText) {
... |
'use strict'
const test = require('tape')
const spacetime = require('./lib')
test('isSame', t => {
let a = spacetime('March 28, 1999 20:42:00', 'Canada/Eastern')
let b = a.clone()
t.equal(a.isSame(b, 'hour'), true, 'same-hour')
t.equal(a.isSame(b, 'day'), true, 'same-day')
t.equal(a.isSame(b, 'week'), true, ... |
#
# Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... |
const Plane = require("./Plane");
class ExperimentalPlane extends Plane {
constructor(
model,
maxFlightDistance,
maxSpeed,
maxLoadCapacity,
type,
classificationLevel
) {
super(model, maxSpeed, maxFlightDistance, maxLoadCapacity);
this._type = type;
this._classificationLevel = cl... |
module.exports = { prefix: 'fas', iconName: 'capsules', icon: [576, 512, [], "f46b", "M555.3 300.1L424.2 112.8C401.9 81 366.4 64 330.4 64c-22.6 0-45.5 6.7-65.5 20.7-19.7 13.8-33.7 32.8-41.5 53.8C220.5 79.2 172 32 112 32 50.1 32 0 82.1 0 144v224c0 61.9 50.1 112 112 112s112-50.1 112-112V218.9c3.3 8.6 7.3 17.1 12.8 25L368... |
/*
* Personium
* Copyright 2014 - 2017 FUJITSU LIMITED
*
* 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 appl... |
/**
* Internal dependencies
*/
import '../lib/side-slide-menu-core';
const sideSlideMenuInit = ($) => {
// Get all menu togglers
const togglers = document.getElementsByClassName('c-slide-nav-toggler');
const slideRight = new window.Menu({
wrapper: '#page',
type: 'slide-right',
menuOpenerClass: '.c-slide-nav... |
"use strict";
function Ide3(window, document, translate, gUserId, pagePanic) {
var self = this
var globs = null
var ResizeTimeout = 300
var PollInterval = 1
var MaxSaveItems = 10
var LineHeight = 34
var TitleHeight = 30
var TopPanelHeight = 52
var DockHeaderColor = "#E2EDF5"
var DarkBackground = "#455A64"
var Bor... |
"use strict";
var userHome = require("user-home");
var path = require("path");
const CACHE_DIR =
process.env.FIREBASE_EMULATORS_PATH || path.join(userHome, ".cache", "firebase", "emulators");
const _emulators = {
database: {
name: "database",
instance: null,
port: 9000,
stdout: null,
cacheDir... |
function warn(t){console.error("[Glide warn]: "+t)}function toInt(t){return parseInt(t)}function toFloat(t){return parseFloat(t)}function isString(t){return"string"==typeof t}function isObject(t){var e=void 0===t?"undefined":_typeof(t);return"function"===e||"object"===e&&!!t}function isFunction(t){return"function"==typ... |
/*!
Name: vue-upload-component
Component URI: https://github.com/lian-yue/vue-upload-component#readme
Version: 3.1.1
Author: LianYue
License: Apache-2.0
Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (I... |
"use strict";
var shallowEqualWithoutFunctions_1 = require('./shallowEqualWithoutFunctions');
function shouldPureComponentUpdate(nextProps, nextState) {
return !shallowEqualWithoutFunctions_1.shallowEqualWithoutFunctions(this.props, nextProps) ||
!shallowEqualWithoutFunctions_1.shallowEqualWithoutFunctions(... |
# -*- coding: utf-8 -*-
# Copyright 2015-2018 Martijn van Exel.
# This file is part of the overpass-api-python-wrapper project
# which is licensed under Apache 2.0.
# See LICENSE.txt for the full license text.
"""Thin wrapper around the OpenStreetMap Overpass API."""
__title__ = "overpass"
__version__ = "0.7"
__lice... |
"use strict";
var linkObj = require("./linkObj");
var reasons = require("./messages").reasons;
var simpleResponse = require("./simpleResponse");
var got = require("got");
var extend = require("extend");
var isString = require("is-string");
/*
Checks a URL to see if it's broken or not.
*/
function che... |
import csv
from datamart_materialize.utils import SimpleConverter
class UnsupportedConversion(ValueError):
"""This conversion cannot work."""
def skip_rows(source_filename, dest_fileobj, nb_rows):
with open(source_filename, 'r') as src_fp:
src = iter(csv.reader(src_fp))
dst = csv.writer(des... |
//v.3.6 build 131108
/*
Copyright DHTMLX LTD. http://www.dhtmlx.com
To use this component please contact sales@dhtmlx.com to obtain license
*/
dhtmlXGridObject.prototype.setRowspan=function(b,d,e){var a=this[this._bfs_cells?"_bfs_cells":"cells"](b,d).cell,c=this.rowsAr[b];if(a.rowSpan&&a.rowSpan!=1)for(var f=c.next... |
var callbackArguments = [];
var argument1 = function callback(){callbackArguments.push(arguments)};
var argument2 = function callback(){callbackArguments.push(arguments)};
var argument3 = "6%>?";
var argument4 = true;
var argument5 = function callback(){callbackArguments.push(arguments)};
var argument6 = false;
v... |
require('./bootstrap');
import Vue from 'vue';
import BasicNavbar from './components/Navbar';
import BasicSampleIndex from './components/samples/Index';
import BasicSampleCreate from './components/samples/Create';
import BasicSampleEdit from './components/samples/Edit';
Vue.component('basic-navbar', BasicNavbar);
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _Collection = _interopRequireDefault(require("./Collection"));
var _Node = _interopRequireDefault(require("./Node"));
var _Relationship = _interopRequireDefault(require("./Relationship"));
var _neo4jDriv... |
import React, { useState, useEffect } from 'react';
import { Box, Container, makeStyles } from '@material-ui/core';
import Page from 'src/components/Page';
import Results from './Results';
import Toolbar from './Toolbar';
import data from './data';
import { useDispatch, useSelector } from 'react-redux';
import { getAll... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... |
var callbackArguments = [];
var argument1 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
argument3[122] = ["Y4wZs","!",")M$v","q8","{Z","*1o","F,D"]
base_0[2] = null
argument2[3.3156198695370476e+307] = null
return a+b-c
};
var argument2 = function callback(a,b,c) {
callbackArgum... |
const { expect, assert } = require("chai");
const { ethers, upgrades } = require("hardhat");
describe("ArrowToken TransferFrom", function () {
let Token;
let arrowToken;
let owner;
let signer1;
let signer2;
beforeEach(async function () {
Token = await ethers.getContractFactory("ArrowToken");
[owne... |
# Copyright 2016 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... |
/**
* Swedish translation for bootstrap-wysihtml5
*/
(function($){
$.fn.wysihtml5.locale["sv-SE"] = {
font_styles: {
normal: "Normal Text",
h1: "Rubrik 1",
h2: "Rubrik 2",
h3: "Rubrik 3",
h4: "Rubrik 4",
h5: "Rubrik 5",
h6... |
/**
* Tests that the $currentOp aggregation stage behaves as expected. Specifically:
* - It must be the first stage in the pipeline.
* - It can only be run on admin, and the "aggregate" field must be 1.
* - Only active connections are shown unless {idleConnections: true} is specified.
* - A user without the inprog... |
const {
createLogger,
format,
transports,
} = require('winston');
const {
splat,
combine,
label,
prettyPrint,
} = format;
const logger = createLogger({
level: process.env.LOG_LEVEL || 'error',
format: combine(
splat(),
label({ label: 'GITHUB' }),
prettyPrint(),
),
transports: [
n... |
import { h } from 'preact';
import '../../style/index.css';
const Header = () => (
<header class="header">
<h1>Tasks List</h1>
</header>
);
export default Header;
|
import Address from './lib/URL.js'
import Fetch, { POLYFILLED } from './lib/fetch/index.js'
import { INTERFACES, HOSTNAME } from './lib/constants.js'
import Request from './lib/Request.js'
import Client from './Client.js'
import Resource from './Resource.js'
/**
* @typedef {object} request
* Represents the parameter... |
//~ name c652
alert(c652);
//~ component c653.js
|
const getGlobal = (name) => {
if (!window) {
return void 0;
}
return window[name];
};
export const fbInstance = (state) => {
state.FB = getGlobal('FB'); // eslint-disable-line no-param-reassign
};
|
givenJob = null;
process.argv.forEach(function (val, index) {
if(index == 2) {
givenJob = val;
}
});
if(givenJob === '-h' || givenJob === '--help') {
console.log("\n" + 'Launch Job (dedicated task). It will create a pid file.');
console.log("\n" + 'Usage:');
console.log(" " + 'node job <jo... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = require('../../../ssr-module-cache.js');
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/***... |
/**
* Copyright 2016 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... |
'use strict';
const Excel = require('exceljs');
/**
* useage: ctx.service.utils.excel
*/
const {
sqlHelper
} = require('../../utils/index');
const Service = require('egg').Service;
class IndexService extends Service {
/**
* @param options {Object}
* @param options.title { String }
* @param... |
/*! modernizr 3.3.1 (Custom Build) | MIT *
* http://modernizr.com/download/?-cssanimations-csstransitions-addtest-setclasses !*/
!function(e,n,t){function o(e,n){return typeof e===n}function r(){var e,n,t,r,i,s,a;for(var l in C)if(C.hasOwnProperty(l)){if(e=[],n=C[l],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.o... |
/ *! jQuery v3.5.1 | (c) Fundação JS e outros contribuidores | jquery.org/license * /
! function (e, t) {"use strict"; "object" == typeof module && "object" == typeof module.exports? module.exports = e.document? t (e,! 0): function (e) {if (! e.document) throw new Error ("jQuery requer uma janela com um documento"); re... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
'use strict'
const AbstractUnicast = require('./../abstract/abstract-unicast.js')
const UnicastDefinition = require('unicast-definition')
/**
* Unicast represent the base implementation of an unicast protocol for the foglet library.
* @extends AbstractUnicast
* @author Arnaud Grall (Folkvir)
*/
class Unicast exte... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-... |
var mainBackground;
var walkingMan;
var buttonOne;
var but
var buttonTwo;
var buttonThree;
var bgSpeed = 1;
var walkSpeed = 4;
var positive;
BasicGame.Game = function (game) {
// When a State is added to Phaser it automatically has the following properties set on it, even if they already exist:
this.game; ... |
function fetch_text(url) {
return fetch(url).then((response) => (response.text()));
}
(function ($) {
skel.breakpoints({
xlarge: '(max-width: 1680px)',
large: '(max-width: 1280px)',
medium: '(max-width: 980px)',
small: '(max-width: 736px)',
xsmall: '(max-width: 480px)',
... |
import celery
import json
from celery.backends.base import DisabledBackend
from django.utils.translation import gettext_lazy as _
from django_celery_results.models import TaskResult
class QueueManager:
def retry_queue(self, task_id):
task = TaskResult.objects.filter(task_id=task_id).first()
if ta... |
/* ***** 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:
* * Redistribution... |
import { RequestEngine } from '../../request-engine';
// Models
// const Label = require('../../models/label');
class BatchEngine extends RequestEngine {
constructor(api_key = null) {
super(api_key);
}
/**
* Creates a batch with the given shipments
*
* @param {Object} batc... |
import time
import h5py
import collections
import concurrent.futures
import threading
import matplotlib as mpl
mpl.use('Agg') # noqa
import argparse
import os
import json
import pickle
import yaml
import numpy
import hashlib
from jinja2 import Environment, FileSystemLoader
from ann_benchmarks import results
from ann_... |
var TweakerUtils = libcd.require("libcd.util.TweakerUtils");
var newPickStack = TweakerUtils.createItemStack("minecraft:diamond_pickaxe");
newPickStack = TweakerUtils.setDamage(newPickStack, 1430);
newPickStack = TweakerUtils.setName(newPickStack, "Patched Pickaxe");
newPickStack = TweakerUtils.enchant(newPickStack, "... |
import requests
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import GitHubProvider
from allauth.socialaccount import app_se... |
addEvent(window, "load", sortables_init);
var SORT_COLUMN_INDEX;
function sortables_init() {
// Find all tables with class sortable and make them sortable
if (!document.getElementsByTagName) return;
tbls = document.getElementsByTagName("table");
for (ti=0;ti<tbls.length;ti++) {
thisTbl = tbls[... |
// When we're using HTTPS, use WSS too.
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
var chatsock = null;
function start_socket() {
if(chatsock) {
chatsock.close();
}
// Check if we are in userscan mode
pathArray = window.location.pathname.split( '/' );
pathArray.shift(... |
const toMongoose = require('./src')
const Dictionary = require('./src/models/dictionary.js')
const connection = require('./src/database/connection.js')
module.exports = {
connection,
toMongoose,
Dictionary,
}
|
hasList = ['ltcbtc', 'ethbtc', 'etcbtc', 'rrtbtc', 'zecbtc', 'xmrbtc', 'dshbtc',
'xrpbtc', 'iotbtc', 'ioteth', 'eosbtc', 'eoseth', 'sanbtc', 'saneth', 'omgbtc',
'omgeth', 'bchbtc', 'bcheth', 'neobtc', 'neoeth', 'etpbtc', 'etpeth', 'qtmbtc',
'qtmeth', 'avtbtc', 'avteth', 'edobtc', 'edoeth', 'btgbtc', 'datbtc', 'dat... |
export {
url as text,
url as number,
url as tel,
url as email
};
export function url(field, context) {
var dispatch = d3.dispatch('change'),
input,
entity;
function i(selection) {
var fieldId = 'preset-input-' + field.id;
input = selection.selectAll('input')
... |
# Generated by Django 3.0.3 on 2020-02-21 16:04
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
import taggit.managers
class Migration(migrations.Migration):
initial = True
dependencies = [
('taggit', '0003_taggeditem_... |
/**
* For the specified group, retrieve all of the users that belong to the group.
*
* @public
* @param {Function} PromiseFunc Function that returns a Promise with one InputParameter that is used
* @param {Object} Obj Current Object to be treated
* @param {Any} InputValue The InputValue for that Promise
* @par... |
import React, { useEffect, useState } from 'react';
import { Route, Redirect } from 'react-router-dom';
import axios from 'axios';
const AuthRoute = ({ component: Component, ...rest }) => {
const [isAuthenticated, setIsAuthenticated] = useState(null);
const [token, setToken] = useState(null);
useEffect(() => {
... |
import os
import numpy as np
import tensorflow as tf
from autodist.const import ENV
from autodist.checkpoint.saver import Saver
from autodist.strategy import AllReduce, Parallax, PartitionedAR, RandomAxisPartitionAR
def main(autodist):
TRUE_W = 3.0
TRUE_b = 2.0
NUM_EXAMPLES = 1000
EPOCHS = 1
# ... |
import React from 'react';
import { VerticalNav } from '../../../index';
export const basicExample = (props, firstItemClass) => (
<VerticalNav {...props} showBadges>
<VerticalNav.Masthead title="Patternfly React" />
<VerticalNav.Item
title="Item 1"
iconClass="fa fa-home"
initialActive
... |
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
function createDataset()
{
var uri = "hello";
uri;
}
mldb.log(createDataset.toString());
var createDatasetSource = '\
var uri = "file://tmp/MLDB-825-data/" + new Date().toISOString() + ".beh"; \
var config = { type: "beh.binary.m... |
/* eslint-env node, mocha */
/* global Promise */
import assert from 'assert';
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import configureMockStore from 'redux-mock-store';
import { createActionThunk } from '../src';
import chai from 'chai';
import spies from 'chai-... |
"""
Django settings for ProdTracker project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathl... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{XtaB:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"init_render",function(){return init_render});var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MO... |
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import BootstrapVue from 'bootstrap-vue'
import Vue from 'vue'
import App from './App.vue'
import 'firebaseui/dist/firebaseui.css'
import VueFire from 'vuefire'
import Firebase from 'firebase'
import * as VueGoogleMaps from 'vue2-g... |
import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
from sklearn.pipeline import Pipeline
from sklearn.neural_network import MLPClassifier
from skompiler import skompile
def test_... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { View, Text } from 'native-base';
import SystemStatus from '../../records/SystemStatus';
import fetchSystemStatusAction from '../../actions/fetchSystemStatus';
import styles from './StatusBarStyles';
class St... |