content
string
from nova.tests.integrated.v3 import test_servers class ConsoleOutputSampleJsonTest(test_servers.ServersSampleBase): extension_name = "os-console-output" def test_get_console_output(self): uuid = self._post_server() response = self._do_post('servers/%s/action' % uuid, ...
from time import sleep as _sleep import sys absolute_import = (sys.version_info[0] >= 3) if absolute_import : # Because this syntaxis is not valid before Python 2.5 exec("from . import db") else : import db # always sleep at least N seconds between retrys _deadlock_MinSleepTime = 1.0/128 # never sleep mor...
import pytest from bit.base58 import b58decode, b58decode_check, b58encode, b58encode_check from bit.format import MAIN_PUBKEY_HASH from .samples import BINARY_ADDRESS, BITCOIN_ADDRESS, PUBKEY_HASH def test_b58encode(): assert b58encode(BINARY_ADDRESS) == BITCOIN_ADDRESS assert b58encode(BINARY_ADDRESS[:1]) ...
import argparse import inspect from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer or a string. """ def __...
from idpanel.training.vectorization import load_raw_feature_vectors from idpanel.training.features import load_raw_features from idpanel.labels import load_labels from sklearn.cross_validation import train_test_split from sklearn.linear_model import LogisticRegression from sklearn.metrics import confusion_matrix import...
__all__ = ['wrap_errors', 'lazy_property'] class wrap_errors(object): """Helper to make function return an exception, rather than raise it. Because every exception that is unhandled by greenlet will be logged, it is desirable to prevent non-error exceptions from leaving a greenlet. This can done with...
"""Mock instance of ArchivedHttpRequest used for testing.""" class ArchivedHttpRequest(object): """Mock instance of ArchivedHttpRequest in HttpArchive.""" def __init__(self, command, host, path, request_body, headers): """Initialize an ArchivedHttpRequest. Args: command: a string (e.g. 'GET' or 'P...
import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 class Infra(recipe_util.Recipe): """Basic Recipe class for the Infrastructure repositories.""" @staticmethod def fetch_spec(_props): solution = lambda name...
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-proxy-init.py ######################################################################## __RCSID__ = "$Id$" import sys import getpass import DIRAC from DIRAC.Core.Base import Script class Params:...
# vi: syntax=python:et:ts=4 import os from SCons.Script import * from config_check_utils import * def CheckSDL(context, sdl_lib = "SDL", require_version = None): if require_version: version = require_version.split(".", 2) major_version = int(version[0]) minor_version = int(version[1]) ...
from collections.abc import Iterable import logging import sys import textwrap import warnings from sqlalchemy.engine import url from . import sqla_compat from .compat import binary_type from .compat import string_types log = logging.getLogger(__name__) # disable "no handler found" errors logging.getLogger("alembic...
from __future__ import print_function import os import six import pyrax pyrax.set_setting("identity_type", "rackspace") creds_file = os.path.expanduser("~/.rackspace_cloud_credentials") pyrax.set_credential_file(creds_file) imgs = pyrax.images cf = pyrax.cloudfiles print("You will need to select an image to export, ...
from openerp.osv import fields, orm import time from openerp.tools.translate import _ class wizard_select_template(orm.TransientModel): _name = "wizard.select.move.template" _columns = { 'template_id': fields.many2one( 'account.move.template', 'Move Template', requ...
from __future__ import absolute_import, print_function import logging import requests from requests.exceptions import Timeout from threading import Thread from time import sleep import six import ssl from tweepy.models import Status from tweepy.api import API from tweepy.error import TweepError from tweepy.utils i...
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Permission' db.create_table('permissions_permission', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ...
import torch from echotorch.datasets.NARMADataset import NARMADataset import echotorch.nn as etnn import echotorch.utils from torch.autograd import Variable from torch.utils.data.dataloader import DataLoader import numpy as np import mdp # Dataset params train_sample_length = 5000 test_sample_length = 1000 n_train_sam...
""" Regression tests for a few ForeignKey bugs. """ from django.db import models # If ticket #1578 ever slips back in, these models will not be able to be # created (the field names being lower-cased versions of their opposite # classes is important here). class First(models.Model): second = models.IntegerField(...
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno...
from _hardware import Expectation from _hardware_android import HardwareAndroid CPU_CLOCK_RATE = 2035200 MEM_CLOCK_RATE = 13763 GPU_CLOCK_RATE = 670000000 GPU_POWER_LEVEL = 1 # lower is faster, minimum is 0 class HardwarePixel2(HardwareAndroid): def __init__(self, adb): HardwareAndroid.__init__(self, adb) d...
import os import tempfile import unittest from coalib.output.ConfWriter import ConfWriter from coalib.parsing.ConfParser import ConfParser class ConfWriterTest(unittest.TestCase): example_file = ("to be ignored \n" " save=true\n" " a_default, another = val \n" ...
from pymqi.CMQCFC import MQCMD_STATISTICS_CHANNEL, MQCMD_STATISTICS_Q from datadog_checks.ibm_mq.stats.base_stats import BaseStats from datadog_checks.ibm_mq.stats.queue_stats import QueueStats from ..metrics import METRIC_PREFIX, channel_stats_metrics, queue_stats_metrics from ..stats import ChannelStats try: i...
#! /usr/bin/env python "Remote RCS -- command line interface" import sys import os import getopt import string import md5 import tempfile from rcsclient import openrcsclient def main(): sys.stdout = sys.stderr try: opts, rest = getopt.getopt(sys.argv[1:], 'h:p:d:qvL') if not rest: ...
# -*- coding: utf-8 -*- ''' Created on 2014��11��21�� @author: ��� ''' import unittest from lxml.etree import Element from feedin import util class Test(unittest.TestCase): def test_etree_to_dict(self): root = Element('div') root.append(Element('a', {'href': 'http://aaa.bbb/'})) result =...
from __future__ import absolute_import, division, unicode_literals from pip.vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError(...
""" Holds global web application state and the WSGI handler. You can run this script for a one-process webapp. Further, you can pass in ``--check`` which will create the app and then exit making it easier to suss out startup and configuration issues. """ import sys from waitress import serve from ichnaea.conf imp...
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import os import shutil import tempfile import unittest from mkdocs import config from mkdocs import utils from mkdocs.config import config_options from mkdocs.exceptions import ConfigurationError from mkdocs.tests.base import dedent def ...
""" Verifies build of an executable with C++ define specified by a gyp define, and the use of the environment during regeneration when the gyp file changes. """ import os import TestGyp # Regenerating build files when a gyp file changes is currently only supported # by the make generator. test = TestGyp.TestGyp(forma...
import sys def __getfilesystemencoding(): ''' Note: there's a copy of this method in interpreterInfo.py ''' try: ret = sys.getfilesystemencoding() if not ret: raise RuntimeError('Unable to get encoding.') return ret except: try: #Handle Jytho...
import sys import os import glob import optparse # Import SIP's configuration module so that we have access to the error # reporting. Then try and import the configuration modules for both PyQt3 and # PyQt4. try: import sipconfig except ImportError: sys.stderr.write("Unable to import sipconfig. Please make ...
import unittest from rx import Observable, return_value, throw, empty, create from rx.testing import TestScheduler, ReactiveTest from rx.disposable import SerialDisposable from rx.operators import map, map_indexed on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_erro...
from eve.utils import config from apps.publish.published_item import PublishedItemResource, PublishedItemService from superdesk.metadata.utils import aggregations from superdesk.notification import push_notification from apps.archive.common import get_user import superdesk from superdesk.utc import utcnow query_filte...
import os from lxml import etree from django.conf import settings from ConfigParser import SafeConfigParser from owslib.iso import MD_Metadata from pycsw import server from geonode.catalogue.backends.generic import CatalogueBackend as GenericCatalogueBackend from geonode.catalogue.backends.generic import METADATA_FORMA...
# -*- coding: utf-8 -*- """ This module contains the functional tests for using virbox. :copyright: (c) 2012 by Sean Plaice :license: ISC, see LICENSE for more details. """ #import logging #import testify # #from virtbox.manage import ( # modifyvm, # storageattach, # startvm, # ) #from vir...
from oslo_config import cfg from nova import block_device from nova.compute import vm_states from nova import context from nova import objects from nova import test from nova.tests.unit import fake_instance from nova.virt import imagecache CONF = cfg.CONF swap_bdm_128 = [block_device.BlockDeviceDict( {'id': ...
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory from lms.djangoapps.course_blocks.api import get_course_blocks from openedx.core.djangolib.testing.utils import get_mock_request from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.modulesto...
from __future__ import print_function import datetime from helpers import unittest import luigi import luigi.notifications from luigi.mock import MockTarget from luigi.util import inherits luigi.notifications.DEBUG = True class A(luigi.Task): def output(self): return MockTarget('/tmp/a.txt') def ...
import os import datetime import dateutil.tz import logging import lib.config import lib.connection import lib.item import lib.plugin from lib.shtime import Shtime from lib.module import Modules import lib.utils from lib.model.smartplugin import SmartPlugin from lib.constants import (YAML_FILE, CONF_FILE, DEFAULT_FI...
"Simple Fts backend" import os from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db.models import Q from django.db import transaction from fts.backends.base import BaseClass, BaseModel, BaseManager from fts.models import IndexWord, Index ...
from __future__ import absolute_import, division, print_function import numpy as np import skxray.core.calibration as calibration import skxray.core.calibration as core def _draw_gaussian_rings(shape, calibrated_center, r_list, r_width): R = core.radial_grid(calibrated_center, shape) I = np.zeros_like(R) ...
#! /usr/bin/env python __author__ = '<EMAIL>' class Segment( object ): """ A Class for representing a segment of a Nucmer Alignment """ def __init__(self, start, end, source=None): assert isinstance(start, int) assert isinstance(end, int) assert start != end self._star...
import networkx import matplotlib.pyplot as plt def input_edges_list(): """считывает список рёбер в форме: в первой строке N - число рёбер, затем следует N строк из двух слов и одного числа слова - названия вершин, концы ребра, а число - его вес return граф в форме словаря рёбер и соответствую...
''' Abbreviation Extension for Python-Markdown ========================================== This extension adds abbreviation handling to Python-Markdown. Simple Usage: >>> import markdown >>> text = """ ... Some text with an ABBR and a REF. Ignore REFERENCE and ref. ... ... *[ABBR]: Abb...
LOCALE_MAPPING = { 'ar': 'ar', 'az': 'az', 'bg': 'bg', 'ca': 'ca', 'cs': 'cs', 'cy': 'cy', 'da': 'da', 'de': 'de', 'el': 'el', 'es': 'es', 'et': 'et', 'fa': 'fa', 'fi': 'fi', 'fr': 'fr', 'gl': 'gl', 'he': 'he', 'hr': 'hr', 'hu': 'hu', 'id': 'id...
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import tmp_dnn import tta features = [ # "hu", # "tutorial", "haralick", # "aaronmoments", # "lbp", # "pftas", # "zernike_moments", # "image_siz...
class BaseContext(object): def __init__(self, evaluator, parent_context=None): self.evaluator = evaluator self.parent_context = parent_context def get_root_context(self): context = self while True: if context.parent_context is None: return context ...
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
from abc import abstractmethod, abstractproperty from twitter.common.lang import Interface __all__ = ( 'BindingHelper', 'CachingBindingHelper', 'apply_all', 'clear_binding_caches', 'unregister_all', ) # The registry for binding helpers. _BINDING_HELPERS = [] # TODO(wickman) Update the pydocs to remove r...
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} import re import struct import socket from ansible.module_utils.network.nxos.nxos import get_config, load_config from ansible.module_utils.network.nxos.nxos import nxos_argument_spe...
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.test import TestCase, override_settings from django.views.generic.base import View from .models import Artist, Author, Page @override_settings(ROOT_URLCONF='generic_views.urls') class Deta...
__all__ = ['VIEW_SET_URL', 'VIEW_SET_VIEW'] VIEW_SET_URL = """from rest_framework.routers import SimpleRouter from {{ app }} import views router = SimpleRouter() {% for model in models %} router.register(r'{{ model | lower }}', views.{{ model }}ViewSet, '{{model}}'){% endfor %} urlpatterns = router.urls """ VIEW...
from __future__ import print_function import numpy as np from .distributions import * __all__ = ["Model", "Node", "data_declaration", "data_definition",\ "generate_h", "generate_cpp"] class Model: def __init__(self): self.nodes = [] self.indices = {} self.num_params = 0 d...
""" SFTP file object """ from __future__ import with_statement from binascii import hexlify from collections import deque import socket import threading import time from paramiko.common import DEBUG from paramiko.file import BufferedFile from paramiko.py3compat import long from paramiko.sftp import CMD_CLOSE, CMD_RE...
import datetime import iso8601 import mock from oslo_utils import timeutils from nova import context from nova import db from nova.objects import bandwidth_usage from nova import test from nova.tests.unit.objects import test_objects class _TestBandwidthUsage(test.TestCase): def setUp(self): super(_Test...
from oslo_serialization import jsonutils as json from six.moves.urllib import parse as urllib from tempest.api_schema.response.compute.v2_1 import services as schema from tempest.common import service_client class ServicesClient(service_client.ServiceClient): def list_services(self, **params): url = 'os...
from openerp import models, fields from openerp import tools class ReportProjectTaskUser(models.Model): _inherit = 'report.project.task.user' vehicle_id = fields.Many2one( comodel_name='fleet.vehicle', string='Vehicle', readonly=True) def init(self, cr): super(ReportProjectTaskUser, self...
import pprint USER_AGENT_PRODUCT="Ansible-gce" USER_AGENT_VERSION="v1" def gce_connect(module, provider=None): """Return a Google Cloud Engine connection.""" service_account_email = module.params.get('service_account_email', None) pem_file = module.params.get('pem_file', None) project_id = module.para...
from five import grok from htmlentitydefs import entitydefs from plone.intelligenttext.transforms import \ convertHtmlToWebIntelligentPlainText from tn.plonemailing import interfaces import lxml.html import re links_with_href_re = re.compile( r'(?m)<a([^<]+)href="([^<"]+)"([^<]*)>([^<]+)<\/a>', re.IGNOREC...
#!/usr/bin/python usage = "sanityCheck_FakeDb.py [--options]" description = "provides unit tests and basic checks of FakeDb functionality" author = "<EMAIL>" #------------------------------------------------- import os import random from ligoTest.gracedb.rest import FakeDb import simUtils as utils import pipeline...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import abs, asarray, cos, exp, arange, pi, sin, sqrt, sum from .go_benchmark import Benchmark class Easom(Benchmark): r""" Easom objective function. This class defines the Easom [1]_ global optimization ...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class ListChannelsByID(Choreography): def __init__(self, temboo_session): """ Creat...
#=============================================================================== # code from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465 # all (c) etc. are of the authors of this procedures, see link above #=============================================================================== def xc...
import atexit, os, unittest ##import comtypes import comtypes.typeinfo, comtypes.client class TypeLib(object): """This class collects IDL code fragments and eventually writes them into a .IDL file. The compile() method compiles the IDL file into a typelibrary and registers it. A function is also ...
import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.dirname(SCRIPT_DIR) DATA_DIR = os.path.join(SCRIPT_DIR, 'data') CHROME_SRC = os.path.dirname(os.path.dirname(os.path.dirname(PARENT_DIR))) MOCK_DIR = os.path.join(CHROME_SRC, "third_party", "pymock") # Fo...
"""Integration tests for maths operations.""" from __future__ import absolute_import, division, print_function from six.moves import (filter, input, map, range, zip) # noqa import numpy as np import numpy.ma as ma import unittest import biggus import biggus.tests.unit.init._aggregation_test_framework as test_framew...
import decimal import json import unittest import uuid from django import forms from django.core import exceptions, serializers, validators from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test import TransactionTestCase, override_settings from django...
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class MempoolLimitTest(BitcoinTestFramework): def __init__(self): self.txouts = gen_return_txouts() def setup_network(self): self.nodes = [] self.nodes.append(start_node(0, self.options.tm...
""" FR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField,...
import types from django.conf import settings from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext, TemplateDoesNotExist from django.utils.decorators import classonlymethod from django_conneg.views import ContentNegotiatedView from django_conneg.decorators impo...
""" Copyright (c) 2016 Keith Sterling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
from model.contact import Contact from random import randrange def test_change_in_the_contact(app,db): if len(db.get_contact_list()) == 0: app.contact.add(Contact(bday="//div[@id='content']/form/select[1]//option[4]", bmonth= "//div[@id='content']/form/select[2]//option[3]",...
import argparse import errno import os import subprocess import sys def MakeDirectories(path): try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): return 0 else: return -1 return 0 def ProcessInfoPlist(args): output_plist_file = os.path...
import logging from scipy.stats import norm import numpy as np from robo.acquisition_functions.base_acquisition import BaseAcquisitionFunction logger = logging.getLogger(__name__) class LogEI(BaseAcquisitionFunction): def __init__(self, model, par=0.0, **kwargs): r""" Computes for a given x th...
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import os try: from banana import template TEMPLATE_MISSING = False except ImportError: TEMPLATE_MISSING = True import pytest from .helpers import create_tempfile, cleanup_tempfiles, temp_folder from . import here @pytest.ma...
# -*- coding: utf-8 -*- from datetime import date, datetime, timedelta from django.conf import settings from django.db import models from django.utils import timezone from django.utils.translation import ugettext as _ User = settings.AUTH_USER_MODEL DURATION = 30 # summer starts 1st June, ends 15th August SUMMER = ...
import os import re from invenio.legacy.dbquery import run_sql def Print_Success_CPLX(parameters, curdir, form, user_info=None): global rn act = form['act'] doctype = form['doctype'] category = rn.split('-') categ = category[2] #Path of file containing group group_id = "" if os.path.e...
from pykmer.basics import kmers from pykmer.file import readFasta import pykmer.kfset as kfset import gzip import sys def isFasta(nm): """does this filename look like a FASTA file?""" if nm.endswith(".fa"): return True if nm.endswith(".fas"): return True if nm.endswith(".fasta"): ...
"""Numerical phase-plane analysis of the Hodgkin-Huxley neuron ---------------------------------------------------------------- hh_phaseplane makes a numerical phase-plane analysis of the Hodgkin-Huxley neuron (``hh_psc_alpha``). Dynamics is investigated in the V-n space (see remark below). A constant DC can be specif...
"""empty message Revision ID: 41a93799080 Revises: 1a9765a646b Create Date: 2015-07-02 14:38:39.418104 """ # revision identifiers, used by Alembic. revision = '41a93799080' down_revision = '1a9765a646b' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### comm...
from . import Framework class GitBlob(Framework.TestCase): def setUp(self): super().setUp() self.blob = ( self.g.get_user() .get_repo("PyGithub") .get_git_blob("53bce9fa919b4544e67275089b3ec5b44be20667") ) def testAttributes(self): self.asse...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class Score(Choreography): def __init__(self, temboo_session): """ Create a new ins...
# -*- coding: utf-8 -*- """ *************************************************************************** DeleteColumn.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com ************************...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <<EMAIL>> This file is part of Ansible Ansible 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 Founda...
import os from plugins import BaseAligner from yapsy.IPlugin import IPlugin from asmtypes import ArastDataInputError class BwaAligner(BaseAligner, IPlugin): def run(self, contig_file=None, reads=None, merged_pair=False): ### Data Checks if len(self.data.contigfiles) != 1: raise ArastDa...
if __name__ == '__main__': import sys import os pkg_dir = (os.path.split( os.path.split( os.path.split( os.path.abspath(__file__))[0])[0])[0]) parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'test...
import datetime import uuid from oslo.config import cfg import webob from nova.api.openstack.compute import plugins from nova.api.openstack.compute.plugins.v3 import multiple_create from nova.api.openstack.compute.plugins.v3 import servers from nova.compute import api as compute_api from nova.compute import flavors f...
from __future__ import unicode_literals from frappe.model.document import Document import frappe from frappe import _ from frappe.utils import comma_and, validate_email_add sender_field = "email_id" class DuplicationError(frappe.ValidationError): pass class JobApplicant(Document): def onload(self): offer_letter =...
import mock from os_brick.initiator import connector from nova.tests.unit.virt.libvirt.volume import test_volume from nova.virt.libvirt.volume import vrtshyperscale DEVICE_NAME = '{8ee71c33-dcd0-4267-8f2b-e0742ecabe9f}' DEVICE_PATH = '/dev/8ee71c33-dcd0-4267-8f2b-e0742ec' class LibvirtHyperScaleVolumeDriverTestCas...
"""Checks WebKit style for test_expectations files.""" import logging import optparse import os import re import sys from common import TabChecker from webkitpy.common.host import Host from webkitpy.layout_tests.models.test_expectations import TestExpectationParser _log = logging.getLogger(__name__) class TestExp...
import warnings warnings.simplefilter(action="ignore", category=RuntimeWarning) warnings.simplefilter(action="ignore", category=PendingDeprecationWarning) import pytest from tempfile import NamedTemporaryFile import os from psutil import virtual_memory import hicexplorer.hicAggregateContacts mem = virtual_memory() me...
""" nosetests setuptools command ---------------------------- The easiest way to run tests with nose is to use the `nosetests` setuptools command:: python setup.py nosetests This command has one *major* benefit over the standard `test` command: *all nose plugins are supported*. To configure the `nosetests` comman...
# -*- coding: utf-8 -*- from __future__ import absolute_import from schematics.types import IntType from schematics.types import LongType from schematics.types import FloatType from schematics.types import StringType from schematics.types import BooleanType from schematics.types.compound import DictType from schemati...
from openerp.osv import osv #TODO:REMOVE this wizard is not used class account_payment_make_payment(osv.osv_memory): _name = "account.payment.make.payment" _description = "Account make payment" def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch accordin...
import os from setuptools import setup from setuptools import Extension from setuptools.command.build_ext import build_ext as BuildExt from subprocess import Popen DIR = os.path.abspath(os.path.dirname(__file__)) LIB_OBJECTS = ['libjsonnet.o', 'lexer.o', 'parser.o', 'static_analysis.o', 'vm.o'] MODULE_SOURCES = ['_js...
import optparse import os import shlex import sys import textwrap from psshlib import version _DEFAULT_PARALLELISM = 32 _DEFAULT_TIMEOUT = 0 # "infinity" by default def common_parser(): """ Create a basic OptionParser with arguments common to all pssh programs. """ # The "resolve" conflict handl...
""" This module contains the base class used to manage the application objects configuration: - representation, - date -... """ from __future__ import print_function from logging import getLogger, INFO from dateutil import tz from alignak_webui import get_app_config # Set logger level to INFO, this ...
# coding: utf8 from __future__ import unicode_literals from .model import Model from ... import describe from ...describe import Dimension, Synapses, Biases, Gradient from ...api import wrap, layerize from .._lsuv import svd_orthonormal from ..util import copy_array def BiLSTM(nO, nI): """Create a bidirectional ...
import TaskPanel def load(): """Load the tool""" TaskPanel.createTask()
from PyQuante.IO.Data import Data class Handler(object): key = "xyz" description = "XYZ File Format" ext = ".xyz" def read(self,string): """ Arguments: - string: String to parse Return: - data: Data object, with a molecule and a molecul...
from boto.exception import BotoServerError class LimitExceededException(BotoServerError): pass class ResourceConflictException(BotoServerError): pass class InvalidConfigurationException(BotoServerError): pass class TooManyRequestsException(BotoServerError): pass class InvalidParameterException...