gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from django.db import models from django.forms import ValidationError from cyder.cydns.soa.models import SOA from cyder.cydns.validation import validate_reverse_name from cyder.cydns.mixins import ObjectUrlMixin from cyder.cydns.validation import validate_ip_type, do_zone_validation import ipaddr import pdb class R...
# -*- coding: utf-8 -*- # for datasets acquired with topspin > 2.1 (requires INF) # scale F1 dimension to get unified scale for MQMAS/STMAS experiments # the program rewrites BF1/SFO1/O1/SW/SF/OFFSET according to # the apparent Larmor frequency of isotropic dimension # Select the nucleus to use for indirect dimension ...
''' Created on Oct 19, 2010 @author: Peter ''' from numpy import * def loadDataSet(): postingList=[['my', 'dog', 'has', 'flea', 'problems', 'help', 'please'], ['maybe', 'not', 'take', 'him', 'to', 'dog', 'park', 'stupid'], ['my', 'dalmation', 'is', 'so', 'cute', 'I', 'love', 'him...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar" _path_str = "bar.error_y" _valid_props = { "array", "arrayminus", ...
from builtin import signature from interface import Object from rpython.rlib import rstring from rpython.rlib.objectmodel import compute_hash from rpython.rlib.unicodedata import unicodedb_6_2_0 as unicodedb from rpython.rlib.rstring import UnicodeBuilder, split, rsplit from numbers import Integer import space class S...
from __future__ import annotations import ast import re import pytest from aspy.refactor_imports.import_obj import FromImport from aspy.refactor_imports.import_obj import FromImportSortKey from aspy.refactor_imports.import_obj import import_obj_from_str from aspy.refactor_imports.import_obj import ImportImport from a...
""" Graph object that handles serialization and deserialization from XML. """ from lib.rr_graph import graph2 from lib.rr_graph.graph2 import NodeDirection from lib.rr_graph import tracks import lxml.etree as ET # Set to True once # https://github.com/verilog-to-routing/vtr-verilog-to-routing/compare/c_internal # is m...
#!/usr/bin/env python import sys import json import urllib import urllib2 import base64 # Class with calls to CloudPassage API class CPAPI: def __init__(self): self.auth_url = 'oauth/access_token' self.auth_args = {'grant_type': 'client_credentials'} self.base_url = 'https://api.cloudpass...
''' @file pipeline.py @author Douglas Applegate @date 9/26/07 Provides a framework for autorecovery, and rerunning, of parts of the pipeline ''' __cvs_id__ = "$Id: pipeline.py,v 1.1 2008-01-17 19:12:38 dapple Exp $" ################ import logging from decorator import decorator log = logging.getLo...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 OpenMarket Ltd # # 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 2012 Nebula, 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...
import chirc.replies as replies import pytest from chirc.types import ReplyTimeoutException @pytest.mark.category("BASIC_CONNECTION") class TestBasicConnection(object): def test_connect_simple(self, irc_session): client = irc_session.get_client(nodelay = True) client.send_raw(["NICK user1...
import tkinter as tk from rpg import util from rpg.ui import widgets import typing if typing.TYPE_CHECKING: from rpg import app from typing import Any, Optional class ConsoleState(object): """Definition of the state of the debug console. This class defines all members of the console required to run...
"""Controller replying state from datapath.""" # System imports from enum import Enum # Local source tree imports from pyof.foundation.base import GenericBitMask, GenericMessage, GenericStruct from pyof.foundation.basic_types import ( BinaryData, Char, FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64) from p...
""" The cache bits of TileStache. A Cache is the part of TileStache that stores static files to speed up future requests. A few default caches are found here, but it's possible to define your own and pull them into TileStache dynamically by class name. Built-in providers: - test - disk - multi - memcache - s3 Exampl...
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0# # Unless required by applicable law or agreed to in writing...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import json import re import types from . import validators __version__ = "1.1.1" # constants for DeletionPolicy Delete = 'Delete' Retain = 'Retain' Snapshot = 'Snapshot' # Pseudo Parameters AWS_ACCO...
# coding: utf-8 import os import time import logging from flask import request, make_response, render_template, jsonify from flask.ext.restful import Resource, abort from werkzeug import secure_filename from werkzeug.exceptions import HTTPException from ..config import Config from ..utils import udefault from ..auth ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for error handling in PB. """ from StringIO import StringIO from twisted.trial import unittest from twisted.spread import pb, flavors, jelly from twisted.internet import reactor, defer from twisted.python import log ## # test exceptio...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
"""Farcy objects test file.""" from __future__ import print_function from farcy import objects from mock import patch import unittest import farcy.exceptions as exceptions from .helper import Struct class ConfigTest(unittest.TestCase): """Tests Config helper.""" @patch('farcy.objects.ConfigParser') @pat...
from __future__ import print_function import sys from gevent import socket import math from construct import * from construct import macros HOST="localhost" PORT=4242 OneChar = Struct("OneChar", String("one",1)) class Socket(object): def __init__(self, socket): self.sock = socket self.internalbu...
# 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 (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait #from selenium.webdriver.suppor...
""" Return config information """ import copy import fnmatch import logging import os import urllib.parse import salt.config import salt.syspaths as syspaths import salt.utils.data import salt.utils.dictupdate import salt.utils.files import salt.utils.platform import salt.utils.sdb as sdb from salt.loader.context imp...
# -*- coding: utf-8 -*- import abc import re from pg_requests.exceptions import TokenError from pg_requests.operators import ConditionOperator, And, QueryObject, Evaluable class TokenValue(Evaluable): """Base class of a parseable unit""" def __init__(self, value): self.value = self.validate(value) ...
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from operator import attrgetter from sqlalchemy.event import lis...
# Copyright 2012 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 law or agre...
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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: # # * Redistributions of source code must retain the above...
""" Functions for parsing header file into: enums list functions list structs list typedefs list Usage: For these functions to work properly input code needs to be prepared first, function prepare_for_parsing(code) has to be called to pre-process the code first. """ from format import p...
import uuid, json from flask import Blueprint, request, url_for, flash, redirect, make_response from flask import render_template, abort from flask.ext.login import login_user, logout_user, current_user, login_required from octopus.core import app from octopus.lib.webapp import ssl_required, request_wants_json, flash...
# 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 shl...
# 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, print_function, unicode_literals import os from builtins import filter, next from collections import defaultdict from twi...
import csv from collections import defaultdict import StringIO from google.appengine.ext import blobstore from google.appengine.ext.webapp import blobstore_handlers from jinja_template import JinjaTemplating from google.appengine.ext import db from google.appengine.api import memcache from xml.dom import minidom from g...
"""Base geometry class and utilities """ import sys from warnings import warn from binascii import a2b_hex from ctypes import pointer, c_size_t, c_char_p, c_void_p from shapely.coords import CoordinateSequence from shapely.ftools import wraps from shapely.geos import lgeos, ReadingError from shapely.geos import WKBWr...
from typing import TYPE_CHECKING from typing import Any from typing import List from poetry.core.semver.empty_constraint import EmptyConstraint from poetry.core.semver.version_constraint import VersionConstraint from poetry.core.semver.version_range_constraint import VersionRangeConstraint if TYPE_CHECKING: from...
# -*- 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 model 'ActionGroupRequest' db.create_table(u'sfpirgapp_actiongrouprequest', ( (u'id', s...
# Copyright 2016 Coursera # # 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, sof...
"""Implementation of editor's buffers.""" class Buffer: """Class representing a text buffer. Buffer is a container for text. Every Buffer is associated with zero or more Window objects that display the text. If the buffer's content changes in any way, all the windows receive notifications about t...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field sites on 'Post' m2m_table_name = db.shorten_...
from collections import deque import unittest from test import support, seq_tests import gc import weakref import copy import pickle from io import StringIO import random BIG = 100000 def fail(): raise SyntaxError yield 1 class BadCmp: def __eq__(self, other): raise RuntimeError class MutateCmp:...
""" """ from .init_args import init_args from .key_swap import key_swap __all__ = [ 'ExtraKeysError', '_get_dict', 'InitArgsError', 'marshal_dict', 'unmarshal_dict', 'marshal_list', 'unmarshal_list', ] def _get_dict(obj): """ Hack to work around the lack of __dict__ when __slots__ ...
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# 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 applicable ...
# 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...
# 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...
#!/usr/bin/env python ''' Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests ...
"""The tests the for Locative device tracker platform.""" import asyncio from unittest.mock import patch import pytest from homeassistant.setup import async_setup_component import homeassistant.components.device_tracker as device_tracker from homeassistant.const import CONF_PLATFORM from homeassistant.components.devi...
from django import forms from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase, TestCase, override_settings from django.test.client import RequestFactory from django.urls import reverse from django.views.generic.base import View from django.views.generic.edit import CreateView, ...
# Copyright 2012 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,...
# -*- coding: utf-8 -*- from __future__ import print_function from collections import OrderedDict from datetime import datetime from itertools import chain import operator import warnings import numpy as np import pytest from pandas.core.dtypes.dtypes import CategoricalDtype import pandas as pd from pandas import ...
"""Tests for the validate methods.""" import pytest from napalm_base import validate _compare_getter = [ ( {"list": ["\d{2}", 1, 2]}, [1, 2, 33], {u'complies': True, u'extra': [], u'missing': [], u'present': ['\d{2}', 1, 2]} ), ( {"list": [1, 2, 3]}, [1, 2, 3, 4, 5]...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from ietf.doc.models import StateType, State, BallotType, DocTypeName from ietf.name.models import BallotPositionName class Migration(DataMigration): def forwards(self, orm): statchg ...
#!/usr/bin/env python """ Python implementation of common model fitting operations to analyse protein folding data. Simply automates some fitting and value calculation. Will be extended to include phi-value analysis and other common calculations. Allows for quick model evaluation and plotting. Also tried to make thi...
# Copyright (c) 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...
import datetime import git import github import os import shutil import sys import tempfile import tenacity import time from collections import OrderedDict from distutils.util import strtobool from six.moves import configparser from pip._internal.main import main as pip_main import urllib3 import yaml from infrared...
# 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 Red Hat, 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...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the convolution and filter functionalities of astropy. A few conceptual notes: A filter kernel is mainly characterized by its response function. In the 1D case we speak of "impulse response function", in the 2D case we call it "po...
import sys import threading import io import csv import itertools import concurrent.futures from collections import OrderedDict, namedtuple from math import isnan import numpy from scipy.sparse import issparse from AnyQt.QtWidgets import ( QTableView, QHeaderView, QAbstractButton, QAction, QApplication, QSty...
import matplotlib.pyplot as plt from pickle import load from os import listdir from os.path import isfile, join import numpy as np from . import results_analysis_functions # Stanford bright color palette (https://identity.stanford.edu/overview/color) color_set = [[140, 21, 21], [0, 152, 219], [0, 155, 118], [178, 111...
#Copyright (c) 2016 Vladimir Vorobev. # #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, distri...
# -*- encoding: utf-8 -*- # # Copyright 2013 Martin Zimmermann <info@posativ.org>. All rights reserved. # License: BSD Style, 2 clauses -- see LICENSE. import io import re import json import pickle from os.path import join from functools import partial from acrylamid import core, utils, lib from acrylamid.compat imp...
# -*- coding: utf-8 -*- import phone_transducer as pt import itertools def phone_substitution_transducer(add_meta_arc=True): """Substitute similar phones (optionally).""" def DetectViolation(l_ar, l_sw, group): if l_ar == pt.abc.EPSILON or l_sw == pt.abc.EPSILON: return False if group[l_ar] != group...
# Copyright 2011-2014 MongoDB, 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 writin...
#!/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. '''Unit tests for grit.format.policy_templates.writers.plist_writer''' import os import sys if __name__ == '__main__': sys.path...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import datetime from django.db import models from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import force_unicode from django.utils.translation import ugettext as _ from django.utils import timezone from django.views.generic.base import View from django...
#!/usr/bin/env python3 """Mininet test runner * must be run as root * you can run a specific test case only, by adding the class name of the test case to the command. Eg ./mininet_test.py FaucetUntaggedIPv4RouteTest It is strongly recommended to run these tests via Docker, to ensure you have all dependencies co...
"""Generalized Functions Hub.""" # internal modules import datetime # external modules import discord from discord.ext import commands # relative modules class MemberID(commands.Converter): """Extract a member id and force to be in guild.""" """ The main purpose is for banning people and forcing t...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines 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 ap...
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2008 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 app...
import re import struct import asyncio import functools from .base import EventBuilder from .._misc import utils from .. import _tl from ..types import _custom def auto_answer(func): @functools.wraps(func) async def wrapped(self, *args, **kwargs): if self._answered: return await func(*arg...
from __future__ import annotations import queue from threading import Thread from typing import TYPE_CHECKING import pytest from django.db import OperationalError, connection, connections from django.db.transaction import TransactionManagementError, atomic from django.test import TestCase, TransactionTestCase from d...
#!/usr/bin/env pytest """ margin_test.py - test suite for stability margin commands RMM, 15 Jul 2011 BG, 30 Jun 2020 -- convert to pytest, gh-425 BG, 16 Nov 2020 -- pick from gh-438 and add discrete test """ import numpy as np import pytest from numpy import inf, nan from numpy.testing import assert_allclose from co...
#!/usr/bin/python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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: # # * Redistrib...
############################################################################ ## ## Copyright (C) 2006-2010 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
#<ImportSpecificModules> import collections import copy import numpy import tables import os import ShareYourSystem as SYS import sys #</ImportSpecificModules> #<DefineLocals> JoinStr='__' JoinDeepStr='/' #</DefineLocals> #<DefineClass> class JoinerClass(SYS.FeaturerClass): #<DefineHookMethods> def modelAfter(sel...
#!/usr/bin/python # Copyright (c) 2009, Purdue University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list ...
from datetime import datetime, timedelta from mock import patch from django.test import TestCase from django.contrib.auth.models import User from django.contrib.messages import constants as message_const from django_dynamic_fixture import get from django_dynamic_fixture import new from readthedocs.core.models import ...
from math import pi from cmath import sqrt, log, atan import pkgutil import numpy as np from io import StringIO import scipy.interpolate import flavio from flavio.physics.running import running from flavio.physics import ckm from flavio.math.functions import li2, zeta from functools import lru_cache from flavio.config ...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import base import config from base import skipUnlessTrue from time import sleep import unittest import sys class NonRegressionScenarios(base.TestScenarios): @skipUnlessTrue("S0") def test_S0_ping_br(self): """ Check 6LBR start-up and connectivity """ self.assertTrue(self.suppor...
import os from pytz import utc from datetime import datetime from ConfigParser import ConfigParser from docker.utils import kwargs_from_env from docker import Client from werkzeug.local import LocalProxy from flask import Blueprint, current_app, jsonify docker_bp = Blueprint('docker_api', __name__, url_prefix='/api...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
import os import pkg_resources import re import sys import textwrap import uuid import prettytable import six from novaclient import exceptions from novaclient.openstack.common import strutils def arg(*args, **kwargs): """Decorator for CLI args.""" def _decorator(func): add_arg(func, *args, **kwargs...
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgstaticviewer" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgText from osgpypp import...
import sys import random import itertools from . import geometry from . import file_io # Convenience functions def dot_progress(line_length=80, char='.', reset=False): """Simple progress indicator on sys.stdout""" if not hasattr(dot_progress, 'counter'): dot_progress.counter = 0 if reset: ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2011 - 2012, 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 # # ...
from qds_sdk.cloud.cloud import Cloud class AwsCloud(Cloud): ''' qds_sdk.cloud.AwsCloud is the class which stores information about aws cloud config settings. The objects of this class can be used to set aws cloud_config settings while create/update/clone a cluster. ''' def __init__(self): ...
from __future__ import division import pickle from io import BytesIO import numpy as np import scipy.sparse from sklearn.datasets import load_digits, load_iris from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.externals.six.moves import zip from sk...
import operator import re from .compat import string_type, total_ordering __all__ = ["Version", "VersionPredicate", "suggest"] # A marker used in the second and third parts of the `parts` tuple, for # versions that don't have those segments, to sort properly. An example # of versions in sort order ('highest' last):...
## @package enhanced_grid ## @brief Contains 2D and 3D Grid containers that supports extended slicing syntax. ## # These classes are provided for rapid prototyping, the methods defined on them might be slow. # @code # grid1 = Grid3D(10, 10, 10, 0) # grid2 = Grid3D(10, 10, 10, 1) # grid1[0, 0, 0] = grid2[0, 0, 0] # gr...
import os import numpy as np import tempfile import shutil import pickle import ntpath import nipype.pipeline.engine as pe import nipype.interfaces.utility as niu import nipype.interfaces.minc as minc import nibabel as nib from nibabel.processing import resample_from_to import SimpleITK as sitk from nipype.interfaces.b...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# -*- coding: utf-8 -*- """ smsc.responses module. This module contains the responses objects wrapping SMSC.ru API answers. :copyright: (c) 2017 by Alexey Shevchenko. :license: MIT, see LICENSE for more details. """ from abc import ABCMeta from collections import namedtuple from typing import Any, Dict, Optional fr...
# Copyright 2013: 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 by a...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
import json import pytest import requests import requests_mock from conftest import get_response from kpm.platforms.kubernetes import get_endpoint, Kubernetes NAMESPACE="testns" def test_endpoints(): a = get_endpoint("po") b = get_endpoint("pods") c = get_endpoint("pod") assert a == b assert b =...