gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import division import os import time import sys import argparse import numpy as np import tables from astropy.table import Table import logging import warnings from Chandra.Time import DateTime import agasc from kadi import events from Sk...
## # Copyright (c) 2017-2020, all rights reserved. Use of this source code # is governed by a BSD license that can be found in the top-level # LICENSE file. ## import os import sys import time import traceback import unittest import numpy as np import numpy.testing as nt from .shmem import MPIShared from .locking ...
# -*- test-case-name: twisted.mail.test.test_pop3client -*- # Copyright (c) 2001-2004 Divmod Inc. # See LICENSE for details. import sys import inspect from zope.interface import directlyProvides from twisted.mail.pop3 import AdvancedPOP3Client as POP3Client from twisted.mail.pop3 import InsecureAuthenticationDisallo...
#! /usr/bin/python3 import struct import json import logging import binascii import math from bitcoin.core import key from functools import reduce from itertools import groupby logger = logging.getLogger(__name__) from bitstring import ReadError from counterpartylib.lib import (config, util, exceptions, util, messag...
from time import sleep import string from PresentationObject import PresentationObject from waitevent import waitevent from qt import * from qtcanvas import * true = success = done = 1 false = failure = incomplete = 0 class slide( PresentationObject ): """ <slide> is used to show objects on one "page" of a p...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Take a list of genome positions and return a 15 base region (-7 to +7) Created: 2017-03-20 16:21 Last modified: 2017-03-20 17:44 """ import os import bz2 import gzip from datetime import timedelta as _td import fyrd import sys import argparse from Bio import S...
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012-2013 Craig Barnes # Copyright (c) 2012 roger # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2014 Sean Vig # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ...
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.db.models.functions import Upper from django.test import TestCase from .models import Article, Author, Reference class OrderingTests(TestCase): @classmethod def ...
"""Support for GTFS (Google/General Transport Format Schema).""" import datetime import logging import os import threading from typing import Any, Callable, Optional import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_NAME, ...
# -*- coding: utf-8 -*- ''' Module for managing the Salt schedule on a minion .. versionadded:: 2014.7.0 ''' # Import Python libs from __future__ import absolute_import import copy as pycopy import difflib import os import yaml # Import salt libs import salt.utils import salt.utils.odict # Import 3rd-party libs im...
#!/usr/bin/env python2 """Overview: The servicerouter is a replacement for the haproxy-marathon-bridge. It reads the Marathon task information and dynamically generates haproxy configuration details. To gather the task information, the servicerouter needs to know where to find Marathon. The service configur...
# Copyright (c) 2012 OpenStack, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
import os import subprocess from textwrap import dedent from mock import patch, Mock import pytest from pretend import stub import pip from pip.exceptions import (RequirementsFileParseError) from pip.download import PipSession from pip.index import PackageFinder from pip.req.req_install import InstallRequirement from...
from copy import deepcopy import re from django import forms from django.utils.datastructures import SortedDict, MultiValueDict from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode from django.utils.safestring import mark_safe from django.forms....
""" Core module Dashboard views """ from anaf.core.rendering import render_to_response from django.shortcuts import get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from anaf.core.decorators import mylogin_required, h...
# Copyright 2014, 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 # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
# Copyright 2015 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. """Provides fakes for several of Telemetry's internal objects. These allow code like story_runner and Benchmark to be run and tested without compiling or st...
# Copyright 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 required b...
# Copyright (c) 2016-2020, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this lis...
#-*- coding: utf-8 -*- import json import hashlib import base64 import traceback from threading import Thread, Event from Queue import Queue, Empty from defs import * try: import tornado from tornado.iostream import StreamClosedError except ImportError: tornado = None StreamClosedError = None class...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 2019 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 print_function from __future__ import division from __future__ import absolute_import import mock from dashboard.pinpoint import tes...
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestCStepping(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): ...
import sys from .himesis import Himesis from .himesis_utils import standardize_name, is_RAM_attribute, to_non_RAM_attribute, get_preds_and_succs from pyramify.ramify_actions import get_default_match_code class Priority(object): """ Implements heuristics for the HimesisMatcher algorithm. Determine...
from future import standard_library standard_library.install_aliases() from builtins import object from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declared_attr from sqlalchemy import create_engine from sqlalchemy.orm import relationship from sqlalchemy import ( Colum...
from __future__ import annotations from datetime import timedelta import operator from sys import getsizeof from typing import ( TYPE_CHECKING, Any, Callable, Hashable, List, cast, ) import warnings import numpy as np from pandas._libs import ( index as libindex, lib, ) from pandas._l...
# -*- coding: utf-8 -*- # Upside Travel, 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...
# Author: Mark Wronkiewicz <wronk@uw.edu> # # License: BSD (3-clause) import os.path as op import warnings import numpy as np import sys import scipy from numpy.testing import assert_equal, assert_allclose from nose.tools import assert_true, assert_raises from nose.plugins.skip import SkipTest from distutils.version i...
# -*- coding: iso-8859-1 -*- """ MoinMoin - base classes for datastructs. @copyright: 2009 MoinMoin:DmitrijsMilajevs @license: GPL, see COPYING for details """ from UserDict import DictMixin class GroupDoesNotExistError(Exception): """ Raised when a group name is not found in the backend. """ class Di...
# sqlalchemy/pool.py # Copyright (C) 2005-2016 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 """Connection pooling for DB-API connections. Provides a number of connection p...
from collections import deque from time import time from twisted.application.service import Service from twisted.internet import reactor from twisted.internet.defer import Deferred, DeferredList from twisted.internet.protocol import ReconnectingClientFactory from twisted.protocols.basic import Int32StringReceiver from...
from __future__ import print_function from . import o5m, osmxml # ****** generic osm data store ****** class OsmData(object): def __init__(self): self.nodes=[] self.ways=[] self.relations=[] self.bounds=[] self.isDiff = False def LoadFromO5m(self, fi): dec = o5m.O5mDecode(fi) dec.funcStoreNode = sel...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
#!/usr/bin/env python # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import with_statement from __future__ import division import sys import os import time import glob import serial import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import struct import re import urllib2 import urlparse import pprin...
# 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 python # Copyright (C) 2009, Mathieu PASQUET <mpa@makina-corpus.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 cop...
from dataclasses import dataclass from os import chmod from os import kill from os import remove from os import rename from pathlib import Path from shutil import rmtree from signal import SIGTERM from subprocess import call from tempfile import NamedTemporaryFile from typing import Optional import click from click im...
from lxml import etree from app import geocache_db from geocache_model_sql import Cache, Cacher, CacheType, CacheContainer, CacheCountry, CacheState, CacheToAttribute, Waypoint, WaypointSym, WaypointType, Log, LogType, Attribute, UserNote from geocache import Geocache from db import DbInterface import re import datetim...
import json from django.contrib.auth import authenticate from django.contrib.auth import get_user_model from django.contrib.sessions.models import Session from django.core import mail from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from rest_framewor...
#!/usr/local/bin/python2.7 # encoding: utf-8 import socket import sys import os import mmap import json import datetime import math import pymysql import multiprocessing import exceptions import string import array import random import threading import traceback import cmd #from pyamf import remoting shutdown = False...
"""Test Z-Wave config panel.""" import json import pytest from homeassistant.bootstrap import async_setup_component from homeassistant.components import config from homeassistant.components.zwave import DATA_NETWORK, const from homeassistant.const import HTTP_NOT_FOUND from tests.async_mock import MagicMock, patch f...
import asyncore import unittest import shutil import os import signal import time import threading from glide.process import Process class Tester(unittest.TestCase): def setUp(self): if not os.path.exists('temp'): os.mkdir('temp') self.test_file = 'temp/execute.sh' test_code = ...
import numpy as np import os try: import netCDF4 as netCDF except: import netCDF3 as netCDF import matplotlib.pyplot as plt import time from datetime import datetime from matplotlib.dates import date2num, num2date import pyroms import pyroms_toolbox import _remapping class nctime(object): pass def remap_bdry...
# Django settings for tns_glass project. DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Nyaruka', 'code@nyaruka.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': ...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals import json import os from pipes import quote import re import shlex import shutil i...
import libvirt import os import string import uuid import xml.etree.ElementTree as ET from cephlvc.network import ArpScraper class Domain(object): def __init__(self, virDomain): self.domain = virDomain def __getattr__(self, attr_name): if hasattr(self.domain, attr_name): return ge...
# 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 agreed to in...
""" Navigation of object containers (e.g. workspaces). The primary class is 'Finder':: from doekbase.data_api import nav finder = nav.Finder(...) # see class docs for args and usage """ __author__ = 'Dan Gunter <dkgunter@lbl.gov>' __date__ = '7/30/15' # System from collections import namedtuple import glob imp...
# Copyright 2016 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 agree...
"""This module is for testing the indent rainmeter module.""" import sys from unittest import TestCase INDENT = sys.modules["Rainmeter.indentrainmeter"] def indention_depth_from_initial(line): """Helper method to start with an initial indention type.""" return INDENT.calc_line_indention_depth(line, INDENT...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # util __init__.py from __future__ import unicode_literals from werkzeug.test import Client import os, sys, re, urllib import frappe import requests # utility functions like cint, int, flt, etc. from frappe.utils.data...
import datetime import pickle from django.db import models from django.test import TestCase from django.utils.version import get_version from .models import Container, Event, Group, Happening, M2MModel class PickleabilityTestCase(TestCase): def setUp(self): Happening.objects.create() # make sure the de...
#The MIT License (MIT) #Copyright (c) 2015-2016 mh4x0f P0cL4bs Team #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, mo...
#!/usr/bin/env python # $Id$ # # Author: Thilee Subramaniam # # Copyright 2012 Quantcast 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 ...
#!/usr/bin/env python # INSTRUCTIONS # Your task for this assignment is to combine the principles that you learned # in unit 3, 4 and 5 and create a fully automated program that can display # the cause-effect chain automatically. # In problem set 4 you created a program that generated cause chain # if you provided it ...
"""Learn to estimate functions from examples. (Chapters 18-20)""" from . utils import * import copy import heapq import math import random from collections import defaultdict #______________________________________________________________________________ def rms_error(predictions, targets): return math.sqrt(ms...
import logging from unittest import TestCase from unittest import skipIf from parameterized import parameterized, param from hvac import exceptions from tests import utils from tests.utils.hvac_integration_test_case import HvacIntegrationTestCase @skipIf( utils.vault_version_lt("0.10.0"), "Azure auth method...
# Copyright 2014-2016 Presslabs 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# -*- coding: utf-8 -*- """ IBEIS: main package init TODO: LAZY IMPORTS? http://code.activestate.com/recipes/473888-lazy-module-imports/ """ # flake8: noqa from __future__ import absolute_import, division, print_function, unicode_literals try: import utool as ut import dtool except ImportError as ex: ...
#!/usr/bin/env python3 # Copyright (c) 2014 The Caroline authors. All rights reserved. # Use of this source file is governed by a MIT license that can be found in the # LICENSE file. # Author: Aleksandr Derbenev <alex@technoworks.ru> import json from optparse import OptionParser import os import shutil import random i...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains a general framework for defining graphs of transformations between coordinates, suitable for either spatial coordinates or more generalized coordinate systems. The fundamental idea is that each class is a node in the transformati...
# -*- coding: utf-8 -*- from rest_framework import status as http_status from boto.exception import S3ResponseError import mock from nose.tools import (assert_equal, assert_equals, assert_true, assert_in, assert_false) import pytest from framework.auth import Auth from tests.base import OsfTestCase, get_default_m...
#!/usr/bin/env python # Corey Brune - Oct 2016 #This script starts or stops a VDB #requirements #pip install docopt delphixpy #The below doc follows the POSIX compliant standards and allows us to use #this doc to also define our arguments for the script. """List all VDBs or Start, stop, enable, disable a VDB Usage: ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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...
"""Collection of miscellaneous routines. Miscellaneous tasks should be placed in :py:mod:`draco.core.misc`. """ import numpy as np from numpy.lib.recfunctions import structured_to_unstructured from ._fast_tools import _calc_redundancy def cmap(i, j, n): """Given a pair of feed indices, return the pair index. ...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.orm import backref from sqlalchemy.orm import joinedload from sqlalchemy.orm import relationship from sqlalchemy.orm import selectin_polymorphic fro...
import argparse from os import sys import random from sys import path from os import getcwd import os, sys, inspect, pprint # this is a hack to get the hpe driver module # and it's utils module on the search path. cmd_folder = os.path.realpath(os.path.abspath("..") ) if cmd_folder not in sys.path: sys.path.insert...
# testing/requirements.py # Copyright (C) 2005-2016 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 """Global database feature support policy. Provides decorators to mark test...
from statsmodels.compat.python import iterkeys, itervalues, zip, range from statsmodels.stats.correlation_tools import cov_nearest import numpy as np from scipy import linalg as spl from statsmodels.tools.sm_exceptions import (ConvergenceWarning, IterationLimitWarning) impor...
# 2. Create build/pyglet.wxs from pyglet.wxs, add all file components # 3. Run candle and light on build/pyglet.wxs to generate # ../../dist/pyglet.msi import os import re import shutil import subprocess from uuid import uuid1 from xml.dom.minidom import parse import pkg_resources class PythonVersion(object): ...
"""Support for Z-Wave.""" # pylint: disable=import-outside-toplevel import asyncio import copy from importlib import import_module import logging from pprint import pprint import voluptuous as vol from homeassistant import config_entries from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, EVENT_H...
""" @package mi.instrument.star_asimet.bulkmet.metbk_a.driver @file marine-integrations/mi/instrument/star_aismet/bulkmet/metbk_a/driver.py @author Bill Bollenbacher @brief Driver for the metbk_a Release notes: initial version """ __author__ = 'Bill Bollenbacher' __license__ = 'Apache 2.0' import re import time impo...
import csv import optparse import os import textwrap import sys from .. import NoSuchReport from .. import approve_report from .. import get_report_info from .. import initialize_gcloud from .. import list_reports from .. import reject_report class InvalidCommandLine(ValueError): pass class NotACommand(object)...
# -*- 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...
''' doc ''' import os import bisect import itertools import functools import operator import enum import sys import lzma import threading import time import hashlib import random import re @enum.unique class Op(enum.Enum): ''' doc ''' def __init__(self): ''' doc ''' s...
from __future__ import absolute_import import collections import os import threading import warnings as builtin_warnings import numpy from chainer import _version from chainer import backends # NOQA from chainer import dataset # NOQA from chainer import datasets # NOQA from chainer import distributions # NOQA fro...
# # Copyright (C) 2005-2016 Christoph Rupp (chris@crupp.de). # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
"""Fabric tasks to automate typical database actions. There are three DB tasks: * db.init * db.backup * db.restore To list all available tasks:: fab --list All tasks makes decision about DB engine given from Django settings and performs appropriate actions. Init DB task ------------ Usage:: fab db.init Thi...
# =============================================================================== # Copyright 2011 Jake Ross # # 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
import unittest from wsgid.commands import * from wsgid.test import FakeOptions, fullpath import os import simplejson from mock import patch, Mock import signal ROOT_PATH = fullpath(__file__) FIXTURES_PATH = os.path.join(ROOT_PATH, 'fixtures') APP_PATH = os.path.join(FIXTURES_PATH, "newapp") #Generates a fresh fu...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# encoding: 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): # Adding model 'DndEdition' db.create_table('dnd_dndedition', ( ('id', self.gf('django.db.mode...
#!/usr/bin/env python # ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # 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 ...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
"""Tests for 1-Wire devices connected on OWServer.""" from unittest.mock import patch from pyownet.protocol import Error as ProtocolError import pytest from homeassistant.components.onewire.const import ( DEFAULT_OWSERVER_PORT, DOMAIN, PRESSURE_CBAR, ) from homeassistant.components.sensor import DOMAIN as...
import os import platform ext = '' local_bins = False # change if wanting to test with local binary exes if local_bins: bin_path = os.path.join("..", "..", "bin") if "linux" in platform.platform().lower(): pass bin_path = os.path.join(bin_path, "linux") elif "darwin" in platform.platform()...
# The MIT License (MIT) # # Copyright (c) 2014 Max Holtzberg <mh@uvc.de> # # 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 us...
# Copyright 2016 Google 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, ...
from pyglet.gl import * from pyglet.window import key from ctypes import c_float import math import random import time SECTOR_SIZE = 16 def cube_vertices(x, y, z, n): return [ x-n,y+n,z-n, x-n,y+n,z+n, x+n,y+n,z+n, x+n,y+n,z-n, # top x-n,y-n,z-n, x+n,y-n,z-n, x+n,y-n,z+n, x-n,y-n,z+n, # bottom ...
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 copyright # ...
#!/usr/bin/env python3 # Copyright (c) 2019 Nordic Semiconductor ASA # SPDX-License-Identifier: Apache-2.0 """ Linter for the Zephyr Kconfig files. Pass --help to see available checks. By default, all checks are enabled. Some of the checks rely on heuristics and can get tripped up by things like preprocessor magic, ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals # IMPORTANT: only import safe functions as this module will be included in jinja environment import frappe import operator import re, urllib, datetime, math import babel.dates fr...
# Copyright 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 requ...
# 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 l...
#!/usr/bin/env python # # DataPipeline - A data import and fitting tool # Copyright (C) 2011 Damien Farrell # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...