gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from astropy import units as u from astropy.coordinates import SkyCoord, frame_transform_graph from astropy.wcs.utils import (celestial_frame_to_wcs, pixel_to_skycoord, proj_plane_pixel_scales, skycoord_to...
# # 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...
################################################################################ # Copyright 2016-2020 Advanced Micro Devices, Inc. All rights reserved. # # 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 t...
import json import time from uuid import uuid4 import mock import pytest from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APITestCase from kolibri.core.auth.models import Facility from kolibri.core.auth.models import Facili...
import json import base64 import uuid import urllib import hashlib from datetime import datetime, timedelta from django.test import TestCase from django.core.urlresolvers import reverse from django.utils.timezone import utc from django.conf import settings from ..models import Statement, Agent, Verb, Activity, SubSta...
# coding: utf-8 # # Copyright 2014 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 requi...
from sympy.core.basic import S, C, Basic, sympify from sympy.simplify import simplify, trigsimp from sympy.functions.elementary.miscellaneous import sqrt from sympy.geometry.exceptions import GeometryError from entity import GeometryEntity from point import Point from line import LinearEntity, Line class Ellipse(Geome...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta from numpy import nan import numpy as np import numpy.ma as ma import pandas as pd from pandas.core.dtypes.common import ( is_categorical_dtype, is_datetime64tz_dtype) from pandas import (Index, Series, i...
from TProtocol import * from struct import pack, unpack __all__ = ['TCompactProtocol', 'TCompactProtocolFactory'] CLEAR = 0 FIELD_WRITE = 1 VALUE_WRITE = 2 CONTAINER_WRITE = 3 BOOL_WRITE = 4 FIELD_READ = 5 CONTAINER_READ = 6 VALUE_READ = 7 BOOL_READ = 8 def make_helper(v_from, container): def helper(func): def...
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import os import unittest from iptest import IronPythonTestCase, run_test, skipUnlessIronPython hitCount = 0 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Name: tutorial_zonal_statistics.py # Purpose: # # Author: Maik Heistermann, Kai Muehlbauer # # Created: 26.08.2015 # Copyright: (c) heistermann, muehlbauer 2015 # Licence: ...
# 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...
"""Support for monitoring Repetier Server Sensors.""" from datetime import datetime import logging import time from homeassistant.components.sensor import SensorEntity from homeassistant.const import DEVICE_CLASS_TIMESTAMP from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispa...
import numpy as np import matplotlib import matplotlib.pylab as plt import healpy as hp import string import yt import os import glob from PIL import Image as PIL_Image from images2gif import writeGif from scipy.special import sph_harm,sph_jn import beatbox from beatbox.multiverse import Multiverse # ===============...
# -*- coding: utf-8 -*- import tensorflow as tf from niftynet.application.base_application import BaseApplication from niftynet.engine.application_factory import \ ApplicationNetFactory, InitializerFactory, OptimiserFactory from niftynet.engine.application_variables import \ CONSOLE, NETWORK_OUTPUT, TF_SUMMARI...
# Copyright 2012-2017 The Meson development team # 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 agree...
# Copyright (c) 2009-2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
#!/usr/bin/env python """ @package mi.core.instrument.data_particle_generator Base data particle generator @file mi/core/instrument/data_particle_generator.py @author Steve Foley @brief Contains logic to generate data particles to be exchanged between the driver and agent. This involves a JSON interchange format """ i...
# # Copyright 2015 Naver Corp. # # 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 writ...
from __future__ import absolute_import, unicode_literals from django.core.exceptions import ValidationError from django.forms import Form from django.forms.fields import IntegerField, BooleanField from django.forms.util import ErrorList from django.forms.widgets import Media, HiddenInput from django.utils.encoding imp...
"""Class to hold all cover accessories.""" import logging from pyhap.const import ( CATEGORY_GARAGE_DOOR_OPENER, CATEGORY_WINDOW, CATEGORY_WINDOW_COVERING, ) from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_CURRENT_TILT_POSITION, ATTR_POSITION, ATTR_TILT_POSITION, ...
import json import time import sys import copy from multiprocessing import Pool, cpu_count import sqlite3 from collections import OrderedDict from unidecode import unidecode print "Working with " + str(cpu_count()) + " processors" def chunks(l, n): """Yield successive n-sized chunks from l.""" for i in xran...
from sympy.core.evalf import PrecisionExhausted, complex_accuracy from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \ fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \ factorial, binomial, Sum, zeta, Catalan, Pow, GoldenRatio, sympify, \ sstr, Function, Mul, Pow, Deriva...
# -*- coding: utf-8 -*- """ pygments.lexers._lua_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names and modules of lua functions It is able to re-generate itself, but for adding new functions you probably have to add some callbacks (see function module_callbacks). Do not edit ...
# Copyright 2019 F5 Networks 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 writ...
# Copyright 2012 OpenStack LLC. # 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 b...
""" kombu.transport.SQS =================== Amazon SQS transport module for Kombu. This package implements an AMQP-like interface on top of Amazons SQS service, with the goal of being optimized for high performance and reliability. The default settings for this module are focused now on high performance in task queue...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: anote.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) ...
"""This component provides select entities for UniFi Protect.""" from __future__ import annotations from dataclasses import dataclass from datetime import timedelta from enum import Enum import logging from typing import Any, Final from pyunifiprotect.data import ( Camera, DoorbellMessageType, IRLEDMode, ...
""" this module provides functions for generating some basic figures. The code can be used as is, or serve as an example for writing your own code. """ import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import ConnectionPatch # from . import plotting_util from .plotting_util import (prepare_...
import os.path import json import copy import itertools import requests.exceptions from . import transport from . import errors from . import utils from . import schemata service_error = utils.registry(errors.ServiceError, 'ERRORS') @service_error(-1) class InternalError(errors.ServiceError): """An internal servi...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import hypothesis.strategies as st from hypothesis import given, assume, settings import numpy as np import time import os from caffe2.python import core,...
# -*- coding: utf-8 -*- # Copyright 2021 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 agr...
# This is a test to see if I can push code from sherlock to github 170926 # -*- coding: utf-8 -*- def most_stable_phase(phase_regions,pH=None, scale='RHE', pt_oxid_V=0.6470339): """ Returns a list containing how close the closest phase is to the ORR equilbrium line and the Pourbaix entry object(s) corrsponding to t...
""" Support for Wink locks. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/lock.wink/ """ import asyncio import logging import voluptuous as vol from homeassistant.components.lock import LockDevice from homeassistant.components.wink import DOMAIN, Wink...
# -*- coding: utf-8 -*- import requests from six import string_types import telebot from telebot import types logger = telebot.logger def _make_request(token, method_name, method='get', params=None, files=None): """ Makes a request to the Telegram API. :param token: The bot's API token. (Created with @B...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # ...
# # 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...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2009, Jean-Michel Sizun # Copyright 2009 Frank Scholz <[email protected]> import os.path from twisted.internet import reactor, threads from twisted.web import server, static from twisted.web.error import PageRedirect ...
import copy import logging import math import re from kubernetes import client from kubernetes.client.rest import ApiException from ray.autoscaler._private._kubernetes import auth_api, core_api, log_prefix import ray.ray_constants as ray_constants logger = logging.getLogger(__name__) MEMORY_SIZE_UNITS = { "K": ...
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access import asyncio import unittest from unittest.mock import patch, MagicMock, sentinel from datetime import datetime, timedelta import pytz import pytest import homeassistant.core as ha from homeassistant.exceptions import InvalidEnt...
# Copyright 2011 OpenStack Foundation # 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 requ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # 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 # "...
from __future__ import annotations import numbers from typing import ( TYPE_CHECKING, overload, ) import warnings import numpy as np from pandas._libs import ( lib, missing as libmissing, ) from pandas._typing import ( ArrayLike, AstypeArg, Dtype, DtypeObj, npt, type_t, ) from...
from __future__ import print_function import filecmp import glob import hashlib from optparse import OptionParser import os import shutil import sys import numpy as np sys.path.insert(0, os.path.join(os.pardir, os.pardir)) from input_set import InputSet, MGInputSet import openmc class TestHarness(object): """G...
#!/usr/bin/env python """This plugin adds artifact functionality to the UI.""" import itertools import StringIO from grr.gui import renderers from grr.gui.plugins import fileview from grr.gui.plugins import forms from grr.gui.plugins import semantic from grr.lib import aff4 from grr.lib import artifact from grr.lib i...
import numpy as np import os #embedding the position def pos_embed(x): if x < -60: return 0 if x >= -60 and x <= 60: return x+61 if x > 60: return 122 #find the index of x in y, if x not in y, return -1 def find_index(x,y): flag = -1 for i in range(len(y)): if x != y[i]: continue else: return i ...
from __future__ import unicode_literals import datetime import unittest import warnings from decimal import Decimal from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured from django.db import models from django.test import TestCase from django.test.utils import override_settings fro...
from __future__ import division import pickle import os import sys import numpy as np from numpy.linalg import norm import pandas as pd import pdb def sliceup(): data = load_pkl(os.path.join('..', "data", 'logisticData.pkl')) X, y = data['X'], data['y'] Xvalid, yvalid = data['Xvalidate'], data['y...
# # 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...
# author : Kanika Sood # Date : Feb 13 # default timings available for 256 matrices (default solver: gmres + ilu , solver id: 32168839) #input file: '/Users/kanikas/Desktop/petsc_anamod_35.csv' (File has all features + solver + class) #output file: '/Users/kanikas/Desktop/solver_pc.csv' (File has all features + solve...
import argparse import json import os import sys from . import TimeoutError, run_script def main(): parser = argparse.ArgumentParser(description='Run tests.') parser.add_argument('action', nargs='+', choices=['build', 'test']) parser.add_argument('--workspace', required=True, help='Workspace to build and ...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import re import sys from ifmap_global import CamelCase, getGoLangType class GoLangApiGenerator(object): def __init__(self, parser, type_map, identifiers, metadata): self._parser = parser self._type_map = type_map ...
from breathe.renderer.rst.doxygen.base import Renderer class DoxygenTypeSubRenderer(Renderer): def render(self): compound_renderer = self.renderer_factory.create_renderer(self.data_object.compounddef) return compound_renderer.render() class CompoundDefTypeSubRenderer(Renderer): section_ti...
import copy import numpy as np import pandas as pd import matplotlib.pyplot as plt from .loading import * def logsumexp(values): biggest = np.max(values) x = values - biggest result = np.log(np.sum(np.exp(x))) + biggest return result def logdiffexp(x1, x2): biggest = x1 xx1 = x1 - biggest xx2 = x2 - biggest r...
# 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 # d...
import os import errno import fnmatch import stat try: from . import msg, utils from .exc_fmt import str_e assert msg and str_e and utils except ImportError: import msg from exc_fmt import str_e IGNORE_FILES = ['.gitignore', '.hgignore', '.flooignore'] HIDDEN_WHITELIST = ['.floo'] + IGNORE_FILES B...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# Copyright 2010 OpenStack Foundation # Copyright 2014 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...
""" Functions --------- .. autosummary:: :toctree: generated/ fmin_l_bfgs_b """ ## License for the Python wrapper ## ============================== ## Copyright (c) 2004 David M. Cooke <[email protected]> ## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this so...
# 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 the...
import math import random import pyglet from pyglet import gl WIDTH = 800 HEIGHT = 600 ROTATION_SPEED = 200 ACCELERATION = 300 SPACESHIP_RADIUS = 40 START_LIVES = 3 SHOOT_DELAY = 0.3 LASER_SPEED = 500 LASER_RADIUS = 5 COLLISION_SPEED_FACTOR = 0.2 ASTEROID_SPEED = 100 ASTEROID_ROTATION_SPEED = 3 ASTEROID_RADIUSES = { ...
import os from .routing_actions import * from .routing_modifiers import * from .routing_routers import * from .routing_subjects import * from .routing_vars import * from ..base import OptionsGroup from ..exceptions import ConfigurationError from ..utils import listify class RouteRule: """Represents a routing rul...
# Copyright 2012 OpenStack Foundation # # 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...
""" General tests for all estimators in sklearn. """ # Authors: Andreas Mueller <[email protected]> # Gael Varoquaux [email protected] # License: BSD 3 clause from __future__ import print_function import os import warnings import sys import pkgutil from sklearn.externals.six import PY3 fr...
# Copyright 2011 OpenStack Foundation # 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 requ...
#!/usr/bin/env python """ python %prog [options] <in_schema.xsd> <out_schema.xsd> Synopsis: Prepare schema document. Replace include and import elements. Examples: python %prog myschema.xsd python %prog myschema.xsd newschema.xsd python %prog -f myschema.xsd newschema.xsd cat infile.xsd | pyth...
# -*- coding: utf-8 -*- # Copyright 2022 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...
from datetime import datetime, time, timedelta from pandas.compat import range import sys import os import nose import numpy as np from pandas import Index, DatetimeIndex, Timestamp, Series, date_range, period_range import pandas.tseries.frequencies as frequencies from pandas.tseries.tools import to_datetime impor...
#!/usr/bin/env python """sunfinder.py: Queries the SolarCoin wallet, pulls solar production data and loads to database""" __author__ = "Steven Campbell AKA Scalextrix" __copyright__ = "Copyright 2017, Steven Campbell" __license__ = "The Unlicense" __version__ = "3.3" from datetime import datetime import getpass impo...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008, Benjamin Kampmann <[email protected]> """ This is a Media Backend that allows you to access the cool and cute pictures from lolcats.com. This is mainly meant as a Sample Media Backend...
# # Copyright (c) 2011, Novartis Institutes for BioMedical Research Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyri...
#! /usr/bin/env python3 """Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere import re import struc...
# gevent monkey patching should be done as soon as possible dont move! import gevent import gevent.monkey gevent.monkey.patch_all() from JumpScale import j j.application.start("jsagent") import time import sys import atexit import psutil import os import select import subprocess from JumpScale.baselib import cmdutils...
# coding=utf-8 """audio_read reads in a whole audio file with resampling.""" # Equivalent to: # import librosa # def audio_read(filename, sr=11025, channels=1): # """Read a soundfile, return (d, sr).""" # d, sr = librosa.load(filename, sr=sr, mono=(channels == 1)) # return d, sr # The code below is adapted f...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# 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 the Li...
""" Load npy xy, plot and save """ import os, sys import matplotlib matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! import matplotlib.pyplot as plt import matplotlib.cm as mpl_cm from matplotlib import rc from matplotlib.font_manager import FontProperties from matplotlib import rcPa...
#!/usr/bin/env python # -*- coding: utf-8; mode: python; -*- """Module providing class for sense disambiguation of connectives. Attributes: DiscourseSenser (class): class for sense disambiguation of connectives """ ################################################################## # Imports from __future__ import...
""" Sparse matrix functions """ # # Authors: Travis Oliphant, March 2002 # Anthony Scopatz, August 2012 (Sparse Updates) # Jake Vanderplas, August 2012 (Sparse Updates) # __all__ = ['expm', 'inv'] import numpy as np import scipy.special from scipy._lib._util import float_factorial from scipy.linal...
import numpy as np from random import randint, choice as random_choice class Board(object): """ Represents the board of 2048 game. Internally it is a Numpy 2D array (matrix). """ POSSIBLE_MOVES = ["up", "down", "left", "right"] def __init__(self, width, height, max_random_value=4): """ ...
"""The tests for the Template Binary sensor platform.""" from datetime import timedelta import logging from unittest.mock import patch from homeassistant import setup from homeassistant.components import binary_sensor from homeassistant.const import ( ATTR_DEVICE_CLASS, EVENT_HOMEASSISTANT_START, STATE_OFF...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2014 IBM Corp. # 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/license...
#!/usr/bin/env python import xml.etree.ElementTree as ElementTree import os import re import sys # This parses buck-out/gen/jacoco/code-coverage/coverage.xml after # `buck test --all --code-coverage --code-coverage-format xml --no-results-cache` # has been run. PATH_TO_CODE_COVERAGE_XML = 'buck-out/gen/jacoco/code-co...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This script aims to demonstrate the benefit (with respect to precision) of the ILU implementation compared to e.g. ignoring sub and super diagonals completely. Note that the python wrapper is quite inefficient and hence not suitable for benchmarking. """ from __futur...
# Copyright 2015 Google 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 applicable law or a...
""" :copyright: (c) 2014 Building Energy Inc :license: see LICENSE for more details. """ import json from django.core.urlresolvers import reverse_lazy, reverse from django.test import TestCase from django.contrib.auth import get_user_model from django.contrib.auth.tokens import default_token_generator from django.util...
# Utility functions for performing image inference # # Copyright 1993-2019 NVIDIA Corporation. All rights reserved. # # NOTICE TO LICENSEE: # # This source code and/or documentation ("Licensed Deliverables") are # subject to NVIDIA intellectual property rights under U.S. and # international Copyright laws. # # These L...
# -*- coding: utf-8 -*- import datetime, time from boto.exception import BotoServerError from django.core.exceptions import PermissionDenied from django.http import Http404 from apps.canvas_auth.models import User, AnonymousUser from canvas.browse import (get_browse_tiles, get_user_stickered, TileDetails, LastReplyTi...
import random import datetime from decimal import Decimal from dateutil.relativedelta import relativedelta import pycountry import trytond.tests.test_tryton from trytond.tests.test_tryton import POOL, USER, CONTEXT from nereid.testing import NereidTestCase from trytond.transaction import Transaction from trytond.confi...
############################################################ # Copyright 2010 Sandia Corporation. # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Government retains certain rights in this software. ############################################################ # Contact: Philippe Pebay...
from operator import attrgetter from sqlalchemy import Column, Date, ForeignKey, Integer, Table, Unicode from sqlalchemy.ext.associationproxy import association_proxy from sqlalchemy.orm import backref, reconstructor, relationship from sqlalchemy.orm.collections import MappedCollection from sqlalchemy.util import Orde...
from panda3d.core import * from panda3d.direct import * from direct.gui.DirectGui import * from direct.showbase import DirectObject from otp.avatar import AvatarPanel from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog from otp.distributed import CentralLogger IGNORE_SCALE = 0.06 STOP_IG...
######################################################################## # Copyright (c) 2001-2006 Ciranova, Inc. All Rights Reserved. # # # # Permission is hereby granted, free of charge, to any person # # obtaining a copy of this s...
# -*- coding: utf-8 -*- import os, inspect from compiler.error import AssemblerError, ParseError, ExtensionError from compiler.executor import Executor from compiler.tokenizer import Tokenizer, Token from compiler.token import TokenType, SYMBOLS, KEYWORDS from compiler.assembler import Assembler from compiler.expressio...
# Copyright 2012-2013 OpenStack, 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 ...
"""The test for the bayesian sensor platform.""" import unittest from homeassistant.setup import setup_component from homeassistant.components.bayesian import binary_sensor as bayesian from tests.common import get_test_home_assistant class TestBayesianBinarySensor(unittest.TestCase): """Test the threshold senso...