text
stringlengths
3
1.05M
from machine import mem32 import sys import uasyncio from i2c_responder_base import I2CResponderBase import calc_icmpv6_chksum import queue import utime import gc from micropython import const _SEND_AVAILABLE = "sa" _RECEIVE_AVAILABLE = "ra" _BLK_MSG_LENGTH_ACK_OK = const(127 + 1) _BLK_MSG_LENGTH_ACK_ER...
import time def merge(data,drawData, l, m, r): n1 = m - l + 1 n2 = r- m # create temp arrays L = [0] * (n1) R = [0] * (n2) # Copy data to temp arrays L[] and R[] for i in range(0 , n1): L[i] = data[l + i] for j in range(0 , n2): R[j] = data[m + 1 + j] # Merg...
var home_Path = document.location.protocol +'//' + window.document.location.hostname +'/'; var userAgent = window.navigator.userAgent.toLowerCase(); console.log(userAgent); var norunAI = [ "android", "iphone", "ipod", "ipad", "windows phone", "mqqbrowser" ,"msie","trident/7.0"]; var norunFlag = false; for(var i=0;i<...
/** * *@2018-10-08 * *@author trsoliu * *@describe vue-cli 3.x配置文件 */ module.exports = { publicPath: './',//vue-cli3.3+新版本使用 //输出文件目录 outputDir: 'dist', //放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。 assetsDir: 'static', parallel:false }
const path = require('path'); const util = require('util'); const PATH_DELIMITER = '[\\\\/]'; // match 2 antislashes or one slash /** * Stolen from https://stackoverflow.com/questions/10776600/testing-for-equality-of-regular-expressions */ const regexEqual = (x, y) => { return ( x instanceof RegExp && y i...
import React from "react" import { NavLink } from "react-router-dom" export default function() { return ( <div> <NavLink exact to="/"><button>Home</button></NavLink> <NavLink to="/counter"><button>Counter</button></NavLink> <NavLink to="/toggle-text"><button>Toggle Text<...
from __future__ import print_function import json import keras import numpy as np from pycocotools.cocoeval import COCOeval def evaluate_coco(generator, model, threshold=0.05): """ Use the pycocotools to evaluate a COCO model on a dataset. Args generator : The generator for generating the evaluatio...
import tests.periodicities.period_test as per per.buildModel((7 , 'W' , 1600));
import asyncio import sys import os async def myCorutine(): while True: await asyncio.sleep(1) print("My Coroutine") async def secondCoroutine(): while True: await asyncio.sleep(1) print("Second Coroutine") loop = asyncio.get_event_loop() try: asyncio.ensure_future(myCorut...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2008 Extreme Engineering Solutions, Inc. * Copyright 2008 Freescale Semiconductor, Inc. */ #include <common.h> #include <i2c.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> void get_spd(ddr2_spd_eeprom_t *spd, u8 i2c_address) { i2c_read(i2c_addre...
export default async function delayPromise(str, ms = 0) { const promise = new Promise(resolve => { setTimeout(() => resolve(str), ms) }) return await promise }
import { ShaderPhongMaterial } from "../ShaderPhongMaterial"; import { UniformsUtils } from "three"; import FragmentShader from "./ExpansionMaterial.frag.glsl"; import VertexShader from "./ExpansionMaterial.vert.glsl"; export class ExpansionMaterial extends ShaderPhongMaterial { get amp() { return this.unif...
import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/styles'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import IconButton from '@material-ui/core/IconButton'; import Tooltip from '@m...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB from __future__ import absolute_import, division, print_function import os import pytest from six import iteritems from ramlfications.config import setup_config from ramlfications.config import ( AUTH_SCHEMES, HTTP_RESP_CODES, MEDIA_TYPES, PROTOCOLS, HTTP_...
// Copyright (C) 2022 Igalia, S.L. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-temporal.plaintime.prototype.round description: Valid values for roundingIncrement option includes: [temporalHelpers.js] features: [Temporal] ---*/ const plainTime = new Tempo...
// Copyright (C) 2015 André Bargull. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-dataview.prototype.setuint16 description: > Index bounds checks are performed after value conversion. info: > ... 3. Return SetViewValue(v, byteOffset, littleEndian, "U...
// 注册 ServiceWorker function regSW() { if ('serviceWorker' in navigator) { // 注册 navigator.serviceWorker .register('./sw.js', {scope: './'}) .then( function(registration) { console.log('ServiceWorker 注册成功!作用域为: ', registration.scope); }) ...
import { isNullOrUndefined } from "util"; const words = require('capitalize'); /** * Returns a capitalized string. * * @param {TwingEnvironment} env * @param {string | TwingMarkup} string A string * * @returns {Promise<string>} The capitalized string */ export function capitalize(env, string) { if (isNullOrU...
import json from packlib.base import ProxmoxAction class ClusterConfigTotemAction(ProxmoxAction): """ Get corosync totem protocol settings. """ def run(self, profile_name=None): super().run(profile_name) # Only include non None arguments to pass through to proxmox api. proxmo...
import os import logging import tempfile import subprocess from .utils import _setup_logging logger = logging.getLogger(__name__) _setup_logging(logger) SOURCE_IMAP_HOST = os.getenv('SOURCE_IMAP_HOST', '') SOURCE_IMAP_PORT = os.getenv('SOURCE_IMAP_PORT', None) TARGET_AUTH_FILE = os.getenv('TARGET_AUTH_FILE') class ...
define([ "dojo/_base/declare", "dojo/Evented", "dojo/topic", "dojo/_base/array", "dojo/_base/lang", "esri/layers/GraphicsLayer", "esri/layers/RasterFunction", "esri/graphic", "esri/layers/ImageServiceParameters", "esri/layers/MosaicRule", "esriviewer/map/base/LayerQueryParame...
import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as ticker from matplotlib.colors import LinearSegmentedColormap from matplotlib.ticker import PercentFormatter import matplotlib.colors as colors import matplotlib.cm as cmx # Configure the plotting environment plt.rcParams['xtick.direction']...
// If you really want a HOC for some reason, you can easily // create one using a regular component with a render prop! import React from "react"; function withMouse(Component) { return class extends React.Component { render() { return ( <Mouse render={mouse => ( ...
#!/usr/bin/env python """Tests for bllb module.""" # pylint: disable=unused-wildcard-import, undefined-variable import sys import pytest from scripttest import TestFileEnvironment as FileEnvironment from bripy.bllb.bllb import * env = FileEnvironment(ignore_hidden=False) SCRIPT_PATH = r"..\..\..\src\bripy\bllb\bllb...
import React, { Component, } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { EuiContextMenuPanel } from './context_menu_panel'; import { EuiContextMenuItem } from './context_menu_item'; function mapIdsToPanels(panels) { const map = {}; panels.forEach(panel => { ...
export default (state = null, action) => { switch(action.type) { case 'SET_CURRENT_USER': return action.user case 'CLEAR_CURRENT_USER': return null default: return state } }
import time import datetime import requests_mock from django.conf import settings from selenium.common.exceptions import NoSuchElementException from events.models import User, Playlist from functional_tests.selenium_test_case import SeleniumTestCase from functional_tests.utils import navbar_active_element_text clas...
""" I/O for XDMF. https://www.xdmf.org/index.php/XDMF_Model_and_Format """ import os import pathlib from io import BytesIO from xml.etree import ElementTree as ET import numpy as np from .._common import cell_data_from_raw, raw_from_cell_data, write_xml from .._exceptions import ReadError, WriteError from .._helpers ...
// Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- es6id: 10.2.1 description: > It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList contains any duplicate entries. flags: [module] features: [let, const]...
/* * Copyright 2018 Mahdi Khanalizadeh * * 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...
__ignore__ = ["engine"] __private__ = ["models", "utils", "exceptions"] from app.core import auth from app.core import db from app.core import exceptions from app.core import face_api from app.core import models from app.core import settings from app.core import token from app.core import utils from app.core.auth imp...
'''Crie uma classe que modele um quadrado:''' class Quadrado: def __init__(self, lado=None, area=None): self.lado = lado def altera_valor(self, valor): self.lado = valor return self.lado def retorna_valor(self): return self.lado def calcular_area(self): self.area = self.lado ** 2 return self.area ...
import styled from 'styled-components'; // import { positionFix } from '../Theme/mixin'; export default styled('div')` width: 100%; height: 100%; background-image: url(${({ bg }) => bg || 'white'}); background-size: cover; background-attachment: fixed; background-color: ${({ theme }) => theme['color-black-...
#!/usr/bin/python import datetime import gzip import os import sitchlib import shutil from dateutil.parser import parse as dt_parse from LatLon.lat_lon import LatLon import pdb """ Outputs files like state.csv.gz. These contain CSV data from the FCC license database. Use for determining GPS distance from tower. Al...
import React, { Component } from 'react'; // import Main from './componets/Main/Main'; import Asaid from './componets/Asaid/Asaid'; // import Statistics from './componets/Statistics'; class App extends Component { render() { // const { good, neutral, bad } = this.state; // const {state, onLeaveFeedback, ...
import collections import json import ssl import tornado.gen import tornado.ioloop import tornado.iostream import tornado.tcpserver from h2.config import H2Configuration from h2.connection import H2Connection from h2.events import RequestReceived, DataReceived def init_logging(): logger = logging.getLogger('cli...
#pragma once // Copyright 2020 AiBlocks Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "crypto/SecretKey.h" #include "herder/Herder.h" #include "main/Applicat...
# -*- coding: utf-8 -*- """ YEPY 核心Module by jimmy.dong@gmail.com 2016.1.4 不建议在项目中修改此Module中方法,以避免对升级造成困扰 """ _yepy_version = '1.0b' __all__ = ['Debug','FirePhp']
import React from "react"; import { Link } from "gatsby" export default ({title, to}) => ( <div className="DesktopHeaderLink"> <Link to={to} > <h2 >{title}</h2> </Link> </div> )
module.exports = { singleQuote: true, trailingComma: 'all', arrowParens: 'avoid', };
/* * Copyright 2018 Schibsted. * Licensed under the MIT license. See LICENSE file in the project root for details. */ import MockPDFMake from 'pdfmake'; import { createElement, createRenderer, toPDFMake } from '.'; jest.mock('pdfmake', () => jest.fn()); describe('#jsx-pdf', () => { describe('createRenderer', ()...
load('bower_components/lodash/dist/lodash.js'); load('bower_components/underscore.string/dist/underscore.string.min.js'); var slugs = {}; var num = 0; var unconflictName; unconflictName = function(name) { var otherUser, suffix; otherUser = db.users.findOne({ slug: _.string.slugify(name) }); if (!otherUse...
COLORS = { "black": "\033[30m", "red": "\033[31m", "green": "\033[32m", "yellow": "\033[33m", "blue": "\033[34m", "magenta": "\033[35m", "cyan": "\033[36m", "white": "\033[97m", "bold_white": "\033[1;37m", } class Color: reset = "\033[0m" def __init__(self, content: str) -...
import re import discord from discord.ext import commands from helpers import isLeader def setup(bot): bot.add_cog(BaseCommands(bot)) class BaseCommands(commands.Cog): def __init__(self, bot): self.bot = bot self.bot.remove_command("help") @commands.command() async def help(self, ...
# -*- coding: utf-8 -*- """ reVX Configuration """
var validation_2_c_l_2_normalization_layer_8cpp = [ [ "CLNormalizationLayerFixture", "validation_2_c_l_2_normalization_layer_8cpp.xhtml#a63b510b6111d8c5cc66a49d0ea847645", null ], [ "combine", "validation_2_c_l_2_normalization_layer_8cpp.xhtml#a3f016dd4dea349a6b71893528b493eb6", null ], [ "DATA_TEST_CASE", ...
#!/usr/bin/env python3 # To get the user token import os # To interact with github import github from github import Github from github.GithubException import GithubException from github.Organization import Organization from github import UnknownObjectException # To modify the git repository using sane tools from git ...
from dataclasses import dataclass from item import Item from tile import Tile @dataclass class Knight: """ This class hold the properties and methods of Knight """ id: str name: str tile: Tile defence_power: int = 1 attack_power: int = 1 item: Item = None status: str = "ALIVE...
import * as React from "react" import {StaticImage} from "gatsby-plugin-image"; const Brands = () => { return (<> {[1,2,3,4,5,6,7,8,9].map(brand => (<div className='col-4'> <StaticImage src={"../images/brands/28_OC_LOGO.jpeg"} width={500} quality...
import rexviewer as r #XXX make all these return False class ModuleManager: #was not calling update to not confuse with the eventhandlers def run(self, elapsedtime): pass #print ".", #print elapsedtime """here was using 'on_chat' but changed to viewer event names, perh...
//Copyright 2015, Thomas Pronk // //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 ...
# -*- coding: utf-8 -*- """ Created on Fri Jan 20 12:08:10 2017 @author: ozsanos """ import pandas as pd raw_data = pd.read_csv('data.csv') raw_columns = list(raw_data) columns = set() dates = list() """ Delete raw columns """ for column in raw_columns: if column[0:8] == "Unnamed:": ...
__version__ = "1.0c1"
"use strict"; const Generator = require("yeoman-generator"); const chalk = require("chalk"); const yosay = require("yosay"); const glob = require("glob"); const { resolve } = require("path"); const remote = require("yeoman-remote"); const yoHelper = require("@feizheng/yeoman-generator-helper"); const replace = require(...
#ifndef SRC_STORAGEENGINEINTF_H #define SRC_STORAGEENGINEINTF_H #include <cstddef> #include <vector> template <typename EntityT> class StorageEngineIntf { public: using StorageKey = std::size_t; virtual ~StorageEngineIntf() = default; virtual StorageKey create(const EntityT& entity) = 0; virtual const Enti...
describe("Performance of JSONBigNumber", function() { var iterations = 1000; var nonBigNumberJSONInput = '{"array":[{"big":123456789012345,"small":654},{"big":1234567890.12345,"small":789.012}],"boolTrue":true,"boolFalse":false,"nullStr":null,"letterStr":"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","...
from __main__ import app, flask, a class indx(): keywords = "elisttm, elisttm2, elittm, eli, trashbot, mc.elisttm.space" icon_dir = f'{a.img}/logos/' sm_buttons = ( ('twitter', a.twitter), ('youtube', a.youtube), ('steam', a.steam), ('github', a.github), #('discord', a.discord), ) buttons = ( ("/e...
""" Util functions for SMPL @@batch_skew @@batch_rodrigues @@batch_lrotmin @@batch_global_rigid_transformation """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf def batch_skew(vec, batch_size=None): """ ve...
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "sw/device/lib/dif/dif_otbn.h" #include "sw/device/lib/base/bitfield.h" #include "otbn_regs.h" // Generated. /** * Data width of big number subset, in byte...
// // _ooOoo_ // o8888888o // 88" . "88 // (| ^_^ |) // O\...
"""Utils for an immutable dataclass data structure.""" import copy import dataclasses from dataclasses import _process_class from typing import Any, Callable, TypeVar _ClsT = TypeVar('_ClsT') _LsClsT = List[_ClsT] def dataclass(_cls: _ClsT = None, *, init=True, repr=True, ...
# # PySNMP MIB module HP-SN-ROOT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-SN-ROOT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:23:41 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
import math import charts.svgs.svg_histogram as svg_histo import charts.pdfs.pdf_histogram as pdf_histo import charts.scale as scale import charts.data_utils as util class ConfigException(Exception): pass def get_histogram(pop_data, sample_data, config, col, fmt): width = config["width"] height = config...
/*! * jQuery Simulate v0.0.1 - simulate browser mouse and keyboard events * https://github.com/jquery/jquery-simulate * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * Date: Sun Dec 9 12:15:33 2012 -0500 */ ;(function( $, undefined )...
from py2neo import Graph, NodeMatcher, RelationshipMatcher from app import settings class GraphContext(object): ''' GraphContext, will give you a connection to graph database specified on the .env ''' graph=None def __init__(self): self.graph = Graph(settings.NEO4J_URI, auth=(settings.NEO4J_USER, ...
from django.conf.urls import url import models.views as models_views urlpatterns = [ url(r'^$', models_views.models_list), url(r'^reload_model$', models_views.reload_model), url(r'^arrange_topics$', models_views.arrange_topics), url(r'^reset_visuals$', models_views.reset_visuals), url(r'^create$', ...
""" Optuna example that optimizes multi-layer perceptrons using ChainerMN. In this example, we optimize the validation accuracy of hand-written digit recognition using ChainerMN and MNIST, where architecture of neural network is optimized. ChainerMN and it's Optuna integration are supposed to be invoked via MPI. You ...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() requirements = [ 'numpy' ] setuptools.setup( name="assembly_stats", version="0.1.4", author="Mike Trizna", author_email="triznam@si.edu", description="Calculates both scaffold and contig statistics (N50, L50...
/* * PCF8574 GPIO Port Expand * https://www.mischianti.org/2019/01/02/pcf8574-i2c-digital-i-o-expander-fast-easy-usage/ * * The MIT License (MIT) * * Copyright (c) 2017 Renzo Mischianti www.mischianti.org All right reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of ...
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Constraint = Matter.Constraint; var engine, world; var canvas,baseimage,playerimage; var palyer, playerBase, playerArcher; var playerArrows = []; var numberOfArrows = 10; var board1, board2; var score=0; function preload() {...
'use strict'; const assert = require('assert'); const app = require('../../../src/app'); describe('folders service', function() { it('registered the folders service', () => { assert.ok(app.service('folders')); }); });
system.exec_command("bspc node -o 0.6", getOutput=False)
Number.prototype.formatMoney = function(places, symbol, thousand, decimal) { places = !isNaN(places = Math.abs(places)) ? places : 2; symbol = symbol !== undefined ? symbol : "$"; thousand = thousand || ","; decimal = decimal || "."; var number = this, negative = number < 0 ? "-" : "", ...
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'make', 'wget'] if args.lxc: programs += ['apt-cacher-ng', 'lxc', 'debootstrap'] elif args.kvm: programs += ['apt-cacher-ng', 'python-vm-builder', ...
# Copyright 2020 Open Source Robotics Foundation, Inc. # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2014-10-26 16:54:01 # @Author : yml_bright@163.com API_URL = 'http://127.0.0.1/webserv2/' CONNECT_TIME_OUT = 7 TERM = '14-15-2'
import random ITERATIONS = 10 POSITIONS_IN_CANAL = 10 CANAL_WIDTH = 200 counter = 0 def make_ship(): ''' Generates a random ship, returns the generated ship. ''' ship = {} global counter counter += 1 ship["ID"] = str(counter) ship["width"] = random.randint(10,100) ship["status"] = ...
# MIT License # # Copyright (c) 2020 Aruba, a Hewlett Packard Enterprise company # # 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...
#!/usr/bin/env python import sys from setuptools import setup setup( name='Signaller', version='1.1.0', description='Signals and slots implementation with asyncio support', author='Michal Krenek (Mikos)', author_email='m.krenek@gmail.com', url='https://github.com/xmikos/signaller', licens...
import React from 'react'; import { expect } from 'chai'; //import { shallow, mount, render } from 'enzyme'; var enzyme = require('enzyme'); import Foo from '../src/Foo'; //var Foo = require('../src/Foo.js'); describe("A suite", function() { it("contains spec with an expectation", function() { expect(enzyme.shal...
/home/wai/anaconda3/lib/python3.6/sre_constants.py
'use strict'; //Setting up route angular.module('measures').config(['$stateProvider', function($stateProvider) { // Measures state routing $stateProvider. state('listMeasures', { url: '/measures', templateUrl: 'modules/measures/views/list-measures.client.view.html' }). state('listMyMeasures', { url...
var extend = require('extend'), fs = require('fs'), yaml = require('js-yaml'); // helper functions var Option = function (options) { this.options = options; }; Option.prototype.extend = function (options) { extend(this.options, options) }; Option.prototype.get = function (key) { return key ? this.options[key] :...
par=0 impar=0 n=0 resp="" while resp != "N": i=int(input("digite um número: ")) if i % 2 == 0: par+=1 else: impar+=1 resp=input("Deseja continuar? (S/N): ").upper() print("Quantidade de números pares: ", par) print("Quantidade de números ímpares: ", impar)
""" Module for basic correlation analysis of large datasets extracted via the Quandl Python API. General idea: 1. download/load all data 2. format data as independent time series 3. correlate against each other (all combinations of 2) 4. profit??? bit.ly/2KbRCME 5. wait no, format it as a table (for pretty printing) o...
# Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html from abc import ABC, abstractmethod from typing import Any, Callable, Dict, List, Mapping, Optional, cast, Tuple, TypeVar, Type import copy import signal import tempfile from functools import wraps from threading import Timer import smtpli...
'use strict' module.exports = require('./lib/cjs')
module.exports={A:{A:{"1":"E A B","130":"L H G jB"},B:{"1":"8 C D e K I N J"},C:{"1":"0 1 2 3 5 7 9 H G E A B C D e K I N J P Q R S T U V W X Y Z a b c d f g h i j k l m n o M q r s t u v w x y z KB JB CB DB EB O GB HB IB","257":"4 gB BB F L aB ZB"},D:{"1":"0 1 2 3 4 5 7 8 9 F L H G E A B C D e K I N J P Q R S T U V W ...
import './node-jvm-stats-table.style.scss' class nodeJvmStatsTableController { } export default nodeJvmStatsTableController;
// BRING IN MONGOOSE SCHEMA MODULE const { Schema } = require('mongoose'); // This is a subdocument schema, it won't become its own model but we'll use it as the schema for the User's `savedBooks` array in User.js const bookSchema = new Schema({ authors: [ { type: String, }, ], description: { ...
angular.module("ng-token-auth",["ngCookies"]).provider("$auth",function(){var t;return t={apiUrl:"/api",signOutUrl:"/auth/sign_out",emailSignInPath:"/auth/sign_in",emailRegistrationPath:"/auth",confirmationSuccessUrl:window.location.href,passwordResetPath:"/auth/password",passwordUpdatePath:"/auth/password",passwordRes...
# -*- coding: utf8 -*- # The MIT License (MIT) # # Copyright (c) 2018 Niklas Rosenstein # # 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...
#include "vendor/unity.h" #include "../src/acronym.h" #include <stdlib.h> #include <string.h> void setUp(void) { } void tearDown(void) { } void test_abbreviation(char *phrase, char *expected) { char *actual = abbreviate(phrase); TEST_ASSERT_EQUAL_STRING(expected, actual); free(actual); } void test_null_str...
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. # builtin import os # internal from sdv import errors from sdv.resources import XSD_ROOT # relative from . import common from .. import xml_schema, base class CyboxSchemaValidator(base.BaseSchemaValidator): ...
# 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 writing, software # distributed under t...
require('dotenv').config() const { connect } = require('mongoose') module.exports = connect(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true })
import speech_recognition as sr from kalliope.core import Utils from kalliope.stt.Utils import SpeechRecognition class Wit(SpeechRecognition): def __init__(self, callback=None, **kwargs): """ Start recording the microphone and analyse audio with Wit.ai api :param callback: The callback f...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAffydata(RPackage): """Affymetrix Data for Demonstration Purpose Example datasets...
#------------------------------------------------------------------------------ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. # # Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved. # # Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta, # Canada...
from fastapi import APIRouter, Depends from model_hub.db.database_manager import DatabaseManager from model_hub.db import get_database from model_hub.db.models import Model router = APIRouter() @router.get('/') async def all_models(db: DatabaseManager = Depends(get_database)): models = await db.get_models() ...