text
stringlengths
3
1.05M
import torch import torch.nn as nn from transformers import BertModel, BertPreTrainedModel from transformers.models.bert.modeling_bert import BertAttention, BertIntermediate, BertOutput from components import masked_avgpool class DecoderLayer(nn.Module): def __init__(self, config): super().__init__() ...
var searchData= [ ['v_5ffunc',['v_func',['../def__glob_8h.html#a6980c51a42cf5597296325058b444a5e',1,'def_glob.h']]], ['valid_5faddress',['VALID_ADDRESS',['../def__macro_8h.html#a8f38da0e8a47dc26276ec70fd2a132d5',1,'def_macro.h']]], ['valid_5frange',['VALID_RANGE',['../def__macro_8h.html#a9942bdee6053bf5958e7b2755...
export default class AddSshKeyValidation { constructor(inputElement, warningElement, originalSubmitElement, confirmSubmitElement) { this.inputElement = inputElement; this.form = inputElement.form; this.warningElement = warningElement; this.originalSubmitElement = originalSubmitElement; this.conf...
# -*- coding: utf-8 -*- # # PubKey/RSA/_slowmath.py : Pure Python implementation of the RSA portions of _fastmath # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To #...
#!/usr/bin/env python # # fakemail (Python version) # # $Id: fakemail.py,v 1.4 2011/06/09 16:57:10 ashtong Exp $ import asyncore import getopt import os import signal import smtpd import socket import sys class FakeServer(smtpd.SMTPServer): RECIPIENT_COUNTER = {} def __init__(self, localaddr, remoteaddr, ...
$('#id_a_wechat').hover(function () { $('#id_img_wechat_qrcode').fadeIn("fast"); }, function () { $('#id_img_wechat_qrcode').fadeOut("fast"); });
'use strict' const debug=require('debug')('platziverse:api') const http=require('http') const chalk=require('chalk') const express=require('express')//Se va a encargar de crear una request handler que se ejecutará cada vez que llega una peticion a nuestro servidor const asyncify=require('express-asyncify') const api=r...
"""Test the successful creation of Pyomo 1-degree models in RBFOpt. This module contains unit tests for the module rbfopt_degree1_models. Licensed under Revised BSD license, see LICENSE. (C) Copyright International Business Machines Corporation 2016. """ from __future__ import print_function from __future__ import ...
from mlgm.logger.logger import Logger
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }...
var fs = require('fs'); var expect = require('chai').expect; var converter = require('../index'); var schema = require('./fixtures/schema') var readFixture = function(filename) { return fs.readFileSync('./test/fixtures/' + filename + '.coffee').toString(); } describe('Relay.QL transpilation', function(...
AUI.add('aui-audio', function(A) { var AObject = A.Object, Lang = A.Lang, UA = A.UA, DOC = A.config.doc, NAME = 'audio', getClassName = A.getClassName, CSS_AUDIO = getClassName(NAME), CSS_AUDIO_NODE = getClassName(NAME, 'node'), DEFAULT_PLAYER_PATH = A.config.base + 'aui-audio/assets/player....
const fs = require('fs'); const { execSync } = require('child_process'); const chalk = require('chalk'); let apollosAppsLocation = null; const apollosAppsLocationFromEnv = fs .readFileSync(`${__dirname}/../.env`, 'utf8') .match(/APOLLOS_APPS_LOCATION=(.*)/); if (apollosAppsLocationFromEnv && apollosAppsLocationFr...
const devMode = (process.env.NODE_ENV !== 'development'); export default { // App Details appName: 'Shop.com Demo App', // Build Configuration - eg. Debug or Release? DEV: devMode, shopComAPI: 'be10dd0b4fac42be891fcadd88528d3c', };
/*! * jsoneditor.js * * @brief * JSONEditor is a web-based tool to view, edit, and format JSON. * It shows data a clear, editable treeview. * * Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+ * * @license * This json editor is open sourced with the intention to use the editor as * a ...
from pyswitch.os.base.bgp import Bgp as BaseBgp class Bgp(BaseBgp): """ The Interface class holds all the actions assocaiated with the Interfaces of a NOS device. Attributes: None """ def __init__(self, callback): """ Interface init function. Args: ...
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sphinx_...
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not u...
(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{959:function(_,t,s){_.exports=function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_;var t={name:"cv",weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юп...
from powerline_shell.themes.default import DefaultColor class Color(DefaultColor): USERNAME_FG = 8 USERNAME_BG = 251 USERNAME_ROOT_BG = 209 HOSTNAME_FG = 8 HOSTNAME_BG = 7 HOME_SPECIAL_DISPLAY = False PATH_BG = 15 PATH_FG = 8 CWD_FG = 8 SEPARATOR_FG = 251 READONLY_BG = 2...
// Return the number of seconds passed since some fixed point in time. export function getTime() { if (globalThis.performance) return performance.now() / 1000; else { // Fall back to a Node API if high-quality standards aren't implemented. const t = process.hrtime(); return t[0] + t[1] / 1e9; } }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PugPrinter = void 0; const prettier_1 = require("prettier"); const doctype_shortcut_registry_1 = require("./doctype-shortcut-registry"); const logger_1 = require("./logger"); const attribute_separator_1 = require("./options/attribute-s...
/** Base implementation of a sideways-scrolling list, using 'view' for customised presentation of the items. @constructor */ function SlidingList(container, options, view) { var segments = []; var stream = options['stream']; var streamContext; var input; var frameId; var updatingTimeout; var animateStartTime; ...
const { NotImplementedError } = require('../extensions/index.js'); /** * Implement chainMaker object according to task description * */ const chainMaker = { getLength() { }, addLink(value) { }, removeLink( /* position */ ) { throw new NotImplementedError('Not implemented'); ...
from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.http import JsonResponse from django.shortcuts import get_object_or_404, redirect from django.template.loader import render_to_string from django.views.decorators.http import require_POST from .models import Referra...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/wearables/belt/shared_belt_s13.iff" result.attribute_template_id = ...
import os import cv2 import numpy as np def ffzk(input_dir):#Relative directory for all existing files imgname_array=[];input_dir=input_dir.strip("\"\'") for fd_path, _, sb_file in os.walk(input_dir): for fil in sb_file:imgname_array.append(fd_path.replace('\\','/') + '/' + fil) if os.path....
import { useState, useRef, useEffect } from "react"; export const useIsKeyPressed = (key) => { const [isPressed, setIsPressed] = useState(false); const keyRef = useRef(key); useEffect(() => { const onKeyDown = (ev) => { if (ev.key === keyRef.current) setIsPressed(true); }; const onKeyUp = (ev)...
from os import environ def singleton(cls, *args, **kw): instances = {} def _singleton(): if cls not in instances: instances[cls] = cls(*args, **kw) return instances[cls] return _singleton @singleton class Configuration(object): KEY_API_URL = "API_API_URL" KEY_DATACOL...
const ConversionRates = artifacts.require("./ConversionRates.sol"); const TestToken = artifacts.require("./mockContracts/TestToken.sol"); const SanityRates = artifacts.require("./SanityRates"); const MockFundWallet = artifacts.require("./mockContracts/MockFundWallet.sol"); const Reserve = artifacts.require("./KyberFund...
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET="some-very-long-string-of-random-characters-CHANGE-TO-YOUR-LIKING" SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123456@localhost:3306/flask_api?charset=utf8mb4" class DevelopmentConfig(...
var debug = process.env.NODE_ENV !== "production"; var webpack = require('webpack'); var path = require('path'); module.exports = { context: path.join(__dirname, "src"), devtool: debug ? "inline-sourcemap" : null, entry: "./js/client.js", module: { loaders: [ { test: /\.jsx?$/, exclud...
const ScrollerPage = require('../ScrollerPage'); describe('Scroller', function () { beforeEach(function () { ScrollerPage.open('WithSpottable'); }); describe('with spottable', function () { it('should meet initial conditions', function () { ScrollerPage.open('WithSpottable'); expect(ScrollerPage .button...
import https from 'node:https'; import http from 'node:http'; import { graphqlUploadExpress } from 'graphql-upload'; import { readFileSync } from 'node:fs'; import { SubscriptionServer } from 'subscriptions-transport-ws'; import { execute, subscribe } from 'graphql'; import nconf from 'nconf'; import express from 'expr...
''' Crie um algoritmo que leia um número e mostre o seu dobro, triplo e raiz quadrada. ''' n = int(input('Digite um número: ')) dobro = n*2 triplo = n*3 raiz = n ** (1/2) print(f'Número digitado: {n}') print(f'Dobro: {dobro}') print(f'Triplo: {triplo}') print(f'Raiz quadrada: {raiz:.3f}')
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AccessControl = void 0; var core_1 = require("./core"); var enums_1 = require("./enums"); var utils_1 = require("./utils"); /** * @classdesc * AccessControl class that implements RBAC (Role-Based Access Control) basics * and ABAC...
/** * Copyright 2020 Dhiego Cassiano Fogaça Barbosa * 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...
import React, { createContext, useMemo, useContext, useCallback } from "react" const SimpleTranslationContext = createContext({ translationMap: {}, }) export const SimpleTranslationProvider = ({ translationNodes, ...otherProps }) => { const translationMap = useMemo(() => { const map = {} translationNo...
import { inherit } from "@uirouter/core"; export default class MesaController { constructor(mesaService) { var vm = this; this.name = 'Mesa'; init(); function init() { mesaService.getMesas().then(function abc(resp) { vm.mesas = resp.data; }); } vm.apagar = function (id) { ...
import copy import logging import re from markupsafe import escape from galaxy import model, util from galaxy.web.framework.helpers import grids, iff, time_ago from galaxy.webapps.base.controller import BaseUIController, web log = logging.getLogger(__name__) VALID_FIELDNAME_RE = re.compile(r"^[a-zA-Z0-9\_]+$") cl...
require('./bootstrap'); const $ = require("jquery"); import swal from 'sweetalert'; $(document).ready(function() { // console.log("Configuration"); // swal("Hello world!"); });
IdleState = function (statemachine, game, gameref, mover) { //this.mover = mover; //this.statemachine = statemachine; //this.game = game; //this.gameref = gameref; } IdleState.prototype = Object.create(EmptyState.prototype); IdleState.constructor = IdleState; /*IdleState.prototype.init = function(map) ...
let text = "<h1>Winter is coming</h1>"; let myRegex = /<.*?>/; // it's the answer! let result = text.match(myRegex);
$(function() { // Dropzone.autoDiscover = false; $(function() { $("#dropzone").on("success", function(file, response) { console.log(file); var response = jQuery.parseJSON(response); // console.log(response); if (response.status == 'failed') { alert(jQuery(response.error).text(...
# Generated by Django 4.0.1 on 2022-04-05 15:07 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('checker', '0025_rename_config_id_fk_pipelineenv_pipelineapp_fk'), ] operations = [ migrations.RenameField( model_name='pipelineenv', ...
import React from 'react'; import { Provider } from 'react-redux'; import configureStore from 'redux-mock-store'; import { MemoryRouter } from 'react-router-dom'; import renderer from 'react-test-renderer'; import { render, mount } from 'enzyme'; import { toJson } from 'enzyme-to-json'; import NavigationBar from './N...
const IconExternalLink = () => ( <span className="pl-1"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" className="w-4 h-4 text-gray-500" stroke="currentColor"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} ...
from typing import (Any, Iterable) import pytest from hypothesis import given from lz import right from lz.iterating import last from tests import strategies @given(strategies.iterables, strategies.scalars) def test_basic(iterable: Iterable[Any], object_: Any) -> None: attach = right.attache...
// This file can be replaced during build by using the `fileReplacements` array. // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. export var environment = { production: false, apiEndpoint: 'http://localhost:49749' }; /* ...
from typing import AnyStr def to_str(str_or_bytes: AnyStr, encoding: str = "utf-8") -> str: if isinstance(str_or_bytes, str): return str_or_bytes return str_or_bytes.decode(encoding) def to_bytes(str_or_bytes: AnyStr, encoding: str = "utf-8") -> bytes: if isinstance(str_or_bytes, bytes): ...
// if using babel cli // babel -w -o nodeserv.js index.js var rollup = require("rollup"); var babel = require("rollup-plugin-babel"); rollup.rollup({ entry: "src/main.js", plugins: [ babel() ] }).then(function (bundle) { bundle.write({ dest: "dist/bundle.js", format: "umd" }); }); // if using rollup c...
import React from 'react'; import weekdayImgPlaceholder from '../weekday-img-placeholder.jpg' class DayHeadersContainer extends React.Component { constructor(props) { super(props); this.state = { ...props }; // This was some sort of bug in React? // this.handleClick = this.handleClick.bind(this); }...
from bs4 import BeautifulSoup from nose.tools import ( assert_equal, assert_not_equal, assert_raises, assert_true, ) from routes import url_for import ckan.model as model import ckan.plugins as p import ckan.tests.helpers as helpers import ckan.tests.factories as factories webtest_submit = helpers...
'use strict' // These represent the incoming data containers that we might need to validate const containers = { query: { storageProperty: 'originalQuery', joi: { convert: true, allowUnknown: false, abortEarly: false } }, // For use with body-parser body: { storageProperty: 'o...
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[97],{ /***/ "./frontend/src/@core/comp-functions/forms/form-validation.js": /*!********************************************************************!*\ !*** ./frontend/src/@core/comp-functions/forms/form-validation.js ***! \*****************************...
import React, { Component } from 'react'; import { Link, withRouter } from 'react-router-dom'; import 'bootstrap/dist/css/bootstrap.min.css'; import { SignInLink } from '../SignIn'; import { withFirebase } from '../Firebase'; import './index.css'; import * as ROUTES from '../../constants/routes'; const SignUpPage = (...
$.validator.addMethod( "time", function( value, element ) { return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value ); }, "Please enter a valid time, between 00:00 and 23:59" );
'use strict';function implementsOnDestroy(pipe) { return pipe.constructor.prototype.onDestroy; } exports.implementsOnDestroy = implementsOnDestroy; //# sourceMappingURL=pipe_lifecycle_reflector.js.map
/** * @module myModule * @summary: This module's purpose is to: * * @description: * * Author: Justin Mooser * Created On: 2015-05-15. * @license Apache-2.0 */ "use strict"; require('angular'); require('angular-extend-promises'); window._ = require('lodash'); require('../index'); var app = angular.module('...
/* [sample_design_test.js] encoding=utf-8 */ var chai = require("chai"); var expect = chai.expect; var assert = chai.assert; var sinon = require("sinon"); var promiseTestHelper = require("promise-test-helper"); var shouldFulfilled = promiseTestHelper.shouldFulfilled; var hookProperty = require("hook-test-helpe...
# encoding: utf-8 # module mod2 # from mod2.so # by generator 1000.0 # no doc # no imports # no functions # no classes
// Import the discord.js module const Discord = require('discord.js'); // Import request for API access var request = require('request'); // auth file var auth = require('./auth.json'); // import async var async = require('async'); var q = async.queue(function(task, callback){ servers = task.sList.toLowerCase(); ...
import { combineReducers } from 'redux'; import { routerReducer as routing } from 'react-router-redux'; import timezone from '../shared/services/timezone/timezone.reducer'; const rootReducer = combineReducers({ routing, timezone, }); export default rootReducer;
# coding=utf-8 """Voting classifier.""" from sklearn import datasets, model_selection, metrics, ensemble, naive_bayes, linear_model if __name__ == "__main__": print("Loading data...") X, y = datasets.load_iris(return_X_y=True) X_train, X_test, y_train, y_test = model_selection.train_test_split(X, y) ...
/* jshint devel:true */ (function($){ 'use strict'; $(function(){ $('.button-collapse').sideNav(); $('.parallax').parallax(); // open initial modals $('.modal.initial-open').each(function() { $(this).openModal(); }); }); // end of document ready })(jQuery); // end of jQuery name space
import React from 'react'; import PropTypes from 'prop-types'; import { graphql } from 'gatsby'; import Layout from '../components/layout'; const Rocket = ({data}) => { const rocketData = data.spacexLaunches; return ( <Layout> <div className="container"> <h1>{rocketData.mission_name}</h1> ...
/* * Copyright 2014 The Closure Compiler 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 applicable...
'use strict'; class FormItem{ constructor ($compile, dataProviderService){ var templates = { text: '<label for="{{id}}">{{label}}<input type="text" class="form-control" name="{{id}}" ng-model="val"/>', select: '<label for="{{id}}">{{label}}<select name="{{id}}" class="form-control" ng-model="val"...
// import produce from 'immer'; import categoryPage2Reducer from '../reducer'; // import { someAction } from '../actions'; /* eslint-disable default-case, no-param-reassign */ describe('categoryPage2Reducer', () => { let state; beforeEach(() => { state = { // default state params here }; }); it(...
_pad = '<pad>' unk = '<unk>' eos = '<eos>' sos = '<sos>' mask = '<mask>' _logits = '1234567890' _punctuation = '\'(),.:;?$*=!/"\&-#_ \n' _letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' symbols = [_pad, unk, eos, sos, mask] + list(_logits) + list(_letters) + list(_punctuation) # symbols = list(_logits)...
/*! * VisualEditor DataModel DefinitionListNode class. * * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ /** * DataModel definition list node. * * @class * @extends ve.dm.BranchNode * * @constructor * @param {Object} [element] Refere...
''' OnionStalker - Tor Relay Monitoring Service This service will allow Tor relay operators to set up alerts similar to the now discontinued Tor Weather service. This program is released into the public domain! ''' import pymysql from flask import render_template # Used to render HTML pages from flask import Flas...
import axios from 'axios' const URL = 'http://localhost:3003/api/todos' export const changeDescription = event => ({ type: 'DESCRIPTION_CHANGED', payload: event.target.value }) export const search = (description) => { return (dispatch, getState) => { const description = getState().todo.descriptio...
#/*********************************************************************** # * Licensed Materials - Property of IBM # * # * IBM SPSS Products: Statistics Common # * # * (C) Copyright IBM Corp. 1989, 2020 # * # * US Government Users Restricted Rights - Use, duplication or disclosure # * restricted by GSA ADP Schedule Co...
/** * Auto-generated action file for "Jira" API. * * Generated at: 2019-05-07T14:37:00.318Z * Mass generator version: 1.1.0 * * flowground :- Telekom iPaaS / atlassian-com-jira-connector * Copyright © 2019, Deutsche Telekom AG * contact: flowground@telekom.de * * All files of this connector are licensed under...
var express = require('express'); var router = express.Router(); var imageController = require('./imageController'); router.get('/', (req, res, next) => { imageController.list(req, res); }); router.get('/:id', (req, res, next) => { imageController.get(req, res); }); router.post('/', (req, res, next) => { image...
var Fast = require( 'fast-api' ), config = require( './config' ); var ExampleServer = Fast.createServer( config.fast ); ExampleServer.listen( config.app.port );
// @filename: index.js /// <reference types="node" /> export var Something = 2; // to show conflict that can occur // @ts-ignore export var A; (function(A1) { var B; (function(B) { var Something1 = require("fs").Something; var thing = new Something1(); })(B = A1.B || (A1.B = { })); })(A ...
import React from 'react'; import {Badge} from 'reactstrap'; export default class Contextual extends React.Component { render() { return ( <div className="badge-group"> <Badge color="primary">Primary</Badge> <Badge color="secondary">Secondary</Badge> <Badge color="success">...
/** * expressCartMobile * https://github.com/atmulyana/expressCartMobile * * @format * @flow strict-local */ import React from 'react'; import AccountBar from './AccountBar'; import CheckoutBar from './CheckoutBar'; import LessPureComponent from './LessPureComponent'; import LoginhBar from './LoginBar'...
var expect = require('expect.js'), htmlparser2 = require('htmlparser2'), $ = require('../'), fixtures = require('./fixtures'), fruits = fixtures.fruits, food = fixtures.food, _ = { filter: require('lodash/filter') }; // HTML var script = '<script src="script.js" type="text/javascript"...
import React from 'react'; const IconPlaybook = props => ( <svg width="60" height="60" viewBox="0 0 105 106" {...props}> <path d="M103.92 31.16L56.42 58.59C56.1162 58.7655 55.7715 58.8579 55.4206 58.858C55.0697 58.8581 54.7249 58.7658 54.4209 58.5905C54.117 58.4152 53.8644 58.1631 53.6888 57.8593C53.5131 5...
'use strict'; const ReviewersTest = require('./reviewers_test'); class ReviewerNotOnTeamTest extends ReviewersTest { get description () { return 'should return an error when attempting to create a post with a review with a reviewer that is not on the team'; } getExpectedError () { return { code: 'RAPI-100...
/* Copyright (C) 2015 Carlos Pais * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribut...
from abc import ABC, abstractmethod from math import pi class Person: def __init__(self, name): self.name = name def introduce(self): print(f'Hello! I am {self.name}') class Shape(ABC): @abstractmethod def calculate_perimeter(self): pass @abstractmethod...
""" sphinx.transforms.post_transforms.images ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Docutils transforms used by Sphinx. :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re from math import ceil from typing import Any, ...
const path = require('path'); exports = module.exports = function () { /* * S1: __wepy_require(n); * S2: require('./lib/sth'); * S3: require('/vendor.js')(n); * S4: import 'xxxx' from 'xxx';j */ this.register('script-dep-fix', function scriptDepFix (parsed, isNPM) { let code = parsed.code; ...
'use strict'; const chai = require('chai'), sinon = require('sinon'), Sequelize = require('../../../index'), Promise = Sequelize.Promise, expect = chai.expect, Support = require('../support'), dialect = Support.getTestDialect(), DataTypes = require('../../../lib/data-types'), config = require('../../co...
'use strict'; const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); const ignoredFiles = require('react-dev-utils/ignoredFiles'); const config = require('./webpack.config.dev'); const paths = require...
import './App.css'; import add from './src-to-test/add' function App() { const firstOperand = 1; const secondOperand = 2; const expectedResult = 3; return ( <div className="App"> <header className="App-header"> <div style={{marginLeft: '30vw'}}> <h2>Simple test for add.js:</h2> ...
//@flow export { default as LabelChooserReducer } from './LabelChooserReducer';
import tensorflow as tf from text import symbols class AttrDict(dict): def __init__(self,*args,**kwargs): super(AttrDict, self).__init__(*args,**kwargs) self.__dict__=self def create_hparams(hparams_string=None, verbose=False): """Create model hyperparameters. Parse nondefault from given strin...
class Solution: def countAndSay(self, n: int) -> str: s = '1' for _ in range(n - 1): cur, temp, cnt = s[0], '', 0 for d in s: if cur == d: cnt += 1 else: temp += str(cnt) + cur cur = d...
def change_b(b): b[2]="^" a = [ 0, 1, 2, 3, 4 ] b = a[:] print("---------------------------") print("a:",a) print("b:",b) print("---------------------------") print("setting a[0] to 'X'") a[0] = 'X' print("a:",a) print("b:",b) print("---------------------------") print("setting b[-1] to '*'") b[-1] = '*' print(...
import React from 'react' import ScrollToTop from '../components/ScrollToTop' import SignIn from '../components/Signing' const SigninPage = () => { return ( <div> <ScrollToTop /> <SignIn /> </div> ) } export default SigninPage
module.exports = { ...require("./test/jest-common"), collectCoverageFrom: ["**/src/**/*.js"], projects: ["./test/jest-lint.js", "./test/jest-client.js"], };
const fetch = require('node-fetch') const { sticker5 } = require('../lib/sticker') let handler = async (m, { conn, args, usedPrefix, command }) => { if (!args[0]) throw `Use :\n${usedPrefix + command} <url>\n\nExample :\n${usedPrefix + command} https://store.line.me/stickershop/product/8149770` if (!args[0].m...
var _ // globals /* This section uses a functional extension known as Underscore.js - http://documentcloud.github.com/underscore/ "Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extend...
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = R...
from math import sqrt import numpy as np from numpy import finfo import torch from torch.autograd import Variable from torch import nn from torch.nn import functional as F from layers import ConvNorm, LinearNorm from utils import to_gpu, get_mask_from_lengths from modules import GST,TransformerStyleTokenLayer import p...