code
stringlengths
1
199k
from __future__ import division from __future__ import print_function from PIL import Image from PIL import ImageFont from PIL import ImageDraw from PIL import ImageEnhance import nwcsaf import numpy as np from satpy import Scene, find_files_and_readers from datetime import datetime, timedelta from copy import deepcopy...
class Usecase: def __init__(self, file, **settings): self.file = file self.settings = {"ifc_class": None} for key, value in settings.items(): self.settings[key] = value def execute(self): return self.file.create_entity(self.settings["ifc_class"])
import tornado.testing from testexample import ExampleApp class TestExampleApp(tornado.testing.AsyncHTTPTestCase, tornado.testing.LogTrapTestCase): def get_app(self): return ExampleApp() def test_home(self): response = self.fetch('/') self.assertEqual(response.code, ...
low_primes = {1,3,5,7,11,13} low_primes.add(17) # It will be {1,3,5,7,11,13,17} low_primes.update({19,23},{2,29}) # It will be {1,2,3,5,7,11,13,17,19,23,29}, sorted order while low_primes: print(low_primes.pop()/3) #It will pop the first one (1) out, but because it is within a while l...
""" Python 'utf-8' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs encode = codecs.utf_8_encode def decode(input, errors='strict'): return codecs.utf_8_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): ...
import os try: f = file('blah','r') except IOError,e: print 'could not open file:',e def safe_float(obj): try: return float(obj) except ValueError: pass ccfile = None log = file('log.txt','w+') try: ccfile = file('card.txt','r') txns = ccfile.readlines() ccfile.close() except...
""" Copyright 2017-present Airbnb, 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, softwa...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('socialnet', '0029_auto_20161121_0543'), ] operations = [ migrations.AddField( model_name='author', name='displayname', ...
class Coordinates: """ WhiteSource model for artifact's coordinates. """ def __init__(self, group_id, artifact_id, version_id): self.groupId = group_id self.artifactId = artifact_id self.versionId = version_id def create_project_coordinates(distribution): """ Creates a 'Coordinates'...
class SessionHelper: def __init__(self, app): self.app = app # Функция входа на сайт def login(self, username, password): wd = self.app.wd self.app.open_home_page() wd.find_element_by_name("user").click() wd.find_element_by_name("user").clear() wd.find_element...
"""This test checks that Nevergrad is functional. It also checks that it is usable with a separate scheduler. """ import ray from ray.tune import run from ray.tune.schedulers import AsyncHyperBandScheduler from ray.tune.suggest.nevergrad import NevergradSearch def easy_objective(config, reporter): import time t...
"""Test cases for the bfloat16 Python type.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import copy import itertools import math from absl.testing import absltest from absl.testing import parameterized import numpy as np from tensorf...
"""Library of training functions.""" import inspect import json import os import time from absl import logging from ddsp.training import cloud import gin import tensorflow.compat.v2 as tf def get_strategy(tpu='', cluster_config=''): """Create a distribution strategy for running on accelerators. For CPU, single-GPU,...
"""A binary to train CIFAR-10 using a single GPU. Accuracy: cifar10_train.py achieves ~86% accuracy after 100K steps (256 epochs of data) as judged by cifar10_eval.py. Speed: With batch_size 128. System | Step Time (sec/batch) | Accuracy ------------------------------------------------------------------ 1 T...
"""The parsers and plugins interface classes.""" import abc import os from plaso.lib import errors class BaseFileEntryFilter(object): """File entry filter interface.""" # pylint: disable=redundant-returns-doc @abc.abstractmethod def Match(self, file_entry): """Determines if a file entry matches the filter. ...
from __future__ import print_function from argparse import ArgumentParser import os from oauth2client.client import OAuth2WebServerFlow from oauth2client import tools from oauth2client.file import Storage VERBOSE = False CLIENT_ID = '586186890913-atr969tu3lf7u574khjjplb45fgpq1bg.apps.googleusercontent.com' CLIENT_SECRE...
import rospy from basics.msg import Complex from random import random rospy.init_node('message_publisher') pub = rospy.Publisher('complex', Complex) rate = rospy.Rate(2) while not rospy.is_shutdown(): msg = Complex() msg.real = random() msg.imaginary = random() pub.publish(msg) rate.sleep()
import mock import pytest from urlparse import urlparse from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf.models import NodeLog from osf.models.licenses import NodeLicense from osf.utils.sanitize import strip_html from osf.utils import permissions from osf_tests.factories imp...
example_template = Template({ 'A': RsrcDef({}, []), 'B': RsrcDef({}, []), 'C': RsrcDef({'a': '4alpha'}, ['A', 'B']), 'D': RsrcDef({'c': GetRes('C')}, []), 'E': RsrcDef({'ca': GetAtt('C', 'a')}, []), }) engine.create_stack('foo', example_template) engine.noop(3) engine.rollback_stack('foo') engine.no...
""" Helper classes for creating frontend metadata """ class ContactPersonDesc(object): """ Description class for a contact person """ def __init__(self): self.contact_type = None self._email_address = [] self.given_name = None self.sur_name = None def add_email_addres...
from __future__ import absolute_import from django.utils.translation import ugettext as _ from zerver.lib.actions import check_send_message from zerver.lib.response import json_success, json_error from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view from zerver.models import Client, UserPr...
import contextlib import ctypes from ctypes import wintypes import os import re import struct import time from oslo_log import log as oslo_logging import six from six.moves import winreg from tzlocal import windows_tz from win32com import client import win32net import win32netcon import win32process import win32securit...
from suds.sudsobject import Object as SudsObject class _FactoryKeywords(object): def set_wsdl_object_attribute(self, object, name, value): """Sets the attribute of a WSDL object. Example: | ${order search request}= | Create Wsdl Object | OrderSearchRequest | | | Set Wsdl O...
from google.cloud import datacatalog_v1 def sample_list_tags(): # Create a client client = datacatalog_v1.DataCatalogClient() # Initialize request argument(s) request = datacatalog_v1.ListTagsRequest( parent="parent_value", ) # Make the request page_result = client.list_tags(request=...
BOT_NAME = 'DynamicItemsScrapy' SPIDER_MODULES = ['DynamicItemsScrapy.spiders'] NEWSPIDER_MODULE = 'DynamicItemsScrapy.spiders'
import copy import re import fixtures from jsonschema import exceptions as jsonschema_exc import six from nova.api.openstack import api_version_request as api_version from nova.api import validation from nova.api.validation import parameter_types from nova.api.validation import validators from nova import exception fro...
import unittest import subprocess import os import platform import shutil from os.path import join, normpath, abspath, split import sys env_path = "/".join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1]) sys.path.insert(0, env_path) import littlechef test_path = split(normpath(abspath(__file__)))[0] littlec...
"""Compose ACLs on ports.""" from faucet import valve_of from faucet.conf import InvalidConfigError def push_vlan(vlan_vid): """Push a VLAN tag with optional selection of eth type.""" vid = vlan_vid vlan_eth_type = None if isinstance(vlan_vid, dict): vid = vlan_vid['vid'] if 'eth_type' i...
from resolwe.flow.models import Data from resolwe.test import tag_process, with_resolwe_host from resolwe_bio.utils.test import KBBioProcessTestCase class MicroRNATestCase(KBBioProcessTestCase): @with_resolwe_host @tag_process("workflow-mirna") def test_mirna_workflow(self): # Prepare data for align...
import os import socket import time import uuid import testresources import testtools from heatclient import client as heatclient from keystoneclient.v2_0 import client as ksclient from muranoclient import client as mclient import muranoclient.common.exceptions as exceptions import murano.tests.functional.engine.config...
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0005_auto_20170915_2036'), ] operations = [ migrations.CreateModel( name='CourseOfferingMajor', fields=[ ...
from __future__ import print_function import sys from paradrop.base import settings from paradrop.lib.utils.pd_storage import PDStorage from .chute import Chute class ChuteStorage(PDStorage): """ ChuteStorage class. This class holds onto the list of Chutes on this AP. It implements the PDSto...
import envi.archs.h8.emu as h8_emu import envi.archs.h8.regs as h8_regs import vivisect.impemu.emulator as v_i_emulator class H8WorkspaceEmulator(v_i_emulator.WorkspaceEmulator, h8_emu.H8Emulator): taintregs = [h8_regs.REG_ER0, h8_regs.REG_ER1, h8_regs.REG_ER2] def __init__(self, vw, logwrite=False, logread=Fal...
from django.conf import settings from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.PDB import * from Bio.PDB.PDBIO import Select from common.definitions import * from protein.models import Protein, ProteinSegment from residue.models import Residue from structure.functions import BlastSearch, MappedRe...
from tempest.api.volume import base from tempest.common import waiters from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators CONF = config.CONF class BaseGroupSnapshotsTest(base.BaseVolumeAdminTest): @classmethod...
from uuid import UUID import uuid try: bytes() except NameError: bytes = str from org.apache.qpid.proton import Proton, ProtonUnsupportedOperationException from org.apache.qpid.proton import InterruptException as Interrupt from org.apache.qpid.proton import TimeoutException as Timeout from org.apache.qpid.proton.en...
"""Built-in loss functions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import six from tensorflow.python.distribute import distribution_strategy_context from tensorflow.python.framework import ops from tensorflow.python.framework import sm...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("form_designer", "__first__"), ("fluent_contents", "0001_initial")] operations = [ migrations.CreateModel( name="FormDesignerLink", fields=[ ( "con...
import sqlite3 as sqlite import sys import os.path import json from pokemon import pokemon class cookie_reader(): def __init__(self, cookie_location, browser_type): self.cookie_location = cookie_location self._expand_tilde() self.filename = "http_play.pokemonshowdown.com_0.localstorage" ...
"""Main package of the python bindings for oDesk API. For convenience some most commonly used functionalities are imported here, so you can use:: from odesk import Client from odesk import raise_http_error """ VERSION = '0.5.8' def get_version(): return VERSION from odesk.client import Client from odesk.htt...
"""Plugin to parse the OLECF summary/document summary information items.""" from plaso.lib import event from plaso.lib import eventdata from plaso.parsers.olecf_plugins import interface class OleCfSummaryInfoEvent(event.FiletimeEvent): """Convenience class for an OLECF Summary info event.""" DATA_TYPE = 'olecf:summ...
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 model 'TwitterRecentEntriesItem' db.create_table(u'contentitem_fluentcms_twitterfeed_twitte...
'''------------------------------------------------------------------------- Copyright IBM Corp. 2015, 2015 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/l...
class InternalFlowException(Exception): pass class ReturnException(InternalFlowException): def __init__(self, value): self._value = value @property def value(self): return self._value class BreakException(InternalFlowException): pass class ContinueException(InternalFlowException): ...
"""Tests for learn.io.graph_io.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import tempfile import tensorflow as tf from tensorflow.python.framework import errors from tensorflow.python.framework import test_util from tensorflow...
import asyncio from aio_pika import connect, IncomingMessage, ExchangeType loop = asyncio.get_event_loop() async def on_message(message: IncomingMessage): async with message.process(): print("[x] %r" % message.body) async def main(): # Perform connection connection = await connect( "amqp://g...
from django.shortcuts import render, redirect from django.http import HttpResponseRedirect from .models import SupportProject def index( request ): sp = SupportProject.objects.all() if sp.count() == 1: return HttpResponseRedirect( sp.first().project.get_absolute_url() ) else: context_dict = ...
import time import shutil from configobj import ConfigObj NOVA_API_CONF = "/etc/nova/api-paste.ini" OS_API_SEC = "composite:openstack_compute_api_v2" DR_FILTER_TARGET_KEY = "keystone_nolimit" DR_FILTER_TARGET_KEY_VALUE = "compute_req_id faultwrap sizelimit " \ "authtoken keystonecontext drf...
from absl import app from absl.testing import absltest from grr_response_server.databases import db_time_test from grr_response_server.databases import mysql_test from grr.test_lib import test_lib class MysqlClientsTest(db_time_test.DatabaseTimeTestMixin, mysql_test.MysqlTestBase, absltest.TestCa...
from __future__ import absolute_import, division, print_function, unicode_literals import time import logging import ujson as json from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.exceptions import ConnectionTimeout from .config import config from .es_mappings im...
import urllib.parse from openstack import exceptions from openstack import resource class Resource(resource.Resource): @classmethod def find(cls, session, name_or_id, ignore_missing=True, **params): """Find a resource by its name or id. :param session: The session to use for making this request....
"""This file contains the tests for the generic text parser.""" import os import unittest from dfvfs.lib import definitions from dfvfs.path import factory as path_spec_factory from dfvfs.resolver import resolver as path_spec_resolver import pyparsing from plaso.lib import errors from plaso.lib import event from plaso.l...
from manilaclient import api_versions from manilaclient import base from manilaclient.openstack.common.apiclient import base as common_base class ShareInstance(common_base.Resource): """A share is an extra block level storage to the OpenStack instances.""" def __repr__(self): return "<Share: %s>" % self...
"""Create / interact with a batch of updates / deletes.""" from gcloud._localstack import _LocalStack from gcloud.datastore import _implicit_environ from gcloud.datastore import helpers from gcloud.datastore.key import _dataset_ids_equal from gcloud.datastore import _datastore_v1_pb2 as datastore_pb _BATCHES = _LocalSt...
''' @author: sheng @license: ''' import unittest from meridian.acupoints import zhimai44 class TestZhimai44Functions(unittest.TestCase): def setUp(self): pass def test_xxx(self): pass if __name__ == '__main__': unittest.main()
from collections import OrderedDict import os import fixtures from jacket.compute import exception from jacket.compute import test from jacket.tests.compute.unit.virt.disk.vfs import fakeguestfs from jacket.compute.virt.disk import api as diskapi from jacket.compute.virt.disk.vfs import guestfs as vfsguestfs from jacke...
from ajenti.api import * from ajenti.plugins import * info = PluginInfo( title='Hosts', icon='sitemap', dependencies=[ PluginDependency('main'), ], ) def init(): import main
import json import numpy as np import cPickle as pickle with open('../validation/v_xgboost_word_tfidf.csv') as train_file: content = train_file.readlines() testData = [] scores = [] element = content[1].strip("\r\n").split(",") for i in range(1, len(content)): element = content[i].strip("\r\n").split(",") ...
"""List and compare most used OpenStack cloud resources.""" import argparse import json import subprocess import sys from rally.common.plugin import discover from rally import consts from rally import osclients class ResourceManager(object): REQUIRED_SERVICE = None REPR_KEYS = ("id", "name", "tenant_id", "zone"...
import gc import enum import functools import os import os.path import abc import sys import textwrap import re import inspect import copy import contextlib import itertools import types import warnings from operator import attrgetter from datetime import datetime from collections import OrderedDict, ChainMap from coll...
from django.utils.translation import ugettext_lazy as _ import horizon from openstack_dashboard.dashboards.tasks import dashboard class History(horizon.Panel): name = _("History") slug = "history" dashboard.Tasks.register(History)
""" Contains common test fixtures used to run unit tests. """ import sys sys.path.append('../../..') from test_tools.fixtures.common import *
from __future__ import absolute_import, division, print_function, unicode_literals # just in case, for py2 to be py3-ish import pkgutil, io import numpy as np from matplotlib import image, cm from matplotlib import pyplot as plt __all__ = ['get_cat_num', 'n_cats', 'catter'] # N_cats x 72 x 72, 0 is transparent, 1 is ...
from typing import Any, List, Tuple, Dict #cast from sphinx.application import Sphinx from sphinx.ext.autodoc import ModuleLevelDocumenter from sphinx.pycode import ModuleAnalyzer, PycodeError from sphinx.locale import __ from sphinx.domains.python import PyObject from sphinx import addnodes from sphinx.util.inspect im...
"""Monorail client.""" import json from google.oauth2 import service_account from google.auth.transport import requests as google_requests import requests _API_BASE = 'https://api-dot-monorail-prod.appspot.com/prpc' _TARGET_AUDIENCE = 'https://monorail-prod.appspot.com' _XSSI_PREFIX = ')]}\'\n' class Client: """Monor...
"""Contains functions for performing actions on rooms.""" import itertools import logging import math import random import string from collections import OrderedDict from typing import ( TYPE_CHECKING, Any, Awaitable, Collection, Dict, List, Optional, Tuple, ) import attr from typing_ext...
from __future__ import unicode_literals from datetime import datetime import logging from types import NoneType from google.appengine.ext import ndb, deferred, db from google.appengine.ext.ndb.query import Cursor from typing import Optional, List, Union, Tuple from mcfw.rpc import returns, arguments from rogerthat.bizz...
import argparse import ipaddress import gevent import gevent.wsgi import hashlib import json import traceback from gevent import monkey from werkzeug.exceptions import (BadRequest, HTTPException, InternalServerError, NotFound) from werkzeug.routing import Map, Rule, RequestRedirect from...
from oslo_log import log import six import webob.dec import webob.exc from manila.api.openstack import wsgi from manila.i18n import _ from manila import utils from manila.wsgi import common as base_wsgi LOG = log.getLogger(__name__) class FaultWrapper(base_wsgi.Middleware): """Calls down the middleware stack, makin...
import constants from construct import Byte, Struct, Enum, Bytes, Const, Array, Renamed, Int16ul Short = Int16ul RobotInfo = "robot_info" / Struct( "penalty" / Enum(Byte, constants.SPLPenalty), "secs_till_unpenalised" / Byte, "number_of_yellow_cards" / Byte, "number_of_red_cards" / Byte ) TeamInfo = "te...
"""A library of random helper functionality.""" import platform, subprocess, operator, os, shutil, re, sys from glob import glob class MesonException(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, *args, **kwargs) class File: def __init__(self, is_built, subdir, fname): ...
import unittest import mock from greenpithumb import light_sensor class LightSensorTest(unittest.TestCase): def setUp(self): self.mock_adc = mock.Mock() channel = 1 self.light_sensor = light_sensor.LightSensor(self.mock_adc, channel) def test_light_50_pct(self): """Near midpoint ...
""" Copyright 2011, 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 agreed to...
import unreal_engine as ue import json class FilmActor: def begin_play(self): self.pawn = self.uobject.get_owner() def getjson(self): ue.log("@@@@video getting json:") loc = self.uobject.get_actor_location() rot = self.uobject.get_actor_forward() data = { "x":loc.x,"y":loc.y,"z":loc.z, "rx":rot.x, "ry...
""" Example from pybedtools documentation (:ref:`third example`) to count \ reads in introns and exons using multiple CPUs. """ from __future__ import print_function import pybedtools import argparse import os import sys import multiprocessing def featuretype_filter(feature, featuretype): """ Only passes featur...
from __future__ import print_function, unicode_literals, absolute_import import json import sys import os import re import time import shutil import random import mimetypes import imghdr import traceback import json import redis import logging import requests from requests.exceptions import RequestException TYPE_CAT = ...
"""The auto-tuning module of tvm This module includes: * Tuning space definition API * Efficient auto-tuners * Tuning result and database support * Distributed measurement to scale up tuning """ from . import database from . import feature from . import measure from . import record from . import task from . import tune...
sum=0 for x in range(0,1000): if(x%3==0 or x%5==0): sum+=x print(sum)
from __future__ import annotations import hashlib import json from dataclasses import dataclass from enum import Enum from typing import Any, Callable, Iterable, Set, TypeVar from pkg_resources import Requirement from pants.backend.python.util_rules.interpreter_constraints import InterpreterConstraints from pants.util....
import distutils.version as dist_version import os import sys from dragon.db.sqlalchemy.session import get_engine from dragon.db import migration import sqlalchemy import migrate from migrate.versioning import util as migrate_util from dragon.openstack.common import exception from dragon.openstack.common.gettextutils i...
"""Analysis for discounting_chain.""" from typing import Optional, Sequence from bsuite.experiments.discounting_chain import sweep from bsuite.utils import plotting import numpy as np import pandas as pd import plotnine as gg NUM_EPISODES = sweep.NUM_EPISODES BASE_REGRET = 0.08 TAGS = sweep.TAGS _HORIZONS = np.array([1...
""" Copyright 2015 SmartBear Software 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...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.AddField( model_name='notification', name='queued', field=models....
from __future__ import unicode_literals from django import template from django.conf import settings from django.utils import timezone from ads.models import Ad register = template.Library() @register.inclusion_tag('ads/tags/render_ads_zone.html', takes_context=True) def render_ads_zone(context, zone): """ Retu...
''' Created on Sep 15, 2012 Agent classes. Contains references to instances of classes containing observer handlers and code Agent Instances are created automatically. Create a named Handler instance under the Agent, as an instance of the desired handler class, by create (POST) of a JSON object containing a dictionary ...
"""Deploy a model in AI Platform.""" import logging import json import time import subprocess from googleapiclient import discovery from googleapiclient import errors _WAIT_FOR_COMPLETION_SLEEP_SECONDS = 10 _PYTHON_VERSION = '3.5' _RUN_TIME_VERSION = '1.15' def _create_service(): """Gets service instance to start A...
from typing import Any, Callable, Tuple, Union from packed import pack, unpack import jj from jj import default_app, default_handler from jj.apps import BaseApp, create_app from jj.http.codes import BAD_REQUEST, OK from jj.http.methods import ANY, DELETE, GET, POST from jj.matchers import LogicalMatcher, RequestMatcher...
""" EPYNET Classes """ from . import epanet2 from .objectcollection import ObjectCollection from .baseobject import BaseObject, lazy_property from .pattern import Pattern class Node(BaseObject): """ Base EPANET Node class """ static_properties = {'elevation': epanet2.EN_ELEVATION} properties = {'head': epan...
import numpy as np import random import os import shutil import platform import pytest import ray from ray.test_utils import wait_for_condition from ray.internal.internal_api import memory_summary MB = 1024 * 1024 def _init_ray(): return ray.init( num_cpus=2, object_store_memory=700e6, _syst...
from __future__ import print_function import pandas as pd from sklearn.base import TransformerMixin class FamilyCounter(TransformerMixin): def __init__(self, use=True): self.use = use def transform(self, features_raw, **transform_params): if self.use: features = features_raw.copy(dee...
__author__ = 'horacioibrahim' import unittest, os import datetime from time import sleep, ctime, time from random import randint from hashlib import md5 from types import StringType import merchant, customers, config, invoices, errors, plans, subscriptions def check_tests_environment(): """ For tests is need en...
""" Copyright (C) 2017 Open Source Robotics 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 in...
"""Package contains helpers for gdata library. """
"""Configure number in a device through MQTT topic.""" from __future__ import annotations import functools import logging import voluptuous as vol from homeassistant.components import number from homeassistant.components.number import ( DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, DEFAULT_STEP, NumberEntity, )...
import datetime import uuid import freezegun import pretend import pytest from pyramid.httpexceptions import HTTPMovedPermanently, HTTPSeeOther from warehouse.accounts import views from warehouse.accounts.interfaces import IUserService, TooManyFailedLogins from ...common.db.accounts import UserFactory class TestFailedL...
''' Created on Nov 26, 2014 @author: Yury Zhauniarovich <y.zhalnerovich{at}gmail.com> ''' import os, time from interfaces.adb_interface import AdbInterface from bboxcoverage import BBoxCoverage from running_strategies import IntentInvocationStrategy import smtplib import email.utils from email.mime.text import MIMEText...
""" Implements vlans for vmwareapi. """ from nova import db from nova import exception from nova import flags from nova import log as logging from nova import utils from nova.virt.vmwareapi_conn import VMWareAPISession from nova.virt.vmwareapi import network_utils LOG = logging.getLogger("nova.network.vmwareapi_net") F...
import collections import json import math import re import six import uuid from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import units from cinder import context from cinder import exception from cinder.i18n import _, _LE, _LI, _LW from cinder import int...
from StringIO import StringIO import mock from paasta_tools.cli.cmds.list import paasta_list @mock.patch('sys.stdout', new_callable=StringIO) @mock.patch('paasta_tools.cli.cmds.list.list_services', autospec=True) def test_list_paasta_list(mock_list_services, mock_stdout): """ paasta_list print each service returned...
''' Insights Forex live source -------------------------- :copyright (c) 2014 Xavier Bruhiere :license: Apache 2.0, see LICENSE for more details. ''' import time import pandas as pd import dna.logging import intuition.data.forex as forex log = dna.logging.logger(__name__) class Forex(object): ''' At eac...