code
stringlengths
1
199k
from django.template import Context, loader from maintenancemode import http def temporary_unavailable(request, template_name='503.html'): """ Default 503 handler, which looks for the requested URL in the redirects table, redirects if found, and displays 404 page if not redirected. Templates: `503.html`...
""" APM automatic test suite Andrew Tridgell, October 2011 """ import atexit import fnmatch import glob import optparse import os import shutil import signal import sys import time import traceback import apmrover2 import arducopter import arduplane import quadplane from pysim import util os.environ['PYTHONUNBUFFERED...
import socket import threading import socketserver import time class RequestHandler(socketserver.BaseRequestHandler): #def __init__(self, *args, **kwargs): #print(self, *args, **kwargs) #print("Got connection from {}".format( self.client_address[0]) ) #socketserver.BaseRequestHandler.__init_...
from django.template import Library register = Library() @register.inclusion_tag("accountings/acct_entry_item.html", takes_context=True) def acct_entry_item(context, acct_entry, entry_class=''): #from tendenci.apps.accountings.models import AcctTran acct_trans = acct_entry.trans.all() # calculate the total_...
""" local path implementation. """ from __future__ import with_statement from contextlib import contextmanager import sys, os, re, atexit, io import py from py._path import common from py._path.common import iswin32, fspath from stat import S_ISLNK, S_ISDIR, S_ISREG from os.path import abspath, normcase, normpath, isab...
""" sc_webcam.py This file includes functions to: initialise a web cam capture image from web cam Image size is held in the smart_camera.cnf """ import sys import time import math import cv2 import sc_config class SmartCameraWebCam: def __init__(self, instance): # health self.healthy = False...
from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.gepetto import Viewer rootJointType = 'freeflyer' packageName = 'hpp-rbprm-corba' meshPackageName = 'hpp-rbprm-corba' urdfName = 'hyq_trunk_large' urdfNameRom = ['hyq_lhleg_rom','hyq_lfleg_rom','hyq_rfleg_rom','hyq_rhleg_rom'] urdfSuffix = "" srdfSuffix = ...
""" Provides the capability to load netCDF files and interpret them according to the 'NetCDF Climate and Forecast (CF) Metadata Conventions'. References: [CF] NetCDF Climate and Forecast (CF) Metadata conventions. [NUG] NetCDF User's Guide, https://www.unidata.ucar.edu/software/netcdf/documentation/NUG/ """ from abc i...
from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_photonic_media_media_channel_properties_pac import TapiPhotonicMediaMediaChannelPropertiesPac # noqa: F401,E...
import netaddr from tempest import config from tempest.openstack.common import log as logging from tempest.scenario import manager from tempest import test CONF = config.CONF LOG = logging.getLogger(__name__) class TestGettingAddress(manager.NetworkScenarioTest): """Create network with 2 subnets: IPv4 and IPv6 in a...
import abc import six from rally.common import broker from rally.common.i18n import _ from rally.common import log as logging from rally.common import utils from rally import consts from rally import osclients from rally.plugins.openstack.scenarios.nova import utils as nova_utils from rally.plugins.openstack.scenarios....
__author__ = 'rabitdash'
from oslo.config import cfg from oslo.middleware import request_id from oslo.serialization import jsonutils import webob import webob.exc import nova.api.auth from nova.i18n import _ from nova import test CONF = cfg.CONF class TestNovaKeystoneContextMiddleware(test.NoDBTestCase): def setUp(self): super(Test...
from unittest.mock import patch import pytest from zenpy.lib.api_objects import Ticket from airflow.models import Connection from airflow.providers.zendesk.hooks.zendesk import ZendeskHook from airflow.utils import db class TestZendeskHook: conn_id = 'zendesk_conn_id_test' @pytest.fixture(autouse=True) def ...
import unittest import mock from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.hooks.sagemaker import SageMakerHook from airflow.providers.amazon.aws.sensors.sagemaker_endpoint import SageMakerEndpointSensor DESCRIBE_ENDPOINT_CREATING_RESPONSE = { 'EndpointStatus': 'Creating', 'Re...
""" Example Airflow DAG for Google Cloud Memorystore service. """ import os from urllib.parse import urlparse from google.cloud.redis_v1.gapic.enums import FailoverInstanceRequest, Instance from airflow import models from airflow.operators.bash import BashOperator from airflow.providers.google.cloud.operators.cloud_mem...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("zerver", "0342_realm_demo_organization_scheduled_deletion_date"), ] operations = [ migrations.AlterIndexTogether( name="useractivityinterval", index_together={("user_profile", "...
import subprocess from utils import * @all_files_in_dir('util_clk_reset') @all_available_simulators() def test_mock_uvm_report(datafiles, simulator): with datafiles.as_cwd(): subprocess.check_call(['runSVUnit', '-s', simulator]) expect_testrunner_pass('run.log')
"""This code example gets all premium rates belonging to a specific rate card. To create premium rates, run create_premium_rates.py. """ from googleads import dfp RATE_CARD_ID = 'INSERT_RATE_CARD_ID_HERE' def main(client, rate_card_id): # Initialize appropriate service. premium_rate_service = client.GetService('Pre...
import dpkt import pcap import re import socket import urlparse import binascii import signal import sys import os import argparse import rethinkdb as r from rethinkdb.errors import RqlRuntimeError, RqlDriverError from pprint import pprint from utils import add_colons_to_mac RDB_HOST = os.environ.get('RDB_HOST') or 'lo...
"""Support for RESTful binary sensors.""" import httpx import voluptuous as vol from homeassistant.components.binary_sensor import ( DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA, BinarySensorEntity, ) from homeassistant.const import ( CONF_AUTHENTICATION, CONF_DEVICE_CLASS, CONF_FORCE_UPDATE, CONF...
import mock from manila.tests import fake_compute class FakeServiceInstanceManager(object): def __init__(self, *args, **kwargs): self.db = mock.Mock() self._helpers = { 'CIFS': mock.Mock(), 'NFS': mock.Mock(), } self.share_networks_locks = {} self.shar...
from __future__ import print_function import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils from h2o.estimators.deepwater import H2ODeepWaterEstimator def deepwater_multi(): if not H2ODeepWaterEstimator.available(): return frame = h2o.import_file(pyunit_utils.loca...
""" Event beans for Pelix. :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.5.8 :status: Beta .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License....
import unittest from datetime import datetime from unittest import mock from urllib.parse import parse_qs from bs4 import BeautifulSoup from parameterized import parameterized from airflow.www import utils from tests.test_utils.config import conf_vars class TestUtils(unittest.TestCase): def test_empty_variable_shou...
import sys, os sys.path.insert(1, "../../../") import h2o, tests import random def milsong_checkpoint(): milsong_train = h2o.upload_file(h2o.locate("bigdata/laptop/milsongs/milsongs-train.csv.gz")) milsong_valid = h2o.upload_file(h2o.locate("bigdata/laptop/milsongs/milsongs-test.csv.gz")) distribution = "ga...
"""Docstring for this file.""" __author__ = 'ismailsunni' __project_name = 'watchkeeper' __filename = 'reports' __date__ = '8/4/15' __copyright__ = 'imajimatika@gmail.com' __doc__ = '' import os from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response from django.http im...
from __future__ import unicode_literals import sorl.thumbnail.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fundraising', '0014_donation_receipt_email'), ] operations = [ migrations.AlterField( model_name='djangohero', ...
from __future__ import with_statement import os, sys, re from Path import Path COMMENT = re.compile( r"//|#" ) WS = re.compile( r"\s" ) class CacheEntry( object ): def __init__( self, _line ): line = WS.sub( "", str( _line ) ) if not line: return None elif COMMENT.match( line ): ...
from amonone.core.collector.collector import system_info_collector, process_info_collector from amonone.core import settings from amonone.utils.dates import unix_utc_now import sys class Runner(object): def system(self): system_info_dict = {} memory = system_info_collector.get_memory_info() cpu = system_info_col...
import sys, os sys.path.insert(0, os.path.abspath('..')) import redcap extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary', 'numpydoc'] numpydoc_show_class_members = False templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project...
"""Test activation of the first version bits soft fork. This soft fork will activate the following BIPS: BIP 68 - nSequence relative lock times BIP 112 - CHECKSEQUENCEVERIFY BIP 113 - MedianTimePast semantics for nLockTime regtest lock-in with 108/144 block signalling activation after a further 144 blocks mine 82 bloc...
import sys import select import socket import re from struct import * SEARCHD_COMMAND_SEARCH = 0 SEARCHD_COMMAND_EXCERPT = 1 SEARCHD_COMMAND_UPDATE = 2 SEARCHD_COMMAND_KEYWORDS = 3 SEARCHD_COMMAND_PERSIST = 4 SEARCHD_COMMAND_FLUSHATTRS = 7 VER_COMMAND_SEARCH = 0x118 VER_COMMAND_EXCERPT = 0x103 VER_COMMAND_UPDATE ...
'''Converts 2D/3D velocity files from handvel.txt to handvel.rsf - sfhandvel2rsf < handvels.txt o1=0 d1=.001 n1=3000 > handvel.rsf - The program converts time samples from ms to s - The rsf output file will have traces equal to the number of CMP locations in handvel.txt. You need to interploate between traces for a...
from find_it import find_closest from tm2secs2tm import time2secs, secs2time def find_nearest_time(look_for, target_data): what = time2secs(look_for) where = [time2secs(t) for t in target_data] res = find_closest(what, where) return(secs2time(res)) row_data = {} with open('PaceData.csv') as paces: c...
""" Copyright (C) 2012 Fabio Erculiani Authors: 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 the hope that it will be useful, but WITHOUT...
from django.conf.urls import patterns, url from .settings import EMAIL_CONFIRMATION urlpatterns = patterns('nodeshot.community.profiles.views', # noqa url(r'^profiles/$', 'profile_list', name='api_profile_list'), url(r'^profiles/(?P<username>[-.\w]+)/$', 'profile_detail', name='api_profile_detail'), url(r'...
import os, sys, getopt, tempfile opts, args = getopt.getopt(sys.argv[1:], "p:r:o:s") pattern = replFile = outFile = '' strip = False for o, a in opts: if '-p' == o: pattern = a elif '-r' == o: replFile = a elif '-o' == o: outFile = a elif '-s' == o: strip = True if args a...
""" Dump the structure of a course as a JSON object. The resulting JSON object has one entry for each module in the course: { "$module_url": { "category": "$module_category", "children": [$module_children_urls... ], "metadata": {$module_metadata} }, "$module_url": .... ... } """ import json from tex...
import uuid import os.path as path from unidecode import unidecode from django.template.defaultfilters import slugify from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from taiga.projects.history.services import make_key_from_model_object, take_snapshot fro...
from ez_setup import use_setuptools use_setuptools() import os.path import re import sys from setuptools import setup, find_packages directory = os.path.abspath(os.path.dirname(__file__)) path = os.path.join(directory, "version.txt") version_string = open(path).readline() match = re.match(r"\s*(?P<rel>(?P<ver>\d+\.\d+)...
"""Local implementation of OAuth2 specific to Ondilo to hard code client id and secret and return a proper name.""" from homeassistant.core import HomeAssistant from homeassistant.helpers.config_entry_oauth2_flow import LocalOAuth2Implementation from .const import ( DOMAIN, OAUTH2_AUTHORIZE, OAUTH2_CLIENTID...
from _pydevd_bundle.pydevd_constants import IS_PY3K LIB_FILE = 1 PYDEV_FILE = 2 DONT_TRACE = { # commonly used things from the stdlib that we don't want to trace 'Queue.py':LIB_FILE, 'queue.py':LIB_FILE, 'socket.py':LIB_FILE, 'weakref.py':LIB_FILE, '_weakrefset.py':LIB_FILE, 'linecache.py':L...
import logging import platform import sys import sysconfig from importlib.machinery import EXTENSION_SUFFIXES from typing import ( Dict, FrozenSet, Iterable, Iterator, List, Optional, Sequence, Tuple, Union, cast, ) from . import _manylinux, _musllinux logger = logging.getLogger(...
from pyflink.java_gateway import get_gateway from pyflink.common import Configuration __all__ = ['EnvironmentSettings'] class EnvironmentSettings(object): """ Defines all parameters that initialize a table environment. Those parameters are used only during instantiation of a :class:`~pyflink.table.TableEnvi...
import logging import netaddr from tempest_lib.common.utils import data_utils from tempest.api.orchestration import base from tempest import clients from tempest import config from tempest import exceptions from tempest import test CONF = config.CONF LOG = logging.getLogger(__name__) class NeutronResourcesTestJSON(base...
"""Config flow for the Huawei LTE platform.""" from __future__ import annotations import logging from typing import Any from urllib.parse import urlparse from huawei_lte_api.AuthorizedConnection import AuthorizedConnection from huawei_lte_api.Client import Client from huawei_lte_api.Connection import GetResponseType fr...
from energy_model import (ActiveState, EnergyModelNode, EnergyModelRoot, PowerDomain, EnergyModel) from collections import OrderedDict silver_cpu_active_states = OrderedDict([ ( 307200, ActiveState(capacity=149, power=90)), ( 384000, ActiveState(capacity=188, power=111)), ( 460800,...
from qpid.tests import Test from qpid.messaging.address import lex, parse, ParseError, EOF, ID, NUMBER, \ SYM, WSPACE, LEXER from qpid.lexer import Token from qpid.harness import Skipped from qpid.tests.parser import ParserBase def indent(st): return " " + st.replace("\n", "\n ") def pprint_address(name, subjec...
import os import unittest from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.sio_eng.sio.resource import RESOURCE_PATH from mi.dataset.driver.sio_eng.sio.sio_eng_sio_recovered_driver import parse __author__ = 'jroy' log = get_logger() class DriverTest(uni...
class StreamlinkError(Exception): """Any error caused by Streamlink will be caught with this exception.""" class PluginError(StreamlinkError): """Plugin related error.""" class NoStreamsError(StreamlinkError): def __init__(self, url): self.url = url err = "No streams found on this URL...
from requestbuilder import Arg from euca2ools.commands.ec2 import EC2Request class DeleteDhcpOptions(EC2Request): DESCRIPTION = 'Delete a VPC DHCP option set' ARGS = [Arg('DhcpOptionsId', metavar='DHCPOPTS', help='ID of the DHCP option set to delete (required)')]
""" Methods for identifying space-time interaction in spatio-temporal event data. """ __author__ = "Nicholas Malizia <nmalizia@asu.edu>" import pysal import numpy as np import scipy.stats as stats import pysal.weights.Distance as Distance from pysal import cg from pysal.spatial_dynamics import util __all__ = ['SpaceTim...
from functools import wraps from django.conf import settings import json import requests from gengo import Gengo, GengoError # noqa GENGO_LANGUAGE_CACHE = None GENGO_LANGUAGE_PAIRS_CACHE = None GENGO_UNSUPPORTED_MACHINE_LC_SRC = [ 'ar', 'cs', 'da', 'el', 'fi', 'hu', 'id', 'ms', 'no'...
import json import django from django.conf import settings from django.contrib.sites.models import Site from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect from django.test.client import RequestFactory import mock from nose.tools import eq_ from pyquery import PyQuery as pq from kitsune.sumo.tem...
""" .. _tut_compute_covariance: Computing covariance matrix =========================== """ import os.path as op import mne from mne.datasets import sample data_path = sample.data_path() raw_empty_room_fname = op.join( data_path, 'MEG', 'sample', 'ernoise_raw.fif') raw_empty_room = mne.io.read_raw_fif(raw_empty_roo...
"""Nonlinear Transformation classes Created on Sat Apr 16 16:06:11 2011 Author: Josef Perktold License : BSD """ import numpy as np class TransformFunction(object): def __call__(self, x): self.func(x) class SquareFunc(TransformFunction): '''class to hold quadratic function with inverse function and deri...
import clr from System.Collections.Generic import * clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * import Autodesk clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager f...
""" celery.exceptions ~~~~~~~~~~~~~~~~~ This module contains all exceptions used by the Celery API. """ from __future__ import absolute_import import numbers from .five import string_t from billiard.exceptions import ( # noqa SoftTimeLimitExceeded, TimeLimitExceeded, WorkerLostError, Terminated, ) __al...
""" The bot is meant to mark the edits based on info obtained by whitelist. This bot obtains a list of recent changes and newpages and marks the edits as patrolled based on a whitelist. See http://en.wikisource.org/wiki/User:JVbot/patrol_whitelist Commandline parameters that are supported: -namespace Filter the...
""" *************************************************************************** SelectByExpression.py --------------------- Date : July 2014 Copyright : (C) 2014 by Michaël Douchin *************************************************************************** * ...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['stableinterface'], 'supported_by': 'curated'} DOCUMENTATION = ''' --- module: ec2_vpc_subnet_facts short_description: Gather facts about ec2 VPC subnets in AWS description: - Gather facts about ec2 VPC subnets in AWS ...
from gnuradio import gr, gr_unittest, digital, blocks class test_lms_dd_equalizer(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def tearDown(self): self.tb = None def transform(self, src_data, gain, const): SRC = blocks.vector_source_c(src_data, False) EQU ...
"""A Foolscap interface to a TaskController. This class lets Foolscap clients talk to a TaskController. """ __docformat__ = "restructuredtext en" import cPickle as pickle import xmlrpclib, copy from zope.interface import Interface, implements from twisted.internet import defer from twisted.python import components, fai...
""" Web_editor-context rendering needs to add some metadata to rendered and allow to edit fields, as well as render a few fields differently. Also, adds methods to convert values back to Odoo models. """ import ast import base64 import io import itertools import json import logging import os import re import hashlib im...
"""Resumable decompression A ctypes interface to zlib decompress/inflate functions that mimics zlib.decompressobj interface but also supports getting and setting the z_stream state to suspend/serialize it and then resume the decompression at a later time. """ import cPickle import ctypes import zlib if zlib.ZLIB_VERSIO...
'''OpenGL extension KHR.surfaceless_context This module customises the behaviour of the OpenGL.raw.EGL.KHR.surfaceless_context to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/KHR/surfaceless_context.txt ''' from OpenGL import platfo...
#-------------------------------------------------------------------------
"""This module is deprecated.""" from oslo_cache.backends import memcache_pool from oslo_log import versionutils @versionutils.deprecated( versionutils.deprecated.MITAKA, what='keystone.cache.memcache_pool backend', in_favor_of='oslo_cache.memcache_pool backend', remove_in=+1) class PooledMemcachedBacke...
match x: case 1: pass case case 3: pass case<caret>
"""File Interface for Google Cloud Storage.""" from __future__ import with_statement __all__ = ['copy2', 'delete', 'listbucket', 'open', 'stat', 'compose', 'get_location', 'get_storage_class', ] import logging import StringIO import ...
"""A test lib that defines some models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.ops import init_ops from tensorflow....
class Settings(object): def __init__(self): self.radioB = "*googlechrome" self.browserPath = "" self.ipAddr = "ci.eden.sahanafoundation.org" self.ipPort = 4444 self.URL = "http://postgresql.eden.sahanafoundation.org/" self.app = "postgresql/"
import sys import threading import multiprocessing from copy import copy from functools import partial from multiprocessing import Pipe from Exscript.util.impl import serializeable_sys_exc_info class _ChildWatcher(threading.Thread): def __init__(self, child, callback): threading.Thread.__init__(self) ...
from __future__ import absolute_import, division, print_function __metaclass__ = type import atexit import os import re import ssl import time import traceback from random import randint REQUESTS_IMP_ERR = None try: # requests is required for exception handling of the ConnectionError import requests HAS_REQ...
"""This file contains unittests for the kernel.engineservice.py module. Things that should be tested: - Should the EngineService return Deferred objects? - Run the same tests that are run in shell.py. - Make sure that the Interface is really implemented. - The startService and stopService methods. """ __docformat__...
from collections import defaultdict import logging import re import time import types import openerp from openerp import SUPERUSER_ID from openerp import models, tools, api from openerp.modules.registry import RegistryManager from openerp.osv import fields, osv from openerp.osv.orm import BaseModel, Model, MAGIC_COLUMN...
from distutils.core import setup import os import os.path import glob try: destdir = os.environ["DESTDIR"] except KeyError: destdir = "" setup( name='dxdiff', version='1.0', description="An XML aware diff tool.", author = "The ICOM team", author_email = "fraser.waters08@imperial.ac.uk"...
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays from OpenGL.raw.GL import _types as _cs from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GL_ARB_texture_env_crossbar' def _f(...
from lib import cache from lib import exception from lib import base from lib import constants from lib.page.widget import info_widget from lib.page.widget import admin_widget from lib.page.widget import generic_widget def _filter_out_underscore(object_name): """Since class names don't allow underscore in names, we'r...
from api.base.settings.defaults import API_BASE from api.citations.utils import render_citation from django.utils import timezone from nose.tools import * # noqa: from osf_tests.factories import AuthUserFactory, PreprintFactory from tests.base import ApiTestCase from osf.utils.permissions import WRITE from osf.utils.w...
import getopt args = '-a -b -cfoo -d bar a1 a2'.split() optlist, args = getopt.getopt(args, 'abc:d:') assert optlist == [('-a', ''), ('-b', ''), ('-c', 'foo'), ('-d', 'bar')]
"""Mininet tests for clib client library functionality. * must be run as root * you can run a specific test case only, by adding the class name of the test case to the command. Eg ./clib_mininet_test.py FaucetUntaggedIPv4RouteTest It is strongly recommended to run these tests via Docker, to ensure you have all dep...
"""Tests for tensor2tensor.data_generators.wikisum.utils.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from tensor2tensor.data_generators.wikisum import utils import tensorflow as tf pkg_dir, _ = os.path.split(__file__) _TESTDATA = os.path.joi...
""" @package mi.dataset.parser.test @file mi/dataset/parser/test/test_ctdmo_ghqr_imodem.py @author Mark Worden @brief Test code for a ctdmo_ghqr_imodem data parser """ import os from nose.plugins.attrib import attr from mi.core.exceptions import ConfigurationException, UnexpectedDataException from mi.core.log import ge...
from translate.convert import dtd2po from translate.convert import test_convert from translate.misc import wStringIO from translate.storage import po from translate.storage import dtd class TestDTD2PO: def dtd2po(self, dtdsource, dtdtemplate=None): """helper that converts dtd source to po source without req...
""" FI-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ from .fi_municipa...
from unittest import skipUnless from django.contrib.gis.db.models import fields from django.contrib.gis.geos import MultiPolygon, Polygon from django.core.exceptions import ImproperlyConfigured from django.db import connection, migrations, models from django.db.migrations.migration import Migration from django.db.migra...
"""Test cases for binary operators.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.compiler.tests.xla_test import XLATestCase from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops fro...
""" Crystal Module for Grabber v0.1 Copyright (C) 2006 - Romain Gaucher - http://rgaucher.info """ import sys,os,re, string, shutil from xml.sax import * # Need PyXML [http://pyxml.sourceforge.net/] from grabber import getContent_POST, getContentDirectURL_POST from grabber import getContent_GET , getContentDirectUR...
import rapidsms class App(rapidsms.app.App): '''Do nothing. This app is for django integration only and has no sms functionality. This file and class exist only so the router does not print an error messsage.''' #TODO find a more sensible way of allowing non-sms apps pass
import unittest import IECore import sys sys.path.append( "test/IECoreNuke" ) from KnobAccessorsTest import * from FnAxisTest import * from StringUtilTest import * from KnobConvertersTest import * from ParameterisedHolderTest import ParameterisedHolderTest from ObjectKnobTest import ObjectKnobTest from OpHolderTest imp...
""" Test functions for linalg module """ from __future__ import division, absolute_import, print_function import os import sys import itertools import traceback import numpy as np from numpy import array, single, double, csingle, cdouble, dot, identity from numpy import multiply, atleast_2d, inf, asarray, matrix from n...
""" *************************************************************************** lasclip.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com --------------------- Date : Sep...
import sys, os, re import traceback, platform from PyQt4 import QtCore from PyQt4 import QtGui from electrum import util if platform.system() == 'Windows': MONOSPACE_FONT = 'Lucida Console' elif platform.system() == 'Darwin': MONOSPACE_FONT = 'Monaco' else: MONOSPACE_FONT = 'monospace' class Console(QtGui.Q...
from __future__ import with_statement import os import boto from boto.compat import json from boto.exception import BotoClientError def load_endpoint_json(path): """ Loads a given JSON file & returns it. :param path: The path to the JSON file :type path: string :returns: The loaded data """ ...
"""Wrapper around yamllint that supports YAML embedded in Ansible modules.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import ast import json import os import re import sys import typing as t import yaml from yaml.resolver import Resolver from yaml.constructor import SafeC...
"""SCons.Tool.gnulink Tool-specific initialization for the gnu linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ __revision__ = "src/engine/SCons/Tool/gnulink.py 2014/09/27 12:51:43 garyo" import SCons.Ut...
import logging import pprint import werkzeug from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class StripeController(http.Controller): @http.route(['/payment/stripe/s2s/create_json'], type='json', auth='public') def stripe_s2s_create_json(self, **kwargs): acquire...
from . import res_partner from . import res_company from . import wizard