gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 University of Southern California # 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 # # htt...
#!/usr/bin/env python3 # Copyright 2016 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. """ Convert the ASCII download_file_types.asciipb proto into a binary resource. We generate a separate variant of the binary proto ...
import re import unicodedata import yaml from yaml.constructor import ConstructorError from yaml.parser import ParserError from yaml.scanner import ScannerError from .sql import SQLValidator import logging logger = logging.getLogger(__name__) CREATE_TEMPLATE = """CREATE TABLE {0}( fid INTEGER PRIMARY KEY AUTOINCR...
from collections import OrderedDict from functools import partial from numbers import Number from pprint import pprint as pp import f5_os_test from f5_os_test.polling_clients import NeutronClientPollingManager from neutronclient.common.exceptions import BadRequest from pytest import symbols as symbols_data nclient_...
# -*- coding: utf-8 -*- ''' Execute orchestration functions ''' # Import pytohn libs from __future__ import absolute_import, print_function import fnmatch import json import logging import sys # Import salt libs import salt.syspaths import salt.utils import salt.utils.event from salt.exceptions import SaltInvocationEr...
""" Useful (but not essential) functions for writing panflute filters """ # --------------------------- # Imports # --------------------------- from .base import Element from .elements import * from .io import dump import io import os import os.path as p import re import sys import json import yaml import shlex fro...
# Copyright 2014: The Rally team # 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 ...
#!/usr/bin/python # # Copyright 2009 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 b...
# 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 2011 Johan Rydberg # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# Copyright (C) 2014 eNovance SAS <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# 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 # ...
# pylint: disable=g-backslash-continuation # Copyright 2021 The Bazel 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/LICEN...
#!/usr/bin/env python # Every python controller needs these lines import roslib; roslib.load_manifest('practica_turtlebot') import rospy import time import math import numpy as np # The velocity command message from geometry_msgs.msg import Vector3, Twist, Quaternion, Pose, Point # The laser scan message from sens...
# Copyright (c) 2014 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 2012 OpenStack Foundation # 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/LIC...
"""Download handlers for http and https schemes""" import re import logging from io import BytesIO from time import time import warnings from six.moves.urllib.parse import urldefrag from zope.interface import implementer from twisted.internet import defer, reactor, protocol from twisted.web.http_headers import Header...
# 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...
""" @package mi.instrument.mclane.pps.ooicore.test.test_driver @file marine-integrations/mi/instrument/mclane/pps/ooicore/test/test_driver.py @author Dan Mergens @brief Test cases for ppsdn driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t t...
"""Various utility functions. .. include:: math-definitions.rst """ import collections import numpy as np from numpy.core.umath_tests import inner1d from scipy.special import spherical_jn, spherical_yn from . import default def rotation_matrix(n1, n2): """Compute rotation matrix for rotation from *n1* to *n2*....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
import ctypes import torch from . import cudart SUCCESS = 0 ERROR_NOT_READY = 34 class CudaError(RuntimeError): def __init__(self, code): msg = cudart().cudaGetErrorString(code).decode('utf-8') super(CudaError, self).__init__('{0} ({1})'.format(msg, code)) def check_error(res): if res != ...
# 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...
from ..predicate import (KeyIndex, ClassIndex, PredicateRegistry, match_instance, match_key) from ..error import RegistrationError import pytest def test_key_index_permutations(): i = KeyIndex() assert list(i.permutations('GET')) == ['GET'] def test_class_index_permutations(): c...
from __future__ import absolute_import from collections import namedtuple from django.conf import settings from surround.django.logging import setupModuleLogger setupModuleLogger(globals()) class Result(namedtuple('Result', ['value', 'exception'])): __slots__ = () def return_result(self): self.thro...
# -*- coding: utf-8 -*- """ Objects representing objects used with ProofreadPage Extension. The extension is supported by MW 1.21+. This module includes objects: * ProofreadPage(Page) * FullHeader """ # # (C) Pywikibot team, 2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_l...
# Performs extraction of data that matches extraction rules. # This is automatically invoked by core.module code if extraction has been # enabled by the user; other modules need not reference this module directly. import os import re import sys import stat import shlex import tempfile import subprocess import binwalk....
# 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...
""" Module to perform a trapezoid model fit to flux time seres data Author: Christopher J Burke """ import numpy as np import matplotlib.pyplot as plt import scipy.optimize as opt import sys def phaseData(t, per, to): """Phase the data at period per and centered at to INPUT: t - time of data ...
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import argparse import os import sys import subprocess import json import tarfile import contextlib import re from pwd import getpwuid from os import listdir from os.path import join, isfile, isdir, dirname import datetime as dt from cp3_...
# 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/env python import sys import os import itertools import shutil import getopt import re import time import const import pdb import traceback from xml.etree.ElementTree import ElementTree from xml.etree.ElementTree import Element from xml.etree.ElementTree import SubElement from datetime import * import metaco...
from django.test import TestCase from django.test.client import Client try: import json except: from django.utils import simplejson as json from MacroExpansion import MacroExpansion from KeyValueTree import KeyValueTree from truth.models import Truth, KeyValue as TruthKeyValue class TestMacroExpansion(TestCas...
#!/usr/bin/env python3 import sys import re import heapq def extract(s): return [int(x) for x in re.findall(r'(-?\d+).?', s)] def vadd(v1, v2): return tuple(x + y for x, y in zip(v1, v2)) UP, RIGHT, DOWN, LEFT = VDIRS = (0, -1), (1, 0), (0, 1), (-1, 0), def draw(painted): minx = min(x for x, y in pai...
# # 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 # ...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.firestore_admin_v1.proto import ( field_pb2 as google_dot_cloud_dot_firestore_dot_admin__v1_dot_proto_dot_field__pb2, ) from google.cloud.firestore_admin_v1.proto import ( firestore_admin_pb2 as google_dot_cloud...
import json import io MOCK_EMPTY_RESPONSE = {"kind": "tm:asm:policies:host-names:host-namecollectionstate", "selfLink": "https://localhost/mgmt/tm/asm/policies/0000/host-names", "totalItems": 0, "items": [] } def util_load_js...
# # 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...
import datetime import functools import multiprocessing as mp import os import pickle import re from tensorflow.keras.preprocessing import image import PIL.Image from . import exceptions from . import calc as ic pj = os.path.join ic_base_dir = 'imagecluster' def read_pk(filename): """Read pickled data from `f...
import collections import json import random from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.core.cache import cache from django.db.models import Count, Max, Min from django.http import Http404, JsonResponse from django.shortcuts import redirect, ...
# Copyright 2013 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 ...
# Authors: Olivier Grisel <[email protected]> # Alexandre Gramfort <[email protected]> # License: BSD 3 clause from sys import version_info import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.exceptions imp...
""" Functions for preparing various inputs passed to the DataFrame or Series constructors before passing them to a BlockManager. """ from collections import OrderedDict import numpy as np import numpy.ma as ma from pandas._libs import lib from pandas._libs.tslibs import IncompatibleFrequency import pandas.compat as c...
#!/usr/bin/env python import os import pandas as pd from StringIO import StringIO from unittest import TestCase, main from numpy import array, nan, arange from numpy.testing import assert_almost_equal from biom import Table from pandas.util.testing import assert_frame_equal from americangut.util import ( slice...
# -*- coding: utf-8 -*- import operator import pytest import numpy as np from datetime import timedelta from distutils.version import LooseVersion import pandas as pd import pandas.util.testing as tm from pandas import (DatetimeIndex, TimedeltaIndex, Float64Index, Int64Index, to_timedelta, timedel...
import os from AppKit import NSMenuItem, NSImage, NSBezierPath, NSColor, NSCompositeSourceOver, NSGradient, NSNull, \ NSMutableDictionary, NSMutableParagraphStyle, NSParagraphStyleAttributeName, NSFormatter, \ NSLineBreakByTruncatingHead, NSActionCell, NSAttributedString import vanilla from defconAppKit.contro...
"""The tests for the Demo Media player platform.""" import datetime import socket import unittest import pysonos.snapshot from unittest import mock import pysonos from pysonos import alarms from homeassistant.setup import setup_component from homeassistant.components.sonos import media_player as sonos from homeassista...
#!/usr/bin/env python -tt # -*- coding: UTF-8 -*- """ Redis Copy Redis Copy the keys in a source redis server into another target redis server. The script probably needs to be added to a cron job if the keys are a lot because it only copies a fix number of keys at a time and continue from there on the next run. It doe...
# This file is part of ZS # Copyright (C) 2013-2014 Nathaniel Smith <[email protected]> # See file LICENSE.txt for license information. import os import os.path import sys import hashlib from six import int2byte, byte2int, BytesIO, integer_types from nose.tools import assert_raises from .util import test_data_path from ...
# Copyright 2016 Battelle Energy Alliance, 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...
# coding: utf-8 """ Classes and helpers to describe and work with systematic shifts. """ __all__ = ["Shift"] import scinum as sn from order.unique import UniqueObject from order.mixins import CopyMixin, AuxDataMixin, TagMixin, LabelMixin from order.util import typed class Shift(UniqueObject, CopyMixin, AuxDataM...
from __future__ import absolute_import from django import forms from django.conf import settings from django.contrib.auth.forms import SetPasswordForm, AuthenticationForm, \ PasswordResetForm from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db.models.query...
import logging as logger import os from django.apps.registry import AppRegistryNotReady from django.core.management import call_command from django.http.response import Http404 from django.utils.translation import gettext_lazy as _ from iceqube.common.classes import State from iceqube.exceptions import UserCancelledEr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC ''' Spartan 6 bitstream analyzer tool...
"""Tests the Home Assistant workday binary sensor.""" from datetime import date import pytest import voluptuous as vol import homeassistant.components.workday.binary_sensor as binary_sensor from homeassistant.setup import setup_component from tests.async_mock import patch from tests.common import assert_setup_compon...
# 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...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import logging import argparse from datetime import datetime from copy import copy from version import __version__ from Persist import Persist from PersistantData import Schedule from Appointment import Appointment from Utils import int_input, input_with_quit from Appoi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
# -*- encoding: utf-8 -*- """ Local server. `H2OLocalServer` allows to start H2O servers on your local machine: hs = H2OLocalServer.start() : start a new local server hs.is_running() : check if the server is running hs.shutdown() : shut down the server :copyright: (c) 2016 H2O.ai :license: Apache Licens...
# coding: utf-8 import serial import struct import logging import glob import request class SpheroError(Exception): pass class Sphero(object): def __init__(self, path=None): self.sp = None self.dev = 0x00 self.seq = 0x00 self.set_sphero(path) def set_sphero(self, path=N...
# Name: Maud Ottenheijm # Student nr: 10641785 # # This file contains code for preprocessing the dataset from UNESCO on women in science, # combining it with birth rate data government expences data (World Bank). Outputfile 'data_all.js' separates data # per year, then per country with all values in one object. Data ...
# -*- coding: utf-8 -*- """ Created on Mon Mar 12 15:11:17 2018 @author: tih """ def main(input_nc, output_nc, input_JRC, Inflow_Text_Files, include_reservoirs = 1): import time import wa.General.raster_conversions as RC import wa.General.data_conversions as DC import numpy as np import netCDF4 ...
# 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 applicable ...
from flask import Flask from flask import request from flask import render_template from flask import make_response from flask import jsonify import numpy as np import StringIO import csv import time import logging from logging.handlers import SysLogHandler app = Flask(__name__) # log Flask events # address for OS...
import unittest import numpy as np import pysal import pysal.spreg.diagnostics as D from pysal.spreg.twosls_sp import BaseGM_Lag, GM_Lag from pysal.common import RTOL class TestBaseGMLag(unittest.TestCase): def setUp(self): self.w = pysal.rook_from_shapefile(pysal.examples.get_path("columbus.shp")) ...
# -*- coding: utf-8 -*- import unittest import warnings import mock from influxdb.influxdb08 import SeriesHelper, InfluxDBClient from requests.exceptions import ConnectionError class TestSeriesHelper(unittest.TestCase): @classmethod def setUpClass(cls): super(TestSeriesHelper, cls).setUpClass() ...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
#!/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 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...
import pytest import crow2.test.setup # pylint: disable = W0611 from crow2.test.util import Counter from crow2.events.hook import Hook, CancellableHook from crow2.events import exceptions def pytest_generate_tests(metafunc): """ Parameterize tests with different targets """ if metafunc.cls is None: ...
# # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################### # Copyright/License Notice (BSD License) # ######################################################################### ###################################################...
# Copyright 2020 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...
# #---------------------------------------------------------------- # 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 un...
#!/usr/bin/python # # Copyright 2011 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 b...
# 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...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_allclose from ... import units as u from ...tests.helper import pyte...
"""Contains the WidgetPropertiesDialog class.""" __all__ = ['WidgetPropertiesDialog'] from direct.showbase.TkGlobal import * import Pmw, sys """ TODO: Checkboxes for None? Floaters to adjust float values OK and Cancel to allow changes to be delayed Something other than Return to accept a new value """ class...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 # # htt...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Compatibility functionality for Windbg users. """ import argparse import codecs import math import sys from builtins import str import gdb import pwndbg.arch import pwndbg.commands import pwndbg.memory import pwndbg.strings import pwndbg.symbol import pwndbg.typeinfo...
# Copyright 2013 Big Switch Networks 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 r...
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import json import time from c7n.exceptions import PolicyValidationError from .common import BaseTest, functional class TestOpsCenter(BaseTest): def test_post_ops_item(self): factory = self.replay_flight_data('test_post_ops_...
""" This test script will test the set of optimization algorithms. It tests - the conformity of interface - the behavior on simple functions - the behavior on FitnessEvaluators - the behavior when optimizing a list or an array - the behavior when optimizing an Evolvable - the behavior when optimizing a Paramete...
"""Component for wiffi support.""" import asyncio from datetime import timedelta import errno import logging from wiffi import WiffiTcpServer from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_PORT, CONF_TIMEOUT from homeassistant.core import HomeAssistant, callback from homeass...
# 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. from __future__ import absolute_import, division, print_function import abc import datetime import hashlib import ipaddress import warning...
# -*- coding: utf-8 -*- import os import shutil import socket import subprocess import urllib import urllib2 SqueakImage = "Squeak4.5-12568" # You need to enter the real URL and have the server running CODESPEED_URL = 'http://speed.bithug.org/' class Project(object): def __init__(self, name, executables={}, arg...
import operator import pytest from flask_allows.allows import Allows from flask_allows.overrides import Override, OverrideManager from flask_allows.requirements import ( And, C, ConditionalRequirement, Not, Or, Requirement, wants_request, ) def test_cant_create_Requirement(): with py...
"""Provide methods to bootstrap a Home Assistant instance.""" import asyncio import logging import logging.handlers import os import sys from time import time from collections import OrderedDict from typing import Any, Optional, Dict import voluptuous as vol from homeassistant import ( core, config as conf_util,...
"""Provide a way to connect devices to one physical location.""" from collections import OrderedDict from typing import Container, Dict, Iterable, List, MutableMapping, Optional, cast import attr from homeassistant.core import callback from homeassistant.helpers import device_registry as dr, entity_registry as er fro...
# Copyright 2012, Intel, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright (c) 2014 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 agreed to in writing...
# # Copyright (C) 2009 The Android Open Source Project # # 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 la...
"""The tests for the Geofency device tracker platform.""" # pylint: disable=redefined-outer-name import asyncio from unittest.mock import patch import pytest from homeassistant.components import zone import homeassistant.components.device_tracker as device_tracker from homeassistant.components.device_tracker.geofency...
import os from collections import OrderedDict import re import Common import Instructions import Mif class Line(object): def __init__(self, fileName, number, string): self.FileName = fileName self.Number = number self.String = string def __str__(self): return "%s : %s" % (str(self.Number),self.String) d...
class KEY(object): def __init__(self, internal_name, external_name): self.internalName = internal_name self.externalName = external_name class REQUEST(object): def __init__(self, internal_name, external_name): self.internalName = internal_name self.externalName = external_name ...
import logging, threading, sys, os, time, subprocess, string, tempfile, re, traceback, shutil from galaxy import util, model, config from galaxy.model import mapping from galaxy.model.orm import lazyload from galaxy.datatypes.tabular import * from galaxy.datatypes.interval import * from galaxy.datatypes import metadat...
from __future__ import division, print_function from hscom import __common__ (print, print_, print_on, print_off, rrr, profile) = __common__.init(__name__, '[guitools]') # Python from os.path import split import sys #import warnings # Science import numpy as np # Qt from PyQt4 import QtCore, QtGui from PyQt4.QtCore im...
""" Timsort implementation. Mostly adapted from CPython's listobject.c. For more information, see listsort.txt in CPython's source tree. """ from __future__ import print_function, absolute_import, division import collections from numba import types TimsortImplementation = collections.namedtuple( 'TimsortImpl...
"""Provides the worker thread needed for processing streams.""" from __future__ import annotations from collections import defaultdict, deque from collections.abc import Callable, Generator, Iterator, Mapping import contextlib import datetime from io import BytesIO import logging from threading import Event from typin...
# # Jasy - Web Tooling Framework # Copyright 2010-2012 Zynga Inc. # Copyright 2013-2014 Sebastian Werner # import re import sys import json from jasy.script.tokenize.Lang import keywords from jasy.script.parse.Lang import expressions, futureReserved high_unicode = re.compile(r"\\u[2-9A-Fa-f][0-9A-Fa-f]{3}") ascii_en...