text
stringlengths
3
1.05M
/*! JointJS v0.9.6 - JavaScript diagramming library 2015-12-19 This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ (function (root, factory) { if (typeof define === ...
const sequelize = require('./connection');
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Analyz...
/* * Contains integration tests for IRC mode events. */ "use strict"; var Promise = require("bluebird"); var test = require("../util/test"); // set up integration testing mocks var env = test.mkEnv(); // set up test config var config = env.config; var roomMapping = { server: config._server, botNick: config....
#pragma once class Vector2 { public: float x; float y; Vector2() { Set(0,0); } Vector2(float _x, float _y) { Set(_x, _y); } ~Vector2() { } void Set(float _x, float _y) { x = _x; y = _y; } }; Vector2 operator+ (Vector2 lhs, Vector2 rhs) { return Vector2(lhs.x + rhs.x, lhs.y + rhs.y); } Vecto...
'use strict'; exports.__esModule = true; exports['default'] = log; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug); var _stringify = require('../stringify'); var _stringify2 = _interopRequ...
from tests.post_tests import * import unittest def main(): unittest.main() if __name__ == '__main__': main()
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # 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...
from django.contrib import admin from morad.models import Car admin.site.register(Car)
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
import React, { useState, useEffect } from 'react'; import { Link, withRouter, Redirect, useParams } from 'react-router-dom'; import { useFormik } from 'formik'; import { compose } from 'redux'; import { connect } from 'react-redux'; import _ from 'lodash'; import { loginUserWithEmail } from '../../store/actions/aut...
import sqlite3 def connect(): conn=sqlite3.connect("films.db") cur=conn.cursor() cur.execute("CREATE TABLE IF NOT EXISTS film(id INTEGER PRIMARY KEY, title text, director text,year integer,genre text,review text)") conn.commit() conn.close() def insert(title,year,director,genre,review): conn=s...
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Test JSON-RPC over TCP support. """ from __future__ import absolute_import from __future__ import print_function from twisted.internet import reactor, defer from twisted.trial import unittest from txjsonrpc import jsonrpclib from txj...
/** * * RssUrlInput * */ import React from 'react'; import PropTypes from 'prop-types'; // import styled from 'styled-components'; import { InputGroupAddon, InputGroupText, Input } from 'reactstrap'; const RssUrlInput = ({ value = '', onInputChange }) => { const [url, setUrl] = React.useState(value); const ha...
#include <esp_types.h> #include <stdio.h> #include <stdlib.h> #include "rom/ets_sys.h" #include "rom/lldesc.h" #include "rom/gpio.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "freertos/queue.h" #include "freertos/xtensa_api.h" #include "unity.h" #include "soc/ua...
define(function (require) { var max = require('./statistics/max'); var min = require('./statistics/min'); var quantile = require('./statistics/quantile'); var deviation = require('./statistics/deviation'); var dataProcess = require('./util/dataProcess'); var dataPreprocess = dataProcess.dataPre...
from .base import APIBase class Node(APIBase): def __init__(self, config): super().__init__(config, 'node') def list(self): return self._get('/list') def resource(self, names): return self._get('/resource', params={'names': names})
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@nestjs/core"); const microservices_1 = require("@nestjs/microservices"); const app_module_1 = require("./app.module"); async function bootstrap() { const app = await core_1.NestFactory.createMicroservice(app_module...
// Sun, 14 Oct 2018 14:18:48 GMT /* * Copyright (c) 2015 cannon.js Authors * * 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 rig...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import decorators from telemetry.core import util from telemetry.page.actions import play from telemetry.unittest import tab_test_case AUDIO...
// // GGPlayView.h // ThePeopleTV // // Created by aoyolo on 16/4/5. // Copyright © 2016年 高广. All rights reserved. // #import <UIKit/UIKit.h> #import <AVFoundation/AVFoundation.h> @interface GGPlayView : UIView @property (nonatomic ,strong) AVPlayer *player ; @end
var _ = require('lodash'), Promise = require('bluebird'), util = require('../util'), Retry = require('../retry'), log = util.logger(); function BulkActivityExtract(marketo, connection) { this._marketo = marketo; this._connection = connection; this._retry = new Retry({ maxRetries: 10, initialDela...
# 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...
import pytest import torch import platform import os import fnmatch import timm from timm import list_models, create_model, set_scriptable # pylint: disable=no-member if hasattr(torch._C, '_jit_set_profiling_executor'): # legacy executor is too slow to compile large models for unit tests # no need for the fus...
from app.models import Pitch,User,Comment from app import db import unittest class CommentModelTest(unittest.TestCase): def setUp(self): self.user_James = User(username = 'James',password = 'potato', email = 'james@ms.com', bio='herooo',profile_pic_path='https://sss.com') self.new_pitch = Pitch(id=...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const is_1 = require("@sindresorhus/is"); const as_promise_1 = require("./as-promise"); const as_stream_1 = require("./as-stream"); const errors = require("./errors"); const normalize_arguments_1 = require("./normalize-arguments"); const deep_...
# -*- coding: utf-8 -*- """ Creates the array geometry and source position files for Figures 1 and 2 of the JOSS paper accompanying TACOST General comments ---------------- 1) Connect tristar points with lines to show the 'array'-ness of it all Created on Wed Jun 10 20:19:56 2020 @author: tbeleyur """ import matpl...
from collections import namedtuple from decimal import Decimal from exchangelib import Version, EWSDateTime, EWSTimeZone, UTC from exchangelib.errors import ErrorInvalidServerVersion from exchangelib.extended_properties import ExternId from exchangelib.fields import BooleanField, IntegerField, DecimalField, TextField,...
#ifndef INCLUDE_FUTURES_CPP_H_ #define INCLUDE_FUTURES_CPP_H_ #ifdef _MSC_VER #ifdef __cplusplus #ifdef FUTURES_CPP_EXPORTS #define FUTURES_CPP_API extern "C" __declspec(dllexport) #else #define FUTURES_CPP_API extern "C" __declspec(dllimport) #endif #else #ifdef FUTURES_CPP_EXPORTS #define FUTURES_CPP_API __declspe...
// // Heap based scheme from 3imp.pdf // // // variables // BiwaScheme.TopEnv = {}; BiwaScheme.CoreEnv = {}; // // Nil // javascript representation of empty list( '() ) // BiwaScheme.nil = { toString: function() { return "nil"; }, to_write: function() { return "()"; }, to_array: function() { return []; }, le...
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e=e||self).i18nextBrowserLanguageDetector=o()}(this,(function(){"use strict";function e(e,o){for(var t=0;t<o.length;t++){var n=o[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"val...
import React from 'react' const Counter = ({ value, onIncrement, onDecrement, onIncrementAsync}) => ( <div> <button onClick={onIncrementAsync}> Increment after 1 second </button> {' '} <button onClick={onIncrement}> Increment </button> {' '} <button onClick={onDecrement}> ...
import { expectNumberOfArgs } from '../../cjs/_internal/_test' import assoc from '../../cjs/assoc' test('it accepts exact 3 arguments', () => { expectNumberOfArgs( assoc, 3, ['c', 1, { c: 2 }] ) }) test('sets value by its path', () => { expect(assoc('b', 3, { b: 2 })).toEqual({ b: 3 }) }) test('wor...
import _plotly_utils.basevalidators class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="bar.marker.line", **kwargs ): super(ReversescaleValidator, self).__init__( plotly_name=plotly_name, ...
import { o as n, c as s, a } from './app.547ab472.js' const p = '{"title":"mountComponent 挂载组件","description":"","frontmatter":{},"headers":[{"level":2,"title":"mountComponent 挂载组件","slug":"mountcomponent-挂载组件"},{"level":3,"title":"createComponentInstance 创建组件实例","slug":"createcomponentinstance-创建组件实例"},{"level":2...
from django.conf import settings from django.utils import translation from django.contrib.gis.geos import Point from rest_framework import serializers from rest_framework import viewsets from rest_framework.response import Response from rest_framework.decorators import action from rest_framework.settings import api_se...
exports.BattleStatuses = { brn: { effectType: 'Status', onStart: function (target, source, sourceEffect) { if (sourceEffect && sourceEffect.id === 'flameorb') { this.add('-status', target, 'brn', '[from] item: Flame Orb'); return; } this.add('-status', target, 'brn'); }, onBasePower: function ...
import models from './models' export default (requestContext) => { const user = (requestContext && requestContext.req.user) || null return { isUserAuthenticated () { return user !== null }, getAuthenticatedUser () { return user && models.user.findByPk(user.sub) } } }
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
import math import copy import itertools with open('input.txt') as fp: lines = [list(i.strip()) for i in fp.readlines()] def count_active_neighbors(x, y, z, w, active_set): count = 0 for x1, y1, z1, w1 in itertools.product([-1, 0, 1], repeat=4): if not x1 and not y1 and not z1 and not w1: ...
"use strict"; var requestHelpers = require('request-helpers'); var _ = require('lodash'); module.exports = { login: (req, res) => { var authService = sails.services.authservice; var authConfig = sails.config.auth; var loginProperty = authConfig.identityOptions.loginProperty; var pop...
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('friend', 'Unit | Serializer | friend', { // Specify the other units that are required for this test. needs: ['serializer:friend'] }); // Replace this with your real tests. test('it serializes records', function(assert) { let record = this.subje...
// // SNOWSchemaRuleset.h // Snowplow-iOS // // Copyright (c) 2013-2021 Snowplow Analytics Ltd. All rights reserved. // // This program is licensed to you under the Apache License Version 2.0, // and you may not use this file except in compliance with the Apache License // Version 2.0. You may obtain a copy of th...
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.slider.currentvalue.font", **kwargs, ): super(SizeValidator, self).__init__( plotly_name=plotly...
/* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2020-01-09 shelton first version */ #ifndef __DRV_SPI__ #define __DRV_SPI__ #include <rtthread.h> #include "drivers/spi.h" #include "at32f4xx.h" str...
module.exports = { "env": { "browser": true, "commonjs": true, "es2021": true }, "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "parserOptions": { ...
import BrowserUtils from '../utils/BrowserUtils' const DefaultAvatars = { BLURPLE: '6debd47ed13483642cf09e832ed0bc1b', GREY: '322c936a8c8be1b803cd94861bdfa868', GREEN: 'dd4dbc0016779df1378e7812eabaa04d', ORANGE: '0e291f67c9274a1abdddeb3fd919cbaa', RED: '1cbd08c76f8af6dddce02c5138971129' } export default cla...
#include "E53_ST1.h" #include "stm32l4xx.h" #include "stm32l4xx_it.h" #include "usart.h" #include "main.h" gps_msg gpsmsg; static unsigned char gps_uart[1000]; TIM_HandleTypeDef htim16; /*************************************************************** * 函数名称: MX_TIM16_Init * 说 明: 初始化定时器1...
var searchData= [ ['feedforward',['feedForward',['../classneuralnetwork_1_1Perceptron.html#a83e9fbb5f68a8281fe29c51cc538e44c',1,'neuralnetwork::Perceptron']]] ];
// Renan LAVAREC - Ti-R - MIT License if(TR==undefined){var TR={}}TR.MarkdownFSGlobal=new function(){let a=this;a.Debug=false;a.bM=function(){if(a.Debug){console.log("[Markdown] ",arguments)}};a.aZ=" ";const T="<blockquote>";const B="</blockquote>\n";const I=/(\S*)\s?(\S*)/g;const V=/[<>`&]/g;a.bz=/!\[(.*?)\]\((.*?...
function input(field) { return ` <div class="form-group"> <label for="${field.id}">${field.displayName}</label> <input type="text" class="form-control" id="${field.id}" name="${field.namespace}${field.id}" required> <div class="invalid-feedback">${field.displayName} is required.</div> ...
/* * This header is generated by classdump-dyld 1.5 * on Tuesday, November 10, 2020 at 10:19:22 PM Mountain Standard Time * Operating System: Version 14.2 (Build 18K57) * Image Source: /System/Library/PrivateFrameworks/ATVSlides...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/personalize/Personalize_EXPORTS.h> #include <aws/personalize/model/BatchInferenceJob.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebSer...
import unittest from playhouse.test_utils import test_database from peewee import * import tacocat from models import User, Taco TEST_DB = SqliteDatabase(':memory:') TEST_DB.connect() TEST_DB.create_tables([User, Taco], safe=True) USER_DATA = { 'email': 'test_0@example.com', 'password': 'password' } class...
const User = require('../models/User') const path = require('path') module.exports = async (req, res) => { User.create({ ...req.body }, (error, response) => { if (error) { const validationErrors = Object.keys(error.errors).map(key => error.errors[key].message) console.lo...
from selenium.webdriver.common.by import By from selenium_ui.conftest import print_timing from util.conf import CONFLUENCE_SETTINGS from selenium_ui.base_page import BasePage def app_specific_action(webdriver, datasets): page = BasePage(webdriver) if datasets['custom_pages']: app_specific_page = data...
import { createStore} from 'redux'; // destructure let incrementCount = ({incrementBy = 1} = {}) => ({ type: "INCREMENT", incrementBy: typeof incrementBy === "number" ? incrementBy : 1 }) let decremntCount = ({decrementBy = 1} = {}) => ({ type: "DECREMENT", decrementBy: typeof decrementBy === "number" ? decrem...
""" Starts home assistant. """ import sys import os import argparse try: from homeassistant import bootstrap except ImportError: # This is to add support to load Home Assistant using # `python3 homeassistant` instead of `python3 -m homeassistant` # Insert the parent directory of this file into the m...
from mec.routes.meetings import crud from mec.schemas import Meeting, MeetingCreate from typing import List from sqlalchemy.orm import Session from fastapi import APIRouter, HTTPException, Depends, Path from mec.database import SessionLocal from icecream import ic import json # Create a database connection we can use ...
/** * Copyright IBM Corp. 2016, 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'; var _20 = { "elem": "svg", "attrs": { "xmlns": "http:/...
/* * This file is part of mipOS * Copyright (c) Antonino Calderone (antonino.calderone@gmail.com) * All rights reserved. * Licensed under the MIT License. * See COPYING file in the project root for full license information. */ /* -------------------------------------------------------------------------- */ #ifdef E...
from sqlalchemy import create_engine, MetaData, Table from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import text import json class Utils(object): """Utility class""" def __init__(self, dbname = None, dbuser = None, dbpass = None, dbhost = None): """ Constructor for this class. """ ...
/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05 * http://photoswipe.com * Copyright (c) 2017 Dmitry Semenov; */ /** * * UI on top of main sliding area (caption, arrows, close button, etc.). * Built just using public methods/properties of PhotoSwipe. * */ (function (root, factory) { if (typeof define === 'function' &&...
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule()...
import { Meteor } from 'meteor/meteor'; import { roomTypes, composeMessageObjectWithUser } from 'meteor/rocketchat:utils'; import { hasPermission } from 'meteor/rocketchat:authorization'; import { Rooms, Subscriptions, Users } from 'meteor/rocketchat:models'; import { settings } from 'meteor/rocketchat:settings'; impor...
import React,{useState} from 'react' import './login.css' import axios from 'axios' import { Link, useHistory } from "react-router-dom"; import {NotificationContainer, NotificationManager} from 'react-notifications'; function Login() { const [email,setEmail] =useState('') const [password,setPassword] =useState('...
const listaRotinas = document.getElementById('listarotinas') const inputElement = document.getElementById('inputrotina') const adicionarRotina = document.querySelector('.botaorotina') const botaoaddrotina = document.querySelector('#addRotina') const janelaRotina = document.getElementById('janelaRotina') const suas...
# -*- coding: utf-8 -*- import datetime import dash import plotly import main_plot import tech_indicator import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from fetch_data import fetch_market import graph_menu app = dash.Dash( __name__, meta_...
// Copyright (c) 2016-2018, Intel Corporation. // Test code to use the AmbientLightSensor (subclass of Generic Sensor) API // to communicate with the Grove Light sensor on the Arduino 101 // Hardware Requirements: // - A Grove Light sensor // Wiring: // - Wire the sensor's power to Arduino 3.3V or 5V and ground t...
// Taken from http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html // MersenneTwister.h // Mersenne Twister random number generator -- a C++ class MTRand // Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus // Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com // The Mersenne...
// Thanks For Allah // ROZI // ⳹ ❋ཻུ۪۪⸙zifabotz⳹ ❋ཻུ۪۪⸙ // YANG SUDAH DONASI let fs = require('fs') global.owner = ['6285828764046', '6285828764046','6285828764046', '6285828764046', '6285828764046'] // Letakan nomor kamu disini global.APIs = { // API Prefix // nama: 'https://website' hardianto: 'https://hardianto...
/** * Created by Harsha on 6/7/18. */ var cashTransactionListing = function () { var handleOrders = function () { var grid = new Datatable(); grid.init({ src: $("#cashTransactionManageTable"), onSuccess: function (grid) { // execute some code after table ...
"""The rest component.""" import asyncio import logging import httpx import voluptuous as vol from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN from homeassistant.const import ( CONF_AUTHENTICATION, CONF_HEADE...
/* @doc * @module Tokenizer.h | Definition of a String tokenizer class */ #ifndef __TOKENIZER_H__ #define __TOKENIZER_H__ #define BOOL_TRUE _T("true") #define BOOL_FALSE _T("false") //////////////////////////////////// // @class CTokenizer | Class of a string tokenizer object // @base public | -- // class CTokeni...
beforeEach(function () { this.addMatchers({ toExactlyMatch: function (expected) { var a1, a2, l, i, key, actual = this.actual; var getKeys = function (o) { var a = []; for (key in o) { ...
#include <uvsqgraphics.h> void dessine_mickey(POINT centre, int rayon, COULEUR c){ POINT c2,c3; c2.x = centre.x-3*rayon/(2*sqrt(2));c2.y = centre.y+3*rayon/(2*sqrt(2)); c3.x = centre.x+3*rayon/(2*sqrt(2));c3.y = centre.y+3*rayon/(2*sqrt(2)); draw_circle(centre,rayon,c); draw_circle(c2,rayon/2,c); draw_circle...
/**************************************************************************/ /*! @file pmu.c @author K. Townsend (microBuilder.eu) @date 22 March 2010 @version 0.10 @section DESCRIPTION Controls the power management features of the LPC1343, allowing you to enter sleep/deep-sleep...
import React from 'react'; import { reduxForm } from 'redux-form'; import * as sinon from 'sinon'; import test from 'ava'; import Adapter from 'enzyme-adapter-react-15'; import { shallow, configure } from 'enzyme'; import CheckboxesInput from '../build/index.js'; configure({ adapter: new Adapter() }); test.beforeEa...
const det = (arr, cb)=>{ const calc=(matrix) => { if(matrix.length ===2){ return (matrix[0][0]*matrix[1][1]-matrix[0][1]*matrix[1][0]); } else if(matrix.length >2){ let determinant = 0; for(let i=0; i<matrix.length; i++){ let subArr...
import torch from torch import nn import torch.nn.functional as F from torch.nn import TransformerEncoderLayer import torch_geometric as tg from torch_geometric.nn import global_add_pool from torch_scatter import scatter from model.GNN import GNN, MLP from model.utils import * from itertools import permutations impor...
from rest_framework import serializers from django.db import transaction from delivery.services import create_delivery_config, create_pick_period_line from product.services import create_default_group_by_shop from shop.constant import ShopStatus from shop.services import ( create_shop, create_pay_channel, ...
#ifndef QUAD_SETTINGS #define QUAD_SETTINGS // DEFINE DIGITAL PINS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #define MEGA 1000000L // https://www.pjrc.com/teensy/td_pulse.html constexpr int8_t HCTL_CLOCK_PIN = 10; constexpr int8_t HCTL_RST_PIN = 11; constexpr int8_t HCTL_OE_PIN = 12; constexpr int8_t ...
// @flow import { compose } from 'redux'; import { connect } from 'react-redux'; import { formValueSelector } from 'redux-form'; import { fetchSemesters } from 'app/actions/CompanyActions'; import { fetchCompanyInterest, updateCompanyInterest, } from 'app/actions/CompanyInterestActions'; import CompanyInterestPage,...
/****************************************************************************** * * file: XorHandler.h * * Copyright (c) 2003, Michael E. Smoot . * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno. * All rights reverved. * * See the file COPYING in the top directory of this distribution fo...
from caffe2.python import core import caffe2.python.hypothesis_test_util as hu import caffe2.python.serialized_test.serialized_test_util as serial from hypothesis import given, settings import hypothesis.strategies as st import numpy as np import unittest class TestPiecewiseLinearTransform(serial...
from app import mysql, webapp from pymongo import MongoClient from app.models import * import requests from bs4 import BeautifulSoup as bs amazon_search_url = 'http://www.amazon.in/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&field-keywords=' def crawl_items(): client = MongoClient(webapp.config['MONGO_DB']) ...
""" ASGI config for FossSite project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETT...
const config = require('./common/production.common.config')('bs3'); module.exports = { entry: { 'summernote': './src/js/bs3/settings', 'summernote-bs4': './src/js/bs4/settings', 'summernote-lite': './src/js/lite/settings', 'summernote.min': './src/js/bs3/settings', 'summernote-bs4.min': './src/js/...
"use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ...
const jwt = require("jsonwebtoken"); const user = require("../models/user"); const verifyuser = async (token) => { try{ const verify = jwt.verify(token, process.env.secret_key); const { password, username, email } = verify; if (verify) { ...
class Dog(): def __init__(self, name, age): self.name = name.title() self.age = age def sit(self): print("{0} is now sitting".format(self.name.title())) def roll_over(self): print("{0} rolled over".format(self.name.title())) # my_dog = Dog('willie', 6) # print("My ...
import React, { Component } from 'react' import PropTypes from 'prop-types' class Square extends Component { render() { let className = 'square' switch (this.props.color) { case 'R': className += ' red'; break case 'G': className += ' green'; break case 'B': clas...
# coding: utf-8 """ server OpenAPI spec version: 2018-06-22T02:34:44Z Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ncloud_server.model.nas_volume_instance import NasVolumeInstance # noqa: F401,E501 class AddNasVolume...
import pytest import numpy as np from auto_stretch import stretch def test_stretch(): s = stretch.Stretch() image = np.array([[1,2],[3,1]]) stretched_image = s.stretch(image) print(f"Image: {image}") print(f"Stretched image: {stretched_image}") assert np.shape(stretched_image) == np.shape(imag...
/* PR target/50749: Verify that post-increment addressing is generated inside a loop. */ /* { dg-do compile { target { any_fpu } } } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 3 { xfail *-*-*} } } */ float test_func_00 (float* p, int c) { float r = 0; ...
import { navigate } from "gatsby"; import { useEffect, useState } from "react" import _ from 'lodash'; import { isLoggedIn, getUser } from "../../services/auth"; import netlifyIdentity from 'netlify-identity-widget'; const Register = () => { if(!isLoggedIn){ navigate("/"); } useEffect(async () =>...
#!/usr/bin/env python3 import magnum as mn import examples.settings def perform_general_tests(attr_mgr, search_string): # get size of template library orig_num_templates = attr_mgr.get_num_templates() # make sure this is same value as size of template handles list assert orig_num_templates > 0 ...
# Copyright 2020 - 2021 MONAI 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/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
""" This file offers the methods to automatically retrieve the graph Frankia sp. BMG512. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein ass...
from bus import Bus from processor import Processor from request import Request from cache_entry import CacheEntry from copy import deepcopy class MESI_Cache: """ Simulator for the MESI cache with the processor ... Methods ------- containsEntry(addr:int) addEntry(entry: CacheEntry) sno...