code
stringlengths
1
199k
""" This module implements the StarFinder class. """ import inspect import warnings from astropy.nddata import overlap_slices from astropy.table import QTable from astropy.utils import lazyproperty import numpy as np from .core import StarFinderBase from ..utils._convolution import _filter_data from ..utils._misc impor...
"""Mayavi/traits GUI for setting MRI fiducials.""" import os from mayavi.core.ui.mayavi_scene import MayaviScene from mayavi.tools.mlab_scene_model import MlabSceneModel import numpy as np from pyface.api import confirm, error, FileDialog, OK, YES from traits.api import (HasTraits, HasPrivateTraits, on_trait_change, ...
print "1..2" import perl perl.eval(""" Python::exec(" print 'ok 1' n = 4 "); print "ok ", Python::eval("n/2"), "\n"; """)
alg = vtk.vtkAlgorithm() pip = vtk.vtkCompositeDataPipeline() alg.SetDefaultExecutivePrototype(pip) del pip Ren1 = vtk.vtkRenderer() Ren1.SetBackground(0.33,0.35,0.43) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(Ren1) renWin.SetSize(300,300) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) pvTe...
import json from django.http import HttpResponseForbidden, HttpResponse from django.views.decorators.csrf import csrf_exempt from security.models import CspReport import logging log = logging.getLogger(__name__) def require_ajax(view): """ A view decorator which ensures that the request being proccessed by ...
"""Interpolate data along a single axis.""" import warnings import numpy as np from ..cbook import broadcast_indices from ..package_tools import Exporter from ..xarray import preprocess_xarray exporter = Exporter(globals()) @exporter.export @preprocess_xarray def interpolate_nans_1d(x, y, kind='linear'): """Interpo...
"""Computational algebraic field theory. """ from __future__ import print_function, division from sympy import ( S, C, Expr, Rational, Symbol, Add, Mul, sympify, Q, ask, Dummy, Tuple, expand_mul, I, pi ) from sympy.polys.polytools import ( Poly, PurePoly, sqf_norm, invert, factor_list, groebner, resultant, ...
""" The ActionChains implementation """ from selenium.webdriver.remote.command import Command from selenium.webdriver.common.keys import Keys class ActionChains(object): """ Generate user actions. All actions are stored in the ActionChains object. Call perform() to fire stored actions. """ def _...
""" .. module:: skrf.io.mdif ======================================== mdif (:mod:`skrf.io.mdif`) ======================================== Mdif class and utilities .. autosummary:: :toctree: generated/ Mdif """ import numpy as np import typing from ..util import get_fid from ..frequency import Frequency from ..net...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [("accounts", "0013_remove_profile_team_access_allowed")] operations = [ migrations.AlterField( ...
import cv2 import imghdr import numpy as np import sys cascPath = "haarcascade_frontalface_default.xml" faceCascade = cv2.CascadeClassifier(cascPath) class Camera(object): def __init__(self): self.video = cv2.VideoCapture(0) self.video.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, 320) self.video.set...
"""This is a server-side example of the pyptlib API.""" import sys from pyptlib.server import ServerTransportPlugin from pyptlib.config import EnvError if __name__ == '__main__': server = ServerTransportPlugin() try: server.init(["blackfish", "bluefish"]) except EnvError, err: print "pyptlib...
__all__ = [] from functools import wraps, partial from .workers import run_blocking from .io import Socket try: import ssl as _ssl from ssl import * except ImportError: # We need these exceptions defined, even if ssl is not available. class SSLWantReadError(Exception): pass class SSLWantWrit...
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) sphere = vtk.vtkSphereSource() sphereMapper = vtk.vtkPoly...
""" Test that the SBWatchpoint::SetEnable API works. """ import os import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * from lldbsuite.test import lldbplatform, lldbplatformutil class TestWatchpointSetEnable(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self)...
from corehq.apps.reports.filters.dates import DatespanFilter class TDHDateSpanFilter(DatespanFilter): default_days = 7
""" pyrseas.dbobject.privileges ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This defines functions for dealing with access privileges. """ PRIVCODES = {'a': 'insert', 'r': 'select', 'w': 'update', 'd': 'delete', 'D': 'truncate', 'x': 'references', 't': 'trigger', 'X': 'execute', 'U': 'usage', 'C':...
""" Contains the transformation functions for getting to "observed" systems from CIRS. Currently that just means AltAz. """ from __future__ import (absolute_import, unicode_literals, division, print_function) import numpy as np from ... import units as u from ..baseframe import frame_transform_g...
import os import time import string import supybot.conf as conf import supybot.ircdb as ircdb import supybot.utils as utils from supybot.commands import * import supybot.plugins as plugins import supybot.ircutils as ircutils import supybot.callbacks as callbacks try: import sqlite except ImportError: raise call...
""" codegen ~~~~~~~ Extension to ast that allow ast -> python code generation. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ from ast import * BOOLOP_SYMBOLS = { And: 'and', Or: 'or' } BINOP_SYMBOLS = { Add: '+', Sub: '-', Mult: ...
from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import re import six import codecs import hashlib from copy import copy from importlib import import_module from six.moves.urllib.parse import parse_qs, urlparse...
''' Utility functions for SportPredictifier Simulation ''' import numpy as np from numpy.random import poisson, binomial, negative_binomial def sim_poisson(mean, n_sim): ''' Simulates Poisson for when mean is equal to variance ''' return poisson(mean, n_sim) def sim_negative_binomial(mean, var, n_sim): ...
import os mysql_host = 'localhost' mysql_port = 3306 mysql_user = 'root' mysql_passwd = '6522123' mysql_db = 'webserver' mysql_charset = 'utf8'
import os import sys if __name__ == "__main__": # GETTING-STARTED: change 'myproject' to your project name: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
from __future__ import unicode_literals import collections import numpy as np from pymatgen.core.structure import Structure from pymatgen.core.lattice import Lattice from pymatgen.electronic_structure.bandstructure import Kpoint from monty.json import MSONable """ This module provides classes to define a phonon band st...
"""Test mining RPCs - getmininginfo - getblocktemplate proposal mode - submitblock""" import copy from binascii import b2a_hex from decimal import Decimal from test_framework.blocktools import create_coinbase from test_framework.mininode import CBlock from test_framework.test_framework import PivxTestFramework from tes...
import numpy as np class dtree: """ Decision Tree with weights""" def __init__(self): """ Constructor """ def read_data(self,filename): fid = open(filename,"r") data = [] d = [] for line in fid.readlines(): d.append(line.strip()) for d1 in d: ...
import os import logging from autotest.client.shared import error, utils from virttest import utils_misc from virttest import storage from virttest import qemu_storage from virttest import nfs from qemu.tests import block_copy class DriveMirror(block_copy.BlockCopy): """ base class for block mirror tests; "...
""" Database access related functions for BibKnowledge. """ __revision__ = "$Id$" from invenio.dbquery import run_sql from invenio.memoiseutils import Memoise def get_kbs_info(kbtypeparam="", searchkbname=""): """Returns all kbs as list of dictionaries {id, name, description, kbtype} If the KB is dynamic, th...
import logging from pylons import request, response, session, tmpl_context as c from zkpylons.lib.helpers import redirect_to from pylons.decorators import validate from pylons.decorators.rest import dispatch_on from formencode import validators, htmlfill, ForEach, Invalid from formencode.variabledecode import NestedVar...
var.doCheckForBlankSequences=False read('noOpt.p4_tPickle') t = var.trees[0] read('d.nex') t.data = Data() t.optLogLike(newtAndBrentPowell=1, allBrentPowell=0, verbose=1) t.tPickle('opt')
from django.conf.urls import patterns, url urlpatterns = patterns('misago.apps.resetpswd.views', url(r'^$', 'form', name="forgot_password"), url(r'^(?P<username>[a-z0-9]+)-(?P<user>\d+)/(?P<token>[a-zA-Z0-9]+)/$', 'reset', name="reset_password"), )
'''OpenGL extension PGI.misc_hints Automatically generated by the get_gl_extensions script, do not edit! ''' from OpenGL import platform, constants, constant, arrays from OpenGL import extensions from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_PGI_misc_hints' _DEPRECATED = False GL_PREFER_DOUBLEBUFFER_HI...
import socket import unittest from threading import Thread from struct import pack, unpack from SocketServer import BaseRequestHandler, ThreadingTCPServer from scapy.fields import StrField from scapy.packet import Packet, Raw from pysap.SAPNI import (SAPNI, SAPNIStreamSocket, SAPNIServerThreaded, ...
try: import curses except ImportError: pass colors = [ 'COLOR_BLACK', 'COLOR_BLUE', 'COLOR_CYAN', 'COLOR_GREEN', 'COLOR_MAGENTA', 'COLOR_RED', 'COLOR_WHITE', 'COLOR_YELLOW' ] color_pairs = { ("white", "black"): 0 # Special case, can't be changed } schemes = { "input": ("w...
__description__ = \ """ pdb_oligomer.py Grabs the name of every molecule in the file, then looks at the biological assembly and decides whether or not the asymmetric unit has the relevant assembly. If it does not, the program spits out false. (Some day, it will spit out the relevant assembly...) """ __author__ = "Mic...
import io import os import sys import zlib import time import ctypes import msvcrt from click._compat import _NonClosingTextIOWrapper, text_type, PY2 from ctypes import byref, POINTER, pythonapi, c_int, c_char, c_char_p, \ c_void_p, py_object, c_ssize_t, c_ulong, windll, WINFUNCTYPE from ctypes.wintypes import LPW...
from pyshell.arg.exception import ArgException from pyshell.arg.exception import ArgInitializationException from pyshell.arg.exception import DecoratorException
import time, datetime import lazylibrarian def now(): now = datetime.datetime.now() return now.strftime("%Y-%m-%d %H:%M:%S") def today(): today = datetime.date.today() yyyymmdd = datetime.date.isoformat(today) return yyyymmdd def age(histdate): nowdate = datetime.date.today() m1, d1, y1 = (i...
""" The most likely externally linked URL addresses from the old A+ URL design are redirected to the new views with the new URL mappings. """
"""Handle /_ah/warmup requests on instance start.""" __author__ = 'Mike Gainer (mgainer@google.com)' import logging import urlparse import webapp2 import appengine_config from models import custom_modules MODULE_NAME = 'warmup' _LOG = logging.getLogger('modules.warmup.warmup') _LOG.setLevel(logging.INFO) logging.basicC...
from functools import partial import numpy as np import scipy.sparse import scipy.optimize from Reconstructor import Reconstructor class Total_Variation_Reconstructor(Reconstructor): def __init__(self, arguments): """ Initialize the total variation reconstructor object. """ super(Tot...
import urlparse,re import urllib from core import logger from core import scrapertools from core.item import Item DEBUG = False CHANNELNAME = "internautastv" def isGeneric(): return True def mainlist(item): logger.info("[extremaduratv.py] mainlist") itemlist = [] itemlist.append( Item(channel=CHANNELNAM...
import pytest from tests import test_utils from treeherder.log_parser.artifactbuildercollection import ArtifactBuilderCollection from treeherder.log_parser.artifactbuilders import BuildbotLogViewArtifactBuilder from ..sampledata import SampleData slow = pytest.mark.slow def do_test(log): """ Test a single log. ...
import json import os import sys from configlib import getConfig, OptionParser from kombu import Connection, Queue, Exchange from kombu.mixins import ConsumerMixin from lib.alert_plugin_set import AlertPluginSet from lib.config import ALERT_ACTIONS from mozdef_util.utilities.logger import logger, initLogger class alert...
import flask import logging from bson import ObjectId from flask import current_app as app from eve.utils import config from superdesk.activity import add_activity, ACTIVITY_CREATE, ACTIVITY_UPDATE from superdesk.metadata.item import SIGN_OFF from superdesk.services import BaseService from superdesk.utils import is_has...
""" Module for code that should run during LMS startup """ import logging import django from django.conf import settings settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup from openedx.core.release import doc_version import analytics from openedx.core....
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from flexi_auth.models import Param, ParamRole, PrincipalParamRoleRelation from consts import DES_ADMIN from des.models import DES, Siteattr from gf.base.models import Person from des import models from django....
import sys import unittest sys.path.insert(0, ".") from coalib.misc.Shell import escape_path_argument class ShellTest(unittest.TestCase): # Tests the function that makes a path shell-argument-ready. def test_escape_path_argument(self): osname = "Linux" self.assertEqual( escape_path_a...
from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.PipRequirement import PipRequirement from coalib.settings.Setting import typed_list @linter(executable='pydocstyle', use_stdout=True, use_stderr=True, output_format='regex', output_regex=r'.*:(?...
from spack import * class Cntk(Package): """The Microsoft Cognitive Toolkit is a unified deep-learning toolkit that describes neural networks as a series of computational steps via a directed graph.""" homepage = "https://www.microsoft.com/en-us/research/product/cognitive-toolkit" url = "https:...
from spack import * class PyHumanize(PythonPackage): """This modest package contains various common humanization utilities, like turning a number into a fuzzy human readable duration ('3 minutes ago') or into a human readable size or throughput. It works with python 2.7 and 3.3 and is localized to Russi...
"""Schema for configuration merged into one file. .. literalinclude:: _spack_root/lib/spack/spack/schema/merged.py :lines: 39- """ from llnl.util.lang import union_dicts import spack.schema.bootstrap import spack.schema.cdash import spack.schema.compilers import spack.schema.config import spack.schema.container impo...
from spack import * class Xcompmgr(AutotoolsPackage): """xcompmgr is a sample compositing manager for X servers supporting the XFIXES, DAMAGE, RENDER, and COMPOSITE extensions. It enables basic eye-candy effects.""" homepage = "http://cgit.freedesktop.org/xorg/app/xcompmgr" url = "https://www....
""" This script will test highgui's window functionality """ TESTNAME = "cvShowImage" REQUIRED = ["cvLoadImagejpg", "cvNamedWindow"] import os import sys import works PREFIX=os.environ["top_srcdir"]+"/tests/python/testdata/images/" if not works.check_files(REQUIRED,TESTNAME): sys.exit(77) import python from python.hig...
import unittest import common import binascii import keepkeylib.messages_pb2 as proto import keepkeylib.types_pb2 as proto_types from keepkeylib.client import CallException class TestMsgEstimatetxsize(common.KeepKeyTest): def test_estimate_size(self): self.setup_mnemonic_nopin_nopassphrase() inp1 = ...
from typing import Any, Dict from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from zerver.lib.webhooks.common import check_send_webhook_message from zerver.models import User...
"""Extracts native methods from a Java file and generates the JNI bindings. If you change this, please run and update the tests.""" import collections import errno import optparse import os import re import string from string import Template import subprocess import sys import textwrap import zipfile class ParseError(E...
""" A Hyper-V Nova Compute driver. """ from nova.openstack.common import log as logging from nova.virt import driver from nova.virt.hyperv import hostops from nova.virt.hyperv import livemigrationops from nova.virt.hyperv import migrationops from nova.virt.hyperv import snapshotops from nova.virt.hyperv import vmops fr...
from sqlalchemy import Table, Column, MetaData, select, testing from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects.postgresql import JSONB, JSON from sqlalchemy.orm import sessionmaker from sqlalchemy.testing import fixtures from sqlalchemy.types import Integer from sqlalchemy import JSON ...
""" Global cells config options """ from nova.openstack.common import cfg cells_opts = [ cfg.BoolOpt('enable', default=False, help='Enable cell functionality'), cfg.StrOpt('topic', default='cells', help='the topic cells nodes listen on'), cfg.S...
""" Autopsy Forensic Browser Copyright 2019-2020 Basis Technology Corp. Contact: carrier <at> sleuthkit <dot> org 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/LI...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sites', '0017_site_theme_data'), ] operations = [ migrations.RemoveField( model_name='site', name='disqus_url', ), ]
"""Unit tests to cover CreativeGroupService.""" __author__ = 'api.jdilallo@gmail.com (Joseph DiLallo)' import os import sys sys.path.insert(0, os.path.join('..', '..', '..', '..')) import unittest from adspygoogle.common import Utils from tests.adspygoogle.dfa.v1_19 import client from tests.adspygoogle.dfa.v1_19 import...
class RollbackConfig(object): """ http://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_rollbackconfig """ def __init__(self, model=None): super(RollbackConfig, self).__init__() self._revision = 0 if model is not None: self._build_with_model...
from unittest import mock from airflow.providers.google.cloud.hooks.workflows import WorkflowsHook from airflow.providers.google.common.consts import CLIENT_INFO BASE_PATH = "airflow.providers.google.cloud.hooks.workflows.{}" LOCATION = "europe-west1" WORKFLOW_ID = "workflow_id" EXECUTION_ID = "execution_id" WORKFLOW =...
__author__ = 'alisonbento' import src.base.arrayparsableentity as parsable class HomeShellAppliance(parsable.ArrayParsableEntity): def __init__(self): self.id = 0 self.package = None self.key = None self.type = None self.name = None self.address = None self.cr...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('content', '0001_initial'), ] operations = [ migrations.AddField( model_name='ourstory', name='order', field=models.Ch...
from __future__ import absolute_import import mock import six from orquesta import statuses as wf_statuses import st2tests import st2tests.config as tests_config tests_config.parse_args() from python_runner import python_runner from tests.unit import base from st2common.bootstrap import actionsregistrar from st2common....
"""Operations that generate constants. See the [constants guide](https://tensorflow.org/api_guides/python/constant_op). """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework imp...
"""Contains container classes to represent different protocol buffer types. This file defines container classes which represent categories of protocol buffer field types which need extra maintenance. Currently these categories are: - Repeated scalar fields - These are all repeated fields which aren't composite (e...
import os import sys import time os.environ['DJANGO_SETTINGS_MODULE'] = 'evething.settings' from django.db import connections from thing.models.skill import Skill from thing.models.skillplan import SkillPlan from thing.models.spentry import SPEntry from thing.models.spskill import SPSkill from thing.helpers import roma...
import os import glob import numpy as np import sympy from sympy import pi, sin, cos, var from compmech.conecyl.sympytools import mprint_as_sparse var('i2, k2, j3, l3, i4, j4, k4, l4', integer=True) var('x, t, tmin, tmax, xa, xb, L, r, r1, r2, sina, cosa') var('A11, A12, A16, A22, A26, A66, A44, A45, A55') var('B11, B1...
"""This module contains functions to load and save camera files. """ import numpy as np import glob import os def parse_camera_krtd(fin): """Parse a single camera in KRT format from the file object. Returns a (K,R,t,d) tuple using numpy.matrix types where: K is a 3x3 calibration matrix R is a 3x...
from os import path import tempfile import shutil from subprocess import run, PIPE, Popen from pynq import PL from . import PynqMicroblaze from . import BSPs from . import Modules from .streams import InterruptMBStream __author__ = "Peter Ogden" __copyright__ = "Copyright 2017, Xilinx" __email__ = "ogden@xilinx.com" de...
from __future__ import absolute_import from __future__ import division # Ensures that a/b is always a float. from future.utils import with_metaclass import numpy as np from numpy.testing import assert_equal, assert_almost_equal import numpy.lib.recfunctions as rfn from qinfer.tests.base_test import ( DerandomizedTe...
""" Multi-class / multi-label utility function ========================================== """ from collections import Sequence from itertools import chain import warnings from scipy.sparse import issparse from scipy.sparse.base import spmatrix from scipy.sparse import dok_matrix from scipy.sparse import lil_matrix impo...
from pyasn1.type import univ, namedtype class PBEParameter(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('salt', univ.OctetString()), namedtype.NamedType('iterationCount', univ.Integer()) )
import fixtures from oslo_utils import timeutils class TimeFixture(fixtures.Fixture): """A fixture for overriding the time returned by timeutils.utcnow(). :param override_time: datetime instance or list thereof. If not given, defaults to the current UTC time. """ def __init__(s...
from .base import WhiteNoise __version__ = '3.3.0' __all__ = ['WhiteNoise']
VERSION = "4.0.0"
''' Genshi version of templates to make adding certain Fedora widgets easier. -------------------------------------------- :mod:`fedora.tg.templates.genshi.login.html` -------------------------------------------- .. module:: fedora.tg.templates.genshi.login.html :synopsis: Templates related to logging in and out. ....
""" Unit tests for environment.py @author: Kenneth Hoste (Ghent University) """ import os from test.framework.utilities import EnhancedTestCase, init_config from unittest import TestLoader, main import easybuild.tools.environment as env class EnvironmentTest(EnhancedTestCase): """ Testcase for run module """ de...
import json from twisted.internet import defer from buildbot.db import buildsets from buildbot.test.fakedb.base import FakeDBComponent from buildbot.test.fakedb.buildrequests import BuildRequest from buildbot.test.fakedb.row import Row from buildbot.util import datetime2epoch from buildbot.util import epoch2datetime cl...
import time from xml.dom import minidom from const import CONST class GoogleFeed(object) : def __init__(self,xmlfeed) : # Need a lot more check !!! self._document = minidom.parseString(xmlfeed) self._entries = [] self._properties = {} self._continuation = None self._i...
from . import ( nvset, resource, role, rule, )
from __future__ import unicode_literals from guessit import UnicodeMixin, s, u, base_text_type from guessit.language import Language from guessit.country import Country import json import datetime import logging log = logging.getLogger(__name__) class Guess(UnicodeMixin, dict): """A Guess is a dictionary which has ...
"""Unittest for the logging checker.""" import unittest from astroid import test_utils from pylint.checkers import logging from pylint.testutils import CheckerTestCase, Message, set_config class LoggingModuleDetectionTest(CheckerTestCase): CHECKER_CLASS = logging.LoggingChecker def test_detects_standard_logging...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ansible import constants as C from ansible.compat.six import string_types from ansible.errors import AnsibleParserError, AnsibleUndefinedVariable, AnsibleFileNotFound from ansible.parsing.yaml.objects import AnsibleBa...
from numpy import * from SerialLink import * from Link import * L = [] L.append(Link(a=1)) L.append(Link(a=1)) L[0].m = 1 L[1].m = 1 L[0].r = mat([1,0,0]) L[1].r = [1,0,0] L[0].I = mat([0,0,0,0,0,0]) L[1].I = mat([0,0,0,0,0,0]) L[0].Jm = 0 L[1].Jm = 0 L[0].G = 1 L[1].G = 1 qz = [0,0] tl = SerialLink(L,name='Simple two ...
from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' import StringIO, traceback, sys, gc from PyQt4.Qt import (QMainWindow, QTimer, QAction, QMenu, QMenuBar, QIcon, ...
"""Localization. """ import os from urlparse import urljoin import sys from copy import deepcopy sys.path.insert(1, os.path.dirname(sys.path[0])) from mozharness.base.config import parse_config_file from mozharness.base.errors import PythonErrorList from mozharness.base.parallel import ChunkingMixin class LocalesMixin(...
import logging import threading import time import psycopg2 import pytz from datetime import datetime from dateutil.relativedelta import relativedelta import odoo from odoo import api, fields, models, _ from odoo.exceptions import UserError _logger = logging.getLogger(__name__) BASE_VERSION = odoo.modules.load_informat...
{ "name": "Search Partners by VAT", "version": "8.0.1.0.0", "author": "ADHOC SA", "category": "", "description" : """ Search Partners by VAT ====================== """, "website": "www.adhoc.com.ar", 'license': 'AGPL-3', "depends": ["base_vat", ], "demo": [ ],...
import os import llnl.util.tty as tty from llnl.util.filesystem import mkdirp from spack.util.editor import editor def pre_install(spec): """This hook handles global license setup for licensed software.""" pkg = spec.package if pkg.license_required and not pkg.spec.external: set_up_license(pkg) def ...
import json import os import sys sys.path.append(os.path.join(os.environ['TubeTK_BUILD_DIR'], 'ITK-build/Wrapping/Generators/Python')) sys.path.append(os.path.join(os.environ['TubeTK_BUILD_DIR'], 'ITK-build/Modules/ThirdParty/VNL/src/vxl/lib')) import itk def reconstructSlabs(animalName, directory): PixelType = itk...
import os import shutil import socket import netaddr from neutron.agent.linux import ip_lib from neutron.agent.linux import utils from neutron.common import exceptions from neutron.openstack.common import log as logging from neutron.plugins.common import constants from neutron.services.loadbalancer import constants as ...
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import messages from horizon import tables from horizon.utils import memoized from horizon import views from horizon import workflows from openstack_dashboard import api from ...
import ConfigParser import os import string from cinder.rootwrap import filters def build_filter(class_name, *args): """Returns a filter object of class class_name""" if not hasattr(filters, class_name): # TODO(ttx): Log the error (whenever cinder-rootwrap has a log file) return None filterc...
import paste.urlmap def root_app_factory(loader, global_conf, **local_conf): return paste.urlmap.urlmap_factory(loader, global_conf, **local_conf)