gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Particl Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os import json import configparser from test_framework.test_particl import ( ParticlTestFrame...
"""Support for Honeywell Lyric climate platform.""" from __future__ import annotations import logging from time import localtime, strftime, time from aiolyric.objects.device import LyricDevice from aiolyric.objects.location import LyricLocation import voluptuous as vol from homeassistant.components.climate import Cl...
import os #Testing of ping-pong behaviour with more conditions added to make it more reliable import signal import sys import socket, time import cv import json from PIL import Image from numpy import array import ImageFilter # This makes sure the path which python uses to find things when using import # can find all...
# # Copyright 2013 Quantopian, 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 wr...
# Copyright 2020 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, ...
import re try: from django.utils.unittest import TestCase except ImportError: from django.test import TestCase from .ansi import ANSIString from evennia import utils class ANSIStringTestCase(TestCase): def checker(self, ansi, raw, clean): """ Verifies the raw and clean strings of an ANSI...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Project.is_draft' db.delete_column(u'sfpirgapp_project', 'is_draft') # Adding fie...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import urlparse import logging from collections import MutableSet import requests from requests import RequestException from flexget import...
from django.contrib.contenttypes.models import ContentType, ContentTypeManager from django.contrib.contenttypes.views import shortcut from django.contrib.sites.shortcuts import get_current_site from django.http import Http404, HttpRequest from django.test import TestCase, override_settings from .models import ( Co...
# 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 -*- # Copyright 2020 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 # Copyright (c) 2017-2021 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 appl...
''' Copyright 2014 Tyler Palsulich 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, softwar...
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISC...
import networkx, os, cPickle def main(): base_dir = "/home/emre/arastirma/data/ontology/umls/2013AA/META/" desc_file = base_dir + "MRCONSO.RRF" rel_file = base_dir + "MRREL.RRF" #g = get_mesh_disease_ontology(desc_file, rel_file) #get_basic_info(desc_file, rel_file) #get_drug_info(desc_file, re...
# coding=utf-8 # Copyright 2017 The DLT2T 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 ...
""" Example limit setting script This script provides an example of how to use the limit setting tools, built into echidna, to set a 90% confidence limit on neutrinoless double beta decay. The numbers used in scaling the signal/backgrounds should set a reasonable limit, but are not necessariy the optimum choice of pa...
""" Core components of Home Assistant. Home Assistant is a Home Automation framework for observing the state of entities and react to changes. """ import asyncio import datetime import enum import functools from ipaddress import ip_address import logging import os import pathlib import re import threading from time im...
"""Test the Xiaomi Miio config flow.""" from unittest.mock import Mock, patch from miio import DeviceException from homeassistant import config_entries from homeassistant.components import zeroconf from homeassistant.components.xiaomi_miio import const from homeassistant.components.xiaomi_miio.config_flow import ( ...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # # 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...
""" .. _tut_artifacts_correct_ica: Artifact Correction with ICA ============================ ICA finds directions in the feature space corresponding to projections with high non-Gaussianity. We thus obtain a decomposition into independent components, and the artifact's contribution is localized in only a small numbe...
import os from git.objects import Object, Commit from git.util import ( join_path, join_path_native, to_native_path_linux, assure_directory_exists ) from gitdb.exc import ( BadObject, BadName ) from gitdb.util import ( join, dirname, isdir, exists, isfile, rename, h...
# Copyright 2017 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 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 applicable ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Sub programs for doing the measurements author : Eoin O'Farrell email : phyoec@nus.edu.sg last edited : July 2013 Explantion: There are 3 variables in our instrument: 1 Temperature 2 Field 3 Device parameter; e.g. Backgate V, Topgate V, Current, Angle (one day) T...
import warnings import numpy as np from scipy import sparse from sklearn import datasets, svm, linear_model, base from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from nose.tools import assert_raises, assert_true, assert_false from nose.tools import ass...
# Copyright 2012-2016 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) 2014 Mirantis, 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 re...
import json from dateutil.parser import parse as parse_datetime from dateutil import tz from datetime import datetime import itertools import logging import urllib import urlparse from flask import render_template, redirect, session, make_response, url_for, g, request, abort, \ Response from google.appengine.api i...
""" Type variables for Parametric polymorphism. Cretonne instructions and instruction transformations can be specified to be polymorphic by using type variables. """ from __future__ import absolute_import import math from . import types, is_power_of_two from copy import copy try: from typing import Tuple, Union, ...
"""User API to specify equations.""" import sympy from cached_property import cached_property from devito.finite_differences import default_rules from devito.tools import as_tuple from devito.types.lazy import Evaluable __all__ = ['Eq', 'Inc'] class Eq(sympy.Eq, Evaluable): """ An equal relation between ...
'''Trains DCGAN on MNIST using Keras DCGAN is a Generative Adversarial Network (GAN) using CNN. The generator tries to fool the discriminator by generating fake images. The discriminator learns to discriminate real from fake images. The generator + discriminator form an adversarial network. DCGAN trains the discrimina...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
"""Tests related to the authorization of api calls. NOTE: while all of these are conceptually authorization related, some illegal operations will raise exceptions other than AuthorizationError. This usually happens when the operation is illegal *in principle*, and would not be fixed by authenticating as someone else. ...
import hashlib import os import random import re import string import time from base64 import decodestring from contextlib import contextmanager from datetime import datetime from django import dispatch, forms from django.conf import settings from django.contrib.auth.hashers import BasePasswordHasher, mask_hash from d...
# File: ticTacToeTests.py # from chapter 18 of _Genetic Algorithms with Python_ # # Author: Clinton Sheppard <fluentcoder@gmail.com> # Copyright (c) 2016 Clinton Sheppard # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # You may o...
#!/usr/bin/env python # -*- coding=utf-8 -*- from __future__ import unicode_literals, absolute_import import sys import json import hashlib import logging # noinspection PyProtectedMember, PyPackageRequirements from pip._vendor import requests, os logger = logging.getLogger(__name__) __version__ = '1.0.4' def mai...
from wpc import db, app, login_manager from wpc.utils import requests_get_with_retries from flask.ext.login import UserMixin, current_user from sqlalchemy.orm.properties import ColumnProperty from flask import url_for import humanize from datetime import datetime, timedelta from bs4 import BeautifulSoup @login_mana...
#!/usr/bin/env python # # Copyright (c) 2014 Chris Maxwell <chris@wrathofchris.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copy...
from numpy import mean from cssvmutil import * from eval import * from subprocess import Popen,PIPE cssvm_train='/home/arya/workspace/cssvm/svm-train' cssvm_classify='/home/arya/workspace/cssvm/svm-predict' path= '/home/arya/datasets/cssvm/' measure={'CSA':'Risk','CSU':'AUC','IDL':'AUC','CSE':'Income'} algs=['BM','BP'...
from typing import Dict, List, Optional, Union, cast from django.db.models.query import QuerySet from django.utils.translation import ugettext as _ from django.conf import settings from zerver.lib.cache import generic_bulk_cached_fetch, user_profile_cache_key_id, \ user_profile_by_id_cache_key from zerver.lib.req...
from sympy.core.sympify import _sympify, sympify from sympy.core.basic import Basic from sympy.core.singleton import Singleton, S from sympy.core.evalf import EvalfMixin from sympy.core.numbers import Float from sympy.core.compatibility import iterable from sympy.core.decorators import deprecated from sympy.mpmath imp...
import os import tempfile import pytest from opentaxii.config import ServerConfig BACKWARDS_COMPAT_CONFIG = """ --- dummy: some persistence_api: class: some.test.PersistenceClass parameters: a: 1 b: 2 auth_api: class: other.test.AuthClass parameters: c: 3 """ COMBINED_CONFIG = """ --- dummy: some ...
# 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 ...
import pygame as pg import lib.inputbox as textbox import pyglet, os, json, time import main pg.init() clock = pg.time.Clock() global player_name, FULLSCREEN, levels_number, view, menu view = "main" menu = True player_name = "" FULLSCREEN = "True" levels_number = 0 pg.mixer.init() pg.mixer.music.load("sounds/main_mu...
from __future__ import absolute_import, unicode_literals # -*- coding: utf-8 -*- import json from datetime import datetime from xml.dom import minidom from StringIO import StringIO from django.conf import settings from django.core import serializers from django.db import transaction, connection from django.test impor...
import json import os import shutil import tempfile from contextlib import contextmanager from datetime import datetime, timedelta from decimal import Decimal from django.conf import settings from django.core import mail import mock import pytest from PIL import Image from olympia import amo from olympia.addons.mo...
""" Tests that should run in both Python and JS. This helps ensure that both implementation work in the same way. Focus on use-cases rather than coverage. These tests work a bit awkward, but its very useful to be able to test that the two systems work exactly the same way. You define a class with signals, and then pr...
import datetime import re import urllib2 from bs4 import BeautifulSoup from regional_poll_interpolator import RegionalPollInterpolator party_names = { 'Cons.': 'cpc', 'NDP': 'ndp', 'Liberal': 'lpc', 'BQ': 'bq', 'Green': 'gpc', 'Other': 'oth', } province_code_to_region = { '10': 'ATL', ...
import subprocess from subprocess import call, STDOUT class ReportPDF(object): """PDF generated from an automatically generated LaTeX source containing results of experiments. Content of the PDF is defined by a template defined by a user. """ GEOM_PARAMS = "[paperwidth=65cm, paperheight=40cm, margin=0...
# -*- coding: utf-8 -*- """ gspread.client ~~~~~~~~~~~~~~ This module contains Client class responsible for communicating with Google Data API. """ import json try: import xml.etree.cElementTree as ElementTree except: from xml.etree import ElementTree from . import urlencode from .ns import _ns from .https...
#!/usr/bin/env python2 # transpiled with BefunCompile v1.3.0 (c) 2017 from random import randint import sys import zlib, base64 _g = ("AR+LCAAAAAAABACtVMFy4yAM/RXVuLMzMN4FDGnCUKWf0YOH9uarT5zcf18JO8ROsrs9rA5PSAEhPT+SAeD9Hf6XvX7TeG9ejsSCOd4XO3/T6HAsJWKcu+apCeTU6Rg2" + "JVE7PTVfX2+NlP4o8+4ejj6ygM5ErmJ0yRmNS4ulTJzj7ZGLP...
# Copyright 2018 The Cirq Developers # # 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 ...
# 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...
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Enable 'with' statements in Python 2.5 from __future__ import with_statement import os.path import platform import re import sh...
import os import sys import textwrap import warnings import email from svb import error, util from svb.six import iteritems, string_types from svb.six.moves import urllib # - Requests is the preferred HTTP library # - Google App Engine has urlfetch # - Use Pycurl if it's there (at least it verifies SSL certs) # - Fal...
#!/usr/bin/env python """ spcorrdecimateall.py John Swoboda """ import os import numpy as np import tables import glob import matplotlib.pyplot as plt import pdb import ioclass from IQTools import CenteredLagProduct, FormatIQ if __name__ == "__main__": ## Define input params Input spcor_dir = '/Volumes/ISRDriv...
# orm/dependency.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Relationship dependencies. """ from .. import sql, util, exc as sa_exc from . i...
# # 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 us...
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
""" SQLite3 backend for the sqlite3 module in the standard library. """ import decimal import math import re import warnings from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from...
# coding=utf-8 """Helper utilities module to compute various statistics for the current AOI. :copyright: (c) 2013 by Tim Sutton :license: GPLv3, see LICENSE for more details. """ import os import sys import getpass from tempfile import mkstemp import xml import time from datetime import date, timedelta import zipfile ...
# Copyright 2012 Nebula, 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...
from __future__ import unicode_literals import datetime import json from django.contrib.auth.models import User from django.core.serializers.json import DjangoJSONEncoder from django.test import Client, testcases from django.urls import reverse from django.utils import six, timezone from alexia.apps.billing.models i...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class CreateExtractSubtitleRequest(object): """ NOTE: Th...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ These agents contain a number of "unit test" corpora, or fake corpora that ensure models can learn simple behavior e...
from bson import DBRef, SON from base import ( BaseDict, BaseList, EmbeddedDocumentList, TopLevelDocumentMetaclass, get_document ) from fields import (ReferenceField, ListField, DictField, MapField) from connection import get_db from queryset import QuerySet from document import Document, EmbeddedDocument cl...
# Copyright 2014 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. from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import unittest from py_vulcanize im...
# -*- coding: utf-8 -*- from __future__ import print_function from ez_setup import use_setuptools use_setuptools() import os import sys import imp import subprocess from glob import glob ## Python 2.6 subprocess.check_output compatibility. Thanks Greg Hewgill! if 'check_output' not in dir(subprocess): def check_o...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. import operator import os import platform import sys from typing import Any, Callable, Dict, List, Optional, Tuple, Union from pyparsing i...
# 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 # ...
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP from django import VERSION as DJANGO_VERSION import socket import os import warnings from urlparse import urlparse # Django settings for XOS. from config import Config from config import set_override config = Config() # Override the config fr...
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
import os import shutil from gppylib.db import dbconn from test.behave_utils.utils import check_schema_exists, check_table_exists, drop_table_if_exists from gppylib.operations.backup_utils import get_lines_from_file CREATE_MULTI_PARTITION_TABLE_SQL = """ CREATE TABLE %s.%s (trans_id int, date date, amount decimal(9,2)...
#!/usr/bin/env python import os import pysam import random import logging import argparse import itertools logger = logging.getLogger(__name__) import multiprocessing as mp from collections import defaultdict as dd from bx.intervals.intersection import Intersecter, Interval ''' identify clusters of discordant read...
""" Evaluation of Python code in |jedi| is based on three assumptions: * The code uses as least side effects as possible. Jedi understands certain list/tuple/set modifications, but there's no guarantee that Jedi detects everything (list.append in different modules for example). * No magic is being used: - metac...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) | Plural subsystem is created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop@gmail.com> Translation sys...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
# -*- coding: utf-8 -*- """ Created on Fri Oct 04 13:19:01 2013 Author: Josef Perktold """ from __future__ import print_function from statsmodels.compat.python import lrange, lmap import numpy as np from numpy.testing import assert_allclose, assert_almost_equal, assert_equal from statsmodels import iolib from statsm...
# Copyright 2015 0xc0170 # # 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, soft...
#!/usr/bin/python import unittest import os import random import numpy as np from pymatgen.core.structure import Structure from pymatgen.core.lattice import Lattice from pymatgen.core.surface import Slab, SlabGenerator, generate_all_slabs, \ get_symmetrically_distinct_miller_indices from pymatgen.symmetry.group...
# 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. from code import Code from model import PropertyType, Type import cpp_util import model import schema_util import sys import util_cc_helper class CCGene...
# Copyright (c) 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 functionality ...
# Copyright 2017 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...
""" This code receives and maps points Authors: Niharika Jayanthi, Dheeraj Kamath Project: Marker-based Localization Mentor: Sanam Shakya Main functions: draw_arena(), draw_marker(), draw_robot() getCoordinates(), get_socket() Global variables: arena_length, arena_breadth, s, host, port, room_width ...
# -*- coding: utf-8 -*- """ Created on Wed Sep 21 17:08:59 2016 @author: bitzer """ from __future__ import print_function, division import math import numpy as np import scipy import seaborn as sns import pandas as pd import matplotlib.pyplot as plt from warnings import warn from abc import ABCMeta, abstractmethod ...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2019, Arm Limited and contributors. # # 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 # # ...
"""Common functions for RFLink component tests and generic platform tests.""" from unittest.mock import Mock from homeassistant.bootstrap import async_setup_component from homeassistant.components.rflink import ( CONF_RECONNECT_INTERVAL, DATA_ENTITY_LOOKUP, EVENT_KEY_COMMAND, EVENT_KEY_SENSOR, SER...
"""Support for the Abode Security System.""" from asyncio import gather from copy import deepcopy from functools import partial from abodepy import Abode from abodepy.exceptions import AbodeAuthenticationException, AbodeException import abodepy.helpers.timeline as TIMELINE from requests.exceptions import ConnectTimeou...
# # 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...
"""Status codes for the Sensicam These were taken by conversion using h2py and then writing to a dictionary from PCO_err.h. Additionally, this implements the incredibly messy way of looking up error texts found in PCO_errt.h. Why they chose to make things this complicated, I really don't know. """ # Error code defin...
from __future__ import print_function import functools import itertools import re import sys import warnings import numpy as np import numba.unittest_support as unittest from numba import types, typing, utils, typeof, numpy_support, njit from numba.compiler import compile_isolated, Flags, DEFAULT_FLAGS from numba.nu...
""" This module holds Devices related components. A 'Device' is any computer running the clientapp or the serverapp """ import logging from ConfigParser import SafeConfigParser import config as config import time from player import LocalPlayer, RemotePlayer from socket import * import select import os import threadin...
# Copyright (c) 2009 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. import cld import unittest import sys from testData import * VERBOSE = False # MKM: ported from FullTests in compact_lang_det_unittest_small.cc class...
"""Support for Modbus.""" from __future__ import annotations from typing import cast import voluptuous as vol from homeassistant.components.binary_sensor import ( DEVICE_CLASSES_SCHEMA as BINARY_SENSOR_DEVICE_CLASSES_SCHEMA, ) from homeassistant.components.cover import ( DEVICE_CLASSES_SCHEMA as COVER_DEVICE...
# -*- coding: utf-8 -*- """ Created on Wed Apr 22nd 2015 - Martin Vejmelka Copyright UC Denver 2015 Performs data assimilation for cycling forecasts using WRF. The algorithm is as follows: 1) check if a previous cycle is available a) yes? - run DA using RAWS observations from start of previous cycle up to now ...
#!/usr/bin/python import common #----- import re import os import string import sys import time import traceback import ConfigParser import StringIO import inspect #### Class Configuration ############################ class Configuration: def __init__ (self, fileName): self.cp = None self.inifile =...
# 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...
# Copyright 2013 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 agreed t...
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...