content
stringlengths
4
20k
import time import unittest from bulbs import config from bulbs.element import Vertex, VertexProxy, EdgeProxy, Edge from .testcase import BulbsTestCase class VertexProxyTestCase(BulbsTestCase): def setUp(self): self.vertices = VertexProxy(Vertex,self.client) def test_create(self): james = s...
"""XVP VNC Console Proxy Server.""" import sys from nova import config from nova.openstack.common import log as logging from nova.openstack.common.report import guru_meditation_report as gmr from nova import service from nova import version from nova.vnc import xvp_proxy def main(): config.parse_args(sys.argv) ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: purefa_arrayname version_added: '2.9' short_description: Con...
"""Convert a NT pathname to a file URL and vice versa.""" def url2pathname(url): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.""" # e.g. # ///C|/foo/bar/spam.foo # becomes # C:\foo\bar\spam.foo import stri...
from hodlib.NodePools.torque import TorquePool class NodePoolUtil: def getNodePool(nodePoolDesc, cfg, log): """returns a concrete instance of NodePool as configured by 'cfg'""" npd = nodePoolDesc name = npd.getName() if name == 'torque': return TorquePool(npd, cfg, log) getNodePool = sta...
# -*- coding: utf-8 -*- import json from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response from django.conf import settings from www.misc.decorators import staff_required, common_ajax_response, verify_permission from www.mi...
"""SCons.Tool.Packaging.targz The targz SRC packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal...
from _nodes import * from _vrpn import * from _dtrack_device import * from _dtrack_target import * #import avango.nodefactory #nodes = avango.nodefactory.NodeFactory('av::vrpn::')
# Check every path through every method of UserList from UserList import UserList from test import test_support, list_tests class UserListTest(list_tests.CommonTest): type2test = UserList def test_getslice(self): super(UserListTest, self).test_getslice() l = [0, 1, 2, 3, 4] u = self.t...
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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 later version. T...
# -*- coding: utf-8 -*- """ Unit tests for analytics logic in framework/analytics/__init__.py """ import mock import re import pytest from django.utils import timezone from nose.tools import * # noqa: F403 from datetime import datetime from addons.osfstorage.models import OsfStorageFile from framework import analyt...
#Namer Check routine by sarakha63 from xml.dom.minidom import parseString from xml.dom.minidom import Node import cookielib import urllib import urllib2 import re import time from datetime import datetime from bs4 import BeautifulSoup from couchpotato.core.helpers.variable import getTitle, tryInt from couchpotato.core....
"""Unit tests for third_party_auth/pipeline.py.""" import random from third_party_auth import pipeline, provider from third_party_auth.tests import testutil # Allow tests access to protected methods (or module-protected methods) under # test. pylint: disable-msg=protected-access class MakeRandomPasswordTest(testu...
"""Annotations for host-driven tests.""" # pylint: disable=W0212 import os class AnnotatedFunctions(object): """A container for annotated methods.""" _ANNOTATED = {} @staticmethod def _AddFunction(annotation, function): """Adds an annotated function to our container. Args: annotation: the ann...
# -*- coding: utf-8 -*- """ oauthlib.utils ~~~~~~~~~~~~~~ This module contains utility methods used by various parts of the OAuth spec. """ from __future__ import absolute_import, unicode_literals try: import urllib2 except ImportError: import urllib.request as urllib2 from oauthlib.common import quote, unqu...
from openerp.osv import orm class ProjectProject(orm.Model): _name = 'project.project' _inherit = ['project.project', 'crowdfunding.campaign']
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db import DatabaseError from mkt.carriers import CARRIER_CHOICE_DICT, CARRIER_MAP from mkt.operators.models import OperatorPermission from mkt.regions import REGIONS_CHOICES_ID_DICT, REGIONS_DICT from mkt.us...
""" API Serializers """ from collections import defaultdict from rest_framework import serializers # pylint: disable=abstract-method class GradingPolicySerializer(serializers.Serializer): """ Serializer for course grading policy. """ assignment_type = serializers.CharField(source='type') count ...
import mock from neutron.extensions import portbindings from neutron.tests.unit import _test_extension_portbindings as test_bindings from neutron.tests.unit.db import test_db_base_plugin_v2 as test_plugin from neutron.tests.unit.extensions import test_l3 as test_l3 from neutron.plugins.ibm.common import constants _...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'certified'} DOCUMENTATION = r''' --- module: aci_tenant_ep_retention_policy short_description: Manage End...
import copy import csv import json import os from datetime import datetime from pkg_resources import resource_filename from nupic.data.file_record_stream import FileRecordStream from nupic.engine import Network from nupic.encoders import DateEncoder from nupic.regions.SPRegion import SPRegion from nupic.regions.TPReg...
import lib.jsonrpclib from lib.jsonrpclib import Fault from lib.jsonrpclib.jsonrpc import USE_UNIX_SOCKETS import SimpleXMLRPCServer import SocketServer import socket import logging import os import types import traceback import sys try: import fcntl except ImportError: # For Windows fcntl = None def get_v...
from collections import defaultdict from fs.errors import ResourceNotFoundError import logging import inspect from path import path from django.http import Http404 from django.conf import settings from edxmako.shortcuts import render_to_string from xmodule.modulestore import ModuleStoreEnum from opaque_keys.edx.keys ...
#!/usr/bin/env python """A representation of an Earth Engine image. See: https://sites.google.com/site/earthengineapidocs for more details. """ # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name import json import apifunction import computedobject import data import depr...
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictconfig import ...
"""NRF24L01 driver for Micro Python """ import pyb # nRF24L01+ registers CONFIG = const(0x00) EN_RXADDR = const(0x02) SETUP_AW = const(0x03) SETUP_RETR = const(0x04) RF_CH = const(0x05) RF_SETUP = const(0x06) STATUS = const(0x07) RX_ADDR_P0 = const(0x0a) TX_ADDR = const(0x10) RX_PW_P0 ...
from testutils import unittest, skip_before_python from testconfig import dsn import psycopg2 class ConnectTestCase(unittest.TestCase): def setUp(self): self.args = None def conect_stub(dsn, connection_factory=None, async=False): self.args = (dsn, connection_factory, async) se...
#!/usr/bin/env python """Chain of Trust artifact generation. Attributes: log (logging.Logger): the log object for this module. """ import logging import os from scriptworker.client import validate_json_schema from scriptworker.ed25519 import ed25519_private_key_from_file from scriptworker.exceptions import Scrip...
from __future__ import absolute_import, division, print_function, with_statement import __builtin__ import contextlib import imp import inspect from __builtin__ import __import__ as ORIGINAL_IMPORT from . import util class ImportWhitelistManager(object): def __init__(self, import_whitelist, safe_modules_config,...
from . import util as test_util init = test_util.import_importlib('importlib') import sys import time import unittest import weakref from test import support try: import threading except ImportError: threading = None else: from test import lock_tests if threading is not None: class ModuleLockAsRLoc...
'''track large binary files Large binary files tend to be not very compressible, not very diffable, and not at all mergeable. Such files are not handled efficiently by Mercurial's storage format (revlog), which is based on compressed binary deltas; storing large binary files as regular Mercurial files wastes bandwidth...
from collections import OrderedDict import pytest CONTRIBUTORS_KWARGS = dict( noargs={}, projects=dict(project_codes=[u"project0"]), languages=dict(language_codes=[u"language0"]), projects_and_languages=dict( project_codes=[u"project0"], language_codes=[u"language0"]), since=dict(...
"""@package PyToAPI This module assigns the drivers to the devices. """ import logging from .serial_driver import SerialDriver from .riot_driver import RiotDriver def driver_from_config(dev_type='serial', *args, **kwargs): """Returns driver instance given configuration""" if dev_type == 'serial': retu...
from pyasn1 import error class TagMap: def __init__(self, posMap={}, negMap={}, defType=None): self.__posMap = posMap.copy() self.__negMap = negMap.copy() self.__defType = defType def __contains__(self, tagSet): return tagSet in self.__posMap or \ self.__...
from openerp import models, api, exceptions, _ class SaleOrder(models.Model): _inherit = "sale.order" @api.multi def button_draft(self): # go from canceled state to draft state for order in self: if order.state != 'cancel': raise exceptions.Warning( ...
from mock_decorators import setup, teardown from threading import Thread import socket import time stop_client_thread = False client_thread = None @setup('Simple echo server') def setup_echo_server(e): global stop_client_thread global client_thread def echo_client_thread(): server_address = socket...
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface _Promise {}; interface A { legacycaller Promise<any> foo(); }; """) results = parser.finish() except: threw = True harness.ok(threw, ...
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import DateField, FieldDoesNotExist from django.db.models.sql.constants...
""" These tests only check url parsing for now. We don't want to require the 'network' resource. """ import os, unittest from http.server import SimpleHTTPRequestHandler from test import support class SocketlessRequestHandler(SimpleHTTPRequestHandler): def __init__(self): pass class SimpleHTTPRequestHan...
""" Installation paths. Map the .data/ subdirectory names to install paths. """ import os.path import sys import distutils.dist as dist import distutils.command.install as install def get_install_command(name): # late binding due to potential monkeypatching d = dist.Distribution({'name':name}) i = instal...
from django.conf import settings from django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''): """ Gets a number (as a number or string), and returns it as a string, using formats definied as arguments: * decimal_sep: Decimal separator symbol...
from collections import defaultdict class MetadataMixin(object): """ This mixin adds metadata functionality to the standard error bundle. Including this in the error bundle allows the app to collect and process metadata during the validation process. """ def __init__(self, *args, **kwargs): ...
import os import sys from setuptools import setup, find_packages # When pip installs anything from packages, py_modules, or ext_modules that # includes a twistd plugin (which are installed to twisted/plugins/), # setuptools/distribute writes a Package.egg-info/top_level.txt that includes # "twisted". If you later un...
"""Functional tests for model.py""" # Some Notes: # # * We don't really have any agreed-upon requirements about what __repr__ # should print, but I'm fairly certain I hit an argument mistmatch at # some point, which is definitely wrong. The test_repr methods are there just # to make sure it isn't throwing an exception...
""" Holds packages table model. """ __author__ = 'Jonny Lamb' __copyright__ = 'Copyright © 2008 Jonny Lamb' __license__ = 'MIT' import sqlalchemy as sa from sqlalchemy import orm from debexpo.model import meta, OrmObject from debexpo.model.users import User from debexpo.lib.constants import PACKAGE_NEEDS_SPONSOR_UNK...
''' Created on March 14, 2014 @author: RobCastellow Copyright (c) 2014 PAC Enterprises, LLC 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 th...
import wizard # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from io import StringIO from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core import management from django.test import TestCase, override_settings from .models import Article class SwappableModelTests(TestCase): # Limit memory usage when ...
""" Tests for the force_publish management command """ import mock import six from django.core.management import CommandError, call_command from contentstore.management.commands.force_publish import Command from contentstore.management.commands.utils import get_course_versions from xmodule.modulestore import ModuleS...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.onyx import onyx_pfc_interface from units.modules.utils import set_module_args from .onyx_module import TestOnyxModule, load_fixture class TestOnyxPfcInterfaceModul...
from math import sqrt from random import uniform from .utils import distance, normalizer normalize = normalizer(0, sqrt(8)) class Alignment: def __init__(self, state=None, moral=None): self.state = state or uniform(-1, 1) self.moral = moral or uniform(-1, 1) @property def description(self...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import logging from ..core import get_core_context from ava.runtime import environ from ava.runtime.config import settings from .bottle import request, response, HTTPError, static_file as _static_file from . im...
from __future__ import print_function import time, sys, signal, atexit from upm import pyupm_moisture as upmMoisture def main(): # Instantiate a Grove Moisture sensor on analog pin A0 myMoisture = upmMoisture.Moisture(0) ## Exit handlers ## # This function stops python from printing a stacktrace when ...
""" Verifies file copies with a trailing slash in the destination directory. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('copies-slash.gyp', chdir='src') test.relocate('src', 'relocate/src') test.build('copies-slash.gyp', chdir='relocate/src') test.built_file_must_match('copies-out-slash/directory/file...
"""The sensor tests for the nexia platform.""" from homeassistant.const import PERCENTAGE, TEMP_CELSIUS from .util import async_init_integration async def test_create_sensors(hass): """Test creation of sensors.""" await async_init_integration(hass) state = hass.states.get("sensor.nick_office_temperatu...
import logging import os from zipfile import ZipFile from gosa.backend.routes.sse.main import SseHandler from gosa.common.event import EventMaker from lxml import objectify, etree from pkg_resources import resource_filename from gosa.backend.plugins.upload.main import IUploadFileHandler from gosa.backend.components.wo...
# -*- coding: utf-8 -*- """ support for skip/xfail functions and markers. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from _pytest.config import hookimpl from _pytest.mark.evaluate import MarkEvaluator from _pytest.outcomes import fail from _pytest.o...
USE_PYTHON3 = True def CheckChangeOnUpload(input_api, output_api): return _CommonChecks(input_api, output_api) def CheckChangeOnCommit(input_api, output_api): return _CommonChecks(input_api, output_api) def _CheckForTranslations(input_api, output_api): shared_keywords = ['i18n('] html_keywords = shared_key...
ProcessToComplete = [ ] ProcessToComplete += [ "properties" ] ProcessToComplete += [ "shape" ] ProcessToComplete += [ "map" ] ProcessToComplete += [ "ig" ] ProcessToComplete += [ "ig_light" ] # *** COMMON NAMES AND PATHS *** EcosystemName = "outgame" EcosystemPath = "common/" + EcosystemName ContinentName = Ecosystem...
""" .. _tut_artifacts_correct_ssp: Artifact Correction with SSP ============================ """ import numpy as np import mne from mne.datasets import sample from mne.preprocessing import compute_proj_ecg, compute_proj_eog # getting some data ready data_path = sample.data_path() raw_fname = data_path + '/MEG/samp...
import json from unittest.mock import patch, Mock from django.test import RequestFactory from federation.hostmeta.django import rfc7033_webfinger_view from federation.hostmeta.django.generators import nodeinfo2_view from federation.utils.django import get_function_from_config from federation.tests.fixtures.hostmeta i...
from ..schedule import build_config from ..misc import get_user class TestSchedule(object): basic_args = { '--verbose': False, '--owner': 'OWNER', '--description': 'DESC', '--email': 'EMAIL', '--last-in-suite': True, '--name': 'NAME', '--worker': 'tala', ...
"""Tests for pblite format decoder and encoder.""" from hangups import pblite from hangups.test import test_pblite_pb2 ############################################################################### # pblite.decode ############################################################################### def test_decode(): ...
from operator import mul as _mul from operator import sub as _sub class SpatialIndexer(object): """Allows fast spatial lookups of entities - quickly find all entities within a given radius of a set of coordinates. Optimised by specifying the most commonly used proximity distance. This affec...
#!/usr/bin/python2 ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if succesful, and the program will be silent. Otherwise the exit status will be 1 and it will log which executables failed which checks. Needs `readelf` (for ELF) and `objdump` (for PE). ''' from __future__ import...
from perceval.backend import (Backend, BackendCommand) class BackendB(Backend): """Mocked backend class used for testing""" def __init__(self, origin, tag=None, archive=None): super().__init__(origin, tag=tag, archive=archive) class BackendCommandB(BackendCommand): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Link', fields=[ ('id', models.AutoField(verbose...
# Test normal conditional branches in cases where the sheer number of # instructions causes some branches to be out of range. # RUN: python %s | llc -mtriple=s390x-linux-gnu | FileCheck %s # Construct: # # before0: # conditional branch to after0 # ... # beforeN: # conditional branch to after0 # main: # 0xffd8 ...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib.auth import get_user_model from django.contrib.admin.sites import AdminSite, NotRegistered from mezzanine.utils.importing import import_dotted_path class LazyAdminSite(Adm...
from eventlet.green import httplib from lxml import etree import mox from oslo.config import cfg import webob import webob.dec import webob.exc from nova.api import ec2 from nova import context from nova import exception from nova.openstack.common import timeutils from nova import test from nova import wsgi CONF = cf...
""" Test suite for SocketServer.py. """ import contextlib import imp import os import select import signal import socket import select import errno import tempfile import unittest import SocketServer import test.test_support from test.test_support import reap_children, reap_threads, verbose try: import threading ...
# -*- 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): # Adding field 'LinkedInAddToProfileConfiguration.trk_partner_name' db.add_column('student_linkedinaddtoprof...
"""Support for Aruba Access Points.""" import logging import re import pexpect import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner, ) from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME import homeassistant.helpers.confi...
{ 'name' : 'Fleet Management', 'version' : '0.1', 'author' : 'OpenERP S.A.', 'sequence': 110, 'category': 'Managing vehicles and contracts', 'website' : 'https://www.odoo.com/page/fleet', 'summary' : 'Vehicle, leasing, insurances, costs', 'description' : """ Vehicle, leasing, insurances,...
from django.conf import settings from django.core.urlresolvers import reverse from openstack_dashboard.test import helpers as test INDEX_URL = reverse("horizon:settings:user:index") class UserSettingsTest(test.TestCase): def test_timezone_offset_is_displayed(self): res = self.client.get(INDEX_URL) ...
from openerp.osv import fields, osv from openerp.tools.translate import _ class survey_print_answer(osv.osv_memory): _name = 'survey.print.answer' _columns = { 'response_ids': fields.many2many('survey.response','survey_print_response',\ 'response_id','print_id', "Answer", re...
import inspect from oslo.config import cfg import webob.dec from ryu.lib import hub from routes import Mapper from routes.util import URLGenerator CONF = cfg.CONF CONF.register_cli_opts([ cfg.StrOpt('wsapi-host', default='', help='webapp listen host'), cfg.IntOpt('wsapi-port', default=8080, help='webapp lis...
from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): name = 'uninstall' usage = '%prog [OPTIONS] PACKAGE_NAMES ...' summary = 'Uninstall packages' def __init__(self)...
from test import test_support import mimetools multifile = test_support.import_module('multifile', deprecated=True) import cStringIO msg = """Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_590453667==_" X-OriginalArrivalTime: 05 Feb 2002 03:43:23.0310 (UTC) FILETIME=[42D88CE0:...
"""Benchmark Tests Definitions.""" import logging from categories import test_set_base _CATEGORY = 'security' class SecurityTest(test_set_base.TestBase): TESTS_URL_PATH = '/%s/test' % _CATEGORY def __init__(self, key, name, doc): """Initialze a benchmark test. Args: key: key for this in dict's...
"""develop tests """ import sys import os, re, shutil, tempfile, unittest import tempfile import site from distutils.errors import DistutilsError from setuptools.compat import StringIO from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dis...
import numpy as np import unittest from op_test import OpTest class TestL1NormOp(OpTest): """Test l1_norm """ def setUp(self): self.op_type = "l1_norm" self.max_relative_error = 0.005 X = np.random.uniform(-1, 1, (13, 19)).astype("float32") X[np.abs(X) < self.max_relative...
""" The By implementation. """ class By(object): """ Set of supported locator strategies. """ ID = "id" XPATH = "xpath" LINK_TEXT = "link text" PARTIAL_LINK_TEXT = "partial link text" NAME = "name" TAG_NAME = "tag name" CLASS_NAME = "class name" CSS_SELECTOR = "css selecto...
""" 10. One-to-one relationships To define a one-to-one relationship, use ``OneToOneField()``. In this example, a ``Place`` optionally can be a ``Restaurant``. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_co...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pants.backend.python.python_requirement import PythonRequirement from pants.backend.python.targets.python_requirement_library import PythonRequirementL...
import unittest, sys sys.path.extend(['.','..','../..','py']) import os import h2o2 as h2o import h2o_cmd, h2o_import as h2i, h2o_browse as h2b from h2o_test import find_file, dump_json, verboseprint expectedZeros = [0, 4914, 656, 24603, 38665, 124, 13, 5, 1338, 51, 320216, 551128, 327648, 544044, 577981, 573487, 57...
import json import os import re from fabric.api import cd, env, get, hide, local, put, require, run, settings, sudo, task from fabric.colors import red from fabric.contrib import files, project from fabric.utils import abort, error # Directory structure PROJECT_ROOT = os.path.dirname(__file__) env.project = 'pycon' e...
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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...
#!/usr/bin/env python """ Custom test runner If args or options, we run the testsuite as quickly as possible. If args but no options, we default to using the spec plugin and aborting on first error/failure. If options, we ignore defaults and pass options onto Nose. Examples: Run all tests (as fast as possible) $ ....
import numpy as np import itertools, logging from ..kern import Kern from ..core.parameterization.variational import NormalPosterior, NormalPrior from ..core.parameterization import Param, Parameterized from ..core.parameterization.observable_array import ObsAr from ..inference.latent_function_inference.var_dtc import...
from scipy.constants import c, epsilon_0, mu_0 from scipy.special import ellipk, ellipkm1 from numpy import sqrt, sinh, log, pi class cpw: def __init__(self, w=10., s=6., t=.1, h=500., l=1000., e1=11.6, material="nb", tgdelta=1e-8): self.w = w*1e-6 self.s = s*1e-6 self.t = t*1e-6 s...
import tempfile import traceback from test_framework.test_framework import PresidentielcoinTestFramework from test_framework.util import * from test_framework.netutil import * class RPCBindTest(PresidentielcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True ...
"""Extensible class instrumentation. The :mod:`sqlalchemy.ext.instrumentation` package provides for alternate systems of class instrumentation within the ORM. Class instrumentation refers to how the ORM places attributes on the class which maintain data and track changes to that data, as well as event hooks installed...
""" mbed CMSIS-DAP debugger Copyright (c) 2015 ARM Limited 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...
RECORD_TYPES = ['A', 'AAAA', 'TXT', 'CNAME', 'MX', 'PTR', 'SRV', 'SPF'] from boto.resultset import ResultSet class ResourceRecordSets(ResultSet): """ A list of resource records. :ivar hosted_zone_id: The ID of the hosted zone. :ivar comment: A comment that will be stored with the change. :ivar cha...
from openerp import models, fields def _filter_trigger_lines(trigger_lines): filtered_trigger_lines = [] unique_tests = [] for trigger_line in trigger_lines: if trigger_line.test not in unique_tests: filtered_trigger_lines.append(trigger_line) unique_tests.append(trigger_li...
import logging from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import six from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSEx...
from ansible.module_utils._text import to_text from ansible.module_utils.basic import env_fallback, return_values from ansible.module_utils.network.common.utils import to_list, EntityCollection from ansible.module_utils.connection import exec_command from ansible.module_utils.connection import Connection, ConnectionErr...
"""Support for w800rf32 devices.""" import logging import W800rf32 as w800 import voluptuous as vol from homeassistant.const import ( CONF_DEVICE, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, ) import homeassistant.helpers.config_validation as cv from homeassistant.helpers.dispatcher import dispat...
import visvis as vv import numpy as np from visvis.pypoints import Pointset def solidCylinder(translation=None, scaling=None, direction=None, rotation=None, N=16, M=16, axesAdjust=True, axes=None): """ solidCylinder( translation=None, scaling=None, direction=None, rotation=None...