text
stringlengths
3
1.05M
const { GraphQLString, GraphQLList, GraphQLNonNull, GraphQLInputObjectType, } = require('graphql'); /** * @name exports * @summary MedicinalProductIndicationotherTherapy Input Schema */ module.exports = new GraphQLInputObjectType({ name: 'MedicinalProductIndicationotherTherapy_Input', description: '', fields...
# -*- coding: utf-8 -*- __author__ = 'Ricardo M. Vilchis' __email__ = 'ajkaanbal@gmail.com' __version__ = '0.1.0'
import { makeStyles } from '@material-ui/core'; import { cvMakerFooter, form } from '../styles'; const styles = makeStyles(() => ({ ...cvMakerFooter, ...form, root: { background: '#f9f9f9', }, container: { background: '#fff', padding: '20px 32px 40px', }, alignCenter: { alignItems: 'cente...
/** * Copyright 2015 Telerik AD * * 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 ...
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables from...
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var heyListen = require('hey-listen'); var prevTime = 0; var onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined ? function (callback) { return window.requestAnimationFrame(callback); } : fun...
import React from 'react'; const Inventory = () => { return ( <h1>This is inventory page</h1> ) } export default Inventory;
exports.handler = async (event) => { return { statusCode: 200, body: JSON.stringify( { message: 'Go Serverless v1.0! Your function executed successfully!', input: event, }, null, 2 ), }; // Use this code if you don't use the http event with the LAMBDA-PROXY in...
// Ajax request to print table in the homepage function load_table() { $("#products").empty(); let html = ``; $.ajax({ url: "/products/categories", type: 'GET', cache: false, success: (options) => { for (const [key, value] of Object.entries(options)) { html += `<div class="container"> ...
const User = require('../models/user'); const Role = require('../models/role'); const jwt = require('jsonwebtoken'); const keys = require('../config/keys'); const storage = require('../utils/cloud_storage'); module.exports = { async getAll(req, res, next) { try { const users = await User.getAl...
const AssertionError = require('assertion-error'); const Reporter = require('../reporter'); const Context = require('./context.js'); const TestHooks = require('./hooks.js'); const TestCase = require('./testcase.js'); const Runnable = require('./runnable.js'); const NightwatchAssertError = require('../assertion').Assert...
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import MainNav from './Navigation/Navigation' import {Provider} from 'react-redux' import { NavigationContainer } from '@react-navigation/native'; import Store from './Store/configureStore' export default function App() { return ( ...
import Icon from 'vue-awesome/components/Icon' Icon.register({ restaurant_menu: { paths: [ { d: 'M8.1 13.34l2.83-2.83L3.91 3.5a4.008 4.008 0 000 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.4...
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument famins...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parse = exports.stringify = exports.isJSON = exports.reviver = exports.replacer = void 0; var _isRegex = _interopRequireDefault(require("is-regex")); var _isFunction = _interopRequireDefault(require("is-function")); var _isSymbol...
'use strict'; if (process.env.ADAPTER === 'websql') { describe('test.node-websql.js', function () { it('should run websql when we are actually testing websql', function () { var db = new PouchDB('testdb'); db.adapter.should.equal('websql'); return db.destroy(); }); }); }
import React from 'react'; import PropTypes from 'prop-types'; import fetchPonyfill from 'fetch-ponyfill'; import debounce from 'lodash.debounce'; import { Badge } from './badge-examples'; import resolveUrl from '../lib/resolve-url'; export default class SuggestionAndSearch extends React.Component { static propTypes...
const cols = { xs: 24, s: 24, m: 24, l: 24, xl: 12, xxl: 8, }; export default cols;
import React from "react"; import { Container, Top, BottomContent, BottomHeader, Bottom, Title, Text, Anchor, AnchorDiv, Icon, } from "./styles/summary"; const Summary = ({ children, ...restProps }) => { return <Container {...restProps}>{children}</Container>; }; Summary.Top = ({ children, ...re...
import React, { Component } from "react"; import { Link } from "react-router-dom"; import { Container, Row, Col } from "reactstrap"; //Import Icons import FeatherIcon from "feather-icons-react"; // import images import services from "../../assets/images/illustrator/services.svg"; // Modal Video import Mod...
""" WSGI config for forever project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "forever.settings") from django.core.w...
import time from sklearn.datasets import make_classification from sklearn.decomposition import PCA from sklearn.grid_search import GridSearchCV from sklearn.pipeline import Pipeline from sklearn.svm import SVC from pipeline_grid_search import PipelineGridSearchCV pipe = Pipeline([ ("pca", PCA()), ("svm", SVC...
// CLASS AsyncQueue // Classes.AsyncQueue = Classes.Base.subclass({ __idPrefix: "AsyncQueue", _eventManager: null, _queues: null, // This class batches the processing based on entries count, not based on elapsed // time. Using elapsed time would give us a more accurate balancing of the processing // time regar...
let defaultState = false; let removingPolygonPointsState = false; let addingPolygonPointsState = false; let movableObjectsState = true; let continuousDrawingState = true; let lastDrawingModeState = null; let readyToDrawShapeState = false; let hasDrawnShapeState = false; let cancelledReadyToDrawState = null; let removin...
//Codigo de lcuadrado console.group("Cuadrados"); // const ladoCuadrado = 5; // console.log("Los lados del cuadrado miden: " + ladoCuadrado + "cm"); function perimetroCuadrado (lado){ return lado * 4; } // console.log("El perimetro del cuadrado es : " + perimetroCuadrado + "cm"); function areacuadrado(lado){ ...
""" Code is generated by ucloud-model, DO NOT EDIT IT. """ from ucloud.core.typesystem import schema, fields class PHostCPUSetSchema(schema.ResponseSchema): """ PHostCPUSet - DescribePHost """ fields = { "CoreCount": fields.Int(required=False, load_from="CoreCount"), "Count": ...
//~ name a304 alert(a304); //~ component a305.js
/** * TextAreaExpander plugin for jQuery * v1.0 * Expands or contracts a textarea height depending on the * quatity of content entered by the user in the box. * * By Craig Buckler, Optimalworks.net * * As featured on SitePoint.com: * http://www.sitepoint.com/blogs/2009/07/29/build-auto-expanding-textarea-1/ *...
import {ArtifactoryDao} from '../../artifactory_dao'; export function ArtifactLicensesDao(RESOURCE, ArtifactoryDaoFactory) { return ArtifactoryDaoFactory() .setPath(RESOURCE.GENERAL_TAB_LICENSES + '/:action') .setCustomActions({ 'getLicenses': { method: 'GET', ...
from boa3.builtin import public @public def main(a: int, b: int) -> bool: if a == b: return True return False
def getSpeakerGender(): import requests import os import re import pickle try: import ssl ssl._create_default_https_context = ssl._create_unverified_context except: pass path = '/Users/Guest/PycharmProjects/aud.io/data/audio/wav/accents' accents = os.listdir(pa...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ re...
import Vue from 'vue'; import App from './App.vue'; import router from './router'; import store from './store'; // import ELEMENT from 'element-ui'; import mavonEditor from 'mavon-editor'; import 'mavon-editor/dist/css/index.css'; // Vue.use(ELEMENT); Vue.use(mavonEditor); Vue.prototype.$store = store; //...
const ruleModule = require('./../../../src/rules/require-version'); const {lint, ruleType} = ruleModule; describe('require-version Unit Tests', () => { describe('a rule type value should be exported', () => { test('it should equal "standard"', () => { expect(ruleType).toStrictEqual('standard'); }); ...
(function() { $(document).ready(function() { // The pattern to replace in image paths; this allows image paths in the live // code editors (e.g. "images/fish.jpg" to be rewritten to point to the correct // URL on the server (e.g. "assets/images/fish.jpg") var imagePathPattern = /(images\/(?:\w+)\.(jpg|png|svg))/gi; /...
var searchData= [ ['errorconnectiontext_27',['errorConnectionText',['../classplayer_1_1_player_creation_frame.html#a9bed7bc7a62ac2536ba6f34204b9fd36',1,'player::PlayerCreationFrame']]], ['exitbutton_28',['exitButton',['../classgui_1_1_start_game_frame.html#a7fbd43aa7f5939b3b1f909b46dadbaf3',1,'gui::StartGameFrame']...
import { createStore, applyMiddleware, compose } from "redux"; import thunk from "redux-thunk"; import rootReducer from "./reducers"; const initialState = {}; const middleware = [thunk]; const composeEnhancers = (typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose; const...
import os import json from django.conf import settings from django.shortcuts import render from django.http import HttpResponse, HttpResponseBadRequest from .utils.ss_calculator import get_retire_data from .utils.ss_utilities import get_retirement_age from dateutil import parser import datetime from retirement_api.mod...
import { PageModuleDescriptor } from '@/modules-arch/page-module-descriptor' import { BalanceExplorerModule } from '@modules/assets/balance-explorer/module' export class BalancesPageModule extends PageModuleDescriptor { constructor (opts = {}) { super({ ...opts, importComponentFn: _ => import('@/vue/...
num = int(input("Informe um número: ")) u = num // 1 % 10 d = num // 10 % 10 c = num // 100 % 10 m = num // 1000 % 10 print("Analisando o número {}".format(num)) print("Unidade {}".format(u)) print("Dezena {}".format(d)) print("Centena {}".format(c)) print("Milhar {}".format(m))
export default { members: 'Membres', role: 'Rôle', updateRole: 'Mettre à jour le rôle', addMember: 'Ajouter un membre', userSearchAPIs: "Rechercher des utilisateurs (avec l'IPA)", userSearchPrompt: 'Commencez à taper pour rechercher', removeMember: 'Supprimer un membre', removePrompt: 'Êtes-vous sûr de ...
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const PageLink = props => { const { children, className, tag: Tag, ...attributes } = props; const classes = classNames('page-link', className); return ( <Tag data-test='page-link' {...attributes} className={...
import curses import curses.textpad import sys from SDWLE.agents import registry from SDWLE.cards.heroes import hero_for_class from SDWLE.constants import CHARACTER_CLASS from SDWLE.engine import Game, Deck, card_lookup from SDWLE.ui.game_printer import GameRender from SDWLE.cards import * def load_deck(filename): ...
import React from "react"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import Navbar from "./components/Navbar" import Footer from "./components/Footer" import Home from "./components/Home" import Disturbing from "./components/Disturbing" import Great from "./components/Great" import Bad ...
function tickets(input, criteria) { let result = []; class Ticket { constructor(destination, price, status) { this.destination = destination; this.price = price; this.status = status; } } for (let line of input) { let [destination, price, sta...
const baseAPI = Cypress.env('REACT_APP_API_URL'); describe('superadmin should be assigned all roles by default', () => { before(() => { cy.server(); cy.route('GET', `${baseAPI}/user/roles/10948?&page=1`, 'fixture:roles/superAdminUsers'); cy.route('PUT', `${baseAPI}/user/role/update`, 'fixture...
import React from 'react'; import config from '../../config'; import { twitterPageURL } from '../../util/urlHelpers'; import { StaticPage, TopbarContainer } from '../../containers'; import { LayoutSingleColumn, LayoutWrapperTopbar, LayoutWrapperMain, LayoutWrapperFooter, Footer, ExternalLink, } from '../../...
module.exports = { rules: { // enforce line breaks after opening and before closing array brackets // https://eslint.org/docs/rules/array-bracket-newline // TODO: enable? semver-major 'array-bracket-newline': ['off', 'consistent'], // object option alternative: { multiline: true, minItems: 3 } //...
const webpack = require('webpack'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const ChunkHashReplacePlugin = require('chunkhash-replace-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); exports.devServer = function (options) { return { devServer: { watchOptions: ...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { getLots } from '../actions'; import LotItem from '../widgetsUI/lot_item'; class HomeContainer extends Component { componentWillMount(){ this.props.dispatch(getLots(1,0,'desc')) } renderItems = (lots) => ( ...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The aRIA Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Linux network utilities. Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-l...
export const dataFormat = (name, arr) => { return { user: name, LT3words: arr.filter(message => { return message.text.split(' ').length <= 3 }).length, LT3wordsColor: 'hsl(165, 70%, 50%)', noTone: arr.filter(message => { return message.text.split(' ').length > 3 && !message.score }...
/** * @license Apache-2.0 * * Copyright (c) 2018 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 logging from collections import OrderedDict from typing import Dict, List import tornado.gen import tornado.ioloop import tornado.options from cachetools import TTLCache, cached from aqua_monitor import chat, clients tornado.options.define('history-days', default=7, type=int, help='Number of days of history t...
const { singleQuery } = require('../../baseQueries'); const getUserWatchList = async ({ userId }) => { const queryText = ` SELECT issues.id, issues.modified_date AS "modifiedDate", issues.name, issues.funded_amount AS "fundedAmount" FROM watching JOIN issues ON watching.issue_id =...
/* * /MathJax/localization/ru/MathML.js * * Copyright (c) 2009-2016 The MathJax Consortium * * 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/license...
var EventHandlers = { // Event handler for previous and next changeSlide: function (options, e) { // console.log('changeSlide'); var indexOffset, slideOffset, unevenOffset; unevenOffset = (this.state.slideCount % this.props.slidesToScroll !== 0); indexOffset = unevenOffset ? 0 : (this.state.slideCou...
import React from "react"; import Header from "./Header"; import Home from './Home'; import Footer from "./Footer"; import '../App.css'; function MainContent() { return ( <div className="bgImage"> <Header/> <Home/> <Footer/> </div> ) } export default MainContent;
import React, { useState, useEffect } from "react"; import { Tab } from "@headlessui/react"; import Layout from "../../../../components/layout/layout"; import { useRouter } from "next/router"; import MenMeasuementForm from "../../../../components/clients/ClientForm/men/men.form.component"; import WomenMeasuementForm fr...
window.DependencyLoader.push('Base', function() { /** * BaseCollection * * @extends Base */ window.BaseCollection = Base.extend({ /** * _accessors * * @access protected * @var Array (default: []) */ _accessors: [], ...
let books; const initialized = () => { console.warn("Database Books is ready") books = db.addCollection('books'); }; const path = require('path'); const loki = require('lokijs'); const db = new loki(path.join(__dirname, '../../data/books.db'), { autoload: true, autoloadCallback: initialized, autosav...
var browsersync = require('browser-sync'), gulp = require('gulp'), autoprefixer = require('gulp-autoprefixer'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'), postcss = require('gulp-postcss'), sass = require('gulp-sass'), stylus = require('gulp-stylus'), sourcemaps ...
if (typeof firebase === 'undefined') throw new Error('hosting/init-error: Firebase SDK not detected. You must include it before /__/firebase/init.js'); firebase.initializeApp({ apiKey: "<API_KEY>", authDomain: "<PROJECT_ID>.firebaseapp.com", databaseURL: "https://<DATABASE_NAME>.firebaseio.com", project...
// !! IMPORTANT README: // You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. // When the user scrolls the page, execute myFunction /*********** INSTRUCTIONS: - Select the...
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(348)},function(e,t,n){var r=n(4),o=n(21),i=n(14),a=n(15),u=n(22),l=function(e,t,n){var c,s,f,p,d=e&l.F,h=e&l.G,v=e&l.S,y=e&l.P,m=e&l.B,g=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),w=b.prototype||(b.pr...
const rootDir = '<rootDir>/setup'; module.exports = { moduleFileExtensions: ['ts', 'tsx', 'js'], moduleNameMapper: { '.s?css$': 'jest-css-modules', }, setupFiles: [`${rootDir}/test-shim.js`, `${rootDir}/test-setup.js`], testMatch: ['**/*.test.(ts|tsx)'], transform: { '.tsx?$': 'ts-jest', }, ver...
const yo = require('yo-yo') const co = require('co') const {DownloadsList} = require('builtin-pages-lib') import renderBuiltinPagesNav from '../com/builtin-pages-nav' import {render as renderDownloadsList} from '../com/downloads-list' // globals // = var downloadsList // main // = co(function * () { // fetch down...
(function(e,t){function y(e){for(var t=1,n;n=arguments[t];t++)for(var r in n)e[r]=n[r];return e}function b(e){return Array.prototype.slice.call(e)}function E(e,t){for(var n=0,r;r=e[n];n++)if(t==r)return n;return-1}function S(){var e=b(arguments),t=[];for(var n=0,r=e.length;n<r;n++)e[n].length>0&&t.push(e[n].replace(/\/...
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8313],{11965:function(Te,G,k){"use strict";k.d(G,{Z:function(){return H}});var v=k(82961);function H(p,E){var l=typeof Symbol!="undefined"&&p[Symbol.iterator]||p["@@iterator"];if(!l){if(Array.isArray(p)||(l=(0,v.Z)(p))||E&&p&&typeof p.length==...
"""SCons.Tool.applelink Tool-specific initialization for the Apple gnu-like linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
import { expect } from 'chai'; import wrapWord from './../src/wrapWord'; describe('wrapWord', () => { it('wraps a string at a nearest whitespace', () => { expect(wrapWord('aaa bbb', 5)).to.deep.equal(['aaa', 'bbb']); expect(wrapWord('a a a bbb', 5)).to.deep.equal(['a a a', 'bbb']); }); cont...
webpackJsonp([3],{544:function(e,t,n){n(579);var i=n(8)(n(562),n(591),"data-v-3dc80bf4",null);e.exports=i.exports},556:function(e,t,n){"use strict";function i(){var e=c()({},l.b,{platform:"h5",uin:0,needNewCode:1});return n.i(A.a)("https://c.y.qq.com/musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg",e,l.c)}function o(){...
(function() {var implementors = {}; implementors["vec2dim"] = [{text:"impl&lt;T&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html\" title=\"trait core::marker::Unpin\">Unpin</a> for <a class=\"struct\" href=\"vec2dim/struct.Vec2d.html\" title=\"struct vec2dim::Vec2d\">Vec2d</a...
export { default } from "./WeightPage";
import requests s = requests.session() s.auth = ("yzz","123456") s.get("https://www.baidu.com/") print(s.headers)
var msg1Titulo, mesActual = new Date(), meses = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], mesesCortos = ['Ene','Feb','Mar','Abr', 'May','Jun','Jul','Ago','Sep', 'Oct','Nov','Dic']; $(document).on('ready', function(){ if(l...
from django.test import TestCase from accounts.forms import SignUpForm class SignUpFormTest(TestCase): def test_form_has_fields(self): form = SignUpForm() expected = ["username", "email", "password1", "password2"] actual = list(form.fields) self.assertSequenceEqual(expected, actual...
(function(){(function(a){a.CarCrashSingletonClass.prototype.api=function(d){var b,c;c=this;b=Q.defer();$.ajax({type:d.method,url:d.action,data:d.data,dataType:"json",cache:false,success:function(e){var f;if(typeof e.success!=="undefined"&&e.success){b.resolve(e)}else{f=c.composeApiError(e);b.reject(f)}},error:function(...
import smart_imports smart_imports.all() data_protector_client = accounts_tt_services.data_protector class TTAPiTests(utils_testcase.TestCase): def setUp(self): super().setUp() game_logic.create_test_map() data_protector_client.cmd_debug_clear_service() self.account = self.ac...
#!/usr/bin/python ######################################################################################################################## # # Copyright (c) 2014, Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permi...
import logging from django.core.exceptions import ObjectDoesNotExist from teams.models import Team from utils.email import add_outgoing_email logger = logging.getLogger("bornhack.%s" % __name__) def add_new_speaker_proposal_email(speaker_proposal): formatdict = {"proposal": speaker_proposal} try: ...
import matplotlib.pyplot as plt def plot_learning_curve(): pass # plot_loss_change(learn.sched, sma=20) def plot_training_loss(train_losses): plt.plot(range(len(train_losses)), train_losses, 'b-') plt.xlabel('train_step') plt.ylabel('training_loss') plt.show() # https://towardsdatas...
// jingle bell time is a swell time var level = 1; //This is a % var levInt = 1; //This is level as an integer which is used for tab name var levSafe = 0.8; //To avoid seeing the background between the joins function update() { level = level + 0.05;//update it first if(level > 100) { level = 100; // Max out ...
import React from "react"; import Display from "./Display"; import ButtonPanel from "./ButtonPanel"; import calculate from "../logic/calculate"; import keyReference from "../logic/keyReference"; import "./App.css"; class App extends React.Component { constructor(props) { super(props); this.state = { t...
#!/usr/bin/env node /* eslint-disable func-names */ import Benchmark from "benchmark"; import seedrandom from "seedrandom"; import pkg from 'sprintf'; import { Graph, algorithms } from '../index.js'; const { sprintf } = pkg; const seed = process.env.SEED; seedrandom(seed, { global: true }); if (seed) { console.log...
'use strict'; var defaults = require('../core/core.defaults'); var elements = require('../elements/index'); var helpers = require('../helpers/index'); defaults._set('bubble', { hover: { mode: 'single' }, scales: { xAxes: [{ type: 'linear', // bubble should probably use a linear scale by default position...
const restify = require('restify'); const errs = require('restify-errors'); const { v4: uuidv4 } = require('uuid'); const debug = require('debug')('engine-server'); const verbose = require('debug')('engine-server-verbose'); const Session = require('./session.js'); const EventStream = require('./event_stream.js'); cons...
import React from 'react' import ReactDOM from 'react-dom' import ProgressButton, {STATE} from '../../lib/index' import createReactClass from 'create-react-class' const App = createReactClass({ getInitialState () { return { button1State: STATE.NOTHING, button2State: STATE.NOTHING, button3State:...
# -*- coding: utf-8 -*- from layers.dynamic_rnn import DynamicLSTM import numpy as np import math import torch import torch.nn as nn import torch.nn.functional as F class PositionProximity(nn.Module): def __init__(self, opt): self.opt = opt super(PositionProximity, self).__init__() def fo...
import React from 'react'; import PropTypes from 'prop-types'; import { Button } from '@material-ui/core'; import { noop } from 'lodash'; import { useStyles } from './delete-button.styles'; const DeleteButton = ({ children, onClickHandler, ...props }) => { const styles = useStyles(); return ( <div className={...
import pytest from aoc2021 import day05 @pytest.mark.parametrize( ("name", "expected"), [("sample", 5), ("full", 5690)], ) def test_day05_part1(name: str, expected: int): data_path = f"data/day05-{name}.txt" assert day05.part1(data_path) == expected @pytest.mark.parametrize( ("name", "expected"...
""" The MIT License (MIT) Copyright (c) 2021-present VincentRPS 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, ...
import numpy as np import numpy.linalg as npla def qr_iteration(A, tol): # Your implementation goes here for i in range(A.shape[1] - 1, 0, -1): while npla.norm(A[i - 1, :i - 1], ord=2) > tol: sigma = A[i, i] Q, R = npla.qr(A - sigma * np.diag(np.diag(np.ones(A.shape)))) ...
#coding=utf-8 ''' @author: dengdan ''' import cv2 import numpy as np import logging import math from . import event import util IMREAD_GRAY = 0 IMREAD_COLOR = 1 IMREAD_UNCHANGED = -1 COLOR_WHITE =(255, 255, 255) COLOR_BLACK = (0, 0, 0) COLOR_GREEN = (0, 255, 0) COLOR_RGB_RED = (255, 0, 0) COLOR_BGR_RED = (0, 0, 25...
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _extends from "@babel/runtime/helpers/esm/extends"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; impo...
const nav = document.querySelector('.nav') window.addEventListener('scroll', fixNav) function fixNav() { if (window.scrollY > nav.offsetHeight + 150) { nav.classList.add('active') } else { nav.classList.remove('active') } }
from itertools import product import numpy as np from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix, issparse) import pytest from sklearn import metrics from sklearn import neighbors, datasets from sklearn.exceptions import DataConversionWarning...
function VideoGame(display, url) { Game.call(this, display); this.transparent = false; this.video = document.createElement('video'); this.video.src = url; this.video.setAttribute('loop', true); this.video.play(); this.background = document.createElement('canvas').getContext('2d'); this.b...
import pytest from dumbpm.prio.parse import parse_input def test_parse_input_not_found() -> None: with pytest.raises(FileNotFoundError): parse_input("tests/prio/csvs/mamma.csv") def test_parse_input_negative() -> None: with pytest.raises(ValueError): parse_input("tests/prio/csvs/negative.cs...