text stringlengths 3 1.05M |
|---|
// Copyright (c) 2017 Couchbase, 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 or agreed to in w... |
if input_int () < input_int() and input_int() > input_int():
print (42 + input_int ())
else:
print (0 if input_int() == 0 else 1)
|
"""
Utilities for file-based Contents/Checkpoints managers.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from contextlib import contextmanager
import errno
import io
import os
import shutil
from tornado.web import HTTPError
from notebook.utils import (
... |
#!/usr/bin/env python
import sys
import cvmfs
def usage():
print sys.argv[0] + " <local repo name | remote repo url>"
print "This script lists all catalog of the provided CVMFS repository."
if len(sys.argv) != 2:
usage();
sys.exit(1)
repo_identifier = sys.argv[1]
repo = cvmfs.open_repository(repo_i... |
'use strict';
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _routerWarning = require('./routerWarning');
var _routerWarning2 = _interopRequireDefault(_rou... |
from __future__ import print_function
import CoolProp.CoolProp as CP, json
jj = json.loads(CP.get_config_as_json_string())
with open('../coolprop/configuration_keys.rst.in', 'w') as fp:
for key in sorted(jj.keys()):
fp.write('``' + key + '``: ' + CP.config_key_description(key) + '\n\n')
|
import {adaptTextAreas} from './modules/textAreas';
import {adaptLabels} from './modules/labels';
import {setRequiredInputs, setValueForInput, changeTypeInput} from './modules/input';
import { addMask } from './modules/masks';
import { forMoneyBRMask, strMask, forDateBRMask } from './modules/functions';
import { inputV... |
from py.test import raises
class AppTest_IndexProtocol:
def setup_class(cls):
cls.w_o = cls.space.appexec([], """():
class oldstyle:
def __index__(self):
return self.ind
return oldstyle()""")
cls.w_n = cls.space.appexec([], """():
... |
(function (global) {
var babelHelpers = global.babelHelpers = {};
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
babelHelpers.interopRequireDefault = _interopRequireDefault;
function _getRequireWildcardCache() {
if (typeof WeakMap !== "func... |
#!/usr/bin/env python3
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
import logging
import pytest
from helpers import (
check_grafana_is_ready,
get_datasource_for,
get_grafana_datasources,
oci_image,
)
logger = logging.getLogger(__name__)
tester_resources = {
"grafana... |
import itertools
import math
import numbers
import re
import functools
from typing import List
from collections import OrderedDict
from opentrons.util.vector import Vector
SUPPORTED_MODULES = ['magdeck', 'tempdeck']
def unpack_location(location):
"""
Returns (:Placeable:, :Vector:) tuple
If :location:... |
const CustomError = require("../extensions/custom-error");
module.exports = function calculateHanoi(disksNumber, turnsSpeed) {
let speedInSeconds = turnsSpeed / 3600;
let turns = 2 ** disksNumber - 1;
let seconds = Math.floor(turns / speedInSeconds);
return {turns, seconds};
};
|
/**********************************************************************
* plperl.c - perl as a procedural language for PostgreSQL
*
* src/pl/plperl/plperl.c
*
**********************************************************************/
#include "postgres.h"
/* Defined by Perl */
#undef _
/* system stuff */
#include... |
/**
1828. Queries on Number of Points Inside a Circle
You are given an array points where points[i] = [xi, yi] is the coordinates of the ith point on a 2D plane. Multiple points can have the same coordinates.
You are also given an array queries where queries[j] = [xj, yj, rj] describes a circle centered at (xj, yj) w... |
"""Gaussian functions."""
import numpy as np
def area_of_gaussian(amp, fwhm):
"""Calculate the integrated area of the Gaussian function.
area_gauss = amp * fwhm / ((1. / np.sqrt(2*np.pi)) * 2*np.sqrt(2*np.log(2)))
combining all constants in the denominator yields a factor of 0.93943727869965132
Pa... |
//*******************************************************************************************//
// //
// Download Free Evaluation Version From: https://bytescout.com/download/web-installer //
// ... |
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
(window.webpackJsonp=window.webpackJsonp||[]).push([["locale-display-names.en-GD-d-ts"],{"./node_modules/@formatjs/intl-displaynames/locale-data/en-GD.d.ts":function(s,n,a){"use strict";a.r(n)}}]); |
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file acc... |
# Largest Coprime Divisor
# https://www.interviewbit.com/problems/largest-coprime-divisor/
#
# You are given two positive numbers A and B. You need to find the maximum valued integer X such that:
#
# X divides A i.e. A % X = 0
# X and B are co-prime i.e. gcd(X, B) = 1
#
# For example,
#
# A = 30
# B = 12
# We r... |
import styles from './template.css';
import template from './template';
import AoflElement from '@aofl/web-components/aofl-element';
/**
* @summary IconRoundTextFormatElement
* @class IconRoundTextFormatElement
* @extends {AoflElement}
*/
class IconRoundTextFormatElement extends AoflElement {
/**
* Creates an... |
from distutils.core import setup
setup(
name='teamwork-time',
version='0.0.1',
packages=[''],
url='https://github.com/gabeduke/teamwork-time',
license='mit',
author='gabeduke',
author_email='',
description='time entry package for teamwork project management software'
)
|
from fastapi import FastAPI
from neomodel import config, db
from ariadne.asgi import GraphQL
import os
from dotenv import load_dotenv
load_dotenv()
from routers import tree_graph, parent_child
from ariadne_resolvers import schema
app = FastAPI()
USERNAME = os.environ['USERNAME']
PASSWORD = os.environ['PASSWORD']
co... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* ... |
var express = require('express');
var router = express.Router();
var jwt = require('jsonwebtoken');
var config = require('../config/main');
var User = require('../app/models/user');
// Obtain a JWT token
router.post('/token', function (req, res) {
var email = req.body.email;
var password = req.body.password;
... |
from typing import Any, Dict, Optional, Sequence
from ..argument_utility import (
ActionScalerArg,
EncoderArg,
QFuncArg,
RewardScalerArg,
ScalerArg,
UseGPUArg,
check_encoder,
check_q_func,
check_use_gpu,
)
from ..constants import IMPL_NOT_INITIALIZED_ERROR, ActionSpace
from ..datase... |
from django.db.models import DecimalField, OuterRef, Subquery, Sum
from django.db.models.functions import Cast
from datahub.core.query_utils import (
get_choices_as_case_expression,
get_front_end_url_expression,
get_full_name_expression,
)
from datahub.metadata.query_utils import get_sector_name_subquery
f... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:/Users/user/Documents/Python-programming/quick-point/ui\full_disp.ui'
#
# Created by: PyQt5 UI code generator 5.12.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(obj... |
// Modules
import Koa from 'koa';
import serve from 'koa-static';
import proxy from 'koa-proxy';
import path from 'path';
// Utils
import { config } from'./config';
import { router } from './router';
import { Consts } from './utils';
const app = new Koa();
const callbackRun = () =>
console.log(Consts.SERVER.RUN(co... |
/*! /function/property/unify 1.0.2 | http://nucleus.qoopido.com | (c) 2015 Dirk Lueth */
!function(){"use strict";function r(r,t){function i(r,i){return t(i)}var n=/^-?(?:webkit|khtml|icab|moz|ms|o)([A-Z]|-[a-z])/,c=/-([a-z])/gi;return function(t){return r(r(t).replace(n,"$1").replace(c,i))}}provide(["../string/lcfirst... |
# -*- coding: utf-8 -*-
"""
Burst web client
"""
from future.utils import PY3, iteritems
import re
import os
import urllib3
import dns.resolver
import requests
from elementum.provider import log, get_setting
from time import sleep
from urllib3.util import connection
from .utils import encode_dict, translatePath
if ... |
# 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 ... |
#!/usr/bin/env python
#
# This file is part of Corrade.
#
# Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017, 2018, 2019 Vladimír Vondruš <mosra@centrum.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associ... |
import React, { Component } from "react";
import { connect } from "react-redux";
import PropTypes from "prop-types";
import Spinner from "../common/Spinner";
import ProfileItem from "./ProfileItem";
import { getProfiles } from "../../actions/profileActions";
class Profiles extends Component {
componentDidMou... |
# Copyright 2019 Google LLC
#
# 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, ... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, September 27, 2020 at 11:44:45 AM Mountain Standard Time
* Operating System: Version 14.0 (Build 18A373)
* Image Source: /System/Library/PrivateFrameworks/HealthDaemon.framework/HealthDaemon
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 ... |
import React from "react"; // eslint-disable-line no-unused-vars
import { connect } from "react-redux";
import { browserHistory } from "react-router";
import _ from "lodash";
import { Dialog, DatePicker, TextField, RaisedButton, MenuItem, SelectField, Paper, AppBar, IconButton } from "material-ui";
import NavigationClo... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Input } from 'antd'
import style from './style.less'
import { post } from 'Util/request'
import cs from 'classnames'
import Highlight from 'react-highlighter'
let timer = null
const loop = function () { }
class HotPersonCascader extend... |
var MicroServer = require("microserver");
var svg_to_png = require("svg-to-png");
var fs = require("fs");
var os = require("os");
var path = require("path");
var config = require("configise");
var logger = config.logger || require("winston");
var Promise = require("bluebird");
var _ = require("underscore");
Promise.pr... |
class FlowDocumentReader(Control,IResource,IAnimatable,IInputElement,IFrameworkInputElement,ISupportInitialize,IHaveResources,IQueryAmbient,IAddChild,IJournalState):
"""
Provides a control for viewing flow content,with built-in support for multiple viewing modes.
FlowDocumentReader()
"""
def AddLogical... |
#!/usr/bin/python
import argparse
import math
class Euler008(object):
"""
Euler008 - This script is to solve the following Euler Problem:
The four adjacent digits in the 1000-digit number that have the greatest
product are 9 x 9 x 8 x 9 = 5832.
73167176531330624919225119674426574742355349194934... |
require('./bootstrap');
// require('./general');
|
from debayer.debayer import Debayer2x2, Debayer3x3, DebayerSplit
# Needs to be last line
__version__ = '1.0.0' |
import random
x = int(input("Dime un numero:"))
x = random.randrange(100)
#CONDICIONAL IF,ELIF,ELSE
if x>0:
print(f"{x} es positivo")
elif x<0:
print(f"{x} es negativo")
else:
print(x, " es cero")
print(type(x))
for i in range(5):
xRandom = random.randrange(101)
if xRandom > 50:
print(xRa... |
import {builtin} from './common.js'
export const split = by => xs =>
builtin(String.prototype.split)(xs, by)
export const replace = re => f => x =>
builtin(String.prototype.replace)(x, re, f)
export const match = re => str =>
builtin(String.prototype.match)(str, re)
export const substr = start => end => xs =... |
import numpy as np
import xml.etree.cElementTree as ET
import xml.dom.minidom as minidom
import imp
import glob
import os
import random
import numpy as np
import stl
from stl import mesh
def find_mins_maxs(obj):
minx = maxx = miny = maxy = minz = maxz = None
for p in obj.points:
# p contains (x, y,... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2016-2018 The PIVX developers
// Copyright (c) 2019 MochaChain LLC
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#i... |
__NUXT_JSONP__("/52/41", (function(a,b,c,d,e,f,g,h,i,j){return {data:[{metaTitle:b,metaDesc:c,verseId:41,surahId:52,currentSurah:{number:"52",name:"الطور",name_latin:"At-Tur",number_of_ayah:"49",text:{"1":"وَالطُّوْرِۙ ","2":"وَكِتٰبٍ مَّسْطُوْرٍۙ ","3":"فِيْ رَقٍّ مَّنْشُوْرٍۙ ","4":"وَّالْبَيْتِ الْمَعْمُوْرِۙ ",... |
#!/usr/bin/env python3
__author__ = "Aditya Krishnakumar"
def bucket_sort(A):
buckets = [[] for x in range(10)]
for i, x in enumerate(A):
buckets[int(x * len(buckets))].append(x)
out = []
for buck in buckets:
out += isort(buck)
return out
def isort(A):
if len... |
MobData = {
258: [ {"id":"0","inid":0,"type":2,"name":"レッドアイ所員","repop":20,"id_area":2,"lv_min":0,"lv_max":0,"is_npc":false,"real_posx":30.13,"real_posy":62.53,"posx":50.21,"posy":52.11},
{"id":"1","inid":0,"type":2,"name":"レッドアイ所員","repop":20,"id_area":2,"lv_min":0,"lv_max":0,"is_npc":false,"real_posx":30.34,"real_p... |
from django.urls import path
from django.conf.urls import url
from . import views
urlpatterns = [
path('', views.index, name='port-index'),
path('ajax-call/summary/', views.portdetail_summary, name='port_detail_summary'),
path('ajax-call/builds/', views.portdetail_build_information, name='port_detail_buil... |
export { default as Facebook } from './Facebook' |
"""Module containing the InitializeParams parser
This parser handles the following tasks for the InitializeParams:
- storage / accessibility outside the initialize request
- configuring option defaults
- organizing initialization values in one place
"""
from typing import List, Optional
from pygls.types import Init... |
#!/usr/bin/env python3
import os
import io
import re
import numpy
from setuptools import setup, find_packages, Extension
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8"),
) as fp:
return fp.read()
# Ge... |
import numpy as np
def pbc2pbc(pbc):
newpbc = np.empty(3, bool)
newpbc[:] = pbc
return newpbc
|
/**
* Copyright (c) 2015 Guyon Roche
* LICENCE: MIT - please refer to LICENCE file included with this module
* or https://github.com/guyonroche/exceljs/blob/master/LICENSE
*/
'use strict';
var utils = require('../../../utils/utils');
var BaseXform = require('../base-xform');
var ColorXform = require('../style/col... |
import { CButton, CCard, CCardBody, CCol, CDataTable, CRow } from "@coreui/react";
import React, { useEffect, useState } from "react";
// Custom Imports
import DashboardLayout from "../../layouts/DashboardLayout";
import axios from "../../services/axios";
function BookingNew() {
// Stateful Hooks
const [memberTyp... |
/**
* Copyright (C) Mellanox Technologies Ltd. 2021. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#ifndef UCC_TL_CUDA_EP_HASH_H_
#define UCC_TL_CUDA_EP_HASH_H_
#include "config.h"
#include "core/ucc_context.h"
#include "utils/khash.h"
#include <stdint.h>
/* TODO: common code with TL/UCP */
static inl... |
import os, sys
import unittest
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
basedir = os.path.abspath(os.path.dirname(__file__))
from app import app
from db import db
import json
from datetime import datetime, timedelta
from helper import Helper
TEST_DB = 'test.db'
class CheckoutTe... |
var hljs = require('@mathssyfy/markdown-it-loader/lib/highlight')
/**
* renderHighlight
* @param {string} str
* @param {string} lang
*/
var renderHighlight = function (str, lang) {
try {
return hljs(str, lang)
} catch (err) { }
}
exports.renderHighlight = renderHighlight
|
// 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.
/*
"pageSets" is a list of lists.
- Before each sublist:
Run chrome.browingData.remove and close the connections.
- Before eac... |
(function ($) {
$(document).ready(function () {
$('.async-ascii-art').each(function () {
var $art = $(this);
$.get('/artiiproxy', { text: $art.text() })
.done(function (response) {
$art.html(response.text);
});
});
console.log('gurray');
});
})(jQuery);
|
class Solution(object):
def firstUniqChar(self, s):
"""
:type s: str
:rtype: int
"""
sl = len(s)
min = None
for c in string.ascii_lowercase:
if s.count(c) == 1 and (s.find(c)<min or min is None):
min =... |
# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const domain_1 = require("@/domain");
class LogAnomalyReport extends domain_1.AbstractAnomalyReport {
constructor(id, creationTime, localHash, absoluteDiff, relativeDiff, previousAnomalyReportId, relatedAssetId) {
super(id, domain_... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import torch
import torch.nn as nn
from mmseg.models import build_segmentor
class MoCo(nn.Module):
"""
Build a MoCo model with: a query encoder, a key encoder, and a queue
https://arxiv.org/abs/1911.05722
"""
def __init__(self, ... |
# Copyright 2018 Intel, 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 or agreed to in writing,... |
/**
* Copyright 2009-2014 MongoDB, 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 or ... |
example = 'example string'
print(len(example)) |
const fs = require('fs-extra');
const path = require('path');
const rollup = require('rollup');
const transpile = require('./transpile');
const TRANSPILED_DIR = path.join(__dirname, '../dist/transpiled-cli');
const ENTRY_FILE = path.join(TRANSPILED_DIR, 'cli/index.js');
const DEST_FILE = path.join(__dirname, '../dist/... |
#
# Metrix++, Copyright 2009-2019, Metrix++ Project
# Link: https://github.com/metrixplusplus/metrixplusplus
#
# This file is a part of Metrix++ Tool.
#
SEVERITY_INFO = 0x01
SEVERITY_WARNING = 0x02
SEVERITY_ERROR = 0x03
DETAILS_OFFSET = 15
def notify(path, cursor, level, message, d... |
const fs = require('fs')
const execSync = require('child_process').execSync
const prettyBytes = require('pretty-bytes')
const gzipSize = require('gzip-size')
const exec = (command, extraEnv) =>
execSync(command, {
stdio : 'inherit',
env : Object.assign({}, process.env, extraEnv)
})
consol... |
# Copyright 2020 PerfKitBenchmarker 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 appli... |
# -*- coding: utf-8 -*-
#
# pip documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 22 22:08:49 2008
#
# This file is execfile()d with the current directory set to its containing dir
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All confi... |
/**
* This test checks that the operations that should modify the timestamp of a database or a
* collection actually do it.
*
* For databases, every time a DB is dropped and recreated its timestamp should also be updated
*
* For collections, this test verifies that the timestamp is properly updated when sharding ... |
from guillotina.exceptions import DeserializationError
from guillotina.exceptions import ValueDeserializationError
from guillotina.response import Response
from unittest import mock
import asyncio
import pytest
@pytest.mark.asyncio
async def test_non_existing_container(container_requester):
async with container_... |
import re
import json
from interfaces.SentenceOperation import SentenceOperation
from tasks.TaskTypes import TaskType
class GenderBiasFilter(SentenceOperation):
tasks = [TaskType.TEXT_TO_TEXT_GENERATION]
languages = ["en", "fr", "pl", "ru"]
def __init__(self, language, feminine_input=[], masculine_input=... |
"""Test the dtoolsid package."""
def test_version_is_string():
import dtoolsid
assert isinstance(dtoolsid.__version__, str)
|
import React from "react"
import "./Menu.css"
const MenuTop = () => (
<nav className="navbar">
<div className="navbar--logo-holder">
<h1> OPEN UX</h1>
</div>
<ul className="navbar--link">
<li className="navbar--link-item">Perfil</li>
<li className="navbar--link-item">Sobre</li>
... |
const helperFunction = require('../helpers/helperFunction');
// constructor
const Comment = function (answer) {
this.body = answer.body;
this.user_id = answer.user_id;
this.post_id = answer.post_id;
};
Comment.create = (newComment, result) => {
const query = `INSERT INTO comments(body,user_id,post_id) VALUES(... |
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "v1_pod_template_spec.h"
v1_pod_template_spec_t *v1_pod_template_spec_create(
v1_object_meta_t *metadata,
v1_pod_spec_t *spec
) {
v1_pod_template_spec_t *v1_pod_template_spec_local_var = malloc(sizeof(v1_pod_template_spec_t));
if (!... |
# -*- coding: utf-8 -*-
"""Styling documentation
"""
import datetime
from typing import List
import IPython
from IPython.core.magic import Magics, line_magic, magics_class
class JocumentError(TypeError):
''' An error from the jocument styling system '''
class CenterOutput():
''' Center HTM... |
/**
* Query Manager
* Copyright (c) Webmatch GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This pr... |
/*
*
* RatingBox actions
*
*/
import { DEFAULT_ACTION, LOAD_REVIEW } from './constants';
export function loadRating(review) {
return {
type: LOAD_REVIEW,
review
}
}
export function defaultAction() {
return {
type: DEFAULT_ACTION,
};
}
|
force_multiplier = 3
mallet_maximum_speed = 6
puck_maximum_speed = 15
puck_mass = 0.1
mallet_mass = 0.5
puck_friction = 0.9995
mallet_friction = 0.95
mallet_mallet_restitution = 0.1
puck_mallet_restitution = 0.9
mallet_wall_restitution = 0.3
puck_wall_restitution = 0.95
max_distance = 600 |
# -*- coding: utf-8 -*-
# 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... |
from recipe_scrapers.twopeasandtheirpod import TwoPeasAndTheirPod
from tests import ScraperTest
class TestTwoPeasAndTheirPodScraper(ScraperTest):
scraper_class = TwoPeasAndTheirPod
def test_host(self):
self.assertEqual("twopeasandtheirpod.com", self.harvester_class.host())
def test_canonical_ur... |
(function(){var e=window.AmCharts;e.AmMap=e.Class({inherits:e.AmChart,construct:function(a){this.cname="AmMap";this.type="map";this.theme=a;this.svgNotSupported="This browser doesn't support SVG. Use Chrome, Firefox, Internet Explorer 9 or later.";this.createEvents("rollOverMapObject","rollOutMapObject","clickMapObject... |
import numpy as np
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras.utils import to_categorical
from keras.layers import Embedding, Input,InputLayer,BatchNormalization, Dense, Bidirectional,LSTM,Dropout,GRU, Conv1D, MaxPool1D, Activation
from keras.models ... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.transforms as transforms
import os
from .build import SSHEAD_REGISTRY
from .ss_layers import Bottleneck, conv1x1, conv3x3
from ..utils.image_list import ImageList, crop_tensor
class JigsawHead(nn.Module):
de... |
//
// GVSettingsTableViewController.h
// gvideoapp
//
// Created by Gaurav Khanna on 4/28/14.
// Copyright (c) 2014 Gapps. All rights reserved.
//
#import <UIKit/UIKit.h>
extern NSString *const GVSettingsTableViewControllerDismissNotification;
@interface GVSettingsTableViewController : UITableViewController
//@... |
/* Import Modules */
const Discord = require('discord.js')
const api = require("imageapi.js");
module.exports = {
name: "dog",
category: "fun",
description: "Command to send randon pictures of dogs",
aliases: [" "],
usage: "dog",
run: async(client, message, args) => {
const toSearch = ... |
from yiot_trust_provisioner import __version__, __author__
from setuptools import setup, find_packages
setup(
name="yiot_trust_provisioner",
version=__version__,
packages=find_packages(exclude=('tests',)),
install_requires=[
'virgil-sdk==5.2.1',
'virgil-crypto>=3,<4',
'prettytab... |
import time
from typing import Callable, Optional
from blspy import AugSchemeMPL, G2Element
import chia.server.ws_connection as ws
from chia.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters
from chia.farmer.farmer import Farmer
from chia.protocols import farmer_protocol, harve... |
#if (defined(__USE_PUBLIC_HEADERS__) && __USE_PUBLIC_HEADERS__) || (defined(USE_AUDIOTOOLBOX_PUBLIC_HEADERS) && USE_AUDIOTOOLBOX_PUBLIC_HEADERS) || !__has_include(<AudioToolboxCore/CAFFile.h>)
/*!
@file CAFFile.h
@framework AudioToolbox.framework
@copyright (c) 2004-2015 by Apple, Inc., all rights reserved.
@abstr... |
"""
This module converts requested URLs to callback view functions.
URLResolver is the main class here. Its resolve() method takes a URL (as
a string) and returns a ResolverMatch object which provides access to all
attributes of the resolved URL match.
"""
import functools
import inspect
import re
import string
from i... |
/* $NetBSD: txsim.c,v 1.7 2002/01/29 18:53:21 uch Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by UCHIYAMA Yasushi.
*
* Redistribution and use in source and binary forms, with or without
... |
/*
* Copyright (c) 2018 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* 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... |
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... |
import os ,re
class Config():
SECRET_KEY = 'hfjdisoolfjd=-20394opz;'
QUOTE_API = 'http://quotes.stormconsultancy.co.uk/random.json'
UPLOADED_PHOTOS_DEST ='app/static/images'
@staticmethod
def init_app(app):
pass
class ProdConfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get("DATAB... |