text
stringlengths
3
1.05M
""" Making more functional exercise 7-5 """ print('=====Welcome to the cinema=====') flag = True tickets = [] total = [] while flag: ticket = int(input('Enter your age: ')) tickets.append(ticket) repeat = input('Is there anyone else (y/n): ') if repeat == 'y': continue else: brea...
# Copyright 2013 Red Hat, Inc. # 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...
#ifndef FOOD_H #define FOOD_H #include "equipment.h" class Food : public Equipment { public: Food(); Food(std::string name, int initial_health_gain, int health_gain_per_trigger, int total_triggers); void printDescription(WINDOW *win); void printType(WINDOW *win); void compa...
import numpy as np import cv2 from PIL import Image import matplotlib.image as mpimg class Line: def __init__(self): # was the line detected in the last iteration? self.detected = False # Set the width of the windows +/- margin self.window_margin = 56 # x values of the fitte...
/** * @template T */ export default class Set { constructor(iterable) { /**@type {T[]} */ this._values = []; if(Array.isArray(iterable)) { this._values = iterable.filter((val, idx, self) => self.indexOf(val) === idx); } } /** * return the number of items in the set * @return {n...
""" Tasks related to projects. This includes fetching repository code, cleaning ``conf.py`` files, and rebuilding documentation. """ import datetime import json import logging import os import shutil import signal import socket import tarfile import tempfile from collections import Counter, defaultdict from fnmatch i...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # Copyright (c) 2019 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 Lic...
const express = require('express') const bodyParser = require('body-parser') const database = require('./database/database') const multer = require('multer') const R = require('ramda') const path = require('path') const requestIp = require('request-ip') // multer setup const storage = multer.diskStorage({ destinatio...
import argparse import torch import tsai.all as tmsr def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('model', type=str, help='Name of model class, should be able to be got by `getattr(tmsr, args.model)`') parser.add_argument('weight', type=str, help='Path to ') parser.add_argu...
import React, { Component } from 'react'; /** * Component that renders a video element for a passed in video track. * * @extends Component */ class Video extends Component { /** * Default values for {@code Video} component's properties. * * @static */ static defaultProps = { cla...
import turtle as t def rectangle(horizontal, vertical, color): t.pendown() t.pensize(1) t.color(color) t.begin_fill() for counter in range(1, 3): t.forward(horizontal) t.right(90) t.forward(vertical) t.right(90) t.end_fill() t.penup() t.speed('very-slow')...
const auth = require('bindings')('auth.node') function promptTouchID(options, callback) { // Parse and sanitize options object if (!options) { throw new Error('Options object is required.') } else if (!options.hasOwnProperty('reason')) { throw new Error('Reason parameter is required.') } else if (typeo...
def add(x, y=2): return x + y def product(x, y=2): return x * y
"a frame is a single picture, cosequitively making up a video" #--------------------------------------------------------------------------------------------------# import logging from collections import Counter import pandas as pd import numpy as np import cv2 from sklearn.cluster import DBSCAN, AgglomerativeClusterin...
export class Empresa{ constructor(nombre, id){ this.nombre = nombre this.id = id } }
from .base import IBroadcaster from websocket import BroadcastServerFactory, BroadcastServerProtocol, BroadcastClientFactory, \ BroadcastClientProtocol, UserInputServerFactory, UserInputServerProtocol, TwistedWSConsumer, TwistedWSPushProducer, \ TwistedConsumer, TwistedPullProducer from twisted.internet import...
from multiprocessing import Pool, Manager import os def copy_file_task(name, old_folder_name, new_folder_name, queue): """完成copy一个文件的功能""" fr = open(old_folder_name + "/" + name) fw = open(new_folder_name + "/" + name, "w") content = fr.read() fw.write(content) fr.close() fw.close() ...
#!/usr/bin/env python # # LIBTBX_SET_DISPATCHER_NAME cctbx.small_cell_process from __future__ import absolute_import, division, print_function import logging logger = logging.getLogger('cctbx.small_cell_process') help_message = ''' DIALS script for processing sparse images. ''' from dials.command_line.stills_proces...
const CustomError = require("../extensions/custom-error"); module.exports = function repeater(str, {repeatTimes = '',separator='+',addition='',additionRepeatTimes='',additionSeparator='|'}={}) { let res = ''; let i = 0, j = 0; do{ res+=str; j = 0; do{ re...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote class VoxMediaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?:theverge|vox|sbnation|eater|polygon|curbed|racked)\.com/(?:[^/]+/)*(?P<id>[^/?]+)' _TESTS = [{ ...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/runnable.h> #include <vespa/vespalib/util/threadexecutor.h> namespace searchcorespi::index { /** * Interface for a single thread used for write tasks. */...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="testpkgjwilson", version="0.0.2", author="Joseph Wilson", author_email="jw59615@gmail.com", description="placeholder", long_description=long_description, long_description_content_t...
import React from "react"; import styled from "styled-components"; import theme from "../styles/theme"; import { mixins } from "../styles/shared"; import { Link } from "react-router-dom"; const StyledCard = styled.div` display: flex; box-shadow: 3px 4px 20px rgba(0, 0, 0, 0.1); padding: 0 2rem; max-width: 650p...
import Cookies from "universal-cookie"; class token { constructor() { this.cookies = new Cookies(); } set = (key, value) => { this.cookies.set(key, value, { path: "/" }); }; get= key => { return this.cookies.get(key, { path: "/" }); }; remove = key => { this.cookies.remove(key, { path:...
"""Utility functions for Slurm.""" import os import subprocess from lbann.util import make_iterable from .batch_script import BatchScript class SlurmBatchScript(BatchScript): """Utility class to write Slurm batch scripts.""" def __init__(self, script_file=None, work_dir=os.g...
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { t...
#! /usr/bin/env python3 # Copyright 2019 Intel Corporation # # 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 applicabl...
/* global jest, describe, it, expect */ import React from 'react'; import { Component as Tabs } from '../Tabs'; import Enzyme, { shallow } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16/build/index'; Enzyme.configure({ adapter: new Adapter() }); describe('Tabs', () => { describe('render()', () => { ...
/******************************************************************************* SERCOM Universal Synchronous/Asynchrnous Receiver/Transmitter PLIB Company Microchip Technology Inc. File Name plib_sercom5_usart.c Summary USART peripheral library interface. Description This file defines the...
from collections import deque class Solution(object): def pacificAtlantic(self, matrix): """ :type matrix: List[List[int]] :rtype: List[List[int]] """ if not matrix or not matrix[0]: return [] queue = deque() row, col = len(matrix), len(matrix[0...
# -*- coding: utf-8 -*- # Copyright (c) 2014-2017 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014-2015 Brett Cannon <brett@python.org> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2015 Cosmin Poieana <cmin@ropython.org> # Copyright (c) 2015 Viorel Stirbu <viorels@gmail.com> ...
!function(e){const t=e.da=e.da||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 af %1","Align center":"Justér center","Align left":"Justér venstre","Align right":"Justér højre",Aquamarine:"Marineblå",Big:"Stor",Black:"Sort","Block quote":"Blot citat",Blue:"Blå",Bold:"Fed","Bulleted List":"Punktopstilling...
#!/usr/bin/env python import os import firecrown.likelihood.gauss_family.statistic.source.weak_lensing as wl from firecrown.likelihood.gauss_family.statistic.two_point import TwoPoint from firecrown.likelihood.gauss_family.gaussian import ConstGaussian import sacc # Sources """ Creating sources, each one map...
#!/usr/bin/env python # Built-in import sys import os import argparse # Generic import matplotlib.pyplot as plt plt.switch_backend('Qt5Agg') plt.ioff() # tofu # test if in a tofu git repo _HERE = os.path.abspath(os.path.dirname(__file__)) istofugit = False if '.git' in _HERE and 'tofu' in _HERE: istofugit = True...
""" Licensed Materials - Property of IBM Restricted Materials of IBM 20190891 © Copyright IBM Corp. 2021 All Rights Reserved. """ """ Module to where fusion algorithms are implemented. """ import logging import numpy as np from ibmfl.model.model_update import ModelUpdate from ibmfl.aggregator.fusion.iter_avg_fusion_ha...
from collections import OrderedDict from itertools import cycle import numpy as np from experiment.qa.data.models import * from experiment.qa.data.reader import TSVArchiveReader class V1Reader(TSVArchiveReader): def file_path(self, filename): return '{}/V1/{}'.format(self.archive_path, filename) de...
/********************************************************************************* The MIT License (MIT) Copyright (c) 2017 Xirsys 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 witho...
from torchvision.datasets import CIFAR10 import torchvision.transforms as transforms import numpy as np import torch from PIL import Image import cv2 import time class cifar10(CIFAR10): def __init__(self, root, classes=range(10), train=True, transform=None, target_transform=None, download=Fal...
/* Test of link() function. Copyright (C) 2009, 2010 Free Software Foundation, Inc. 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)...
import Icon from 'vue-awesome/components/Icon' Icon.register({ train_two_tone: { raw: '<path fill="none" d="M0 0h24v24H0V0z"/><path opacity=".3" d="M12 4c-3.51 0-4.96.48-5.57 1h11.13c-.6-.52-2.05-1-5.56-1zM6 15.5c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5V12H6v3.5zm9.5-2.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5...
from app.models import db, Folder def seed_folders(): db.session.add(Folder(name="Linux 101", user_id=1, category_id=2)) db.session.add(Folder(name="Org Mode > Markdown", user_id=1, category_id=2)) db....
#!/usr/bin/env python3 """ Fit lifetime decays """ import numpy as np import scipy.optimize import os import argparse import re from uncertainties import ufloat import json VERSION = 1.0 package_directory = os.path.dirname(os.path.abspath(__file__)) def parseCmd(): """ Parse the command line to get the e...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.madDependencies = void 0; var _dependenciesAbs = require("./dependenciesAbs.generated"); var _dependenciesMap = require("./dependenciesMap.generated"); var _dependenciesMedian = require("./dependenciesMedian.generated"); var _de...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE121_Stack_Based_Buffer_Overflow__CWE806_char_declare_snprintf_22b.c Label Definition File: CWE121_Stack_Based_Buffer_Overflow__CWE806.label.xml Template File: sources-sink-22b.tmpl.c */ /* * @description * CWE: 121 Stack Based Buffer Overflow * BadSource: Initialize ...
import logging from typing import List, Optional, Union, Tuple from beer.types.blockchain_format.program import Program, SerializedProgram from beer.types.generator_types import BlockGenerator, GeneratorArg, GeneratorBlockCacheInterface, CompressorArg from beer.util.ints import uint32, uint64 from beer.wallet.puzzles.l...
#ifndef COMMON_REG_H #define COMMON_REG_H #include <iostream> #include <cstdlib> #include <marsyas/system/MarSystemManager.h> #include <marsyas/Collection.h> #include <marsyas/FileName.h> #define CLOSE_ENOUGH 0.0001 using namespace std; using namespace Marsyas; static MarSystemManager mng; // really useful global ...
# -*- coding: utf-8 -*- """Base exchange class""" # ----------------------------------------------------------------------------- __version__ = '1.17.492' # ----------------------------------------------------------------------------- from ccxt.base.errors import ExchangeError from ccxt.base.errors import NetworkE...
from datetime import datetime, date from marqeta.response_models import datetime_object import json import re class PaymentCardResponseModel(object): def __init__(self, json_response): self.json_response = json_response def __str__(self): return json.dumps(self.json_response, default=self.jso...
from django.shortcuts import render, get_object_or_404 from django.views import generic from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.utils.decorators import available_attrs, method_decorator f...
# -*- coding: utf-8 -*- """ Robust Single Linkage: Density based single linkage clustering. """ import numpy as np from sklearn.base import BaseEstimator, ClusterMixin from sklearn.metrics import pairwise_distances from scipy.sparse import issparse from sklearn.externals.joblib import Memory from sklearn.externals im...
// test/boardexec_test.js var assert = require('assert'); var pzpr = require('../../dist/js/pzpr.js'); var testdata = require('../load_testdata.js'); function assert_equal_board(bd1,bd2){ bd1.compareData(bd2,function(group, c, a){ assert.equal(bd2[group][c][a], bd1[group][c][a], group+'['+c+'].'+a); }); } pzpr...
#include "main.h" #ifndef RECTANGLE_H #define RECTANGLE_H class Rectangle { public: Rectangle() {} Rectangle(float x, float y, float width, float height, color_t color); glm::vec3 position; glm::vec3 speed; float rotation; float width; float height; void draw(glm::mat4 VP); void s...
/* Copyright The Infusion copyright holders See the AUTHORS.md file at the top-level directory of this distribution and at https://github.com/fluid-project/infusion/raw/master/AUTHORS.md. Licensed under the Educational Community License (ECL), Version 2.0 or the New BSD license. You may not use this file except in com...
import ACTION_TYPES from './actionTypes'; const initialState = { repositories: [], isFetching: true, fetchError: null }; export default function reducer(state = initialState, { type, payload }) { switch (type) { case ACTION_TYPES.FETCH_REPOSITORIES_START: return { ...state, isFetchin...
//@ defaultNoEagerRun "use strict"; let validInputTestCases = [ // input as string, expected result as string. ["undefined", "NaN"], ["null", "0"], ["0", "0"], ["-0.", "-0"], ["0.5", "0"], ["-0.5", "-0"], ["4", "4"], ["42.1", "42"], ["42.5", "42"], ["42.9", "42"], ["-42....
const Discord = require('discord.js') const Command = require('../Command') class commands extends Command { constructor(bot) { super(bot, { commandName: "Commands", commandUsage: "commands", commandDescription: "Lists the available", commandCooldown: 10, ...
!function(e){const t=e.uk=e.uk||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 із %1",Anonymous:"Анонім",Big:"Великий","Block quote":"Цитата",Bold:"Жирний","Bulleted List":"Маркерний список","Bulleted list styles toolbar":"",Cancel:"Відміна","Cannot upload file:":"Неможливо завантажити файл:","Centered ...
# # 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...
webpackJsonp([0],[function(t,e){t.exports=function(t,e,n,r){var o,i=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(o=t,i=t.default);var s="function"==typeof i?i.options:i;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=Object.create(s.computed||null);Object.keys(r).fo...
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-07-05 01:44 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('auth',...
import numpy as np import scipy.sparse as sp import tensorflow as tf import yaml from pymongo import MongoClient def to_sparse_tensor(M, value=False): """Convert a scipy sparse matrix to a tf SparseTensor or SparseTensorValue. Parameters ---------- M : scipy.sparse.sparse Matrix in Scipy spar...
require('./argv'); require('./caught'); require('./clear'); require('./cli-require'); require('./cluster'); require('./conceal'); require('./errors'); require('./esmodule'); require('./exit-code'); require('./expose-gc'); require('./extension-options'); require('./graceful-ipc'); require('./inspect'); require('./kill-f...
/*global define*/ define([ '../Core/ColorGeometryInstanceAttribute', '../Core/defaultValue', '../Core/defined', '../Core/DeveloperError', '../Core/GeometryInstance', '../Core/GeometryPipeline', '../Core/Matrix4', './PerInstanceColorAppearance', './...
# Copyright: 2006 Brian Harring <ferringb@gmail.com> # License: GPL2/BSD from functools import partial from snakeoil.compatibility import cmp from snakeoil.klass import inject_richcmp_methods_from_cmp from pkgcore.package.base import base, dynamic_getattr_dict from pkgcore.package.mutated import MutatedPkg from pkgc...
# --depends-on commands # --depends-on format_activity # --depends-on permissions from src import EventManager, ModuleManager, utils @utils.export( "channelset", utils.BoolSetting( "relay-extras", "Whether or not to relay joins/parts/quits/modes/etc" ), ) class Module(ModuleManager.BaseModule): ...
"""Cookiecutter repository functions.""" import os import re from cookiecutter.exceptions import RepositoryNotFound from cookiecutter.vcs import clone from cookiecutter.zipfile import unzip REPO_REGEX = re.compile( r""" # something like git:// ssh:// file:// etc. ((((git|hg)\+)?(git|ssh|file|https?):(//)?) | ...
import unittest import solver class TestSolution(unittest.TestCase): def test_solve(self): self.assertEqual(solver.solve(1), 3) self.assertEqual(solver.solve(2), 6) self.assertEqual(solver.solve(3), 6) self.assertEqual(solver.solve(4), 28)
import requests import random import os import time import sys mysfits = [ '0e37d916-f960-4772-a25a-01b762b5c1bd', '2b473002-36f8-4b87-954e-9a377e0ccbec', '33e1fbd4-2fd8-45fb-a42f-f92551694506', '3f0f196c-4a7b-43af-9e29-6522a715342d', '4e53920c-505a-4a90-a694...
#!/usr/bin/env python # coding: utf-8 # In[25]: import torch import numpy as np import matplotlib.pyplot as plt import torch.nn as nn from sklearn import datasets # In[40]: n_pts = 100 centers = [[-0.5, 0.5], [0.5, -0.5]] X, y = datasets.make_blobs(n_samples=n_pts , random_state=123 ...
import logging from copy import copy from jsonobject.api import re_date from dimagi.utils.parsing import json_format_datetime from corehq.util.dates import iso_string_to_datetime def scrub_meta(xform): if not hasattr(xform, 'form'): return scrub_form_meta(xform.form_id, xform.form) def scrub_form...
/* eslint-disable no-console */ import {useState, useEffect} from 'react' import PropTypes from 'prop-types' import {withStateValue} from '@s-ui/hoc' import MoleculeSelectOption from '@s-ui/react-molecule-dropdown-option' import MoleculeSelect from '../../src/index.js' import {IconArrowDown} from '../Icons/index.js' ...
/* * Copyright (c) 2015, Natacha Porté * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI...
// Copyright (c) 2012 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. #ifndef UI_AURA_TEST_EVENT_GENERATOR_H_ #define UI_AURA_TEST_EVENT_GENERATOR_H_ #pragma once #include "base/basictypes.h" #include "ui/base/keycodes/...
import json import setuptools import os from distutils.command.build_py import build_py class hyperAPI_builder(build_py): # Custom class to build the HyperCube API def write_metadata(self): return "__version__ = '{version}'\n\n".format(version=self.distribution.get_version()) def run(self): ...
import os import tempfile import colorsys from collections import OrderedDict from pprint import pprint from scipy.spatial import distance import numpy as np import pandas as pd from ccdc.pharmacophore import Pharmacophore from ccdc.io import csd_directory, CrystalReader, MoleculeWriter, MoleculeReader fr...
_base_ = [ '../../_base_/models/universenet50_2008.py', '../../_base_/datasets/coco_detection_mstrain_480_960.py', '../../_base_/schedules/schedule_1x.py', '../../_base_/default_runtime.py' ] model = dict( backbone=dict(dcn=None, stage_with_dcn=(False, False, False, False)), neck=[ dict( ...
import { attempt, cond, flow, identity, isError, matchesProperty, overEvery, overSome, partial, stubTrue } from 'lodash'; import * as babel from 'babel-core'; import presetEs2015 from 'babel-preset-es2015'; import presetReact from 'babel-preset-react'; import { Observable } from 'rx'; import * as ...
# Escreva um programa que leia a velocidade de um carro. # Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele # foi multado. # A multa vai custar R$ 7.00 por cada Km acima do limite. v = float(input('Qual a velocidade do seu carro? ')) if v > 80: m = (v - 80) * 7 print('Você foi mutado! O valor d...
const {describe, it} = global; import {expect} from 'chai'; import {spy, stub} from 'sinon'; import actions from '../test_item'; describe('core.actions.test_item', () => { it('should do something'); });
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Copyright (c) 2019 The Sistemkoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_PRIMITIVES_T...
import DSA5_Utility from "./utility-dsa5.js" async function setupDefaulTokenConfig() { if (!game.settings.get("dsa5", "defaultConfigFinished")) { console.log("Configuring default token settings") let defaultToken = game.settings.get("core", "defaultToken") defaultToken.displayName = CONST....
module.exports = [ { "date": 1598995600, "name": "eBay Sale", "amount": 10.5, "budget": "checking account", "type": "earning", "category": "Sales" }, { "date": 1598995600, "name": "eBay Sale", "amount": 10.6, "budget": "saving account", "type": "earning", "category": "Sales" }, { "date": ...
from django.forms import ModelForm from djkatta.cabshare.models import cab_sharing class CabShareForm(ModelForm): class Meta: model = cab_sharing exclude = ('id', 'owner',)
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{factory(jQuery);}}(function($){$.ui=$.ui||{};$.extend($.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:...
# Copyright 2021 The Oppia 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 ...
import math import numpy as np import equations as eq #Run This Program def gaia(fn,nroots,edes=1): """This runs evrything to find the as many roots as you want. This program has been sucessfully tested for up to 5000 roots for both Sin() and Tan() functions that have roots after zero. 'fn' is the name of...
/*! * 静态文件服务器 * Copyright 2016 程刁 * Licensed under MIT */ 'use strict'; // http模块 const http = require('http'); // url模块 const url = require('url'); // 路径模块 const path = require('path'); // 文件系统模块 const fs = require('fs'); // 服务器类 class Server { // 构造方法 constructor(options) { let me = this; ...
goog.provide('goog.dom.browserrange.OperaRange'); goog.require('goog.dom.browserrange.W3cRange'); goog.dom.browserrange.OperaRange = function(range) { goog.dom.browserrange.W3cRange.call(this, range); }; goog.inherits(goog.dom.browserrange.OperaRange, goog.dom.browserrange.W3cRange); goog.dom.browserrange.Oper...
from mongoengine import connect, disconnect from mongoengine.connection import _connections from multiprocessing import current_process from config import Config from db.models.results import Results import os import logging log = logging.getLogger(__name__) class Db: Results = None def __init__(self, createCl...
import * as actions from './actions'; export const initialState = { loading: true, error: false, data: {}, settings: {}, interactions: {}, category: 'summary', activeWidget: '', showMap: false, }; // reducers for all widgets parent wrapper component const setWidgetsData = (state, { payload }) => ({ ...
# encoding: utf-8 # # MSUStatusWindowController.py # MunkiStatus # # Copyright 2009-2017 Greg Neagle. # # 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 # # https://www.apache.org/licenses/...
/**************************************************************************//** * @file core_cm0plus.h * @brief CMSIS Cortex-M0+ Core Peripheral Access Layer Header File * @version V5.0.7 * @date 13. March 2019 ******************************************************************************/ /* * Copyri...
module.exports = (user, table, subject) => ({ from: 'Monitoria IP <monitoriaipccufpe@gmail.com>', to: `${user.username}@cin.ufpe.br`, subject, html: table, });
#include "types.h" #include "x86.h" #include "defs.h" #include "date.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" int sys_fork(void) { return fork(); } int sys_exit(void) { exit(); return 0; // not reached } int sys_wait(void) { return wait(); } int sys_kill(void) { int...
import { querylistBrands, saveTheBrand, deleteTheBrand, updateTheBrand, freezeTheBrand, unfreezeTheBrand, querylistRoyalty, saveTheRoyalty, deleteTheRoyalty, updateTheRoyalty, freezeTheRoyalty, } from '@/services/api'; const initData = { records: [] }; export default { namespace: 'basic', st...
""" Copyright 2020 The OneFlow 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...
from flask import Flask from flask import jsonify import os app = Flask(__name__) from model.generate import generate_from @app.route('/') def root(): return app.send_static_file('index.html') @app.route('/api/generate/<text>/<int:n_text>') def generate_text(text, n_text): text = generate_from(os.path.absp...
#!/usr/local/bin/python # -*- coding: utf-8 -*- # file: main.py import re import difflib import numpy as np import pandas as pd from os.path import isfile from IPython.display import HTML from .strongs3.abnum.remarkuple import helper as h from .strongs3 import hebrew as hbr from .strongs3.abnum import find_cumulative_...
/* * @Author: zhiyunl * @Date: 2019-11-16 22:21:59 * @LastEditors: zhiyunl * @LastEditTime: 2019-11-27 22:26:20 * @Description: */ #ifndef RISINGCITY_RBTREE_H #define RISINGCITY_RBTREE_H typedef struct mhNode *RBKEY; enum color_t { BLACK, RED }; enum lr_t { ROOT, LEFT, RIGHT }; struct rbNode { ...
# -*- coding: utf-8 -*- # Copyright (c) 2019, jHetzer and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe @frappe.whitelist() def import_fints_transactions(fints_import, fints_login, user_scope): """Create payment entries by FinTS transactions....