gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2011 Justin Santa Barbara # 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...
# -*- test-case-name: go.routers.app_multiplexer.tests.test_vumi_app -*- import json from twisted.internet.defer import inlineCallbacks from vumi import log from vumi.config import ConfigDict, ConfigList, ConfigInt, ConfigText from vumi.components.session import SessionManager from vumi.message import TransportUserMe...
""" Custom `Screen` class for the `pyte` library. Changes compared to the original `Screen` class: - We store the layout in a prompt_toolkit.layout.screen.Screen instance. This allows fast rendering in a prompt_toolkit user control. - 256 colour and true color support. - CPR support and device attrib...
"""SCons.Tool.FortranCommon Stuff for processing Fortran, common to all fortran dialects. """ # # __COPYRIGHT__ # # 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, inclu...
# coding: utf-8 # In[1]: # The PCA approach seems to fail in bright regions. As you expect... # In[2]: # imports import os from shfi_otf_pipeline import make_apex_cubes import time # for performance analysis from astropy import units as u import FITS_tools import image_tools import numpy as np # for bigger figur...
""" This module provies `sunpy.timeseries.GenericTimeSeries` which all other `sunpy.timeseries.TimeSeries` classes inherit from. """ import copy import warnings from collections import OrderedDict import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import astropy import astropy.units as u fro...
# 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...
""" Module :mod:`pyesgf.logon` ========================== Manage the client's interaction with ESGF's security system. Using this module requires installing the MyProxyClient_ library. .. _MyProxyClient: http://pypi.python.org/pypi/MyProxyClient To obtain ESGF credentials create a :class:`LogonManager` instance an...
""" ============================================================= Online Latent Dirichlet Allocation with variational inference ============================================================= This implementation is modified from Matthew D. Hoffman's onlineldavb code Link: http://matthewdhoffman.com/code/onlineldavb.tar...
# coding=utf-8 """ Download mode implementation. """ from __future__ import division import os import re import sys import mimetypes import threading from time import sleep, time from .output import RawStream from .models import HTTPResponse from .utils import humanize_bytes from .compat import urlsplit PARTIAL_CON...
# Copyright (c) 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 or agreed to ...
# Copyright 2012 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 ...
from core.himesis import Himesis, HimesisPostConditionPattern import cPickle as pickle from uuid import UUID class HMoveOneOutputIndirectMatchDiffRulesRHS(HimesisPostConditionPattern): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMoveOneOutputIndirectMatchDiffRu...
from flask import redirect, render_template, request, \ url_for, Blueprint, jsonify, session, Response from project import utils, database_wrapper from project.services.auth import Auth from flask.ext.api import FlaskAPI, exceptions from flask.ext.api.status import * from models import user from bson.objectid impor...
# -*- coding: utf-8 -*- """ zkb.bodygenerators ~~~~~~~~~~~~~~~~~~ Converter from payload of input file to body content of output. :Copyright: Copyright 2014 Yang LIU <[email protected]> :License: BSD, see LICENSE for details. """ import re import os import hashlib from markdown import Markdown from markdown.inline...
import re import os import csv import xml.etree.ElementTree as ET import logging import glob from datetime import datetime from collections import OrderedDict from bs4 import BeautifulSoup #html parser class RunParser(object): """Parses an Illumina run folder. It generates data for statusdb notable attribut...
# doctest r''' Test the .npy file format. Set up: >>> import sys >>> from io import BytesIO >>> from numpy.lib import format >>> >>> scalars = [ ... np.uint8, ... np.int8, ... np.uint16, ... np.int16, ... np.uint32, ... np.int32, ... np.uint6...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'grid_layout.ui' # # Created: Mon Jun 19 21:36:01 2017 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except At...
# Copyright 2015, Kay Hayen, mailto:[email protected] # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
import operator import logging import itertools import contextlib import claripy from .plugin import SimStatePlugin from .. import sim_options from ..state_plugins.sim_action import SimActionObject l = logging.getLogger(name=__name__) class SimStateHistory(SimStatePlugin): """ This class keeps track of his...
# 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...
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.test.utils import override_settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from ..models import Article from bogofilter.models import BogofilterComment...
# tempfile.py unit tests. import tempfile import errno import io import os import signal import shutil import sys import re import warnings import contextlib import unittest from test import test_support as support warnings.filterwarnings("ignore", category=RuntimeWarning, ...
import re from inspect import getargspec from functools import wraps from django.utils.datastructures import SortedDict from codenode.external.jsonrpc.site import jsonrpc_site from codenode.external.jsonrpc.types import * from codenode.external.jsonrpc.exceptions import * default_site = jsonrpc_site KWARG_RE = re.comp...
from itertools import chain from nineml.user.component import Property, Component, Prototype, Definition from nineml.exceptions import ( NineMLUsageError, NineMLNameError, name_error, NineMLUnitMismatchError) from nineml.base import ( ContainerObject, DynamicPortsObject) class Initial(Property): """ R...
""" Test the 'register' command. """ from __future__ import print_function import os import sys import time import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class RegisterCommandsTestCase(TestBase): mydir = TestBase.compute...
# 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...
"""The tests for the MQTT cover platform.""" import unittest from homeassistant.setup import setup_component from homeassistant.const import STATE_OPEN, STATE_CLOSED, STATE_UNKNOWN import homeassistant.components.cover as cover from homeassistant.components.cover.mqtt import MqttCover from tests.common import ( g...
# -*- coding: utf-8 -*- import os import warnings import django from django.utils import six from django.db.models import fields as django_fields from django.core.management.base import BaseCommand, CommandError from django.db import models from django.apps import apps from collections import OrderedDict class C(obje...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import functools import json import os import random import unittest import warnings from monty.json import MontyDecoder from monty.os.path import which from pymatgen.core.lattice import Lattice from pymatgen...
# Copyright (C) 2012-2013 Red Hat, 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 la...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. import abc from collections import OrderedDict import os from os.path import join as jp from jenkinsflow.api_base import UnknownJobException, BuildResult, Progress from .abstract_ap...
# 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 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import atexit import...
from pamqp import specification from pamqp.body import ContentBody from amqpstorm import Channel from amqpstorm import exception from amqpstorm.basic import Basic from amqpstorm.tests.utility import FakeConnection from amqpstorm.tests.utility import TestFramework class BasicExceptionTests(TestFramework): def tes...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
""" Read a SAS XPort format file into a Pandas DataFrame. Based on code from Jack Cushman (github.com/jcushman/xport). The file format is defined here: https://support.sas.com/techsup/technote/ts140.pdf """ from datetime import datetime import pandas as pd from pandas.io.common import get_filepath_or_buffer, BaseIt...
# Copyright 2013 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...
# 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...
from ionotomo import * import numpy as np import pylab as plt import h5py import cmocean import os import logging as log import gpflow as gp class RationalQuadratic(gp.kernels.Stationary): def __init__(self, input_dim=1, variance=1.0, alpha=1.0, lengthscales=None, active_dims=[0], ARD=False, alpha_prior=None):...
import uuid from django.test import SimpleTestCase, TestCase from django.test.utils import override_settings from casexml.apps.case.mock import CaseFactory, CaseStructure, CaseIndex from casexml.apps.case.const import CASE_INDEX_EXTENSION, UNOWNED_EXTENSION_OWNER_ID from casexml.apps.case.tests.util import delete_all_c...
# 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...
#! /opt/rocks/bin/python # # @Copyright@ # # Rocks(r) # www.rocksclusters.org # version 6.1.1 (Sand Boa) # # Copyright (c) 2000 - 2014 The Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, ar...
"""Subsystems vocabulary from http://ontology.projectchronos.eu/subsystems/?format=jsonld.""" # Listed classes: # "Spacecraft_Communication": models.Classes(name="Spacecraft_Communication"), # "Spacecraft_Propulsion": models.Classes(name="Spacecraft_Propulsion"), # "Spacecraft_Detector": models.Classes(n...
#!/usr/bin/python2 # Copyright 2014 CloudFounders NV # # 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 ...
# =========================================================================== import swap import subprocess,sys,os,time import numpy as np #from subject import Ntrajectory # ====================================================================== """ NAME logging.py PURPOSE Bits and pieces to...
# Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.conf import settings from django.core.files.storage import default_storage from uw_canvas import Canvas from uw_canvas.accounts import Accounts from uw_canvas.admins import Admins from uw_canvas.courses import Courses fr...
''' .. autoclass:: TestLoader :members: :member-order: bysource ''' import os import re import sys import unittest from importlib import import_module from .utils import LOGGER __all__ = ['TestLoader'] def issubclass_safe(cls, base_cls): try: return issubclass(cls, base_cls) except TypeError...
# -*- coding: UTF8 -*- # ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2010. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** import os import racy from racy.rutils import memoize def must_be_overloaded(f...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
import ftplib import requests import tempfile import json import os import sys ''' Created on 07 Sep 2013 @author: rob dobson ''' class HostedConfigFile(): hostedDataLocations = [] latestFileVersion = -1 def initFromFile(self, fName): with open(fName, 'r') as jsonFile: local...
import logging import sys import types from functools import wraps from functools import partial from .error import SleuthError, SleuthNotFoundError from ._util import import_, set_trace __all__ = ['breakOnEnter', 'breakOnException', 'breakOnExit', 'breakOnResult', 'callOnEnter', 'callOnException', 'call...
import argparse import itertools import string import struct import sys # Accepts list of tuples [(mergeable, value)] and merges fields where # mergeable is True. def merge(iterable, merge=lambda a,b:a+b): for k, g in itertools.groupby(iterable, key=lambda a:a[0]): if k is True: yield reduce(m...
# Copyright 2012-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 or agreed ...
# GP4_Table.py : P4 Table Object # ## @package GP4 # # This is a table Instance (all Tables are unique) from GP4_Utilities import * #from GP4_Parser_Function_Code import * from GP4_AST_object import AST_object import GP4_Exceptions import sys class Table(AST_object): ## Construct new Table object. # @param ...
# Copyright 2014 Alcatel-Lucent USA 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...
# Copyright 2021 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # Build/install the iree-compiler-backend python package. # Note that this includes a relatively large...
# -*- coding: utf-8 -*- from __future__ import with_statement from cms.tests.menu_page_viewperm import ViewPermissionTests from cms.compat import get_user_model __all__ = [ 'ViewPermissionComplexMenuStaffNodeTests', ] class ViewPermissionComplexMenuStaffNodeTests(ViewPermissionTests): """ Test CMS_PUBLI...
import math class Fraction(object): precision = 16 def __init__(self, numerator, denominator=1): """ :type numerator: int, float :type denominator: int """ if isinstance(numerator, float) and denominator == 1: self.numerator = Fraction.from_float(numerator...
import cProfile import json import argparse import glob import collections import itertools import cv2 import numpy as np import os def region_of_interest(img, vertices): mask = np.zeros_like(img) if len(img.shape) > 2: channel_count = img.shape[2] select_mask_color = (255,) * channel_count else: ...
from __future__ import absolute_import, unicode_literals from django import forms from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME from django.forms.util import ErrorDict, ErrorList from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet from d...
import struct import unittest import zstandard as zstd def multithreaded_chunk_size(level, source_size=0): params = zstd.ZstdCompressionParameters.from_level( level, source_size=source_size ) return 1 << (params.window_log + 2) class TestCompressor_compress(unittest.TestCase): def test_com...
from __future__ import unicode_literals import uuid import jinja2 import os import copy from IPython.display import HTML from cytoolz.dicttoolz import valmap, merge from IPython.display import display_html from seaborn import color_palette from matplotlib.colors import rgb2hex from .js_utils import _dump_json, d3jsObj...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import datetime import logging from django.db import models from django.utils.translation import ugettext_lazy as _, ugettext from ...
"""Assertion based test cases for monotable.table.MonoBlock.""" import pytest import monotable.table NOT_SPECIFIED = monotable.table.NOT_SPECIFIED LEFT = monotable.alignment.LEFT CENTER = monotable.alignment.CENTER RIGHT = monotable.alignment.RIGHT TOP = monotable.alignment.TOP CENTER_TOP = monotable.alignment.CENTE...
import logging import datetime import json import operator from urlparse import urlparse from util import cached_property from util import dict_from_dir from totalimpactwebapp import db from totalimpactwebapp import json_sqlalchemy logger = logging.getLogger("ti.biblio") def matches_biblio(product1, product2): ...
from datetime import datetime from datetime import timezone import pytest import responses import chwrapper class TestSearch: """the Service.rate_limit decorator""" current_timestamp = int(datetime.timestamp(datetime.now(timezone.utc))) s = chwrapper.Search(access_token="pk.test") with open("tests...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * """ IMPORTS """ from typing import Dict, Callable, Optional, Any from collections import OrderedDict import traceback import requests from sixgill.sixgill_request_classes.sixgill_auth_request import SixgillAuthRequest ...
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 ''' Ansible module for zabbix actions ''' # # Zabbix action ansible module # # # Copyright 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
# Copyright 2016 Pinterest, 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...
# Copyright 2017: 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...
#!/usr/bin/python from __future__ import print_function import argparse import json import os import sys import shlex from cli.settings import Settings from cli.appconfig import AppConfig from cli.hooks import Hooks from cli.utils import Utils from cli.utils import printException, printErrorMsg from cli.dockerutils im...
#!/usr/bin/env python # # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Process Android resources to generate R.java, and prepare for packaging. This will crunch images and generate v14 compatible ...
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 # list of condit...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
""" this file does variant calling for DNAseq """ #============= import required packages ================= import os import sys,subprocess sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) # disable buffer so that in the log file all information is printed in order. from f00_Message import Message from f01_list_tr...
import pymongo import socket import json # import pandas as pd import scipy.stats as stats import matplotlib.pyplot as plt import re from collections import defaultdict, deque import math import numpy as np from matplotlib.font_manager import FontProperties hardcoded_designs = ( "1.GroundSta@SUR1 2.GroundSta@S...
# Copyright 2013 Cloudera 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 2011 OpenStack LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
#! /usr/local/bin/stackless2.6 # by [email protected] at Fri May 14 14:22:30 CEST 2010 """Interactive Python console for Syncless and coroutines. Example invocation: $ python -m syncless.console See more on http://code.google.com/p/syncless/wiki/Console . """ __author__ = '[email protected] (Peter Szabo)' import arra...
# 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...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation file...
# Copyright 2014, 2015 SAP SE # # 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,...
#!/usr/bin/env python """Tests client actions related to administrating the client.""" import os import StringIO import psutil from grr.client import comms from grr.lib import config_lib from grr.lib import flags from grr.lib import rdfvalue from grr.lib import stats from grr.lib import test_lib class ConfigActi...
# 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 from __future__ import print_function import sys import os import threading import time import numpy as np from PySide import QtGui, QtCore from . import utils from . import input from . import _ember import matplotlib matplotlib.rcParams['backend.qt4'] = 'PySide' matplotlib.use('Qt4Agg') from m...
# 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 use ...
from sympy import Symbol, Rational, Order, C, exp, ln, log, O, var, nan, pi, S from sympy.utilities.pytest import XFAIL, raises from sympy.abc import w, x, y, z def test_caching_bug(): #needs to be a first test, so that all caches are clean #cache it e = O(w) #and test that this won't raise an exceptio...
from firewallconfigdecryptor.exception import ParserException from firewallconfigdecryptor.device import Firewall, Gateway, FirewallInterface from firewallconfigdecryptor.security import ACL, InterfaceACL, SecurityZone, SecurityConduit, ConduitFirewallArchitecture, RuleInteraction,AtomicACE from firewallconfigdecryptor...
from __future__ import (absolute_import, division, print_function, unicode_literals) from six.moves import xrange from nose.tools import assert_equal, assert_true, assert_raises from . import get_assert_same_ggplot, cleanup assert_same_ggplot = get_assert_same_ggplot(__file__) from ggplot im...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
# # 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 # ...
# -*- coding: utf-8 -*- import numpy as np from allel.util import asarray_ndim, check_integer_dtype def _check_dac_n(dac, n): dac = asarray_ndim(dac, 1) check_integer_dtype(dac) mx = np.max(dac) if n is None: n = mx elif n < mx: raise ValueError('number of chromosomes too small; ...
from __future__ import division, print_function, absolute_import from ...utils.six.moves import xrange import numpy as np import nose from dipy.io.bvectxt import orientation_from_string from dipy.tracking.utils import (affine_for_trackvis, connectivity_matrix, density_map, length, mov...
""" (c) RIKEN 2015. All rights reserved. Author: Keitaro Yamashita This software is released under the new BSD License; see LICENSE. """ import re import os import numpy from cctbx import crystal from cctbx import miller from cctbx import uctbx from cctbx.array_family import flex from libtbx.utils import null_out fro...
#-*- coding: utf-8 -*- # 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 o...
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Implements ProcessPoolExecutor. The follow diagram and text describe the data-flow through the system: |======================= In-process =====================|== Out-of-process ==| +----------+ +----------...
# 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 2020 The Kubeflow 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 applic...