text
stringlengths
3
1.05M
import request from '@/util/myAxios' export function searchList (data) { return request({ url: 'goods/queryGoods', method: 'post', data }) } export function queryCategory (data) { return request({ url: 'goods/queryCategory', method: 'post', data }) }
"use strict"; /* Component for a list of comments in a visible/active annotation */ const PlayerUIComponent = require("./../lib/player_ui_component"), Utils = require("./../lib/utils"), Comment = require("./comment"), commentListTemplateName = 'comment_list', newCommentTemplateName ...
import numpy as np from dfn import FractureNetwork class FractureNetworkFlow(FractureNetwork): """Discrete fracture network model for flow. Parameters ---------- connectivity : array-like The inlet and outlet node pairing for each segment, describing the network connectivity. The fi...
module.exports = { entry: [ './src/index.js' ], output: { path: __dirname, publicPath: '/', filename: 'bundle.js' }, module: { loaders: [{ exclude: /node_modules/, loader: 'babel', query: { presets: ['react',...
const getL10n = require('wp-get-l10n') const rimraf = require('rimraf') const uniq = require('lodash.uniq') const CLI = global.deuxcli.require('main') const messages = global.deuxcli.require('messages') const {captchaMaker, separatorMaker} = global.deuxhelpers.require('util/cli') class RemoveMenu extends CLI { cons...
'use strict'; const { PassThrough } = require('stream'); const WriteStream = require('./WriteStream'); class Publisher { constructor (channel, name) { this.channel = channel; this.name = name; } async createWriteStream () { await this.channel.assertExchange(this.name, 'fanout', { durable: true });...
from models.area import Area from models.country import Country area = Area() area.createTable() country = Country() country.createTable()
var config = require('../config'); var extractIPTC = require('../lib/extractIPTC'); var keystone = require('arch-keystone'); var resizeImage = require('../lib/resizeImage'); var transform = require('model-transform'); var Types = keystone.Field.Types; var ImageCollection = new keystone.List('ImageCollection', { ma...
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"+cux":function(t,e){t.exports={type:"image",mimeType:"image/gif",src:"/assets/static/loader.7ba8522.26b00aa05cbb68a428ee9f0fd01277d2.gif",size:{width:200,height:200},sizes:"(max-width: 200px) 100vw, 200px",srcset:["/assets/static/loader.7ba8522.26b00aa05cbb68a4...
import asteroids from "../asteroids"; test("seven asteroids", () => { expect(asteroids).toHaveLength(7); }); test("no same id", () => { const checkForDuplicate = (arr) => { for (let i = 0; i < arr.length; i++) { const temp = arr.filter((el) => el === arr[i]); if (temp.length > 1) return true; ...
import React from "react" import Contact from "../components/templates/Contact" const ContactPage = () => <Contact /> export default ContactPage
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{154:function(t,s,a){"use strict";a.r(s);var e=a(0),n=Object(e.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"content"},[t._m(0),t._m(1),t._m(2),t._m(3),t._m(4),t._m(5),t._m(6),a("p",[t._v("Webpack 的别名可以通过 "),a("code",[...
import { Vector2 } from '../../../build/three.module.js'; /** * Sobel Edge Detection (see https://youtu.be/uihBwtPIBxM) * * As mentioned in the video the Sobel operator expects a grayscale image as input. * */ var SobelOperatorShader = { uniforms: { 'tDiffuse': { value: null }, 'resolutio...
export const ASAKAI_MODE = 'asakai' export const ALL_QUESTIONS_MODE = 'all' export const NOT_ANSWERED = 'notAnswered' export const ALL_QUESTIONS_OPTION = 'all' export const VALIDATED_OPTION = 'validated' const IN_VALIDATION_OPTION = 'inValidation' const NOT_VALIDATED_OPTION = 'notValidated' export const FILTER_OPTION...
'use strict'; var general = require('../lib/general.js'); /* ======== A Handy Little Nodeunit Reference ======== https://github.com/caolan/nodeunit Test methods: test.expect(numAssertions) test.done() Test assertions: test.ok(value, [message]) test.equal(actual, expected, [message]) test....
import { handleActions } from 'redux-actions' import Event from '../models/Event' import { ticketReducerMap } from './Ticket' import ConvertCase from '../utils/ConvertCase' export const eventInitialState = new Event() export const eventReducerMap = { CREATE_EVENT: { next: (state, acti...
// 〇時間前、という表記に使う。.js-relative-timeタグがあるところに使用。 const UNITS = { year: 24 * 60 * 60 * 1000 * 365, month: (24 * 60 * 60 * 1000 * 365) / 12, day: 24 * 60 * 60 * 1000, hour: 60 * 60 * 1000, minute: 60 * 1000, second: 1000, }; const now = new Date(); const relativeTimeFormat = new Intl.RelativeTimeF...
import importlib from .base_model import BaseModel MODEL_REGISTRY = {} def register_model(name): """ New model types can be added to cogdl with the :func:`register_model` function decorator. For example:: @register_model('gat') class GAT(BaseModel): (...) Args: ...
"use strict"; var $ = require("jquery"), common = require("./commonParts/common.js"), createFunnel = common.createFunnel, environment = common.environment, trackerModule = require("viz/funnel/tracker"), clickEventName = require("events/click").name, pointerEvents = require("events/pointer"), ...
export * from '@styled-icons/material/PhonelinkOff';
import os import fabulous from fabulous.color import * from fabulous import text, utils, image, debug, xterm256 def wait(): raw_input("\nPress " + bold("enter") + " for more fun... ") print "" def demo_image(): section("Semi-Transparent PNG") imp = " from fabulous import image\n " print bold(...
/** * @license Angular v8.2.13 * (c) 2010-2019 Google LLC. https://angular.io/ * License: MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/core/testing'), require('@angular/platform-browser-dynamic')...
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('app'))
import torch from torch.autograd import Variable import numpy as np from torch import distributions as dis from copy import deepcopy import torch.nn as nn EPS = 1e-6 # Avoid NaN (prevents division by zero or log of zero) # CAP the standard deviation of the actor LOG_STD_MAX = 2 LOG_STD_MIN = -20 REG = 1e-3 # regular...
import React, { Component } from "react"; import {Router, Route, browserHistory, Redirect} from "react-router"; import Home from './components/Home' import StudentHome from './components/StudentHome' import NewRecord from './components/NewRecord' import ViewRecord from './components/ViewRecord'; import Educational fr...
import assertString from './util/assertString'; /** * 判断是否为URL。 * @param {string} str 校验字符串 * @returns {boolean} 真/假 * * @example * * jeselvmo.isURL('http://harveyzeng.iteye.com/blog/1776991'); * //=> true * * jeselvmo.isURL('https://www.baidu.com'); * //=> true * * jeselvmo.isURL('http://baidu.com'); * /...
let EOL = require('os').EOL; let path = require('path'); let fsp = require('fsp'); let chalk, chalkify; // lazy load /** * Class representing a directory. */ class Directory { /** * @param {Object} dir Plain object representation of the Directory class. */ constructor(dir) { this.path = ...
const color = require('kleur'); const Prompt = require('./prompt'); const { erase, cursor } = require('sisteransi'); const { style, clear, lines, figures } = require('../util'); /** * TextPrompt Base Element * @param {Object} opts Options * @param {String} opts.message Message * @param {String} [opts.styl...
numero = int(input('Digite um número inteiro: ')) print('''Escolha uma das bases para conversão \033[1;31m1 - Binário\033[m \033[1;32m2 - Octal\033[m \033[1;33m3 - Hexadecimal\033[m''') opcao = int(input('Digitar opção: ')) if opcao == 1: print('{} convertido para \033[1;31mBinário\033[m é igual a {}'.format(nume...
# qubit number=2 # total number=9 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as...
module.exports = { plugins: [ '@babel/plugin-proposal-optional-chaining' ], presets: [ [ '@babel/preset-env', { targets: { node: '10.13.0', } } ] ] };
/* # Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "l...
/*global Buffer require exports console setTimeout */ var net = require("net"), util = require("./lib/util"), Queue = require("./lib/queue"), to_array = require("./lib/to_array"), events = require("events"), parsers = [], commands, connection_id = 0, default_port = 6379, default_host = ...
import _uniq from 'lodash-es/uniq'; import { actionDeleteRelation } from './delete_relation'; // https://github.com/openstreetmap/potlatch2/blob/master/net/systemeD/halcyon/connection/actions/DeleteWayAction.as export function actionDeleteWay(wayId) { function canDeleteNode(node, graph) { return !graph....
(function(e){const t=e["cs"]=e["cs"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 z %1","Align cell text to the bottom":"Zarovnat text buňky dolů","Align cell text to the center":"Zarovnat text buňky na střed","Align cell text to the left":"Zarovnat text buňky doleva","Align cell text to the middle":...
import PropTypes from 'prop-types' const FOFFER_ENTRIES_PROPS = PropTypes.shape({ id: PropTypes.number.isRequired, symbol: PropTypes.string.isRequired, amountOrig: PropTypes.number.isRequired, amountExecuted: PropTypes.number.isRequired, type: PropTypes.string, status: PropTypes.string, rate: PropTypes.o...
function showPostIt(a){var b=$(".content .sidebar .postit");b.css("background-color",a.color);b.find(".series").text(a.series.name);b.find(".possibility").text("Possibility "+a.possibility);b.find(".priority").text("Priority "+a.priority);b.find(".statement").text(a.statement);if(a.question){b.find(".question").show();...
class Error(Exception): '''Base class for other exceptions''' pass class ChrError(Error): '''Raise when the breakpoint is not in autosome or allosome, where annotation is not possible''' def __init__(self, bkp): Exception.__init__( self, "Breakpoint " + str(bkp) + " is in neithe...
import React from 'react'; import { Link } from 'react-router-dom'; export default () => ( <ul> <li> <Link to="/">Home</Link> </li> <li> <Link to="/about">About</Link> </li> <li> <Link to="/contact">Contact</Link> </li> </ul> );
function init() { document.cookie = 'cookie=/get-my-radio-premium'; } document.addEventListener('DOMContentLoaded', init);
/** * plupload.html5.js * * Copyright 2009, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ // JSLint defined globals /*global plupload:false, File:false, window:false, atob:false, FormData:false,...
'use strict'; // const pg = require('pg'); const Step = require('../../lib/runner/step'); module.exports = class CreateFunctionSign001 extends Step { constructor(baseName, baseVersion) { super(baseName, baseVersion); // this.kind = kind; this.name = 'verify'; this.name = `${this.kind}_${this.version}....
import React from 'react'; import Layout from '../layout/main'; import Canvas from '../component/canvas'; import CanvasControl from '../component/canvas-control'; export default function Main({ canvas, viewport, actions }) { return ( <Layout> <Canvas canvas={canvas} viewport={viewport} /> ...
""" Application to explore the difference between sasview 3.x orientation dispersity and possible replacement algorithms. """ import mpl_toolkits.mplot3d # Adds projection='3d' option to subplot import matplotlib.pyplot as plt from matplotlib.widgets import Slider, CheckButtons from matplotlib import cm import numpy...
console.log('in 1.worker.js'); const _ = require('lodash'); console.log(_.chunk(['a', 'b', 'c', 'd'], 2));
import QuickTesterDisplay from './display/quick-tester-display.js'; class QuickTester { static get typeName() { return 'quick-tester'; } getDisplayComponent() { return QuickTesterDisplay; } } export default QuickTester;
# Copyright (c) 2021 PaddlePaddle 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 appli...
import Component from '@ember/component'; import boundOneWay from 'ghost-admin/utils/bound-one-way'; import moment from 'moment'; import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; export default Component.extend({ feature: service(), config: service(), mediaQueries: ...
const { Gio } = imports.gi; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const { AutoGridLayout } = Me.imports.tilingManager.tilingLayouts.autoGrid; /* exported VerticalGridLayout */ var VerticalGridLayout = class VerticalGridLayout extends AutoGridLayout { ...
"use strict"; var __values = (this && this.__values) || function (o) { var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; if (m) return m.call(o); return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; ...
'use strict'; angular.module('BlurAdmin.setting', []) .service("config", function($window, $location) { var url = new $window.URL($location.absUrl()).origin; this.url = url + "/"; var serverMode = 'prod' var baseUrl = 'azurewebsites.net/api/' if (serverMode == 'dev') { ...
function b1() { x = 1; function b2() { x = 2; } }
from enum import Enum class Family(str, Enum): NONE = "None" FULL = "Full" ASPEN = "Aspen" def __str__(self) -> str: return str(self.value)
import { observable } from 'mobx'; import { map } from 'lodash'; import playlistParser from 'playlist-parser'; import BaseAction from '../base_action'; export default class GetStreamUrlsFromPlaylistUrl extends BaseAction { @observable result = []; run = async ({ playlistUrl }) => { const extension = /\.(pls|m...
const PREC = { impl: 1, or: 2, and: 3, eq: 4, neq: 4, '<': 5, '>': 5, leq: 5, geq: 5, update: 6, not: 7, '+': 8, '-': 8, '*': 9, '/': 9, concat: 10, '?': 11, negate: 12 } module.exports = grammar({ name: 'nix', extras: $ => [ /\s/, $.comment, ], supertypes: $ => [ ...
"use strict"; const fs = require('fs'); const path = require('path'); const tools = require('@iconify/tools'); const phantom = require('@iconify/tools/src/export/phantomjs'); const config = require('./config'); const fsHelper = require('./files'); module.exports = overwrite => new Promise((fulfill, reject) => { ...
$(document).ready(init_control); /******************************************************************************************************************************************************************************/ function init_control() { $('#tbt-tareo').DataTable({ "language": { "url": "//cdn.data...
x => x |> { method: y => y + 1 } |> z => z * 2
import getopt import glob import os import sys import traceback import shutil def __validate_params(input_paths, output_path, output_format, json_pin_sheet, json_icons): if not os.path.exists(json_pin_sheet): raise ValueError("Couldn't find JSON atlas for Pin Sheet: {0}".format(json_pin_sheet)) if not...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
// Single tile on screen with vector data function ScreenVectorTile(layer, tilePoint, zoom) { this.layer = layer; this.tilePoint = tilePoint; this.zoom = zoom; this.gmx = layer._gmx; this.zKey = this.layer._tileCoordsToKey(tilePoint, zoom); var utils = gmxAPIutils; this.worldWidthMerc = util...
import React from "react"; import { Card, Icon, Segment } from "semantic-ui-react"; const GenericContainer = ({ ChildComponent, title, description, dateUpdated, loading, }) => { return ( <Card fluid as={Segment} loading={loading}> <Card.Content> <Card.Header>{title}</Card.Header> ...
/** * @license Apache-2.0 * * Copyright (c) 2020 The Stdlib 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/licenses/LICENSE-2.0 * * Unless required by a...
import { PropTypes, Component } from 'react' // creo un array di scelte preimpostate per il form const tahoeResorts = [ "Alpine Meadows", "Boreal", "Diamond Peak", "Donner Ski Ranch", "Heavenly", "Homewood", "Kirkwood", "Mt. Rose", "Northstar", "Squaw Valley", "Sugar Bowl" ]...
Reveal.addEventListener( 'ready', function() { QUnit.module( 'Markdown' ); test( 'Vertical separator', function() { strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' ); }); test( 'Attributes on vertical slides header', function() { strictEqual( docum...
import _createClass from "@babel/runtime/helpers/createClass"; import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose"; import Ext_Base from '../../Ext/Base.js'; var Ext_data_NodeInterface = /*#__PURE__*/function (_Ext_Base) { _inheritsLoose(Ext_data_NodeInterface, _Ext_Base); Ext_data_NodeInterface.PRO...
// 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, or any plugin's // vendor/assets/javascripts directory can be referenced here using a relative path. // // It's not advisa...
import React from 'react'; import { Link } from 'gatsby'; import styled from 'styled-components'; import {graphql , useStaticQuery} from 'gatsby'; import Img from 'gatsby-image'; const Images = styled.div` width: 157px; height: 20px; margin-top: auto; margin-bottom: auto; ` const Logo = () => { const { file } = ...
var Buffer = require("buffer/").Buffer; var should = require("should"); var qzeonjs = require("../../index.js"); describe("transaction.js", function () { var transaction = qzeonjs.transaction; it("should be object", function () { (transaction).should.be.type("object"); }); it("should have properties", f...
// moment.js language configuration // language : hungarian (hu) // author : Adam Brunner : https://github.com/adambrunner var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); function translate(number, withoutSuffix, key, isFuture) { var num = number, suffix; ...
import { MoviesListPage as MLP } from '../page-objects'; describe('4) MOVIES LIST: PAGING', () => { it('4.1.1: Page 1 button is active by default', () => { cy.visit(`${Cypress.env('homeUrl')}?moviesType=top_rated&page=1`); MLP.paginationLinkActive().should('contain', 1); }); it('4.1.2: First movie card...
'use strict'; /** * map_reduce_replace.js * * Generates some random data and inserts it into a collection. Runs a * map-reduce command over the collection that computes the frequency * counts of the 'value' field and stores the results in an existing * collection. * * Uses the "replace" action to ove...
import api from '../api/artifacts-api' import { createArtifactPreviewContent } from './createArtifactPreviewContent' export const setArtifactPreviewFromSchema = ( artifact, noData, setNoData, setPreview ) => { if (noData) { setNoData(false) } setPreview([ { type: 'table', data: { ...
'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var path = require('path'); var me...
const path = require('path'); const webpack = require('webpack'); const merge = require('webpack-merge'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const TARGET = process.env.npm_lifecycle_event; const PATHS = { app: path.join(__dirname, 'app'), build: path.join(__dirname, 'build'), modul...
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'smiley', 'zh-cn', { options: '表情图标选项', title: '插入表情图标', toolbar: '表情符' } );
import shutil def pretty_table(table, limit_widths): cols = len(table[0]) def max_width(col, max_w): w = 0 for l in table: w = max(w, len(l[col])) if max_w != -1: w = min(w, max_w) return w widths = [max_width(i, limit_widths[i] if i < len(limit_wi...
import numpy as np import math from scipy.spatial.distance import cityblock import matplotlib.pyplot as plt from re import split from field_info import * from collections import Counter def sample_SCENE(sample_ft, p_pos, v_pickers, w_pickers, current_ft, pred_horizon,centers): scene={} # target position and finish...
/*! * modernizr 3.3.0 (Custom Build) | MIT * http://modernizr.com/download/?-touchevents-setclasses */ !function(e,n,t){function o(e,n){return typeof e===n}function s(){var e,n,t,s,a,i,r;for(var l in c)if(c.hasOwnProperty(l)){if(e=[],n=c[l],n.name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.opti...
"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.UserCircle = React.forwardRef(function (props, ref) { var attrs = { "fill": "curren...
(function () { 'use strict'; angular .module('com.module.member') .provider('modalState', ['$stateProvider', function($stateProvider) { var provider = this; this.$get = function() { return provider; } this.state = function(stateName, options) { var modalInstance; ...
import * as tslib_1 from "tslib"; import { OTableCellRendererActionComponent, DEFAULT_INPUTS_O_TABLE_CELL_RENDERER_ACTION, DEFAULT_OUTPUTS_O_TABLE_CELL_RENDERER_ACTION } from './action/o-table-cell-renderer-action.component'; import { OTableCellRendererBooleanComponent, DEFAULT_INPUTS_O_TABLE_CELL_RENDERER_BOOLEAN } fr...
'use strict' // Template version: 1.2.6 // see http://vuejs-templates.github.io/webpack for documentation. const path = require('path') module.exports = { dev: { // Paths assetsSubDirectory: 'static',// 资源子目录,指js,css,img存放的目录,其路径相对于index.html assetsPublicPath: '/', //:资源目录,指assetsSubDirectory目录也就是js,css...
/* jQWidgets v3.8.0 (2015-Apr) Copyright (c) 2011-2015 jQWidgets. License: http://jqwidgets.com/license/ */ (function(b){var a=(function(){var c={},u,q,j,l,g,h,o,p;function d(B,A,x,z,y,v,w){this.hierarchy=y;this.exportFormat=v;this.filename=w;B.beginFile(w);n(B);k(B);B.endFile(w);return B.getFile()}function n(z){var x...
/** * @NApiVersion 2.x * @NScriptType UserEventScript * @NModuleScope SameAccount */ define(['N/record', 'N/log','N/search','N/file'], function(record,log,search,file) { function beforeLoad(context) { if(context.type == "view") { var valfoto1 = null; var valfoto2 = null; ...
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-82b5"],{"9dka":function(e,t,a){},BKbu:function(e,t,a){"use strict";a.r(t);var n={name:"ManagerListPage",filters:{dialogTitle:function(e){return e?"创建管理账户":"编辑管理账户"}},data:function(){return{roles:null,list:null,listLoading:!1,listTotal:0,manager:{manageid:null,...
// Auto-generated. Do not edit! // (in-package crazyflie_driver.msg) "use strict"; const _serializer = _ros_msg_utils.Serialize; const _arraySerializer = _serializer.Array; const _deserializer = _ros_msg_utils.Deserialize; const _arrayDeserializer = _deserializer.Array; const _finder = _ros_msg_utils.Find; const _g...
import path from 'path'; import webdriver from 'selenium-webdriver'; import { expect } from 'chai'; import { check } from '../func'; function findList(driver) { return driver.findElements(webdriver.By.css('.todo-list > li')); } const addTodo = async (driver, key) => { // add todo driver.findElement(webdriver.By...
# MIT License # # Copyright (C) IBM Corporation 2018 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
export default function(scale) { return function(_) { var range = scale.range(), lo = _[0], hi = _[1], min = -1, max, t, i, n; if (hi < lo) { t = lo; lo = hi; hi = t; } for (i=0, n=range.length; i<n; ++i) { if (range[i] >= lo && range[i] <= hi) { ...
const AppError = require('../../../../../shared/errors/AppError'); const usersRepository = require('../../repositories/UsersRepository') class IsUserMemberOfService { constructor() {} async execute(user, group) { const isUserMemberOf = await usersRepository.isUserMemberOf(user, group) if (...
const ul = document.querySelector('ul') const lis = ul.querySelectorAll('li') ul.addEventListener('click', e => { for (let i = 0; i < lis.length; i++) { lis[i].className = '' } e.target.className = 'checked' })
/** * 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 strict-local * @format * @emails oncall+metro_bundler */ 'use strict'; const FailedToResolvePathError = require('../Fa...
function meanSquareError(firstArray, secondArray) { if (firstArray.length !== secondArray.length) return false; return firstArray.map((e, i) => e - secondArray[i]).map(e => e * e).reduce((s, c) => s + c, 0) / firstArray.length; } // From: https://www.codewars.com/kata/mean-square-error // 5 kyu console.log(meanSqua...
const gulp = require('gulp') const config = require('./config').dev const dev = require('../../src/cmds').dev module.exports = { command: dev.command, description: dev.description, builder: function(yargs) { yargs.options(dev.options).config(config) }, handler: function(argv) { // convert single pro...
/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the above copyright notice, this list of conditions and /// ...
import React from "react"; import ReactDOM from "react-dom"; import { BrowserRouter } from "react-router-dom"; import App from "App"; import reportWebVitals from "./reportWebVitals"; import { Provider } from "react-redux"; import index from "./reducer"; import { PersistGate } from "redux-persist/integration/react"; i...
const logger = require("../modules/logger.js"); // This event executes when a new guild (server) is joined. module.exports = (client, guild) => { logger.log(`[GUILD JOIN] ${guild.id} added the bot. Owner: ${guild.ownerId}`); };
export default {D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0.140868,"20":0,"21":0,"22":0,"23":0,"24":0.437697,"25":0,"26":0,"27":0,"28":0,"29":0.005031,"30":0.135837,"31":0.005031,"32":0,"33":0.160992,"34":0,"35":0.332046,"36":0.005031,"37":0,"38":0.005031...
import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D from keras.utils import np_utils import numpy as np ## Settings in training phase. batch_size = 32 # Change batch size based on the capability of your resource. num_classes = 10 # MNIST epochs =...