content
stringlengths
4
20k
{ 'name': 'Barcode Scanner Hardware Driver', 'version': '1.0', 'category': 'Hardware Drivers', 'sequence': 6, 'summary': 'Hardware Driver for Barcode Scanners', 'website': 'https://www.odoo.com/page/point-of-sale', 'description': """ Barcode Scanner Hardware Driver ==========================...
import pandas as pd from scattertext.DataFrameCorpus import DataFrameCorpus class CorpusDF(DataFrameCorpus): def __init__(self, df, X, mX, y, text_col, term_idx_store, category_idx_store, ...
""" Utility classes for handling directories and files """ import functools import inspect import os import shutil import tempfile class Directory(object): """Handle directories on filesystems """ def __init__(self, dirname=None): """ Creates a new Directory instance """ self.dirname...
''' Nif Utilities, stores logging across the code base''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2016, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followin...
"""Fix incompatible imports and module references.""" # Authors: Collin Winter, Nick Edds # Local imports from .. import fixer_base from ..fixer_util import Name, attr_chain MAPPING = {'StringIO': 'io', 'cStringIO': 'io', 'cPickle': 'pickle', '__builtin__' : 'builtins', 'c...
""" Builder for Freescale Kinetis series ARM microcontrollers. """ from os.path import join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm....
import logging import logging.handlers import os import pprint import release import sys import threading import psycopg2 import openerp import sql_db import tools _logger = logging.getLogger(__name__) def log(logger, level, prefix, msg, depth=None): indent='' indent_after=' '*len(prefix) for line in (p...
''' Created on Nov 11, 2014 @author: arne ''' from __future__ import division, print_function from __future__ import absolute_import from math import isnan from cbmpy.solver import CBSolver from .decomposition import Leaf from .sparserationals import Matrix from . import matroid class EFMEnumerator(): ''' ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from rest_framework import status from rest_framework.response import Response class DestroyModelMixin(object): """ Destroy a model instance. support for softdelete """ def destroy(self, request, *args, **kwargs): ...
__author__ = 'thorwhalen' import pymongo as mg import pandas as pd from ut.util.imports.ipython_utils import PPR from ut.daf.to import dict_list_of_rows from ut.daf.manip import rm_cols_if_present from ut.daf.ch import to_utf8 def mdb_info(mg_element=None): if mdb_info is None: return mdb_info(mg.MongoC...
__author__ = "Jesús Arroyo Torrens <<EMAIL>>" __license__ = "GNU General Public License v2 http://www.gnu.org/licenses/gpl.html" import wx.lib.scrolledpanel from horus.util import resources, profile from horus.gui.util.patternDistanceWindow import PatternDistanceWindow from horus.gui.util.imageView import VideoView ...
from __future__ import absolute_import, division, print_function __metaclass__ = type class ModuleDocFragment(object): # Standard exoscale documentation fragment DOCUMENTATION = r''' options: api_key: description: - API key of the Exoscale DNS API. - Since 2.4, the ENV variable C(CLOUDSTACK...
# coding=utf-8 from lib.Register import get_reg_class __author__ = 'Anatoli Kalysch' class Trace(list): def __init__(self, reg_size=64, tr=None): super(Trace, self).__init__() self.peephole = False self.constant_propagation = False self.standardization = False self.operand...
from json import JSONEncoder, JSONDecoder from base64 import b64decode def main(request, response): uuid = request.GET.first("token", None) if "querystate" in request.GET: response.headers.set("Content-Type", "text/plain") return JSONEncoder().encode(request.server.stash.take(uuid)) server...
# -*- coding: utf-8 -*- """Tests for the Namespace class.""" # # (C) Pywikibot team, 2014-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals try: from collections.abc import Iterable except ImportError: # Python 2.7 from collections im...
import unittest from ctypes import * from test import test_support class StringArrayTestCase(unittest.TestCase): def test(self): BUF = c_char * 4 buf = BUF("a", "b", "c") self.assertEqual(buf.value, "abc") self.assertEqual(buf.raw, "abc\000") buf.value = "ABCD" sel...
""" Support for command line notification services. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.command_line/ """ import logging import subprocess from homeassistant.helpers import validate_config from homeassistant.components.notify import ( ...
"""distutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ import os from configparser import RawConfigParser from distutils.cmd import Command DEFAULT_PYPIRC = """\ [distutils] index-servers = pypi [pypi] username:%s pass...
from essentia_test import * class TestFlatness(TestCase): def testZero(self): self.assertEqual(Flatness()(zeros(1000)), 0) def testConstant(self): self.assertEqual(Flatness()([23]), 1) self.assertAlmostEqual(Flatness()([12]*237), 1, 1e-5) def testEmpty(self): self.assertC...
""" Ansible action plugin to execute health checks in OpenShift clusters. """ # pylint: disable=wrong-import-position,missing-docstring,invalid-name import sys import os try: from __main__ import display except ImportError: from ansible.utils.display import Display display = Display() from ansible.plugins...
from openerp import netsvc import time from openerp.osv import osv,fields from openerp.tools.translate import _ import openerp.addons.decimal_precision as dp class stock_return_picking_memory(osv.osv_memory): _name = "stock.return.picking.memory" _rec_name = 'product_id' _columns = { 'product_id'...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class ReduceMean(Base): @staticmethod def export_do_not_keepdims()...
"""A simple web api wrapper around the wikipedia sql db. This is helpful if trying to query the fever wikipedia dump without needing to use directly access protobufs. """ from absl import app from absl import flags import flask from language.serene import wiki_db FLAGS = flags.FLAGS flags.DEFINE_string('wiki_db_path'...
from OctaHomeCore.views import * from OctaHomeCore.models import * from OctaHomeCore.helpers import * import json from OctaHomeLights.models import * ############### # View Object # ############### class handleGenericDeviceView(viewRequestHandler): def getViewParameters(self): if self.Kwarguments.has_key('deviceTyp...
"""Finalize crowdsale.""" import pytest from ethereum.tester import TransactionFailed from populus.chain import TestRPCChain from web3.contract import Contract from ico.tests.utils import time_travel from ico.state import CrowdsaleState def test_finalize_fail_goal(chain: TestRPCChain, uncapped_flatprice_final: Cont...
"""Tests for naming module.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.autograph.pyct import naming from tensorflow.python.platform import test class NamerTest(test.TestCase): def test_new_symbol_tracks_names(self): n...
from __future__ import unicode_literals from django.db.transaction import atomic from django.utils.encoding import python_2_unicode_compatible from .exceptions import IrreversibleError @python_2_unicode_compatible class Migration(object): """ The base class for all migrations. Migration files will impo...
import mock import uuid from oslo_config import cfg from neutron import context from neutron.db import api as db_api from neutron.db.quota import api as quota_api from neutron.quota import resource from neutron.tests import base from neutron.tests.unit import quota as test_quota from neutron.tests.unit import testlib...
# -*- coding: utf-8 -*- import httplib2 import urllib try: import json except ImportError: try: import simplejson as json except ImportError: raise ImportError( "You need to have a json parser, easy_install simplejson") class Googl: """Access Goo.gl url shorten""" de...
import os import socket import subprocess from charms import layer from charms.reactive import when, when_any, when_not from charms.reactive import set_state, remove_state from charms.reactive import hook from charmhelpers.core import hookenv from charmhelpers.core import host from charmhelpers.contrib.charmsupport im...
import unittest2 as unittest import subprocess from webkitpy.tool.steps.haslanded import HasLanded class HasLandedTest(unittest.TestCase): maxDiff = None @unittest.skipUnless(subprocess.call('which interdiff', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0, "requires interdiff") def te...
from openerp.osv import fields,osv from openerp import tools from openerp.addons.crm import crm AVAILABLE_STATES = [ ('draft','Draft'), ('open','Open'), ('cancel', 'Cancelled'), ('done', 'Closed'), ('pending','Pending') ] class project_issue_report(osv.osv): _name = "project.issue.report" _...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import ray if __name__ == "__main__": ray.init(num_cpus=0) A = np.ones(2**31 + 1, dtype="int8") a = ray.put(A) assert np.sum(ray.get(a)) == np.sum(A) del A del a ...
from django.contrib import admin from oi.shop.product.models import CategoryImages, Category, Tax, ProductImages, Product class CategoryImagesInline(admin.TabularInline): model = CategoryImages max_num = 2 class CategoryAdmin(admin.ModelAdmin): search_fields = ["name", "slug"] list_display = ("name",...
# coding=iso-8859-1 # TODO: # -test graph generation APIs (from adjacency, etc..) # -test del_node, del_edge methods # -test Common.set method from __future__ import division, print_function import os try: from hashlib import sha256 except ImportError: import sha sha256 = sha.new import subprocess import...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.contrib import linalg as linalg_lib from tensorflow.contrib.linalg.python.ops import linear_operator_util from tensorflow.python.framework import dtypes from tensorflow.pytho...
"""Base TestCase class for gs integration tests.""" import shutil import tempfile import time from boto.exception import GSResponseError from boto.gs.connection import GSConnection from tests.integration.gs import util from tests.integration.gs.util import retry from tests.unit import unittest @unittest.skipUnless(u...
{ 'name': 'IBAN Bank Accounts', 'version': '1.0', 'category': 'Hidden/Dependency', 'description': """ This module installs the base for IBAN (International Bank Account Number) bank accounts and checks for it's validity. ===================================================================================...
import lru import logging logger = logging.getLogger(__name__) class ormcache(object): """ LRU cache decorator for orm methods, """ def __init__(self, skiparg=2, size=8192, multi=None, timeout=None): self.skiparg = skiparg self.size = size self.method = None self.stat_miss...
import os def ursula_controller_ips(hostvars, groups, controller_name='controller'): controller_ips = set() for host in groups[controller_name]: controller_primary_interface = hostvars[host]['primary_interface'] ip = hostvars[host][controller_primary_interface]['ipv4']['address'] contr...
import unittest, random, sys, time, re sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_browse as h2b, h2o_exec as h2e, h2o_import as h2i, h2o_cmd from h2o_test import dump_json, verboseprint class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @clas...
#!/usr/bin/env python import responses import toml import unittest from unittest.mock import MagicMock import projector_lights_off from projector_lights_off import LightManager class TestLightManager(unittest.TestCase): def setUp(self): with open("config.toml") as f: self.config = toml.load(...
project=None # # You may not need to change these: # import os, sys, commands, socket, urllib # Name of the repository. # You can hardwire this to make the script faster. repo = os.path.basename(os.getcwd()) # Fully-qualified domain name of this host. # You can hardwire this to make the script faster. host = socket....
from TCAction import TCActionBase from NativeLog import NativeLog import time import random import string class TestCase(TCActionBase.CommonTCActionBase): def __init__(self, test_case, test_env, timeout=45, log_path=TCActionBase.LOG_PATH): TCActionBase.CommonTCActionBase.__init__(self, test_case, test_env...
import datetime from openerp.exceptions import AccessError ############################################################################## # # OLD API # ############################################################################## from openerp.osv import osv, fields class res_partner(osv.Model): _inherit = 'r...
from spack import * class PyPybedtools(PythonPackage): """pybedtools wraps and extends BEDTools and offers feature-level manipulations from within Python.""" homepage = "http://daler.github.io/pybedtools" url = "https://pypi.io/packages/source/p/pybedtools/pybedtools-0.7.10.tar.gz" version(...
import warnings from django.core.exceptions import ObjectDoesNotExist from django.db import connection, models from django.db.models.constants import LOOKUP_SEP from django.db.models.fields.related import OneToOneField, OneToOneRel from django.db.models.query import ModelIterable, QuerySet from django.db.models.sql.da...
from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY class LineCountBear(LocalBear): LANGUAGES = {"All"} AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'<EMAIL>'} LICENSE = 'AGPL-3.0' CAN_DETECT = {'F...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import sys, os version = '1.2' setup(name='sip-proxpy', version=version, description="Customizable HTTP/HTTPS proxy with plugin architecture", long_description="""\ A fork of ProxPy as use...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import stat from ansible.cli import CLI from ansible.errors import AnsibleError, AnsibleOptionsError from ansible.executor.playbook_executor import PlaybookExecutor from ansible.playbook.block import Block from ansible.p...
from django import db from django.contrib import auth from django.utils.encoding import force_bytes UserModel = auth.get_user_model() def check_password(environ, username, password): """ Authenticates against Django's auth database mod_wsgi docs specify None, True, False as return value depending on...
# # Handler library for Linux IaaS # # Copyright 2014 Microsoft Corporation # # 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 requ...
#!/usr/bin/python2.7 import socket import multiprocessing import time class OscCommandListener: def __init__(self, osc_ip, osc_port): self.OscIP = osc_ip self.OscPort = osc_port # Set up the socket to receive self.sock = socket.socket(socket.AF_INET, # Internet ...
import itertools import numpy as np from pyspark import SparkContext from pyspark import since, keyword_only from pyspark.ml import Estimator, Model from pyspark.ml.param import Params, Param, TypeConverters from pyspark.ml.param.shared import HasSeed from pyspark.ml.wrapper import JavaParams from pyspark.sql.function...
#!/usr/bin/env python3 ''' Common functions Copyright 2013-2018 RIKEN Copyright 2018-2020 Chiba Institute of Technology 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://w...
# # test_codecmaps_jp.py # Codec mapping tests for Japanese encodings # from test import support from test import multibytecodec_support import unittest class TestCP932Map(multibytecodec_support.TestBase_Mapping, unittest.TestCase): encoding = 'cp932' mapfileurl = 'http://www.unicode.org/...
"""Stub version of the blob-related parts of the images API.""" import logging from google.appengine.api import datastore BLOB_SERVING_URL_KIND = "__BlobServingUrl__" class ImagesBlobStub(object): """Stub version of the blob-related parts of the images API.""" def __init__(self, host_prefix): ""...
import numpy as np import os from cache import cache ######################################################################## def one_hot_encoded(class_numbers, num_classes=None): """ Generate the One-Hot encoded class-labels from an array of integers. For example, if class_number=2 and num_classes=4 th...
import httplib import mock import st2common.bootstrap.actionsregistrar as actions_registrar from tests import FunctionalTest @mock.patch('st2common.bootstrap.base.REGISTERED_PACKS_CACHE', {}) class PacksViewsControllerTestCase(FunctionalTest): @classmethod def setUpClass(cls): super(PacksViewsContro...
import os, sys, setuptools from setuptools import setup, find_packages # require python 2.7+ if sys.hexversion < 0x02070000: raise RuntimeError('This package requires python 2.7 or better') heredir = os.path.abspath(os.path.dirname(__file__)) def read(*parts, **kw): try: return open(os.path.join(heredir, *part...
from __future__ import absolute_import import six from django import forms def field_to_config(name,field): config={ 'name':name, 'label':field.label or name.replace('_',' ').title(), 'placeholder':field.widget.attrs.get('placeholder'), 'help':field.help_text, 'required':field.required, } if...
import warnings from django import test from django.contrib.contenttypes.fields import GenericRelation from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import CharField, related from django.utils.deprecation import RemovedInDjango110Warning from .models import BasePerson, Person from ...
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) if here not in sys.path: sys.path.insert(0, here) from typ.version import VERSION with open(os.path.join(here, 'README.rst')) as fp: readme = fp.read().strip() readme_lines = readme.splitlines...
""" API for OGC Filter Encoding (FE) constructs and metadata. Filter Encoding: http://www.opengeospatial.org/standards/filter Currently supports version 1.1.0 (04-095). """ from owslib.etree import etree from owslib import util from owslib.namespaces import Namespaces # default variables def get_namespaces(): n...
#!/usr/bin/env python # -*- coding: utf-8 -*- import io from setuptools import setup, find_packages from swid_generator import meta readme = io.open('README.rst', mode='r', encoding='utf8').read() setup(name='swid_generator', version=meta.version, description=meta.description, author=meta.authors, ...
"""This code example gets a suggested ad unit by its id. To determine which suggested ad units exist, run get_all_suggested_ad_units.py. This feature is only available to DFP premium solution networks.""" __author__ = '<EMAIL> (Jeff Sham)' # Locate the client library. If module was installed via "setup.py" script, th...
from . import constants import sys import codecs from .latin1prober import Latin1Prober # windows-1252 from .mbcsgroupprober import MBCSGroupProber # multi-byte character sets from .sbcsgroupprober import SBCSGroupProber # single-byte character sets from .escprober import EscCharSetProber # ISO-2122, etc. import re...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsFeedback. .. note:: 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 2 of the License, or (at your option) any later version. """ __aut...
import cherrypy # This class is a slightly modified version of the default CherryPy # Dispatcher. The default dispatcher requires all paramaters to occur at # the end of the URI. This dispatcher permits nested parameters with dynamic # Controller initialization. # # Example: /vdsm-api/storagedomains/<sd-UUID>/images...
import csv import json import urllib2 import urlparse SUPPORTED_DISTROS = ['ubuntu'] AWS_REGIONS = ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'eu-west-1', 'sa-east-1', 'us-east-1', 'us-...
#!/usr/bin/python # # convert .po to .js # import json import optparse import os import polib import re import string import sys parser = optparse.OptionParser(usage="usage: %prog [options] pofile...") parser.add_option("--callback", default="_.setTranslation", dest="callback", help="callback function to call with da...
from functools import partial from pythonforandroid.toolchain import Recipe, shprint, current_directory import sh class OpenSSLRecipe(Recipe): version = '1.0.2h' url = 'https://www.openssl.org/source/openssl-{version}.tar.gz' def should_build(self, arch): return not self.has_libs(arch, 'libssl' ...
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE_CLASSES = [ 'django.middleware.cache.UpdateCa...
"""Kombu transport using the Django database as a message store.""" from __future__ import absolute_import from django.conf import settings from django.core import exceptions as errors from kombu.five import Empty from kombu.transport import virtual from kombu.utils import cached_property, symbol_by_name from kombu.u...
""" pghoard - compressor tests Copyright (c) 2015 Ohmu Ltd See LICENSE for details """ import io import logging import lzma import os import random import socket from queue import Queue import pytest from pghoard import metrics from pghoard.compressor import CompressorThread from pghoard.rohmu import IO_BLOCK_SIZE, ...
{ 'name' : 'Authentication via LDAP', 'version' : '1.0', 'depends' : ['base'], 'author' : 'OpenERP SA', #'description': < auto-loaded from README file 'website' : 'https://www.odoo.com', 'category' : 'Authentication', 'data' : [ 'users_ldap_view.xml', 'user_ldap_installer...
from SCons.Util import Split from SCons.Script.SConscript import Configure import common import os import sys def checkPkgConfig(env, package): ret = os.system('pkg-config --exists ' + package) if ret == 0: env.ParseConfig('pkg-config --cflags --libs ' + package) else: raise Exception("ERROR: You have to insta...
from django.conf.urls import patterns, url from django.contrib.auth import context_processors from django.contrib.auth.urls import urlpatterns from django.contrib.auth.views import password_reset from django.contrib.auth.decorators import login_required from django.contrib.messages.api import info from django.http impo...
import copy from . import ElementTree XINCLUDE = "{http://www.w3.org/2001/XInclude}" XINCLUDE_INCLUDE = XINCLUDE + "include" XINCLUDE_FALLBACK = XINCLUDE + "fallback" ## # Fatal include error. class FatalIncludeError(SyntaxError): pass ## # Default loader. This loader reads an included resource from disk. # #...
""" The Value hierarchy provides a way of representing the values measurements produce such that they can be merged across runs, grouped by page, and output to different targets. The core Value concept provides the basic functionality: - association with a page, may be none - naming and units - importance tracking [wh...
import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.ovirt import ( check_sdk, create_connection, get_dict_of_struct, ovirt_full_argument_spec, ) ANSIBLE_METADATA = {'status': 'preview', 'supported_by': 'community', 'v...
from django.contrib import admin from django.core.urlresolvers import reverse, NoReverseMatch from jmbo.admin import ModelBaseAdmin from jmbo_twitter import models class FeedAdmin(ModelBaseAdmin): inlines = [] list_display = ('title', '_image', 'subtitle', 'publish_on', 'retract_on', \ '_get_absolut...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( url_basename, ) class EngadgetIE(InfoExtractor): _VALID_URL = r'''(?x)https?://www.engadget.com/ (?:video(?:/5min)?/(?P<id>\d+)| [\d/]+/.*?) ''' _TEST = { 'url':...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest from mock import ANY from ansible.module_utils.network.fortios.fortios import FortiOSHandler try: from ansible.modules.network.fortios import fortios_system_replacemsg_icap except ImportErro...
from __future__ import absolute_import from django.db.models import Q from django.test import TestCase from .models import Issue, User, UnicodeReferenceModel class RelatedObjectTests(TestCase): def test_m2m_and_m2o(self): r = User.objects.create(username="russell") g = User.objects.create(userna...
#!/usr/bin/env python """ An executable which proxies for a subprocess; upon a signal, it sends that signal to the process identified by a pidfile. """ import os import sys import signal import time class PidProxy: pid = None def __init__(self, args): self.setsignals() try: self.p...
import math from .. import util from . import base from . import common from ..cl_util import opencl_manager _c_file = opencl_manager.add_compile_unit() _c_file.append_resource("common.h") _c_file.append_resource("simple3d.cl") class Sphere(base.Shape3D): def __init__(self, d=1, r=None): if r is None: ...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import distutils.spawn import os import os.path import subprocess import traceback import ansible.constants as C from ansible.errors import AnsibleError from ansible.module_utils.six.moves import shlex_quote from ansible.module_ut...
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Production"), "icon": "fa fa-star", "items": [ { "type": "doctype", "name": "Production Order", "description": _("Orders released for production."), }, { "type": "doctype", ...
# The GDAL C library, OGR exception, and the Field object from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType # ctypes function pro...
# Functions that manipulate both user and client information. It seemed better # to call that out into a separate module, rather than decide whether to stick # it into User or into Client. from emission.core.wrapper.user import User from emission.core.wrapper.client import Client from emission.core.get_database import ...
from Products.DataCollector.plugins.CollectorPlugin import SnmpPlugin, GetMap class IomegaDeviceMap(SnmpPlugin): """Map mib elements from Iomega mib to get hw and os products. """ maptype = "IomegaDeviceMap" snmpGetMap = GetMap({ #'' : 'manufacturer', '.1.3.6.1.4.1.1139.10.1.1.0' : ...
"""Tests for various static pages (like the About page).""" __author__ = 'Sean Lip' from core.tests import test_utils class NoninteractivePagesTest(test_utils.GenericTestBase): def test_about_page(self): """Test the About page.""" response = self.testapp.get('/about') self.assertEqual(r...
"""Test cases for KMS keys.""" import os import unittest from googleapiclient import discovery from oauth2client.client import GoogleCredentials # Set dunder unittest in the global scope for pretty unit test results __unittest = True class TestKSM(unittest.TestCase): """Test configuration of KSM keys in the CMEK ...
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
# # file: pygsl/gsl_dist/gsl_extension.py # $Id: gsl_Extension.py,v 1.4 2008/02/09 16:42:58 schnizer Exp $ # # module for gsl extensions compilation from distutils.core import setup, Extension from distutils.errors import DistutilsModuleError, DistutilsExecError import os import os.path import re import string import ...
#! /usr/bin/python # -*- coding: utf-8 -*- import re import jpype from .. import jvm from .. import utils __all__ = ['Kkma'] class Kkma(): """Wrapper for `Kkma <http://kkma.snu.ac.kr>`_. Kkma is a morphological analyzer and natural language processing system written in Java, developed by the Intelli...
{ 'name': 'ESC/POS Hardware Driver', 'version': '1.0', 'category': 'Hardware Drivers', 'sequence': 6, 'website': 'https://www.odoo.com/page/point-of-sale', 'summary': 'Hardware Driver for ESC/POS Printers and Cashdrawers', 'description': """ ESC/POS Hardware Driver ======================= T...
from mock import patch from . import helpers as test_helpers from cloudinit import ssh_util VALID_CONTENT = { 'dsa': ( "AAAAB3NzaC1kc3MAAACBAIrjOQSlSea19bExXBMBKBvcLhBoVvNBjCppNzllipF" "W4jgIOMcNanULRrZGjkOKat6MWJNetSbV1E6IOFDQ16rQgsh/OvYU9XhzM8seLa" "A21VszZuhIV7/2DE3vxu7B54zVzueG1O1Deq6...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} try: from pyVmomi import vim, vmodl HAS_PYVMOMI = True except ImportError: HAS_PY...