code
stringlengths
1
199k
import logging import sys import unittest import test_env test_env.setup_test_env() from proto import realms_config_pb2 from realms import permissions from test_support import test_case class BuilderTest(test_case.TestCase): def setUp(self): super(BuilderTest, self).setUp() self.builder = permissions.Builder(...
import matplotlib.pyplot as plt import numpy as np import sklearn from sklearn import svm, datasets from sklearn.metrics import precision_recall_curve from sklearn.metrics import average_precision_score from sklearn.cross_validation import train_test_split from sklearn.preprocessing import label_binarize from sklearn.m...
from ..azure_common import BaseTest, arm_template class IoTHubTest(BaseTest): def setUp(self): super(IoTHubTest, self).setUp() def test_iot_hub_schema_validate(self): with self.sign_out_patch(): p = self.load_policy({ 'name': 'test-iot-hub-compliance', ...
"""Support for RainMachine devices.""" import logging from datetime import timedelta import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_BINARY_SENSORS, CONF_IP_ADDRESS, CONF_PASSWORD, CONF_PORT, CONF_SCAN_INTERVAL, CONF_SENSOR...
from oslo_config import cfg from nova.i18n import _LW from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import utils LOG = logging.getLogger(__name__) ram_allocation_ratio_opt = cfg.FloatOpt('ram_allocation_ratio', default=1.5, help='Virtual ...
import contextlib import sys import mock import netaddr from oslo.config import cfg import testtools from neutron.agent.linux import async_process from neutron.agent.linux import ip_lib from neutron.agent.linux import ovs_lib from neutron.agent.linux import utils from neutron.common import constants as n_const from neu...
import os __All__ = ['lock', 'unlock'] if os.name == 'nt': def lock(file): raise NotImplementedError('Windows is not supported.') def unlock(file): raise NotImplementedError('Windows is not supported.') elif os.name == 'posix': from fcntl import flock, LOCK_EX, LOCK_UN def lock(file): ...
"""Builder function to construct tf-slim arg_scope for convolution, fc ops.""" import tensorflow as tf from object_detection.protos import hyperparams_pb2 slim = tf.contrib.slim def build(hyperparams_config, is_training): """Builds tf-slim arg_scope for convolution ops based on the config. Returns an arg_scope to u...
from plenum.test.spy_helpers import get_count def sum_of_request_propagates(node): return get_count(node.replicas[0]._ordering_service, node.replicas[0]._ordering_service._request_propagates_if_needed) + \ get_count(node.replicas[1]._ordering_service, node.replic...
from beritest_tools import BaseBERITestCase class test_raw_bltzall_lt_back(BaseBERITestCase): def test_before_bltzall(self): self.assertRegisterNotEqual(self.MIPS.a0, 0, "instruction before bltzall missed") def test_bltzall_branch_delay(self): self.assertRegisterEqual(self.MIPS.a1, 2, "instructi...
import abc import copy import datetime import exceptions import re import urlparse import six from tempest import config from tempest.openstack.common import log as logging from tempest.services.identity.json import token_client as json_id from tempest.services.identity.v3.json import token_client as json_v3id CONF = c...
import pytest import time import sys import cPickle as pickle from test_base_class import TestBaseClass aerospike = pytest.importorskip("aerospike") try: from aerospike.exception import * except: print "Please install aerospike python client." sys.exit(1) class TestAppend(object): def setup_class(cls): ...
""" Definition of views. """ from app.models import Choice, Poll from datetime import datetime from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpRequest, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from djan...
import sys import json import os import re import argparse def get_file_locations(): parser = argparse.ArgumentParser() parser.add_argument('input', help='Input AVPR filename(s)', nargs='+') parser.add_argument('output', help='Output directory') args = parser.parse_args() return (args.input, args.output) def ...
''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' from __future__ import print_function import atexit import copy import json import os import re import shutil import subprocess import tempfile try: import ruamel.yaml as yaml except ImportError: import yaml from ansible.module_utils.basic...
"""Internal helpers for tests in this directory.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import os import sqlite3 from tensorflow.contrib.summary import summary_ops from tensorflow.python.framework import test_util class SummaryDbT...
from .firefox.webdriver import WebDriver as Firefox # noqa from .firefox.firefox_profile import FirefoxProfile # noqa from .chrome.webdriver import WebDriver as Chrome # noqa from .chrome.options import Options as ChromeOptions # noqa from .ie.webdriver import WebDriver as Ie # noqa from .edge.webdriver import Web...
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from pants.base.exceptions import TaskError from pants.engine.engine import Engine from pants_test.base.context_utils import create_context from pants_test.engine.base_...
"""This component provides basic support for Foscam IP cameras.""" import asyncio from libpyfoscam import FoscamCamera import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, SUPPORT_STREAM, Camera from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ...
from __future__ import absolute_import, print_function import ctypes import math import threading from . import interface from pyglet.debug import debug_print from pyglet.media.events import MediaEvent from pyglet.media.drivers.base import AbstractAudioDriver, AbstractAudioPlayer from pyglet.media.listener import Abstr...
import operator import os import mock import unittest from contextlib import contextmanager from shutil import rmtree from StringIO import StringIO from tempfile import mkdtemp from xml.dom import minidom from eventlet import spawn, Timeout, listen import simplejson from swift.common.swob import Request, HeaderKeyDict ...
"""Keras hashing preprocessing layer.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import numpy as np from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import spa...
"""Shark IQ Wrapper.""" from __future__ import annotations import logging from typing import Iterable from sharkiqpy import OperatingModes, PowerModes, Properties, SharkIqVacuum from homeassistant.components.vacuum import ( STATE_CLEANING, STATE_DOCKED, STATE_IDLE, STATE_PAUSED, STATE_RETURNING, ...
"""This plugin renders the filesystem in a tree and a table.""" import cgi import os import random import socket from django import http from M2Crypto import X509 from grr.gui import renderers from grr.gui.plugins import fileview_widgets from grr.gui.plugins import forms from grr.gui.plugins import semantic from grr.li...
from beritest_tools import BaseBERITestCase from nose.plugins.attrib import attr @attr('mt') class test_ipc(BaseBERITestCase): def test_cause_t0(self): self.assertRegisterEqual(self.MIPS.threads[0].s0 & 0xffff, 0x800, "Thread 0 cause register not interrupt on IP3") def test_epc_t0(self): expecte...
from climate import tests class DBUtilsTestCase(tests.TestCase): """Test case for DB Utils.""" pass
from __future__ import print_function from __future__ import division from __future__ import absolute_import from congress.api import api_utils from congress.api import webservice from congress.tests import base class TestAPIUtils(base.SqlTestCase): def setUp(self): super(TestAPIUtils, self).setUp() def...
from oslo_config import cfg import nova.conf hyperv_opts = [ cfg.IntOpt('evacuate_task_state_timeout', default=600, help='Number of seconds to wait for an instance to be ' 'evacuated during host maintenance.'), cfg.IntOpt('cluster_event_check_interval', ...
from sklearn.base import BaseEstimator, TransformerMixin import numpy as np class PositionalSelector(BaseEstimator, TransformerMixin): def __init__(self, positions): self.positions = positions def fit(self, X, y=None): return self def transform(self, X): return np.array(X)[:, self.po...
import base64 import json from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from ..views import register, statements, activities class ActivityTests(TestCase): @classmethod def setUpClass(cls): print "\n%s" % __name__ def setUp(self): ...
import abc import datetime import decimal import functools import json import uuid import pytz import msgpack import six from lymph.utils import Undefined @six.add_metaclass(abc.ABCMeta) class ExtensionTypeSerializer(object): @abc.abstractmethod def serialize(self, obj): raise NotImplementedError @a...
import os import numpy as np import matplotlib.pyplot as plt from hyperion.model import ModelOutput from hyperion.util.constants import pc if not os.path.exists('frames'): os.mkdir('frames') m = ModelOutput('flyaround_cube.rtout') image = m.get_image(distance=300 * pc, units='MJy/sr') for iview in range(image.val.s...
from functools import wraps from htmlmin.minify import html_minify def minified_response(f): @wraps(f) def minify(*args, **kwargs): response = f(*args, **kwargs) minifiable_status = response.status_code == 200 minifiable_content = 'text/html' in response['Content-Type'] if minifi...
""" Flexx setup script. """ import os from os import path as op try: # use setuptools namespace, allows for "develop" import setuptools # noqa, analysis:ignore except ImportError: pass # it's not essential for installation from distutils.core import setup name = 'flexx' description = "Pure Python toolkit ...
from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.html import conditional_escape from django.utils.encoding import force_unicode from django.utils impo...
from .display_common import BaseScreen import time class LCDScreen(BaseScreen): def set_terminal_properties(self, colors=None, bright_is_bold=None, has_underline=None): pass def set_mouse_tracking(self, enable=True): pass def start(self): pass def stop(self): pass...
""" Handles a "generic" string format for units """ import os import re import warnings import sys from fractions import Fraction import unicodedata from . import core, utils from .base import Base from astropy.utils import classproperty from astropy.utils.misc import did_you_mean def _is_ascii(s): if sys.version_i...
import collections import math import sys from telemetry.timeline import model as model_module from telemetry.value import scalar from telemetry.value import list_of_scalar_values from telemetry.web_perf.metrics import timeline_based_metric TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' TOPLEVEL_SERVICE_CATEGORY = 'disabled-by-...
__author__ = 'j.s@google.com (Jeff Scudder)' import unittest import atom_tests.core_test import atom_tests.data_test import atom_tests.http_core_test import atom_tests.auth_test import atom_tests.mock_http_core_test import atom_tests.client_test import gdata_tests.client_test import gdata_tests.core_test import gdata_t...
""" Polish-specific form helpers """ import re from django.newforms import ValidationError from django.newforms.fields import Select, RegexField from django.utils.translation import ugettext_lazy as _ class PLVoivodeshipSelect(Select): """ A select widget with list of Polish voivodeships (administrative provinc...
"""Script for making catalogs of galaxy fit data corresponding to a real galaxy training set used by GalSim. It has to collect information from several large files.""" import pyfits import numpy as np galsim_catfile = 'real_galaxy_catalog_23.5.fits' fit_catfiles = ['BRIGHTtotalRAW00000.26113.fits', 'to...
import sys from django.contrib.admin.helpers import AdminForm from django.utils.decorators import method_decorator from django.db import transaction from django.utils import simplejson from django.views.decorators.clickjacking import xframe_options_sameorigin from cms.constants import PLUGIN_COPY_ACTION, PLUGIN_MOVE_AC...
import math import json import os import pytest import rti_python.ADCP.AdcpCommands def calculate_predicted_range(**kwargs): """ :param SystemFrequency=: System frequency for this configuration. :param CWPON=: Flag if Water Profile is turned on. :param CWPBL=: WP Blank in meters. :param CWPBS=: WP b...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('nomcom', '0004_auto_20151027_0829'), ] operations = [ migrations.RemoveField( model_name='position', name='incumbent', ), ]
import sys from ..pakbase import Package class Mt3dAdv(Package): """ MT3DMS Advection Package Class. Parameters ---------- model : model object The model object (of type :class:`flopy.mt3d.mt.Mt3dms`) to which this package will be added. mixelm : int MIXELM is an integer ...
""" Testing the Intravoxel incoherent motion module The values of the various parameters used in the tests are inspired by the study of the IVIM model applied to MR images of the brain by Federau, Christian, et al. [1]. References ---------- .. [1] Federau, Christian, et al. "Quantitative measurement of brain pe...
import sys from itertools import accumulate, count, product from collections import namedtuple from random import randrange from ndtypes import ndt, ApplySpec from _testbuffer import get_sizeof_void_p SIZEOF_PTR = get_sizeof_void_p() Mem = namedtuple("Mem", "itemsize align") def c_datasize(t): """Check the datasize...
SECRET_KEY = 'spam' DEBUG = True TEMPLATE_DEBUG = DEBUG ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ['tests'] DATABASES = {'default': {'NAME': 'db.sqlite', 'ENGINE': 'django.db.backends.sqlite3'}} TEMPLATE_CONTEXT_PROCESSORS = [ 'django_settings_export.settings_export' ] TEMPLATES = [ ...
import collections import os import tempfile import unittest import uuid import qiime2.core.type from qiime2.sdk import Artifact from qiime2.sdk.result import ResultMetadata import qiime2.core.archive as archive from qiime2.core.testing.type import IntSequence1, FourInts, Mapping from qiime2.core.testing.util import ge...
""" astroquery.solarsystem.jpl -------------------------- a collection of data services provided by JPL """ from .sbdb import * from .horizons import * from . import *
import os from cookiecutter import repository, exceptions import pytest def test_finds_local_repo(tmpdir): """A valid local repository should be returned.""" project_dir = repository.determine_repo_dir( 'tests/fake-repo', abbreviations={}, clone_to_dir=str(tmpdir), checkout=None,...
import logging from unittest import mock import olympia.core.logger from olympia.amo.tests import TestCase from olympia.users.models import UserProfile class LoggerTests(TestCase): @mock.patch('olympia.core.get_remote_addr', lambda: '127.0.0.1') @mock.patch('olympia.core.get_user', lambda: UserProfile(username=...
import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_array_less, assert_array_equal) import pytest import mne from mne.datasets import testing from mne.label import read_label from mne import (read_cov, read_forward_solution, re...
import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth.hashers import make_password class Migration(DataMigration): def forwards(self, orm): """Adds a user to be used for migrations.""" # ``make_password(None)`` makes an unusa...
""" Tests for miscellaneous models Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np import pandas as pd import os import re import warnings from statsmodels.tsa.statespace import mlemodel from statsmodels import datasets from numpy.testi...
""" OptimizableComp finds whether a comprehension can be optimized. """ from pythran.analyses.identifiers import Identifiers from pythran.passmanager import NodeAnalysis class OptimizableComprehension(NodeAnalysis): """Find whether a comprehension can be optimized.""" def __init__(self): self.result = s...
import os from pymco.test import ctxt from . import base class RabbitMQTestCase(base.IntegrationTestCase): '''RabbitMQ integration test case.''' CTXT = { 'connector': 'rabbitmq', 'plugin.rabbitmq.vhost': '/mcollective', 'plugin.rabbitmq.pool.size': '1', 'plugin.rabbitmq.pool.1.ho...
from datetime import timedelta import operator from sys import getsizeof import warnings import numpy as np from pandas._libs import index as libindex, lib import pandas.compat as compat from pandas.compat import get_range_parameters, lrange, range from pandas.compat.numpy import function as nv from pandas.util._decora...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('msgs', '0002_auto_20150204_1116'), ] operations = [ migrations.RemoveField( model_name='message', name='issue', ), ]
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 field 'AuthIdentity.last_verified' db.add_column( 'sentry_authidentity', ...
import numpy as np import pandas as pd from bokeh.plotting import * cats = list("abcdef") y = np.random.randn(2000) g = np.random.choice(cats, 2000) for i, l in enumerate(cats): y[g == l] += i // 2 df = pd.DataFrame(dict(score=y, group=g)) groups = df.groupby('group') q1 = groups.quantile(q=0.25) q2 = groups.quanti...
import re import os.path import subprocess from mainwindow import MainWindow def default_c10t_executable(): return "./c10t" def default_minecraft_world(): return "~/.minecraft/saves/World1" def default_output_image(): return os.path.abspath("out.png") def quote_arg_if_needed(arg): """Add quotes if the a...
import logging import os import sys from telemetry.core import browser_finder from telemetry.core import browser_options from telemetry.page import page_test from telemetry.page import page_runner from telemetry.page import page_set from telemetry.test import discover def Main(test_dir, page_set_filenames): """Turns ...
if __name__ == '__main__': x = int(raw_input()) y = int(raw_input()) z = int(raw_input()) n = int(raw_input()) print ( [ [i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n] )
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import pytest from tableschema import types from tableschema.config import ERROR @pytest.mark.parametrize('format, value, result', [ ('default', [2000, 10], (2000, 10)...
from collections import defaultdict from mongoengine.python_support import txt_type __all__ = ('NotRegistered', 'InvalidDocumentError', 'LookUpError', 'DoesNotExist', 'MultipleObjectsReturned', 'InvalidQueryError', 'OperationError', 'NotUniqueError', 'FieldDoesNotExist', 'ValidationErro...
import wx from BTL.defer import ThreadedDeferred from BTL.language import languages, language_names from BTL.platform import app_name from BitTorrent.platform import read_language_file, write_language_file from BitTorrent.GUI_wx import SPACING, VSizer, gui_wrap, text_wrappable error_color = wx.Colour(192,0,0) class Lan...
""" Microformats2 is a general way to mark up any HTML document with classes and propeties. This library parses structured data from a microformatted HTML document and returns a well-formed JSON dictionary. """ from .version import __version__ from .parser import Parser, parse from .mf_helpers import get_url __all__ = ...
import string, copy import sys def read_fasta(afile, query_id=''): """Parses any fasta, a2m, a3m file, sequence or alignment file. @param afile input file @param query_id ID of query sequence (default='') Ensures: key of a given query ID only contains its ID, not the full header @return {...
""" x86 definitions. Commonly used definitions. """ from __future__ import absolute_import from cdsl.isa import TargetISA, CPUMode import base.instructions from . import instructions as x86 from base.immediates import floatcc ISA = TargetISA('x86', [base.instructions.GROUP, x86.GROUP]) # type: TargetISA X86_64 = CPUMo...
from __future__ import unicode_literals, division, absolute_import import os import re import logging from path import path from flexget import plugin from flexget.event import event from flexget.config_schema import one_or_more from flexget.plugin import get_plugin_by_name from flexget.utils.tools import TimedDict log...
""" Type Inference """ from .typevar import TypeVar from .ast import Def, Var from copy import copy from itertools import product try: from typing import Dict, TYPE_CHECKING, Union, Tuple, Optional, Set # noqa from typing import Iterable, List, Any, TypeVar as MTypeVar # noqa from typing import cast fro...
import sys PYTHON_MAJOR_VERSION = sys.version_info import os import posixpath try: import urlparse as url_parser import urllib2 urlopen = urllib2.urlopen except ImportError: import urllib.parse as url_parser from urllib.request import urlopen as url_opener urlopen = url_opener from m3u8.model im...
from tasks.cache import cache_issues from tasks.cache import cache_pulls from tasks.cache import cache_commits from tasks.cache import oldest_issues from tasks.cache import oldest_pulls from tasks.cache import least_issues from tasks.cache import least_pulls from tasks.cache import issues_closed_since from tasks.cache ...
from msrest.serialization import Model class SubResource(Model): """SubResource. :param id: Resource ID. :type id: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, } def __init__(self, *, id: str=None, **kwargs) -> None: super(SubResource, self).__init__(**kwarg...
"""\ ===================================== Timing the speed of primes algorithms ===================================== """ from __future__ import division import sys from itertools import islice if __name__ == '__main__': import os path = os.path.dirname(__file__) parent, here = os.path.split(path) sys....
from Screens.MessageBox import MessageBox from boxbranding import getMachineBrand, getMachineName from Screens.ParentalControlSetup import ProtectedScreen from Components.config import config from Tools.BoundFunction import boundFunction from Screens.InputBox import PinInput class FactoryReset(MessageBox, ProtectedScre...
import Log import Version import os import sys import imp import Config import Song from OpenGL.GL import * from OpenGL.GLU import * import string import math from Language import _ from Shader import shaders from Task import Task from constants import * GUITARTYPES = [0, 1, 4] DRUMTYPES = [2, 3] MICTYPES = [5] de...
""" Darwin Session collectors. """ __author__ = "Adam Sindelar <adamsh@google.com>" from rekall.entities import definitions from rekall.plugins.collectors.darwin import common from rekall.plugins.collectors.darwin import zones class DarwinTerminalUserInferor3000(common.DarwinEntityCollector): """Infers the relation...
import sys sys.path.append("./pizza") from gnu import gnu argv = sys.argv if len(argv) != 5: print "Syntax: plot.py in.liggghts Nfreq Nsteps compute-ID" sys.exit() infile = sys.argv[1] nfreq = int(sys.argv[2]) nsteps = int(sys.argv[3]) compute = sys.argv[4] me = 0 from liggghts import liggghts lmp = liggghts() lmp....
"""Parallel testing, supporting arbitrary collection ordering The Workflow ------------ - Master py.test process starts up, inspects config to decide how many slave to start, if at all - env['parallel_base_urls'] is inspected first - py.test config.option.appliances and the related --appliance cmdline flag are used...
"""Additional auxiliary data types""" from itertools import islice __license__ = """\ Copyright (C) 2006-2012 Tamás Nepusz <ntamas@gmail.com> Pázmány Péter sétány 1/a, 1117 Budapest, Hungary This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
""" Higher order classes and functions for Libvirt Sandbox (lxc) container testing :copyright: 2013 Red Hat Inc. """ import datetime import time import logging import lvsb_base def make_sandboxes(params, env, extra_ns=None): """ Return list of instantiated lvsb_testsandboxes classes from params :param param...
import numpy as np from hyperspy._signals.signal1d import Signal1D from hyperspy._signals.signal2d import Signal2D from hyperspy.decorators import lazifyTestClass @lazifyTestClass class Test2D: def setup_method(self, method): self.im = Signal2D(np.random.random((2, 3))) def test_to_signal1D(self): ...
import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for field in ('species', 'cultivar', 'other', 'gender', 'bloom_period', 'fruit_period', 'fact_sheet', 'plant_guide'): ...
from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' import sys, os, re from functools import partial from PyQt5.Qt import ( QGridLayout, QToolButton, QIcon, QRadioButton, QMe...
""" script to build the latest binaries for each vehicle type, ready to upload Peter Barker, August 2017 based on build_binaries.sh by Andrew Tridgell, March 2013 AP_FLAKE8_CLEAN """ from __future__ import print_function import datetime import optparse import os import re import shutil import time import string import ...
import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line os.environ.setdefault("DJANGO_SETTINGS_MODULE", "worldmap.settings") execute_from_command_line(sys.argv)
from .depth import * from .camera import * from .contact import * from .imagefeature import * from .arduino import *
"""The message storage service.""" from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ 'IMessage', 'IMessageStore', ] from zope.interface import Interface, Attribute class IMessageStore(Interface): """The interface of the global message storage service. All mess...
from __future__ import absolute_import from collections import OrderedDict from linchpin.InventoryFilters.InventoryFilter import InventoryFilter class Inventory(InventoryFilter): DEFAULT_HOSTNAMES = ['public_ip'] def get_host_data(self, res, cfgs): """ Returns a dict of hostnames or IP addresses...
import sickbeard import kodi import plex import emby import nmj import nmjv2 import synoindex import synologynotifier import pytivo import growl import prowl from . import libnotify import pushover import boxcar import boxcar2 import nma import pushalot import pushbullet import freemobile import tweet import trakt impo...
from django.conf import settings from django.conf.urls.defaults import handler500, handler404, patterns, include, \ url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascri...
import account_move_line import account_move_reconcile import cash_flow_type import cash_flow_distribution import report import wizard
""" Module for code that should run during LMS startup """ from django.conf import settings settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import edxmako import logging from monkey_patch import django_utils_translation import analytics log = loggin...
import statement
from . import test_account_payment_transfer_reconcile_batch
from sympy.core.evalf import PrecisionExhausted, complex_accuracy from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \ fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \ factorial, binomial, Sum, zeta, Catalan, Pow, GoldenRatio, sympify, \ sstr, Function, Eq, Mul, Pow, Der...
registry = {} def register(model, fields, order='pk', filter=False, results=5): registry[str(model)] = (model, fields, results, order, filter) class LoopBreak(Exception): pass def search_for_string(search_string): search_string = search_string.lower() matches = [] for key in registry: model, fie...
from spack import * class Dtbuild3(Package): """Simple package which acts as a build dependency""" homepage = "http://www.example.com" url = "http://www.example.com/dtbuild3-1.0.tar.gz" version('1.0', '0123456789abcdef0123456789abcdef')