code
stringlengths
1
199k
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote_plus from ..utils import ( js_to_json, ) class KaraoketvIE(InfoExtractor): _VALID_URL = r'https?://karaoketv\.co\.il/\?container=songs&id=(?P<id>[0-9]+)' _TEST = { 'url': 'http:...
"""Misc plugin.""" import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') from otopi import constants as otopicons from otopi import util from otopi import plugin from ovirt_engine_setup import constants as osetupcons @util.export class Plugin(plugin.PluginBase): """Misc plugin.""" ...
"""Dump information so we can get a quick look at what's available.""" import platform import sys def whatever(f): try: return f() except: return f def dump_module(mod): print(f"\n### {mod.__name__} ---------------------------") for name in dir(mod): if name.startswith("_"): ...
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'pf-@jxtojga)z+4s*uwbgjrq$aep62-thd0q7f&o77xtpka!_m' DEBUG = True ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions'...
import numpy as np from pych.array_ops import pych_ewise_add from pych.extern import Chapel @Chapel() def assign(jazz=int, ballet=np.ndarray): """ ballet = jazz; """ return None def test_whole_array_assignment(): a = np.ones(10) b = np.ones(10) c = np.ones(10) pych_ewise_add(a,b,c) # add...
import mock import unittest from airflow import DAG from airflow import configuration from airflow.exceptions import AirflowException from airflow.sensors.sql_sensor import SqlSensor from airflow.utils.timezone import datetime configuration.load_test_config() DEFAULT_DATE = datetime(2015, 1, 1) TEST_DAG_ID = 'unit_test...
version = '3.4.1' version_tuple = (3, 4, 1)
import hashlib import json import logging import os import sys import tempfile import unittest import net_utils import isolated_format from depot_tools import auto_stub from depot_tools import fix_encoding from utils import file_path from utils import tools import isolateserver_mock ALGO = hashlib.sha1 class TestCase(n...
from sqlalchemy.orm.exc import NoResultFound from wtforms import ValidationError class Unique(object): """Checks field value unicity against specified table field. :param get_session: A function that return a SQAlchemy Session. :param model: The model to check unicity against. :param col...
"""Unit test for treadmill.appcfg.abort """ import os import shutil import tempfile import unittest import kazoo import mock import treadmill from treadmill import appenv from treadmill import context from treadmill.apptrace import events from treadmill.appcfg import abort as app_abort class AppCfgAbortTest(unittest.Te...
"""RedundantImportDetector.py Discover redundant java imports using brute force. Requires Python 2.3""" import os, sys, re from glob import glob reportFile = file("RedundantImports.txt", 'w') startDir = 'D:\\aaa-TIJ4\\code' findImports = re.compile("\n(?:import .*?\n)+") baseDir = os.path.abspath(".") print "basDir:", ...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import socket import unittest import mock from pants.java.nailgun_protocol import ChunkType, NailgunProtocol class TestChunkType(unittest.TestCase): def test_chunktyp...
import pathlib import shutil import tempfile import unittest from unittest import mock import pykka import mopidy from mopidy.audio import PlaybackState from mopidy.core import Core, CoreListener from mopidy.internal import models, storage, versioning from mopidy.models import Track from tests import dummy_mixer def ma...
from tempest_lib.common.utils import data_utils from tempest_lib import exceptions as lib_exc from tempest.api.compute.security_groups import base from tempest import test class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest): @classmethod def setup_clients(cls): super(SecurityGroupsTestJSON, cls).s...
import angr import datetime import time class GetSystemTimeAsFileTime(angr.SimProcedure): timestamp = None def run(self, outptr): self.instrument() self.state.mem[outptr].qword = self.timestamp def instrument(self): if angr.options.USE_SYSTEM_TIMES in self.state.options: ...
""" This is a test for an error with ir_utils._max_label not being updated correctly. As a result of the error, inline_closurecall will incorrectly overwrite an existing label, resulting in code that creates an effect-free infinite loop, which is an undefined behavior to LLVM. LLVM will then assume the function can nev...
from __future__ import absolute_import from sentry.testutils import APITestCase class InternalQueueTasksListTest(APITestCase): def test_anonymous(self): self.login_as(self.user, superuser=True) url = '/api/0/internal/queue/tasks/' response = self.client.get(url) assert response.statu...
import parser import unittest import sys import operator import struct from test import support from test.support.script_helper import assert_python_failure class RoundtripLegalSyntaxTestCase(unittest.TestCase): def roundtrip(self, f, s): st1 = f(s) t = st1.totuple() try: st2 = p...
c = get_config() load_subconfig('etc/base_config.py') load_subconfig('etc/github_auth.py') c.Spawner.container_ip = '192.168.99.100'
import os, sys import re, codecs import shutil, glob def _find(pathname, matchFunc=os.path.isfile): for dirname in sys.path: candidate = os.path.join(dirname, pathname) if matchFunc(candidate): return candidate def mk_dir(path): if not find_dir(path): os.mkdir(path) def find_...
""" SQLite3 backend for django. Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ from __future__ import unicode_literals import datetime import decimal import warnings import re from django.conf import settings from django.db import utils from django.db.backends import (utils as...
from __future__ import absolute_import import sys import functools from sentry.utils.strings import ( is_valid_dot_atom, soft_break, soft_hyphenate, tokens_from_name, codec_lookup, truncatechars, oxfordize_list, ) ZWSP = u"\u200b" # zero width space SHY = u"\u00ad" # soft hyphen def test_c...
from datetime import datetime, timedelta import logging from django.core.cache import cache from django.db import models import bleach import caching.base as caching from celeryutils import task from tower import ugettext_lazy as _ import amo.models from amo import helpers from translations.fields import save_signal, T...
""" Utility function to facilitate testing. """ from __future__ import division, absolute_import, print_function import os import sys import re import operator import warnings from functools import partial import shutil import contextlib from tempfile import mkdtemp from .nosetester import import_nose from numpy.core i...
""" Choosing the thumbnail figure ============================= This example demonstrates how to choose the figure that is displayed as the thumbnail, if the example generates more than one figure. This is done by specifying the keyword-value pair ``sphinx_gallery_thumbnail_number = <fig number>`` as a comment somewher...
import sys Fbowtie = open(sys.argv[1]) bowtie_dic = {} for line in Fbowtie: idbowtie = line.split()[0] bowtie_dic[idbowtie]= line[:-1] Fbowtie.close() Ffasta = open(sys.argv[2]) fasta_dic = {} for line in Ffasta: if line[0] == ">": idfasta = line[1:-1] else: fasta_dic[idfasta] = line[:-1] Ffasta.close()...
import sys import os from recommonmark.parser import CommonMarkParser from recommonmark.transform import AutoStructify import alabaster on_rtd = os.environ.get('READTHEDOCS', None) == 'True' extensions = [ 'sphinx.ext.ifconfig', 'sphinx.ext.autodoc', 'sphinx.ext.todo', # 'alabaster', ] templates_path = ...
""" .. NOTE:: Added `imdb_original_name` recently, so in case the title lookup translations cause problems switch to find_entry to use that instead! """ from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import pytest ...
""" S3 Synchronization: Peer Repository Adapter @copyright: 2011-15 (c) Sahana Software Foundation @license: MIT 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 rest...
import os import inspect import biokbase.narrative.monkeypatch as monkeypatch c = get_config() try: myfile = __file__ except NameError: myfile = os.path.abspath(inspect.getsourcefile(lambda _: None)) myfile = os.path.dirname( myfile) c.NotebookApp.webapp_settings = { 'template_path': os.path.join(myfile,"kbase_templa...
r"""usb.core - Core USB features. This module exports: Device - a class representing a USB device. Configuration - a class representing a configuration descriptor. Interface - a class representing an interface descriptor. Endpoint - a class representing an endpoint descriptor. find() - a function to find USB devices. s...
import subprocess from ..utils import ThreadedSegment class Segment(ThreadedSegment): def run(self): try: p1 = subprocess.Popen(["node", "--version"], stdout=subprocess.PIPE) self.version = p1.communicate()[0].decode("utf-8").rstrip() except OSError: self.version ...
import frappe def execute(): providers = frappe.get_all("Social Login Key") for provider in providers: doc = frappe.get_doc("Social Login Key", provider) doc.set_icon() doc.save()
""" WebSearch Flask Blueprint. Template hierarchy. ------------------- - ``searchbar_frame_base.html`` - ``searchbar_frame.html`` - ``collection_base.html`` - ``collection.html`` used by ``/collection/<collection>`` - ``index_base.html`` - ``index.html`` used ...
import matplotlib.pyplot as mpl import numpy as np import scipy as sp import time import shm import os vcmImage = shm.ShmWrapper('vcmImage12%s' % str(os.getenv('USER'))); def on_button_press(event): global vcmImage # get the yuyv image data yuyv = vcmImage.get_yuyv(); # data is actually int32 (YUYV format) not ...
import json import os import shutil from smart_qq_bot.logger import logger from smart_qq_bot.config import DEFAULT_PLUGIN_CONFIG from smart_qq_bot.excpetions import ( ConfigFileDoesNotExist, ConfigKeyError, ) __all__ = ("PluginManager", ) PLUGIN_PACKAGES = "plugin_packages" PLUGIN_ON = "plugin_on" class PluginM...
from __future__ import print_function, unicode_literals import time import traceback import sickbeard from sickbeard import common, failed_history, generic_queue, history, logger, search, ui BACKLOG_SEARCH = 10 DAILY_SEARCH = 20 FAILED_SEARCH = 30 MANUAL_SEARCH = 40 MANUAL_SEARCH_HISTORY = [] MANUAL_SEARCH_HISTORY_SIZE...
import gtk import sys try: from config import ConfigController import snapfly_core from gui import GtkMenu from gui import TrayIcon from version import Application from launcher import launch_command except ImportError: sys.stderr.write("Can't import snapfly menu modules.\nExiting\n") im...
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
import re from b2.util.utility import * from b2.build import feature from b2.util import sequence, set __re_two_ampersands = re.compile ('&&') __re_comma = re.compile (',') __re_split_condition = re.compile ('(.*):(<.*)') __re_toolset_feature = re.compile ('^(<toolset>|<toolset->)') __re_os_feature = re.compile ('^(<os...
__revision__ = "$Id: __init__.py,v 1.3 2005/02/04 22:56:40 dfugate Exp $" ''' This package includes utility modules which are used before Acspy is built. Essentially it is in place to remove cyclic dependencies between the acsstartup and acspy CVS modules. '''
from matplotlib.pyplot import figure, xlim, ylim, gca, arrow, text, scatter from mpl_toolkits.axes_grid.axislines import SubplotZero from numpy import linspace, arange, sqrt, pi, sin, cos, sign from IPython.display import set_matplotlib_formats set_matplotlib_formats('png', 'pdf') def make_plot_ax(): fig = figure(f...
from spack import * class Upp(CMakePackage): """ The Unified Post Processor (UPP) software package is a software package designed to generate useful products from raw model output. """ homepage = "https://github.com/NOAA-EMC/UPP" git = "https://github.com/NOAA-EMC/UPP.git" url = "https:/...
import StringIO import logging from libavg import logger from testcase import * class LoggerTestCase(AVGTestCase): def __init__(self, testFuncName): AVGTestCase.__init__(self, testFuncName) self.testMsg = u'福 means good fortune' def setUp(self): self.stream = StringIO.StringIO() ...
import unittest from cs.CsRedundant import CsRedundant from cs.CsConfig import CsConfig from cs.CsDatabag import CsCmdLine import merge class TestCsRedundant(unittest.TestCase): def setUp(self): merge.DataBag.DPATH = "." self.cmdline = CsCmdLine("cmdline", {}) def test_init(self): csconf...
"""DISCO Backup Service Implementation.""" import json import requests import six class DiscoApi(object): """Class for all the requests to Disco API.""" def __init__(self, ip, port): """Init client.""" # Rest related variables self.req_headers = {'Content-type': 'application/json'} ...
""" Tests in this module will be skipped unless: - ovsdb-client is installed - ovsdb-client can be invoked password-less via the configured root helper - sudo testing is enabled (see neutron.tests.functional.base for details) """ import eventlet from oslo_config import cfg from neutron.agent.linux import ovsdb_monit...
INET_E_USE_DEFAULT_PROTOCOLHANDLER = -2146697199 # _HRESULT_TYPEDEF_(0x800C0011L) INET_E_USE_DEFAULT_SETTING = -2146697198 # _HRESULT_TYPEDEF_(0x800C0012L) INET_E_DEFAULT_ACTION = INET_E_USE_DEFAULT_PROTOCOLHANDLER INET_E_QUERYOPTION_UNKNOWN = -2146697197 # _HRESULT_TYPEDEF_(0x800C0013L) INET_E_REDIRECTING = -214669719...
"""Definition of targets to build distribution packages.""" import os.path import sys sys.path.insert(0, os.path.abspath('..')) import python_utils.jobset as jobset def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, ...
import unittest from unittest.mock import call, patch import mock from airflow import AirflowException from airflow.providers.google.cloud.hooks.datastore import DatastoreHook GCP_PROJECT_ID = "test" def mock_init(self, gcp_conn_id, delegate_to=None): # pylint: disable=unused-argument pass class TestDatastoreHook(...
import json import os import mock from oslo_policy import policy as common_policy import six from six.moves.urllib import request as urlrequest from testtools import matchers from keystone import exception from keystone.policy.backends import rules from keystone.tests import unit from keystone.tests.unit.ksfixtures imp...
import numpy as np import threading from numba import cuda, float32, float64, int32, int64, void from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase import math def add(x, y): return x + y def add_kernel(r, x, y): r[0] = x + y @skip_on_cudasim('Dispatcher objects not used in the simulator') c...
''' Support for the TelosB / Tmote Sky platforms, and close clones. Utilizes the GoodFET firmware with CCSPI application, and the GoodFET client code. ''' import os import time import struct import time from datetime import datetime, timedelta from kbutils import KBCapabilities, makeFCS from GoodFETCCSPI import GoodFET...
import json import re from django import http from django.db.models import Count from django.db.transaction import non_atomic_requests from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from olympia import amo from olympia.amo.utils import render, paginate from olympia.amo.decora...
from __builtin__ import unicode from antlr4.IntervalSet import IntervalSet, Interval from antlr4.Token import Token from antlr4.atn.SemanticContext import Predicate, PrecedencePredicate class Transition (object): # constants for serialization EPSILON = 1 RANGE = 2 RULE = 3 PREDICATE = 4 # e.g...
import multiprocessing import os workers = multiprocessing.cpu_count() * 2 + 1 worker_class = "gevent" timeout = 1800 # half an hour chdir = os.path.dirname(__file__) proc_name = "mytardis_gunicorn"
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('tardis_portal', '0003_auto_20150907_1315'), ] operations = [ migrations.AddField( model_name='storageboxoption', name='value_type...
from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement from django.test import TestCase
""" Support for monitoring if a sensor value is below/above a threshold. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.threshold/ """ import asyncio import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from ...
from vtdb import keyrange_constants import initial_sharding import utils if __name__ == '__main__': initial_sharding.keyspace_id_type = keyrange_constants.KIT_BYTES utils.main(initial_sharding)
from flask import request from flask.views import MethodView from flask.ext.mongoengine.wtf import model_form from flask.ext.security import current_user from quokka.core.templates import render_template from .models import Comment class CommentView(MethodView): form = model_form( Comment, only=['au...
from pandac.PandaModules import * from toontown.toonbase import TTLocalizer from toontown.toonbase.ToontownBattleGlobals import * from toontown.toonbase.ToontownGlobals import * from SuitBattleGlobals import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal import string ...
from uuid import uuid4 from io import BytesIO from contextlib import closing from twisted.internet import defer, task from twisted.web.iweb import UNKNOWN_LENGTH, IBodyProducer from zope.interface import implementer CRLF = b"\r\n" @implementer(IBodyProducer) class MultiPartProducer(object): """ L{MultiPartProdu...
import random import unittest from hearthbreaker.constants import MINION_TYPE from tests.agents.testing_agents import PlayAndAttackAgent, OneCardPlayingAgent, CardTestingAgent, \ HeroPowerAndCardPlayingAgent from tests.testing_utils import generate_game_for from hearthbreaker.cards import * from hearthbreaker.agent...
"""File Storage Access Control."""
""" SALTS XBMC Addon Copyright (C) 2014 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Thi...
import unittest from tests.baseclass import CommandTest from pykickstart.errors import KickstartParseError, KickstartValueError class F12_TestCase(CommandTest): command = "user" def runTest(self): # pass self.assert_parse("group --name=test", "group --name=test\n") self.assert_parse("gro...
""" Manage the sqlite database used to store crash data. """ import json import sqlite3 class DatabaseHandler: # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- def __init__(self, config = None, root ...
""" Copyright (C) 2009 Canonical Copyright (C) 2012 Fabio Erculiani Authors: Michael Vogt Fabio Erculiani This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3. This program is distributed in ...
""" *************************************************************************** i_cluster.py ------------ Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **************************************************************...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('email_marketing', '0003_auto_20160715_1145'), ] operations = [ migrations.AddField( model_name='emailmarketingconfiguration', name='welcome_email_send_delay', ...
""" Tests core caching facilities. """ from django.test import TestCase from opaque_keys.edx.locator import AssetLocator, CourseLocator from openedx.core.djangoapps.contentserver.caching import del_cached_content, get_cached_content, set_cached_content class Content: """ Mock cached content """ def __in...
""" Graph utilities and algorithms Graphs are represented with their adjacency matrices, preferably using sparse matrices. """ import numpy as np from scipy import sparse from .graph_shortest_path import graph_shortest_path def single_source_shortest_path_length(graph, source, cutoff=None): """Return the shortest p...
import os import tarfile os.chdir(os.path.dirname(os.path.abspath(__file__))) for root, dirs, files in os.walk("data"): dirs[:] = [d for d in dirs if not d.endswith('.git')] for name in files: # These names are for gyp, which expects slashes on all platforms. print('/'.join(root.split(os.sep) + [name]))
"""Look up type information for typedefs of same name at different lexical scope and check for correct display.""" from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TypedefTestCase(TestBase): mydi...
from nova import exception from nova.network import api as network_api from nova.tests.functional.api_sample_tests import test_servers from nova.tests.unit import fake_network_cache_model class AttachInterfacesSampleJsonTest(test_servers.ServersSampleBase): sample_dir = 'os-attach-interfaces' def setUp(self): ...
"""This module is deprecated. Please use `airflow.providers.apache.druid.hooks.druid`.""" import warnings from airflow.providers.apache.druid.hooks.druid import DruidDbApiHook, DruidHook # noqa warnings.warn( "This module is deprecated. Please use `airflow.providers.apache.druid.hooks.druid`.", DeprecationWarn...
from __future__ import print_function import unittest import numpy as np from op_test import OpTest class TestSquaredL2DistanceOp_f0(OpTest): def setUp(self): self.op_type = "squared_l2_distance" self.inputs = { 'X': np.random.uniform(0.1, 0.6, (2, 3)).astype("float32"), 'Y':...
from oslo_log import log as logging from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config from tempest.scenario import manager from tempest import test CONF = config.CONF LOG = logging.getLogger(__name__) class TestVolumeBootPattern(manager.ScenarioTest): """This ...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class AddItem(Choreography): def __init__(self, temboo_session): """ Create a new inst...
""" This is an example dag for using `ImapAttachmentToS3Operator` to transfer an email attachment via IMAP protocol from a mail server to S3 Bucket. """ from datetime import datetime from os import getenv from airflow import DAG from airflow.providers.amazon.aws.transfers.imap_attachment_to_s3 import ImapAttachmentToS3...
from temboo.Library.Google.Plus.Activities.Get import Get, GetInputSet, GetResultSet, GetChoreographyExecution from temboo.Library.Google.Plus.Activities.List import List, ListInputSet, ListResultSet, ListChoreographyExecution from temboo.Library.Google.Plus.Activities.Search import Search, SearchInputSet, SearchResult...
from selenium.common import exceptions from selenium.webdriver.common import by from openstack_dashboard.test.integration_tests.regions import baseregion class NavigationAccordionRegion(baseregion.BaseRegion): """Navigation menu located in the left.""" _project_access_security_locator = ( by.By.CSS_SELE...
"""Module containing Hadoop installation and cleanup functions. For documentation of commands to run at startup and shutdown, see: http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/ClusterSetup.html#Hadoop_Startup """ import functools import logging import os import posixpath import re import time...
""" @package mi.instrument.seabird.sbe26plus.test.test_driver @file marine-integrations/mi/instrument/seabird/sbe26plus/driver.py @author Roger Unwin @brief Test cases for ooicore driver @todo Figure out clock sync off by one issue @todo figure out the pattern for applying startup config @todo what to do with startup p...
from test import support import unittest crypt = support.import_module('crypt') class CryptTestCase(unittest.TestCase): def test_crypt(self): c = crypt.crypt('mypassword', 'ab') if support.verbose: print('Test encryption: ', c) def test_salt(self): self.assertEqual(len(crypt....
from PythonQt import QtCore, QtGui import functools from director import applogic as app _spreadsheetView = None def getSpreadsheetView(): return _spreadsheetView def setSpreadsheetColumnData(columnIndex, name, data): sv = getSpreadsheetView() model = sv.model() model.item(0, columnIndex).setText(name) ...
from django.conf.urls import patterns, url from oscar.core.application import Application from . import views class ProductReviewsApplication(Application): name = None hidable_feature_name = "reviews" detail_view = views.ProductReviewDetail create_view = views.CreateProductReview vote_view = views.A...
import GafferUI import GafferDispatchUI for name in dir( GafferDispatchUI ) : if name.endswith( "__" ) : continue setattr( GafferUI, name, getattr( GafferDispatchUI, name ) )
''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' __all__ = ['image_analysis'] from . import image_analysis
import datetime import re from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Sanitize usernames so they don't contain weird characters. Usernames were populated from the IRC nickname field but not proper...
''' Created on 2013-8-2 @author: lan (www.9miao.com) ''' from gfirefly.netconnect.protoc import LiberateFactory from flask import Flask from gfirefly.distributed.root import PBRoot,BilateralFactory from gfirefly.distributed.node import RemoteObject from gfirefly.dbentrust.dbpool import dbpool from gfirefly.dbentrust.me...
VERSION = (0, 1, 5, 'alpha', 0) def get_version(*args, **kwargs): # Only import if it's actually called. from gfirefly.utils.version import get_version return get_version(*args, **kwargs)
""" *************************************************************************** v_proj.py --------- Date : November 2017 Copyright : (C) 2017 by Médéric Ribreux Email : medspx at medspx dot fr *****************************************************************...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: gcp_compute_subnetwork description: - A VPC network is a virtua...
from __future__ import unicode_literals import frappe from frappe.utils.make_random import add_random_children import frappe.utils import random def make_sample_data(): """Create a few opportunities, quotes, material requests, issues, todos, projects to help the user get started""" selling_items = frappe.get_all("It...
import xml.parsers.expat import os, sys, string, time, fnmatch import re class selClass : def __init__(self, file, parse=0): self.file = file self.sel_classes = [] self.exc_classes = [] self.sel_functions = [] self.exc_functions = [] self.sel_enums = [] s...
from tempest.lib.services.compute import migrations_client from tempest.tests.lib import fake_auth_provider from tempest.tests.lib.services.compute import base class TestMigrationsClient(base.BaseComputeServiceTest): FAKE_MIGRATION_INFO = {"migrations": [{ "created_at": "2012-10-29T13:42:02", "dest_...
import hashlib import random import re import time import zlib import six from six import moves from tempest.api.object_storage import base from tempest.common import custom_matchers from tempest.common.utils import data_utils from tempest import config from tempest import test CONF = config.CONF class ObjectTest(base....
"""Context for building SavedModel.""" import contextlib import threading class SaveContext(threading.local): """A context for building a graph of SavedModel.""" def __init__(self): super(SaveContext, self).__init__() self._in_save_context = False self._options = None def options(self): if not sel...