content
stringlengths
4
20k
# the following file was written/built by Nicholas Lourie, # while working for kozbox, llc. http://kozbox.com """ repeatedblocks.py, part of django-macros, allows for easy and explicit repetition of block tags in django templates. """ from django import template from django.template.loader_tags import BlockNode, do_b...
""" mpld3 renderer ============== This is the renderer class which implements the mplexporter framework for mpld3 """ __all__ = ["MPLD3Renderer"] import random import json import jinja2 import itertools import numpy as np from .mplexporter.utils import color_to_hex from .mplexporter.exporter import Exporter from .m...
from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand from webkitpy.tool import steps class ApplyWatchListLocal(AbstractSequencedCommand): name = "apply-watchlist-local" help_text = "Applies the watchlist to local changes" argument_names = "[BUGID]" steps = [ ste...
from openerp.osv import fields, osv, orm from openerp.tools.translate import _ class stock_packaging_add(orm.TransientModel): _inherit = "stock.packaging.add" _columns = { 'location_id': fields.many2one('stock.location', 'Location'), 'pack_ids': fields.many2many('stock.tracking', 'add_pack_ch...
""" This module provides statistics for L{PRDD}s. Look at the stats() method on PRDD for more info. """ # # 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. # T...
# -*- coding: utf-8 -*- import functools import openerp from openerp.http import Controller, route, request, Response def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: return f(*args, **kw) except Exception, e: return Response(response=str(e), status=500...
#!/usr/bin/env python """Execute the tests for snp_store. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the directory that contains the 'projects' directory. Usage: run_test...
import os from types import SimpleNamespace from django.core.files.base import File from django.db.models.fields.files import FieldFile from django.forms.forms import NON_FIELD_ERRORS from django.template.defaultfilters import filesizeformat from django.utils.translation import gettext_lazy as _ from form_designer im...
from __future__ import unicode_literals from functools import partial from django.contrib.admin.checks import InlineModelAdminChecks from django.contrib.admin.options import InlineModelAdmin, flatten_fieldsets from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.forms impo...
import sys import json import base64 import logging import requests from line import Line from database import Database from modules import ModuleManager from collections import defaultdict from permissions import Permissions from connection import IRCConnection from hooks import HookManager, Hook class BurpyHooves:...
import abc import six from oslo_log import log from neutron.extensions import portbindings from neutron.i18n import _LW from neutron.plugins.common import constants as p_constants from neutron.plugins.ml2 import driver_api as api LOG = log.getLogger(__name__) @six.add_metaclass(abc.ABCMeta) class AgentMechanismDri...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'WebHook' db.create_table('projects_webhook', ( ('id', self.gf('django.db.models....
import os import errno import urlparse import itertools from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation from django.core.files import locks, File from django.core.files.move import file_move_safe from django.utils.encoding impo...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import urlparse import urllib import xbmcgui import xbmcplugin import xbmcaddon import xbmc import json import os import pickle class AddonHelper(dict): ''' Set of tools that can be easily used to communicate with the XBMC/Kodi Plugin API. These to...
""" ML Estimation of Spatial Error Model """ __author__ = "Luc Anselin <EMAIL>,\ Serge Rey <EMAIL>, \ Levi Wolf <EMAIL>" import numpy as np import numpy.linalg as la from scipy import sparse as sp from scipy.sparse.linalg import splu as SuperLU import pysal as ps from utils import Regressi...
# -*- coding: utf-8 -*- # # Paste documentation build configuration file, created by # sphinx-quickstart on Tue Apr 22 22:08:49 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleabl...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.redfish_utils ...
"""Tests for tfdbg module debug_data.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.debug.lib import debug_graphs from tensorflow.python.framework import test_util from tensorflow.python.platform import test class ParseNodeOrTen...
import os import signal import subprocess import tempfile import threading import time # local imports import errors import logger _abort_on_error = False def SetAbortOnError(abort=True): """Sets behavior of RunCommand to throw AbortError if command process returns a negative error code""" global _abort_on_err...
"""Integrated collection of utilities that assist in internationalizing and localizing applications. This package is basically composed of two major parts: * tools to build and work with ``gettext`` message catalogs * a Python interface to the CLDR (Common Locale Data Repository), providing access to various loc...
import unittest import json from app import create_app, db class UserTest(unittest.TestCase): def setUp(self): """Define test variables and initialize app.""" self.app = create_app(config_name="testing") self.client = self.app.test_client # binds the app to the current context ...
from tyr import resources from tyr import app, api import flask_restful #we always want pretty json flask_restful.representations.json.settings = {'indent': 4} api.app.url_map.strict_slashes = False api.add_resource(resources.Instance, '/v0/instances/', '/v0/instances/<int:id>/', '/v0/instances/<string:name>/') api....
#!/usr/bin/env python import argparse, collections, math, os.path import nltk.corpus, nltk.corpus.reader, nltk.data, nltk.tag, nltk.metrics from nltk.corpus.util import LazyCorpusLoader from nltk_trainer import load_corpus_reader, load_model, simplify_wsj_tag from nltk_trainer.tagging import taggers ##################...
"""Home view for PyBossa.""" from flask import current_app from flask.ext.login import current_user from pybossa.model.category import Category from flask import Blueprint from flask import render_template from pybossa.cache import projects as cached_projects from pybossa.cache import users as cached_users from pybossa...
import logging from django.template.defaultfilters import title # noqa from django.utils.translation import ugettext_lazy as _ # noqa from horizon import tables from openstack_dashboard import api from openstack_dashboard.dashboards.project.routers import tables as r_tables LOG = logging.getLogger(__name__) cla...
from __future__ import unicode_literals import mimetypes import os import random import time from email import ( charset as Charset, encoders as Encoders, generator, message_from_string, ) from email.header import Header from email.message import Message from email.mime.base import MIMEBase from email.mime.message...
"""Utility for Closure Library dependency calculation. ClosureBuilder scans source files to build dependency info. From the dependencies, the script can produce a manifest in dependency order, a concatenated script, or compiled output from the Closure Compiler. Paths to files can be expressed as individual arguments...
"""Save and retrieve default locations associated with a bcbio-nextgen installation. """ from __future__ import print_function import os import sys import yaml from bcbio.distributed import objectstore from bcbiovm.aws import config as awsconfig TOSAVE_DEFAULTS = {"datadir": None} def update_check_args(args, comman...
import numpy as np import itertools as it from scipy.sparse import csc_matrix from scipy.sparse.linalg import spsolve class PolarFD: def __init__(self, N, a, nu, R0, R1): self.N = N self.a = a self.nu = nu self.R0 = R0 self.R1 = R1 self.calc_N_var() @classmet...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import errno import datetime import os import tarfile import tempfile import yaml from distutils.version import LooseVersion from shutil import rmtree from ansible.errors import AnsibleError from ansible.module_utils.urls import o...
from datetime import timedelta from django.db import models # Create your models here. from django.db.models.query import QuerySet from apps.core.managers import QuerySetManager class IssueQuerySet(QuerySet): def duration_avg(self): durations = [i.get_duration() for i in self if i.get_duration()] ...
from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j M Y' # '25 Oct 2006' TIME_FORMAT = 'P' # '2:30 p.m.' DATETIME_FORMAT = 'j M Y, P' ...
import testtools from unittest import mock import webob import glance.api.common from glance.common import exception class SimpleIterator(object): def __init__(self, file_object, chunk_size): self.file_object = file_object self.chunk_size = chunk_size def __iter__(self): def read_chu...
import logging import sys import traceback import unittest class PageTestResults(unittest.TestResult): def __init__(self): super(PageTestResults, self).__init__() self.pages_that_had_errors = set() self.pages_that_had_failures = set() self.successes = [] self.skipped = [] @property def pages...
from gnuradio import gr, gr_unittest, filter, blocks import math def sig_source_f(samp_rate, freq, amp, N): t = map(lambda x: float(x)/samp_rate, xrange(N)) y = map(lambda x: math.sin(2.*math.pi*freq*x), t) return y def sig_source_c(samp_rate, freq, amp, N): t = map(lambda x: float(x)/samp_rate, xran...
import argparse import re import sys FALSE_POSITIVES = [ ("src/dbwrapper.cpp", "vsnprintf(p, limit - p, format, backup_ap)"), ("src/index/base.cpp", "FatalError(const char* fmt, const Args&... args)"), ("src/netbase.cpp", "LogConnectFailure(bool manual_connection, const char* fmt, const Args&... args)"), ...
#!/usr/bin/env python """ Draw a graph of the net architecture. """ from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from google.protobuf import text_format import caffe import caffe.draw from caffe.proto import caffe_pb2 def parse_args(): """Parse input arguments """ parser = Argument...
#!/usr/bin/env/python """ merge_filter.py -- find the sponsors in VIVO, and match them to the sponsors in the source. They must match on sponsorid There are two inputs: 1. sponsors in VIVO. Keyed by sponsorid 2. UF sponsors in the source. Keyed the same. There are three cases 1. sponso...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: aci_domain_to_vlan_pool short_description: Bind Domain to VL...
r"""Train a ConvNet on MNIST using K-FAC. This library fits a 5-layer ConvNet on MNIST using K-FAC. The model has the following structure, - Conv Layer: 5x5 kernel, 16 output channels. - Max Pool: 3x3 kernel, stride 2. - Conv Layer: 5x5 kernel, 16 output channels. - Max Pool: 3x3 kernel, stride 2. - Linear: 10 output...
import logging from PyQt4.QtCore import QTimer from PyQt4.QtGui import QIcon, QPixmap, QImage, QApplication import cv2 from application import get_app from ic.queue import Empty from ic import engine from ic import messages # Create the logger object for this module LOG = logging.getLogger(__name__) class Playback(o...
#!/usr/bin/python '''Process G6 JSON files into elasticsearch This version reads JSON from disk or DM API and transforms this into the format expected by the DM search. Usage: process-g6-into-elastic-search.py <es_endpoint> <dir_or_endpoint> [<token>] Arguments: es_endpoint Full ES index URL dir_or_...
"""Modifier classes for corrections based on sun and other angles.""" import logging import time from weakref import WeakValueDictionary import numpy as np import xarray as xr from satpy.modifiers import ModifierBase from satpy.utils import sunzen_corr_cos, atmospheric_path_length_correction logger = logging.getLog...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } from ansible.module_utils.utm_utils import UTM, UTMModule from ansible.module_utils._text import to_native def main(...
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
import logging from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User, SiteProfileNotAvailable from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from djangosaml2.signals import pre_user_save logger = logging.getL...
from datetime import timedelta, date from openerp import exceptions, fields import openerp.tests.common as test_common from .common import BaseAgreementTestMixin class TestAgreementPriceList(test_common.TransactionCase, BaseAgreementTestMixin): """Test observer on_change and purchase ...
import json import os import unittest from telemetry import decorators from telemetry.core import wpr_modes from telemetry.page import page as page_module from telemetry.page import page_set from telemetry.page import page_test from telemetry.unittest_util import options_for_unittests from telemetry.unittest_util impo...
"""Creates a zip archive with policy template files. The list of input files is extracted from a grd file with grit. This is to keep the length of input arguments below the limit on Windows. """ import optparse import os import sys import zipfile def add_files_to_zip(zip_file, base_dir, file_list): """Pack a list ...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class URPlayIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ur(?:play|skola)\.se/(?:program|Produkter)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'http://urplay.se/program/190031-tripp-trapp-trad-sovkudde', 'md5': 'ad5f0de86...
from __future__ import (absolute_import, division, print_function) import unittest import numpy as np import mantid from mantid.kernel import (DateAndTime, BoolTimeSeriesProperty, FloatTimeSeriesProperty, Int64TimeSeriesProperty, StringTimeSeriesProperty) from testhelpers import run_algorit...
"""Class representing a TLS session.""" from .utils.compat import * from .mathtls import * from .constants import * class Session(object): """ This class represents a TLS session. TLS distinguishes between connections and sessions. A new handshake creates both a connection and a session. Data is ...
source("../../shared/qtcreator.py") def main(): for lang in testData.dataset("languages.tsv"): overrideStartApplication() startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return invokeMenuItem("Tools", "Options...") waitForObjectIt...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.common._collections_compat import MutableMapping from ansible.utils.vars import merge_hash class AggregateStats: ''' holds stats about per-host activity during playbook runs ''' def __init__(sel...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import os.path import stat import pytest from ansible.config.manager import find_ini_config_file from ansible.module_utils._text import to_text real_exists = os.path.exists real_isdir = os.path.isdir working_dir = os....
"""Graphical rendering helpers (splines, alpha checks, brush preview) See also: gui.style """ ## Imports from __future__ import division, print_function import logging logger = logging.getLogger(__name__) import math import numpy as np import cairo from lib.helpers import clamp import gui.style from lib.color im...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import random from tensorflow.contrib.learn.python import learn from tensorflow.contrib.learn.python.learn import datasets from tensorflow.contrib.learn.python.learn.estimators._sklear...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urlparse, ) from ..utils import ( determine_ext, unified_strdate, ) class WDRIE(InfoExtractor): _PLAYER_REGEX = '-(?:video|a...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function import os import re import subprocess import sys import tempfile ### class DeltaAlgorithm(object): def __init__(self): self.cache = set() def test(self, changes): abstract ### def getTestResult(s...
"""Translate strings to and from SOAP 1.2 XML name encoding Implements rules for mapping application defined name to XML names specified by the w3 SOAP working group for SOAP version 1.2 in Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft 17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem...
from openerp.osv import osv from openerp.report import report_sxw class bom_structure(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(bom_structure, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'get_children': self.get_children, ...
import os, logging, re, cgi, urllib from public import mechanize from google.appengine.api import memcache, users, urlfetch, taskqueue from google.appengine.ext import db, webapp from google.appengine.ext.webapp.template import render from google.appengine.ext.webapp.util import run_wsgi_app from models.paypalipn i...
"""Pure-Python RSA implementation.""" from .cryptomath import * from .asn1parser import ASN1Parser from .rsakey import * from .pem import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise AssertionError() ...
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes n...
""" The citext PostgreSQL extension supports indexing of case-insensitive text strings and thus eliminates the need for operations such as iexact and other modifiers to enforce use of an index. """ from django.db import IntegrityError from django.test.utils import modify_settings from . import PostgreSQLTestCase from ...
from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class PutBucketNotification(Choreography): def __init__(self, temboo_session): """ ...
"""Ironic DB test base class.""" import fixtures from oslo_config import cfg from oslo_db.sqlalchemy import enginefacade from ironic.db import api as dbapi from ironic.db.sqlalchemy import migration from ironic.db.sqlalchemy import models from ironic.tests import base CONF = cfg.CONF _DB_CACHE = None class Datab...
"""Tests for the Meteo-France config flow.""" from unittest.mock import patch from meteofrance_api.model import Place import pytest from homeassistant import data_entry_flow from homeassistant.components.meteo_france.const import ( CONF_CITY, DOMAIN, FORECAST_MODE_DAILY, FORECAST_MODE_HOURLY, ) from h...
"""A hidden command that prints access tokens. """ from oauth2client import client from googlecloudsdk.calliope import base from googlecloudsdk.calliope import exceptions as c_exc from googlecloudsdk.core import log from googlecloudsdk.core.credentials import store as c_store @base.Hidden class PrintRefreshToken(ba...
import os import sys # The root of the repository ROOT = os.path.realpath("%s/.." % (os.path.dirname(__file__))) SUBMODULE_INFRA = os.getenv("SUBMODULE_INFRA") if SUBMODULE_INFRA is None: SUBMODULE_INFRA = "%s/submodules/infra" % ROOT if not os.path.exists("%s/builder/unix/tools" % SUBMODULE_INFRA): raise Ex...
""" Spider Middleware manager See documentation in docs/topics/spider-middleware.rst """ import six from twisted.python.failure import Failure from scrapy.middleware import MiddlewareManager from scrapy.utils.defer import mustbe_deferred from scrapy.utils.conf import build_component_list def _isiterable(possible_iter...
from __future__ import division from __future__ import unicode_literals from mo_logs import Log from mo_logs import startup from pyLibrary import aws def list_queue(settings, num): queue = aws.Queue(settings) for i in range(num): content = queue.pop() Log.note("\n{{content|json}}", content=co...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sumo', '0001_initial'), ] operations = [ migrations.AddField( model_name='sumogroupmatch', name='ord...
"""Config flow for NEW_NAME integration.""" import logging import voluptuous as vol from homeassistant import config_entries, core, exceptions from .const import DOMAIN # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) # TODO adjust the data schema to the data that you need STEP_USER_DATA_SCHEM...
''' Module containing functions that wrap a QCodes parameter into a sweep or detector function ''' import qcodes as qc from pycqed.measurement import sweep_functions as swf from pycqed.measurement import detector_functions as det def wrap_par_to_swf(parameter, retrieve_value=False): ''' - only soft sweep_fun...
""" Xml parsing tests for XModules """ import pprint from lxml import etree from mock import Mock from unittest import TestCase from xmodule.x_module import XMLParsingSystem, policy_key from xmodule.mako_module import MakoDescriptorSystem from xmodule.modulestore.xml import CourseLocationManager from opaque_keys.edx.l...
from tempest.api.image import base from tempest import test class ImageMembersTest(base.BaseV1ImageMembersTest): @test.attr(type='gate') def test_add_image_member(self): image = self._create_image() self.client.add_member(self.alt_tenant_id, image) body = self.client.get_image_members...
from gnuradio import gr, gr_unittest, blocks, filter, digital class test_simple_correlator(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def tearDown(self): self.tb = None def test_00(self): expected_result = ( 0x00, 0x11, 0x22, 0x33, 0x...
import numpy as np from .parameter_core import Pickleable from .observable import Observable class ObsAr(np.ndarray, Pickleable, Observable): """ An ndarray which reports changes to its observers. The observers can add themselves with a callable, which will be called every time this array changes. The ...
class MessagePumpDelegate(object): def schedule(self, interval, callback): raise NotImplementedError, "subclasses must implement" def message_available(self, message): raise NotImplementedError, "subclasses must implement" def final_message_delivered(self): raise NotImplementedErro...
""" Twisted Python module for Postal Push Notification Server. """ import json from twisted.application import service from twisted.internet import defer from twisted.web import client import types class Service(service.Service): name = 'PostalService' def __init__(self, host='localhost', port=5300): ...
from tempest.api.volume import base from tempest.common.utils.data_utils import rand_name from tempest.openstack.common import log as logging from tempest.test import attr LOG = logging.getLogger(__name__) class VolumesListTest(base.BaseVolumeTest): """ This test creates a number of 1G volumes. To run succe...
from unittest import skipUnless from django.contrib.gis import forms from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, skipUnlessDBFeature from django.utils import six from django.utils.html imp...
""" Default processing factory plugin. """ from xml.dom import minidom as dom from twisted.lore import tree, latex, lint, process from twisted.web import sux htmlDefault = {'template': 'template.tpl', 'baseurl': '%s', 'ext': '.html'} class ProcessingFunctionFactory: def getDoFile(self): return tree.doF...
""" Copyright (c) 2003-2010 Gustavo Niemeyer <<EMAIL>> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <<EMAIL>>" __license__ = "PSF License" import datetime import calendar __all__ = ["relativedelta", "MO", "TU", "WE", "TH", "FR", "SA", "SU"] class wee...
import contextlib import tarfile import eventlet from nova.image import glance from nova import test from nova.virt.xenapi.client import session as xenapi_session from nova.virt.xenapi.image import vdi_through_dev @contextlib.contextmanager def fake_context(result=None): yield result class TestDelegatingToCom...
"""The Generation Dynamics package contains prime movers, such as turbines and boilers, which are needed for simulation and educational purposes. """ from CIM15.IEC61970.Generation.GenerationDynamics.BWRSteamSupply import BWRSteamSupply from CIM15.IEC61970.Generation.GenerationDynamics.HydroTurbine import HydroTurbine...
""" Implementation of a feature importances visualizer. This visualizer sits in kind of a weird place since it is technically a model scoring visualizer, but is generally used for feature engineering. """ ########################################################################## ## Imports ############################...
from miscellaneous.decorators import update_paths from PyQt5.QtWidgets import ( QComboBox, QGridLayout, QLabel, QLineEdit, QPushButton, QWidge...
"""Module for SPICE Proxying.""" from oslo.config import cfg spice_opts = [ cfg.StrOpt('html5proxy_base_url', default='http://127.0.0.1:6082/spice_auto.html', help='Location of spice HTML5 console proxy, in the form ' '"http://127.0.0.1:6082/spice_auto.html"'), ...
#!/usr/bin/env python """ pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limita...
# -*- coding: utf-8 -*- import os import pytest from opbeat.instrumentation import control from opbeat.instrumentation.packages.psycopg2 import extract_signature from tests.contrib.django.django_tests import get_client try: import psycopg2 has_psycopg2 = True except ImportError: has_psycopg2 = False tra...
""" Tests course_creators.views.py. """ from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.test import TestCase from django.core.urlresolvers import reverse from course_creators.views import add_user_with_status_unrequested, add_user_with_status_granted from co...
""" Verifies --root-target removes the unnecessary targets. """ import TestGyp test = TestGyp.TestGyp() # The xcode-ninja generator has its own logic for which targets to include if test.format == 'xcode-ninja': test.skip_test() build_error_code = { 'cmake': 1, 'make': 2, 'msvs': 1, 'ninja': 1, 'xcode': ...
from openerp.addons.project.tests.test_project_base import TestProjectBase from openerp.exceptions import AccessError from openerp.osv.orm import except_orm from openerp.tools import mute_logger class TestPortalProjectBase(TestProjectBase): def setUp(self): super(TestPortalProjectBase, self).setUp() ...
import ns.applications import ns.bridge import ns.core import ns.csma import ns.internet import ns.network def main(argv): # # Allow the user to override any of the defaults and the above Bind() at # run-time, via command-line arguments # cmd = ns.core.CommandLine() cmd.Parse(argv) # ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'RateLimitConfiguration' db.create_table('util_ratelimitconfiguration', ( ('id', ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import importlib import numpy as np from tensorflow.python.eager import backprop from tensorflow.python.framework import constant_op from tensorflow.python.framework import tensor_shape from tensorflow.python...
from AccessControl.SecurityManagement import newSecurityManager from Acquisition import aq_inner, aq_parent from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.browser.bika_listing import BikaListingView from bika.lims.utils import to_utf8 from DateTime import DateTime from operat...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, parse_iso8601, ) class AirMozillaIE(InfoExtractor): _VALID_URL = r'https?://air\.mozilla\.org/(?P<id>[0-9a-z-]+)/?' _TEST = { 'url': 'htt...