gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2014 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 agr...
# Copyright 2015 IBM 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 agree...
from unittest.mock import MagicMock from unittest.mock import ANY import json import sys from botocore import exceptions import pytest from garcon import activity from garcon import event from garcon import runner from garcon import task from garcon import utils from tests.fixtures import decider def activity_run( ...
import http import tempfile from waterbutler.core import streams from waterbutler.core import provider from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.core.utils import AsyncIterator from waterbutler.providers.dataverse import settings from waterbutler.provid...
import itertools from ordereddict import OrderedDict from django.conf import settings from tower import ugettext_lazy as _lazy # WARNING: When adding a new app feature here also include a migration. # # WARNING: Order matters here. Don't re-order these or alphabetize them. If you # add new ones put them on the end....
"""Tools for creating and running the model.""" from __future__ import print_function, division import os import numpy as np from scipy import integrate from scipy import stats from sklearn.ensemble import RandomForestClassifier from sklearn.externals import joblib from sklearn.linear_model import LogisticRegression...
# Copyright (c) 2018 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 License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
import os import sys import unittest import ast import weakref from test import support def to_tuple(t): if t is None or isinstance(t, (str, int, complex)): return t elif isinstance(t, list): return [to_tuple(e) for e in t] result = [t.__class__.__name__] if hasattr(t, 'lineno') and ha...
#!/usr/bin/python # Copyright (c) 2015 Matthew Earl # # 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 # to use, copy, modify, me...
"""Stochastic optimization methods for MLP """ # Authors: Jiyuan Qian <[email protected]> # License: BSD 3 clause import numpy as np class BaseOptimizer(object): """Base (Stochastic) gradient descent optimizer Parameters ---------- params : list, length = len(coefs_) + len(intercepts_) The con...
import shutil import tempfile from numpy import array, allclose, transpose, random, dot, corrcoef, diag from numpy.linalg import norm import scipy.linalg as LinAlg from thunder.factorization.ica import ICA from thunder.factorization.svd import SVD from thunder.factorization.nmf import NMF from thunder.factorization.pca...
# 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...
import copy from datetime import date from django.test import TestCase import six from regcore.db.django_models import DMDiffs, DMLayers, DMNotices, DMDocuments from regcore.models import Diff, Layer, Notice, Document class DMDocumentsTest(TestCase): def setUp(self): self.dmr = DMDocuments() def te...
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # Copyright (C) 2006 Alec Thomas # Copyright (C) 2007 Eli Carter # Copyright (C) 2007 Christian Boos <[email protected]> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
# Copyright (c) 2012 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 ...
# Copyright 2015 - Mirantis, 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 agree...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2007-2012 Heikki Hokkanen <[email protected]> # & others (see doc/author.txt) # GPLv2 / GPLv3 from datetime import datetime from pytz import FixedOffset from vilya.libs.consts import LANGUAGES from vilya.libs.store import cache, ONE_DAY from vilya.models.us...
from __future__ import absolute_import, division, unicode_literals from future.builtins import int, open, str from hashlib import md5 import os try: from urllib.parse import quote, unquote except ImportError: from urllib import quote, unquote from django.apps import apps from django.contrib import admin from ...
# -*- coding: utf-8 -*- # pylint: disable=not-context-manager # NOTE: The pylint not-content-manager warning is disabled pending the fix of # a bug in pylint. See https://github.com/PyCQA/pylint/issues/782 # Disable while we have Python 2.x compatability # pylint: disable=useless-object-inheritance """Classes to ha...
from . import AWSObject, AWSProperty, Tags from .validators import ( boolean, double, integer_range, json_checker, positive_integer ) def validate_authorizer_ttl(ttl_value): """ Validate authorizer ttl timeout :param ttl_value: The TTL timeout in seconds :return: The provided TTL value if valid ""...
import os import pytest try: import pytest_timeout except ImportError: pytest_timeout = None import time import ray import ray.ray_constants import ray._private.gcs_utils as gcs_utils from ray._private.test_utils import ( wait_for_condition, convert_actor_state, make_global_state_accessor, ) # T...
# Copyright (C) 2011-2012 Canonical Services Ltd # # 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 to use, copy, modify, merge, ...
# 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...
################################################################################ # 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...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from builtins import map from builtins import range from builtins import str from builtins import zip from functools import reduce from past.utils import old_div if __name__ == '__main_...
# Copyright 2015, Kay Hayen, mailto:[email protected] # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
# $Id: ip.py 87 2013-03-05 19:41:04Z [email protected] $ """Internet Protocol.""" import dpkt class IP(dpkt.Packet): __hdr__ = ( ('v_hl', 'B', (4 << 4) | (20 >> 2)), ('tos', 'B', 0), ('len', 'H', 20), ('id', 'H', 0), ('off', 'H', 0), ('ttl', 'B', 64), ('...
# 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...
# Copyright 2022 The CLU Authors. # # 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...
#!/usr/bin/env python import sys, os, argparse from numpy import shape, reshape, \ array, zeros, zeros_like, ones, ones_like, arange, \ double, \ int8, int16, int32, int64, uint8, uint16, uint32, uint64, \ uint, \ iin...
from flask import * import pymongo import bson import json import jsonschema import yawparser import datetime import traceback import uuid import os import werkzeug from functools import wraps DB_URI = 'mongodb://localhost:27017/' DB_NAME = 'weatherapp_db' WEATHER_UPDATE_PERIOD = datetime.timedelta(minutes=1) ...
#! -*- coding: utf-8; mode: python -*- """ ago.py: interact with an ArcGIS Portal instance """ import arcpy import json import time import datetime import mimetypes import gzip import random import string import getpass import sys import os from io import BytesIO import codecs import uuid import shutil try: import...
# Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html from typing import Any, Callable, Dict, List, Mapping, Optional, cast, TypeVar, Type import copy import signal import tempfile from functools import wraps from threading import Timer import smtplib import socket from django.conf import se...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Submit or Cancel spot instance requests. When submit, the process will block until the request is fulfilled or the process is killed by user(like CTRL + C), if the process is killed, the requests will be automatically canceled. """ import os import time import pickle...
import http.server import io import json import os import pprint import shutil import subprocess import tempfile import threading import unittest import urllib.parse import warnings import yaml try: import docker import requests deps_available=True except ImportError: deps_available=False import repo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Defines functionality for pipelined execution of interfaces The `Workflow` class provides core functionality for batch processing. .. testsetup:: # ...
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime import imp from myPersonalFunctions import * import glob import numpy parser = argparse.ArgumentParser( description="Prepare the data for run and anal...
# -*- coding: utf-8 -*- # dcf # --- # A Python library for generating discounted cashflows. # # Author: sonntagsgesicht, based on a fork of Deutsche Postbank [pbrisk] # Version: 0.4, copyright Saturday, 10 October 2020 # Website: https://github.com/sonntagsgesicht/dcf # License: Apache License 2.0 (see LICENSE f...
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
# -*- coding: utf-8 -*- import os import subprocess import sys def which(program): import os def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) fpath, fname = os.path.split(program) if fpath: if is_exe(program): return program else: fo...
# 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...
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import os import py import pytest import qisys.script import qisys.sh import qisrc.git from qisrc.test.conftest import TestGitWorkTree, TestGit fr...
from __future__ import absolute_import, unicode_literals import json import warnings from django.db import models from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlparse from elasticsearch import Elasticsearch, NotFoundError from elasticsearch.helpers import bulk fr...
"""Tests for the storage helper.""" import asyncio from datetime import timedelta import json from unittest.mock import Mock, patch import pytest from homeassistant.const import ( EVENT_HOMEASSISTANT_FINAL_WRITE, EVENT_HOMEASSISTANT_STOP, ) from homeassistant.core import CoreState from homeassistant.helpers i...
#!/usr/bin/env python from __future__ import print_function from builtins import str import sys import pmagpy.pmag as pmag def main(command_line=True, **kwargs): """ NAME jr6_magic.py DESCRIPTION converts JR6 format files to magic_measurements format files SYNTAX jr6_magic.py...
""" Test helper functions from numba.numpy_support. """ from __future__ import print_function import sys import numpy as np import numba.unittest_support as unittest from numba import config, numpy_support, types from .support import TestCase, skip_on_numpy_16 class TestFromDtype(TestCase): def test_number_t...
from __future__ import division, absolute_import, print_function import sys import warnings import numpy as np from numpy import random from numpy.compat import asbytes from numpy.testing import ( TestCase, run_module_suite, assert_, assert_raises, assert_equal, assert_warns, assert_array_equal, assert_array_...
# Copyright 2014 Red Hat, 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 a...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
#!/usr/bin/env python """A wrapper script around clang-format, suitable for linting multiple files and to use for continuous integration. This is an alternative API for the clang-format command line. It runs over multiple files and directories in parallel. A diff output is produced and a sensible exit code is returned....
''' DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <[email protected]> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. ...
# Generated from /home/marisa/Work/tvm/python/tvm/relay/grammar/Relay.g4 by ANTLR 4.7.1 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2*") buf.write("\u...
""" sentry.models.authenticator ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import hmac import time import base64 import hashlib from u2flib_server import u2f from ...
# -*- coding: utf-8 -*- # # Copyright (c) 2015-2016 Alessandro Amici # # python 2 support via python-future from __future__ import absolute_import, unicode_literals from pytest_nodev import plugin TEST_PASS_PY = ''' def test_pass(): assert True ''' TEST_FACTORIAL_PY = ''' def test_factorial(candidate): fac...
# Copyright (c) <2016> <GUANGHAN NING>. 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 l...
#!/usr/bin/env python # Copyright (c) 2015, Carnegie Mellon University # All rights reserved. # Authors: Siddhartha Srinivasa <[email protected]> # Authors: Michael Koval <[email protected]> # Authors: David Butterworth <[email protected]> # # Redistribution and use in source and binary forms, with or without # modificat...
class cell: def __init__(self, y, x, icon, cellnum, board): self.chricon = icon self.coords = [y, x] self.evopoints = 0 self.idnum = cellnum self.playable = False self.learnedmutations = { 'move' : False, 'sight' : False, ...
import argparse, sys, os, yaml, logging, errno, locale from datetime import datetime as DateTime import git class MultiPatchCli(object): """Command-line entry point.""" def __init__(self, argv): self.argv = argv self.settings = None def run(self): parser = self.make_parser() ...
import httplib as http import logging import os from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from django.db import models from dropbox.client import DropboxClient, DropboxOAuth2Flow from dropbox.rest import ErrorResponse from flask impo...
# -*- coding: utf-8 -*- """ @file @brief Helpers, inspired from `utils.py <https://github.com/winpython/winpython/blob/master/winpython/utils.py>`_ """ from __future__ import print_function import os import os.path as osp import subprocess import re import sys import locale # ========================================...
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2006-2010 Tampere University of Technology # # 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 li...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
# Copyright 2017, 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright (c) 2014 Hitachi Data Systems, 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 # # U...
from inspect import getargspec, getmembers, isfunction, ismethod from types import MethodType from ipykernel.ipkernel import IPythonKernel from promise import Promise from . import jsonrpc from .config import Config from .jsonrpc import (is_request, is_response, json_rpc_re...
# -*- coding: utf-8 -*- ''' :copyright: (c) 2015 by Allenta Consulting S.L. <[email protected]>. :license: BSD, see LICENSE.txt for more details. ''' from __future__ import absolute_import import json from contextlib import closing from datetime import datetime from requests import Session, Request from requests.excep...
# 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 required by applicable ...
# pylint: disable=too-many-lines # TODO de-clutter this file! # pylint: disable=unused-import from typing import (Any, Callable, Dict, List, Tuple, Optional, Union, Iterable, Set) # pylint: enable=unused-import import time import collections import re from datetime import timedelta import numpy as...
# -*- 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...
#!/usr/bin/env python import numpy as np from scipy.interpolate import interp1d import collections import matplotlib.pyplot as plt ##set values to dictionary def set_dic(a,param_d): param_d['V0'] = a[0] param_d['K0'] = a[1] param_d['K0p'] = a[2] param_d['theta0'] = np.exp(a[3]) param_d['gamma0'] = np.exp(a[4]...
import collections import datetime import functools import ipaddress import os from king_phisher import serializers from king_phisher.client import gui_utilities from king_phisher.client import plugins from king_phisher.client.widget import extras from king_phisher.client.widget import managers from gi.repository imp...
#!/usr/bin/env python3 # *-* coding: utf-8 *-* # This file is part of butterfly # # butterfly Copyright(C) 2015-2017 Florian Mounier # 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 versi...
""" Copyright 2017 Shaun Edwards 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 wr...
## This job takes in the MIMIC-III CSV.gz files from the specified input bucket ## and converts them to Parquet format in the specified output bucket ## Author: James Wiggins ([email protected]) ## Date: 6/3/19 ## Revision: 1 import sys from awsglue.transforms import * from awsglue.utils import getResolvedOptions ...
from typing import Any, Mapping, Union from unittest import mock import orjson from django.conf import settings from django.test import override_settings from zerver.lib.actions import do_create_user, get_service_bot_events from zerver.lib.bot_config import ConfigError, load_bot_config_template, set_bot_config from z...
## INFO ######################################################################## ## ## ## COUBLET ## ## ======= ...
import os import time import numpy as np import argparse import functools import shutil import math import multiprocessing import paddle import paddle.fluid as fluid import reader from mobilenet_ssd import mobile_net from utility import add_arguments, print_arguments from train import build_program from train import t...
from __future__ import division from datetime import timedelta from django.utils import timezone from django.contrib.auth import get_user_model from django.db import models from django.db.models import Count, Avg from tracking.settings import TRACK_PAGEVIEWS, TRACK_ANONYMOUS_USERS from tracking.cache import CacheManag...
from django.test import TestCase from django.core import mail from django.core.mail.backends.locmem import EmailBackend as LocMemEmailBackend from django.utils.timezone import now as datetime_now from mailer.models import (Message, MessageLog, DontSendEntry, db_to_email, email_to_db, PRIORIT...
# Copyright 2013 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/licenses/LICENSE-2.0 # # Unless required by app...
# 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...
""" Copyright (c) 2010 Karl-Michael Schneider 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 to use, copy, modify, merge, publish, dis...
# -*- coding: windows-1252 -*- import struct import sys class Reader: def __init__(self, filename, dump=False): self.dump = dump self.STREAMS = {} doc = file(filename, 'rb').read() self.header, self.data = doc[0:512], doc[512:] del doc self.__build_header() ...
# Copyright (c) 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 ...
# 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 agreed to in writing, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import time import unittest from mock import call from mock import patch from mock import MagicMock as Mock import pyrax from pyrax.manager import BaseManager from pyrax.clouddns import assure_domain from pyrax.clouddns import CloudDNSClient from pyrax.clou...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright (c) 2011 University of Southern California / ISI # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import itertools from pymatgen.core.lattice import Lattice import numpy as np from pymatgen.util.testing import PymatgenTest from pymatgen.core.operations impo...
## Create and compare lists of files/objects ## Author: Michal Ludvig <[email protected]> ## http://www.logix.cz/michal ## License: GPL Version 2 from S3 import S3 from Config import Config from S3Uri import S3Uri from FileDict import FileDict from Utils import * from Exceptions import ParameterError from HashCa...
""" Analysis tools for Topographica, other than plotting tools. Configures the interface to the featuremapper and holoviews projects and sets the appropriate Topographica-specific hooks. """ import numpy as np from holoviews.interface.collector import Reference from holoviews import HSV, Image from holoviews.core.op...
# Copyright (c) 2011 Google 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 copyright # notice, this list of conditions and the ...
"""Constants for the opentherm_gw integration.""" import pyotgw.vars as gw_vars from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS ATTR_GW_ID = "gateway_id" ATTR_MODE = "mode" ATTR_LEVEL = "level" CONF_CLIMATE = "climate" CONF_FLOOR_TEMP = "floor_temperature" CONF_PRECISION = "precision" DATA_GA...
# Copyright 2015 Red Hat, 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 agre...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # # 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/LICE...
from importlib import reload import numpy as np from numpy.testing import assert_equal, assert_almost_equal import pytest import sys import ray import ray.experimental.array.remote as ra import ray.experimental.array.distributed as da import ray.cluster_utils @pytest.fixture def reload_modules(): modules = [ra.c...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
""" There are two types of functions: 1) defined function like exp or sin that has a name and body (in the sense that function can be evaluated). e = exp 2) undefined function with a name but no body. Undefined functions can be defined using a Function class as follows: f = Function('f') (the result...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division from collections import defaultdict from io import BytesIO import os import sys try: unicode except NameError: basestring = unicode = str if sys.version_info[0] < 3: from urllib2 import urlopen ...
# MIT License # Copyright (c) 2016 https://github.com/sndnv # See the project's LICENSE file for the full text import multiprocessing import os import pprint import time from cmd import Cmd from datetime import datetime from time import localtime, strftime from cadb.utils import Config, FileSystem, Types, Build from c...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Aug 4 11:52:11 2017 @author: lracuna """ from vision.camera import * from vision.plane import Plane from vision.circular_plane import CircularPlane import vision.error_functions as ef import gdescent.hpoints_gradient as gd from ippe import homo2d from ...