text
stringlengths
3
1.05M
import axios from 'axios'; import bodybuilder from 'bodybuilder'; const CDP_PUBLIC_API = `${process.env.CDP_PUBLIC_API}/v1/search`; export const getItemRequest = ( site, postId ) => axios .post( CDP_PUBLIC_API, { body: bodybuilder() .size( 1 ) .query( 'query_string', 'query', `(site: ${site} AND pos...
from sympy import S from sympy.physics.vector import Vector, ReferenceFrame, Dyadic from sympy.testing.pytest import raises Vector.simp = True A = ReferenceFrame("A") def test_output_type(): A = ReferenceFrame("A") v = A.x + A.y d = v | v zerov = Vector(0) zerod = Dyadic(0) # dot products ...
class TensorTrainBase: ''' Common base class for :py:type:`TensorTrainSlice` and :py:type:`TensorTrainArray`. At the moment it is just used with :py:func:`isinstance` ''' # So far this is just for isinstance pass
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg...
import pytest from unittest.mock import patch, call, Mock @pytest.mark.ut @patch("boar.running.close_plots") @patch("boar.running.get_code_sources") @patch("boar.running.check_is_notebook") def test_run_notebook_calls_functions_in_order( mock_check_is_notebook, mock_get_code_sources, mock_close_plots, ) -...
from time import sleep import pyautogui as pygui from default.interact import press_keys_b4, foritab win = pygui.getWindowsWithTitle('G5 Phoenix')[0] win.restore() win.show() win.activate() sleep(2) while True: pygui.hotkey('alt') foritab(6, 'down') pygui.hotkey('right', 'enter', interval=.2) press_key...
from django.contrib.auth.models import AbstractUser, BaseUserManager from django.db import models class UserManager(BaseUserManager): use_in_migrations = True def _create_user(self, nickname, email, first_name, last_name, password, birthdate, **extra_fields): email = self.normalize_email(email) ...
import content from '../src/libs/content' describe('content', () => { const likedURL = 'https://domain.tld' let data const output = '---\n' + 'date: \'2021-09-09T12:23:34.120Z\'\n' + 'title: Title\n' + 'tags:\n' + ' - one\n' + ' - two\n' + ' - three\n' + 'updated: \'2021-10-09T12:23:34.120Z\'\n' + '--...
from nonebot import on_command, CommandSession, on_startup, permission as perm from nonebot.message import unescape from datetime import datetime import nonebot from aiocqhttp.exceptions import Error as CQHttpError from nonebot.argparse import ArgumentParser from nonebot.log import logger import cq @on_command("test"...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from django.db import models class Category(models.Model): name = models.CharField(max_length=50, unique=True) class Meta: verbose_name = "Category" verbose_name_plural = "Categories" def __str__(self): return self.name
#set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) 'use strict'; /* jshint quotmark: double */ window.SwaggerTranslator.learn({ "Warning: Deprecated":"Uwaga: Wycofane", "Implementation Notes":"Uwagi Implementacji", "Response Class":"Klasa Odpowiedzi", "Status":"Status...
/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("placeholder","fr-ca",{title:"Propriétés de l'espace réservé",toolbar:"Créer un espace réservé",name:"Placeholder Name",invalidName:"The placehol...
from math import ceil def merge(left, right): merged = [] while len(left) > 0 and len(right) > 0: merged += [min(left[0], right[0])] if left[0] <= right[0]: left = left[1:] else: right = right[1:] return merged + left + right def merge_sort(seq): if le...
import time import threading from chapter3.downloader import Downloader from chapter3.mongo_cache import MongoCache from chapter4.alexa_cb import AlexaCallback SLEEP_TIME = 1 def threaded_crawler(cache=None, max_threads=10): """ Crawl this website in mutiple thread :param cache: :return: """ ...
// Update this constant with your ServiceNow credentials const options = { url: 'https://dev60537.service-now.com/', username: 'admin', password: 'SVx1IfM0bdDk' }; /** * Import the Node.js request package. * See https://www.npmjs.com/package/request */ const request = require('request'); // We'll use this r...
// @flow import React from 'react'; import invariant from 'invariant'; import { path as ramdaPath } from 'ramda'; import { resetFields, setField } from './actions'; import isReactNative from '../../app/isReactNative'; type Path = string | Array<string> | ((props: Object) => Array<string>); type Options = { path: Pa...
//########################################################################### // // FILE: F2806x_Devemu.h // // TITLE: F2806x Device DEVEMU Register Definitions. // //########################################################################### // $TI Release: // $Release Date: //######################################...
const fs = require('fs'); const path = require('path'); const Sequelize = require('sequelize'); const basename = path.basename(__filename); const env = process.env.NODE_ENV || 'development'; const config = require(`${__dirname}/../config/config.json`)[env]; //eslint-disable-line const db = {}; let sequelize; if (confi...
# # Copyright (c) 2022 salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause # """ Wrapper around AWS's Random Cut Forest anomaly detection model. """ import bisect import copy im...
import InternalFilter from './internal-filter'; export default class InternalFilterFirst extends InternalFilter { constructor() { super(...arguments); this._content = null; } _didCreateFilter() { this._rematch(false); } _notifyOwnerPropertyChange() { let { object, key } = this.opts.owner; ...
import pytest from datetime import datetime, time from libres.db.models import Allocation from libres.modules import errors from pytz import utc from sqlalchemy.exc import IntegrityError from uuid import uuid4 as new_uuid def test_add_allocation(scheduler): allocation = Allocation(raster=15, resource=scheduler....
from datetime import date, timedelta from django.conf import settings def get_weather_url(location): # This is the core visual crossing weather query URL BaseURL = 'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/' ApiKey = settings.WEATHER_DATA_API_KEY # Uni...
#!/usr/bin/env python __author__ = 'Kanishka Ganguly' __version__ = '1.0.0' __date__ = 'May 25 2017' import time class file_io: ''' FILE IO ''' def open_file(self, root_dir, glove_type=None, cam=None): if cam is not None: text_file = ('%s/Cam%dTimestamp.txt') % (root_dir, cam) ...
function load_options() { // Check or uncheck each option. BGcall("get_settings", function(settings) { optionalSettings = settings; $("#tabpages"). tabs({ spinner: "", cache: true, cookie: {}, load: function(event, ui) { //translation localizePage()...
from canaille.apputils import obj_to_b64 from canaille.flaskutils import permissions_needed from canaille.mails import profile_hash from canaille.mails import send_invitation_mail from flask import Blueprint from flask import current_app from flask import flash from flask import request from flask import url_for from f...
/* Studente: Lorenzo Gezzi Classe:3INA Data:15/04/2017 Versione: 1.0 */ #include<stdio.h> #include<stdlib.h> #include<math.h> int main(){ char parola1[100]; char parola2[100]; int i; int uguali; printf("Inserire la prima parola "); ...
from pycccl.base import ExchangeBase class Poloniex(ExchangeBase): _public_endpoint = "https://poloniex.com/public" _private_endpoint = "https://poloniex.com/tradingApi" # def __init__(self, *args, **kwargs): # super(Poloniex, self).__init__(*args, **kwargs) # self.settings = auth['poloni...
var socketIOURL = '//' + location.host + '/socket.io/socket.io.js'; Slide.Control.add('socket', function(S, broadcast) { S.clientUID = 0; function time2str(time) { time = '00' + time; return time.substr(-2); } var showQrcode; var qrcodeLink = function() { //按 q显示控制区域二维码 ...
#ifndef IMPLICIT_CLAMP_H #define IMPLICIT_CLAMP_H #include "implicitmodulebase.h" namespace anl { class CImplicitClamp : public CImplicitModuleBase { public: CImplicitClamp(double low, double high); ~CImplicitClamp(); void setRange(double low, double high); void setSour...
# Copyright 2017 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...
# -*- coding: utf-8 -*- import MySQLdb print MySQLdb
import pytest from ethpm import ( Package, ) from ethpm.dependencies import ( Dependencies, ) from ethpm.exceptions import ( EthPMValidationError, FailureToFetchIPFSAssetsError, ) @pytest.fixture def piper_coin_pkg(piper_coin_manifest, w3): return Package(piper_coin_manifest, w3) def test_get_b...
""" Conv AE in pytorch """ import torch import torch.nn as nn import torch.nn.functional as F # from net.models.build import MODEL_REGISTRY from .build import MODEL_REGISTRY class conv2d_Inception(nn.Module): def __init__(self,inplace,place): super(conv2d_Inception,self).__init__() self.n_branch=...
import os import tempfile from dffml.db.sqlite import SqliteDatabase, SqliteDatabaseConfig from dffml.util.asynctestcase import AsyncTestCase from dffml.operation.db import ( DatabaseQueryConfig, db_query_create_table, db_query_insert, db_query_lookup, ) from dffml.df.types import DataFlow, Input from ...
# Copyright 2019 Graphcore Ltd. import numpy as np class LearningRate: """A cosine learning rate schedule with optional warmup.""" def __init__(self, opts, total_iterations): self.base_lr = 2 ** opts["base_learning_rate"] self.learning_rate_decay = opts["learning_rate_decay"] self.ini...
import { assert } from 'chai'; import getStrategy from '../getStrategy'; import { Strategy } from '../../constants'; import { _ } from 'meteor/underscore'; describe('Processors - Guess Strategy', function () { it('should work', function () { assert.equal(Strategy.DEFAULT, getStrategy({isFiltered: true})); as...
// @ts-check import '../../../exported.js'; import { assert, details as X } from '@agoric/assert'; import { E } from '@agoric/eventual-send'; import { Far } from '@endo/marshal'; import { makePromiseKit } from '@agoric/promise-kit'; import { AmountMath } from '@agoric/ertp'; import { assertProposalShape, getAmou...
var bamboo = (function(){ function hasClass(element, className) { var regExp = new RegExp('(\\s|^)'+ className +'(\\s|$)'); return regExp.test(element.className); } function addClass(element, className) { if ('classList' in document.documentElement) { element.classList....
from typing import Dict, Type from athenian.api.controllers.miners.access import AccessChecker from athenian.api.controllers.miners.github.access import GitHubAccessChecker # Do not use this to load all the repos for the account! get_account_repositories() instead. access_classes: Dict[str, Type[AccessChecker]] = { ...
Product of Current and Next Elements Given an array of integers of size N as input, the program must print the product of current element and next element if the current element is greater than the next element. Else the program must print the current element without any modification. Boundary Condition(s): 1 <= N <= ...
import setuptools with open("README.rst", "r") as fh: long_description = fh.read() setuptools.setup( name="graphTiler", version="0.9.0.0", author="Adam Krueger", author_email="adamkru@gmail.com", description=( "Display multiple configurable graphs at once with real-time data " ...
import * as types from './../constants/ActionType' const initialState = { cart: [], total: 0, }; const cart = (state = initialState, action) => { switch (action.type) { case types.ADD_TO_CART: { let existed_item = state.cart.find(value => action.pro.id === value.id); // x...
/* * jQuery UI Accordion 1.6 * * Copyright (c) 2007 Jörn Zaefferer * * http://docs.jquery.com/UI/Accordion * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery.accordion.js 4876 2008-03-08 ...
import { alternatingSums } from '../../javascript/codesignal/alternatingSums'; describe('testing alternatingSums', () => { it('should be return an array of two integers,.', () => { expect(alternatingSums([50, 60, 60, 45, 70])).toEqual([180, 105]); }); it('should be return an array of two integers,.', () =>...
/** * Copyright 2019 Huawei Technologies Co., Ltd * * 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 asyncio from typing import List, Literal, Union import discord import yaml from redbot.core.bot import Red as RedBot from redbot.core.commands import Context from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import box from redbot.core.utils.menus import DEFAULT_CONTROLS, close_menu...
/* vue.config.js */ module.exports = { chainWebpack: (config) => { config.plugin('html').tap((args) => { args[0].title = 'Contact Map'; return args; }); }, pwa: { name: 'Contact Map', themeColor: '#2c3e50', msTileColor: '#2c3e50', appleMobileWebAppCapable: 'yes', appleMobil...
'use strict'; /*eslint-env node*/ var testsContext; require('babel-polyfill'); require('angular'); require('angular-mocks'); require('./client/components/ui-router/ui-router.mock'); testsContext = require.context('./client', true, /\.spec\.ts$/); testsContext.keys().forEach(testsContext);
/************************************************************************* * * * YAP Prolog * * * * Yap Prolog was developed at NCCUP - Universidade do Porto * * * * Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 * * * ****************************...
import datetime from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.db.models import Q from django.conf import settings from apps.reader.models import Feature from apps.profile.tasks import ...
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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. # # Ansible is distribut...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ 'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === '...
const record=require('node-record-lpcm16'); const aikit=require('./aimakerskitutil'); const nodeVersion=process.version.split('.')[0]; //for sensing program const { spawn } = require('child_process'); let ktkws=null; if(nodeVersion==='v6') ktkws=require('./ktkws'); else if(nodeVersion==='v8') ktkws=require('./ktkws_v...
import unittest from skcosmo.preprocessing.flexible_scaler import KernelFlexibleCenterer import sklearn import numpy as np class KernelTests(unittest.TestCase): def test_NoInputs(self): """Checks that fit cannot be called with zero inputs.""" model = KernelFlexibleCenterer() with self.asse...
/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain software (including...
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import, print_function, unicode_literals from datetime import datetime import os import pprint import shutil try: from dateutil.relativedelta import relativedelta HAS_DATEUTIL = True except ImportError: HAS_DATEUTIL = False NO_D...
import numpy as np from . import base def compute_bounding_box(indices, shape): d = len(shape) unraveled_indices = np.concatenate( np.unravel_index(list(indices), shape)).reshape((-1,d), order='F') m = unraveled_indices.min(axis=0) M = unraveled_indices.max(axis=0) + np.ones(d) return m, M ...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-component-video-video"],{"0228":function(t,n,i){n=t.exports=i("2350")(!1),n.push([t.i,"\nuni-video[data-v-2f7e822a]{width:%?690?%\n}",""])},"13af":function(t,n,i){"use strict";var e=i("42d9"),a=i.n(e);a.a},"42d9":function(t,n,i){var e=i("0228");"string"=...
#pragma once #include "global.h" namespace States { class Manager; class Base : public Gwen::Event::Handler { protected: Base() {}; public: virtual void load(States::Manager* manager) {}; virtual void initialize(States::Manager* manager) {}; virtual void resize(States::Manager* manager) {}; virtual v...
/* * VIM - Vi IMproved by Bram Moolenaar * * Do ":help uganda" in Vim to read copying and usage conditions. * Do ":help credits" in Vim to see a list of people who contributed. * See README.txt for an overview of the Vim source code. */ /* * move.c: Functions for moving the cursor and scrolling text. * * Ther...
import React, { Component } from 'react'; import AceEditor from 'react-ace'; import PathLink from '../PathLink/PathLink'; import { Router, Redirect } from 'react-router'; import { textToLowerCaseNoSpaces, splitUrl, getAuthorization } from '../commons/Utils'; import { URL } from '../commons/Constants'; import './ViewR...
import scheduler.view.base as B class Results(B.Base): def __init__(self): super().__init__("Results") def _template_path(self): return "web/results.html" def _generate_template_args(self): d = super().generate_template_args() return d
/* $OpenBSD: key_defined.c,v 1.1 2010/01/12 23:22:05 nicm Exp $ */ /**************************************************************************** * Copyright (c) 2003,2006 Free Software Foundation, Inc. * * * * Permission is h...
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
# -*- coding: utf-8 -*- """ Generate metadata and bag for a resource from Django """ import os from django.core.management.base import BaseCommand from hs_core.models import BaseResource from hs_core.hydroshare.hs_bagit import create_bag_files from hs_core.tasks import create_bag_by_irods from django_irods.icommands...
#ESEncryptor #created by lucas.py import base64 try: from Crypto import Random from Crypto.Cipher import AES except: print "Make sure you have pycrypto installed\nTry running 'easy_install pycrypto'" exit() #decode bytes class ESEncryptor: def __init__(self, key=None, BS=None): self.iv = ...
/***************************************************************************** * Open MCT, Copyright (c) 2014-2020, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * * Open MCT is licensed under the Apache License, Version ...
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2014 Intel Corporation. All rights reserved. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either ...
#!/usr/bin/env python3 """ Netio Command line interface """ import argparse import configparser import os import pkg_resources import requests import sys import traceback from . import Netio from .exceptions import NetioException from typing import List from urllib.parse import urlparse, urlunparse def str2action(s...
from setuptools import setup, find_packages setup( name='gritter', version='0.1', packages=find_packages(), include_package_data=True, install_requires=[ 'click', 'tweepy', ], entry_points=''' [console_scripts] gritter=gritter.gritter.cli:cli ''', )
function Ctx(dom){ return dom.getContext("2d"); } Ctx.prototype.beginPath = function(){ this.beginPath(); return this; } Ctx.prototype.lineWidth = function(number){ console.log(this); this.lineWidth = number; return this; }
/* Copyright (c) 2018 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 applicable law or agr...
// flow-typed signature: 9d97f036cf32cb2814279dc8c5ae4667 // flow-typed version: <<STUB>>/@babel/core_v^7.9.0/flow_v0.121.0 /** * This is an autogenerated libdef stub for: * * '@babel/core' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with t...
from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Callable from typing import Union from poetry.core.semver.version import Version if TYPE_CHECKING: from poetry.core.version.pep440.version import PEP440Version VERSION_3_7_1 = Version.parse("3.7.1") def build_v...
#!/usr/bin/env python3 # simple boardd wrapper that updates the panda first import os import time from panda import BASEDIR as PANDA_BASEDIR, Panda, PandaDFU from common.basedir import BASEDIR from selfdrive.swaglog import cloudlog PANDA_FW_FN = os.path.join(PANDA_BASEDIR, "board", "obj", "panda.bin.signed") def ge...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
import unittest from puzz import * class TestCoord( unittest.TestCase): def test_const_get(self): c = Coord( 1, -2) self.assertEqual( c.get_row_no(), 1) self.assertEqual( c.get_col_no(), -2) def test_get_x_y( self): c = Coord( 1, -2) self.assertEqual( c.get_row_no(), c.get_y()) self.assertEqual( c.ge...
/* * Author: Moisés Fernández Zárate A01197049 * Date created: 22/02/2020 * * Recursion.c * A practice created to learn recursion in C. */ #include <stdio.h> /* * Function: long long int factorial(int iNumFact) * This function calculates the factorial of a given number. * Parameters: int iNum...
var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import re import asyncio import logging import discord from redbot.core import commands, Config, checks from redbot.core.utils.chat_formatting import pagify from redbot.core.i18n import Translator, cog_i18n from .events import Events default_greeting = "Welcome {0.name} to {1.name}!" default_goodbye = "See you late...
""" A class for points used in the GIS Algorithms book. History March 1, 2017 More updates on __str__ to make sure integers are printed correctly. October 28, 2015 Functions __repr__ and __str__ are updated to be more flexible and robust. November 10, 2015 Add a key member to the class Contact...
import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; import PropTypes from 'prop-types'; import Header from './Header'; import ContestPreview from './ContestPreview'; import data from '../testData'; class App extends React.Component { state = { pageHeader: 'Naming Contest...
/*- * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * %sccs.include.proprietary.c% */ #ifndef lint static char sccsid[] = "@(#)va212.c 8.1 (Berkeley) 06/06/93"; #endif /* not lint */ #include "condevs.h" va212opn(telno, flds, dev) char *telno; char *flds[]; stru...
__all__ = ('AuditLogIterator', ) from ...bases import maybe_snowflake from ...user import ClientUserBase from ...utils import now_as_id from ..guild import Guild from ..utils import create_partial_guild_from_id from .audit_log import AuditLog from .audit_log_entry import AuditLogEntry from .preinstanced import Audit...
window._ = require('lodash'); /** * We'll load jQuery and the Bootstrap jQuery plugin which provides support * for JavaScript based Bootstrap features such as modals and tabs. This * code may be modified to fit the specific needs of your application. */ /** * We'll load the axios HTTP library which allows us to...
#pragma once #include "UIElement.h" namespace BF { class UIImage : public UIElement { public: void SetBorder(const int borderSize); }; }
/** * @param {number} length * @return {Array} */ const range = length => Array.apply(null, { length }); export default range;
import React from "react" import Img from "gatsby-image" const Image = ({fixed, fluid, className}) => { const imgFluid = fluid?.localFile?.childImageSharp?.fluid; const imgFixed = fixed?.localFile?.childImageSharp?.fixed; return ( <Img className={className} fluid={imgFluid} fixed={imgFixed} />...
#ifndef BONUS_H #define BONUS_H #include "IObserver.h" #include "DrawingElement.h" #include "CollisionDetection.h" class Bonus : public DrawingElement, public IObserver { public: Bonus() : DrawingElement() { Initilize(); } void Place(); int GetVisibleTime(); int GetHiddenTime(); void Refresh(int action) { } v...
import test from 'ava' import instructions from '../src/instructions' test('all custom slot types should have instructions', t => { for (const key in instructions.items) { if (key) { t.not(instructions.find(key), undefined, 'instructions are not undefined') t.not(instructions.find(key), null, 'instru...
// Check if this build supports the authenticationMechanisms startup parameter. var conn = MongoRunner.runMongod({ smallfiles: "", auth: "", sslMode: "requireSSL", sslPEMKeyFile: "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem" }); conn.getDB('admin').createUser({user: "root", pwd: "pass"...
import os, json, xmltodict, traceback, copy SKIP_TERMS = ['image','atomic','barrier','memory','shadow','noise'] DEFINES = ['in','out','inout','uniform','varying','layout(index)','discard','uint unsigned int','atomic_uint uint'] DEFINES = ''.join(['#define ' + define + '\n' for define in DEFINES]) GENERICS = { '...
/* DirectShow private capture header (QCAP.DLL) * * Copyright 2005 Maarten Lankhorst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at y...
''' The MIT License (MIT) Portions Copyright (c) 2015-2018, The OmniDB Team Portions Copyright (c) 2017-2018, 2ndQuadrant Limited 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 restricti...
"""Unit tests for sequential_selection.py.""" import unittest import numpy from gewittergefahr.deep_learning import sequential_selection TOLERANCE = 1e-6 # The following constants are used to test _subset_input_matrices. THIS_MATRIX1 = numpy.random.uniform(low=0., high=1., size=(100, 32, 32, 12, 4)) THIS_MATRIX2 = n...
const logger = require('../')('test') logger.log('log') logger.success('success') logger.warn('warn') logger.info('info') logger.error('error')
# flake8: noqa ''' Technologies ''' from . import identifier from . import fs from . import persistence from . import securehash from . import timestamp
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -alertnotify, -blocknotify and -walletnotify options.""" import os from test_framework.test_f...