code
stringlengths
1
199k
from funtests import transport class test_redis(transport.TransportCase): transport = "redis" prefix = "redis" def after_connect(self, connection): client = connection.channel().client client.info() def test_cant_connect_raises_connection_error(self): conn = self.get_connection(p...
import sys from datetime import datetime from openerp.osv import orm, fields import logging _logger = logging.getLogger(__name__) _loglvl = _logger.getEffectiveLevel() SEP = '|' class import_odbc_dbtable(orm.Model): _name = "import.odbc.dbtable" _description = 'Import Table Data' _order = 'exec_order' _...
"""Create a "virtual" Python installation """ virtualenv_version = "1.7.1.2" import base64 import sys import os import optparse import re import shutil import logging import tempfile import zlib import errno import distutils.sysconfig from distutils.util import strtobool try: import subprocess except ImportError: ...
import ROOT fill_tree_code = ''' void fill_tree(const char *filename, const char *treeName) { TFile f(filename, "RECREATE"); TTree t(treeName, treeName); int b1; float b2; t.Branch("b1", &b1); t.Branch("b2", &b2); for (int i = 0; i < 100; ++i) { b1 = i; b2 = i * i; t.Fill(); } ...
from __future__ import absolute_import import six import warnings from . import backend as K from .utils.generic_utils import deserialize_keras_object from .engine import Layer def softmax(x, axis=-1): """Softmax activation function. # Arguments x : Tensor. axis: Integer, axis along which the so...
import os from oslo.config import cfg import webob.dec import webob.exc import cinder.api.openstack from cinder.api.openstack import wsgi from cinder.api import xmlutil from cinder import exception from cinder.i18n import _ from cinder.openstack.common import importutils from cinder.openstack.common import log as loggi...
from luigi.configuration import LuigiTomlParser, get_config, add_config_path from helpers import LuigiTestCase class TomlConfigParserTest(LuigiTestCase): @classmethod def setUpClass(cls): add_config_path('test/testconfig/luigi.toml') add_config_path('test/testconfig/luigi_local.toml') def se...
import random class Topology(object): """ Topology source: ring, mesh, linear and fat_tree [source] -- send() --> [coroutine] -- send() --> [coroutine(sink)] args: node port eport link slice slice_condition <priority_policy> federation priority_policy: ...
"""The group types specs controller""" import webob from cinder.api import common from cinder.api.openstack import wsgi from cinder import db from cinder import exception from cinder.i18n import _ from cinder import policy from cinder import rpc from cinder import utils from cinder.volume import group_types class Group...
"""Tests for streams.py""" import asyncio import unittest from unittest import mock from aiohttp import streams from aiohttp import test_utils class TestStreamReader(unittest.TestCase): DATA = b'line1\nline2\nline3\n' def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(N...
__author__ = 'Lorenzo' planet_mapper = { '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>': 'planet type', # link to yago category, can be explored more '<http://live.dbpedia.org/ontology/wikiPageExternalLink>': 'external link', # many '<http://live.dbpedia.org/property/inclination>': 'inclination', # ...
"""Utilities for using the TensorFlow C API.""" from tensorflow.core.framework import api_def_pb2 from tensorflow.core.framework import op_def_pb2 from tensorflow.python.client import pywrap_tf_session as c_api from tensorflow.python.util import compat from tensorflow.python.util import tf_contextlib class ScopedTFStat...
from telemetry.page import page as page from telemetry import story class ServiceWorkerBenchmarkPage(page.Page): """Page for workload to measure some specific functions in JS""" def RunNavigateSteps(self, action_runner): super(ServiceWorkerBenchmarkPage, self).RunNavigateSteps(action_runner) action_runner.W...
import sys from pyasn1.codec.der import decoder as der_decoder from pyasn1.codec.der import encoder as der_encoder from pyasn1_modules import pem from pyasn1_modules import rfc2314 try: import unittest2 as unittest except ImportError: import unittest class CertificationRequestTestCase(unittest.TestCase): pe...
import numpy as np import pytest from pandas._libs.tslibs import iNaT from pandas._libs.tslibs.period import IncompatibleFrequency import pandas as pd import pandas._testing as tm from pandas.core.arrays import ( PeriodArray, period_array, ) @pytest.mark.parametrize( "data, freq, expected", [ ([...
__version__=0.0.0
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin class OpenStackCinder(Plugin): """OpenStack cinder """ plugin_name = "openstack_cinder" profiles = ('openstack', 'openstack_controller') option_list = [("db", "gathers openstack cinder db version", "slow", F...
""" Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY __priority__ = PRIORITY.HIGHEST def dependencies(): pass def tamper(payload, **kwargs): """ Replaces instances like 'CONCAT(A, B)' with 'CONCAT_WS(MID(...
""" Command to migrate transcripts to django storage. """ import logging from django.core.management import BaseCommand, CommandError from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import CourseLocator from cms.djangoapps.contentstore.tasks import ( D...
# -*- coding: utf-8 -*- """Tests for tensorflow.python.ops.io_ops.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tempfile import tensorflow as tf class IoOpsTest(tf.test.TestCase): def testReadFile(self): cases = ['', 'Some conten...
import logging from flask import request, flash, abort, Response from flask_admin import expose from flask_admin.babel import gettext, ngettext, lazy_gettext from flask_admin.model import BaseModelView from flask_admin.model.form import wrap_fields_in_fieldlist from flask_admin.model.fields import ListEditableFieldList...
import logging import multiprocessing import os from mimetypes import guess_type from django.conf import settings from django.core.cache import cache from django.db import connection from zerver.lib.avatar_hash import user_avatar_path from zerver.lib.upload import S3UploadBackend, upload_image_to_s3 from zerver.models ...
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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.or...
import functools from django import http from django.core.exceptions import PermissionDenied from django.shortcuts import redirect from olympia import amo from olympia.access import acl from olympia.addons.decorators import addon_view_factory from olympia.addons.models import Addon from olympia.amo.decorators import lo...
""" The rrule module offers a small, complete, and very fast, implementation of the recurrence rules documented in the `iCalendar RFC <https://tools.ietf.org/html/rfc5545>`_, including support for caching of results. """ import itertools import datetime import calendar import re import sys try: from math import gcd...
""" API v0 views. """ import logging from django.http import Http404 from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from rest_framework import status from rest_framework.authentication import SessionAuthentication from rest_framework.exceptions import AuthenticationFailed from rest_f...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.python.python_requirement import PythonRequirement from pants.base.payload import Payload from pants.base.payload_field import PythonRequirementsFiel...
"""Classes and functions for building TensorFlow graphs. @@Graph @@Operation @@Tensor @@DType @@as_dtype @@device @@name_scope @@control_dependencies @@convert_to_tensor @@convert_to_tensor_or_indexed_slices @@get_default_graph @@reset_default_graph @@import_graph_def @@load_file_system_library @@load_op_library @@add_...
import sys import getopt defs = [] undefs = [] def main(): opts, args = getopt.getopt(sys.argv[1:], 'D:U:') for o, a in opts: if o == '-D': defs.append(a) if o == '-U': undefs.append(a) if not args: args = ['-'] for filename in args: if filename ==...
"""Auto-generated file, do not edit by hand. IE metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_IE = PhoneMetadata(id='IE', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[159]\\d{2,4}', possible_number_pattern=...
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ Test file created by XlsxWriter against a file created by Excel. """ def setUp(self): self.maxDiff = None filename = 'image_anchor05.xlsx' ...
""" Unit tests for nonlinear solvers Author: Ondrej Certik May 2007 """ from __future__ import division, print_function, absolute_import from numpy.testing import assert_ import pytest from scipy._lib.six import xrange from scipy.optimize import nonlin, root from numpy import matrix, diag, dot from numpy.linalg import ...
import ldns pkt = ldns.ldns_pkt.new_query_frm_str("www.google.com",ldns.LDNS_RR_TYPE_ANY, ldns.LDNS_RR_CLASS_IN, ldns.LDNS_QR | ldns.LDNS_AA) rra = ldns.ldns_rr.new_frm_str("www.google.com. IN A 192.168.1.1",300) rrb = ldns.ldns_rr.new_frm_str("www.google.com. IN TXT Some\ Description",300) list = ldns.ldns_rr_list() i...
"""add message column to event Revision ID: 211e93aff1e1 Revises: 2493281d621 Create Date: 2015-03-20 18:50:29.961734 """ revision = '211e93aff1e1' down_revision = '2f3c8fa3fc3a' from alembic import op from sqlalchemy.sql import text def upgrade(): conn = op.get_bind() conn.execute(text("SET FOREIGN_KEY_CHECKS=...
""" Test cases for tabs. """ from mock import MagicMock, Mock, patch from courseware.courses import get_course_by_id from courseware.views import get_static_tab_contents from django.test.utils import override_settings from django.core.urlresolvers import reverse from student.tests.factories import UserFactory from xmod...
from oslo_log import log import testtools from tempest.common import waiters from tempest import config from tempest.scenario import manager from tempest import test CONF = config.CONF LOG = log.getLogger(__name__) class TestShelveInstance(manager.ScenarioTest): """ This test shelves then unshelves a Nova insta...
"""The core data types ctexplain manipulates.""" from typing import Mapping from typing import Optional from typing import Tuple from dataclasses import dataclass from dataclasses import field from frozendict import frozendict @dataclass(frozen=True) class Configuration(): """Stores a build configuration as a collect...
''' Created on Jun 27, 2010 @author: jnaous ''' from openflow.dummyom.models import DummyOM def run(): for om in DummyOM.objects.all(): om.delete() for i in xrange(3): om = DummyOM.objects.create() om.populate_links(10, 20)
""" Python package for feature in MLlib. """ import sys import warnings from py4j.protocol import Py4JJavaError from pyspark import since from pyspark.rdd import RDD from pyspark.mllib.common import callMLlibFunc, JavaModelWrapper from pyspark.mllib.linalg import Vectors, _convert_to_vector from pyspark.mllib.util impo...
"""Tests for the Bond cover device.""" from datetime import timedelta from bond_api import Action, DeviceType from homeassistant import core from homeassistant.components.cover import DOMAIN as COVER_DOMAIN from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_CLOSE_COVER, SERVICE_OPEN_COVER, SERVIC...
import logging as log log.basicConfig( level = 10 ) log.debug( "This is the debug level reporting in" ) log.info( "This is the info level reporting in " ) log.warning( "This is the warning level reporting in" ) log.error( "This is the error level reporting in" ) log.critical( "This is the critical level reporting in" )
from __future__ import print_function from django.core.management.base import BaseCommand from optparse import make_option from laws.models import Bill from laws.vote_choices import BILL_STAGE_CHOICES from mks.models import Knesset class Command(BaseCommand): help = "Freeze bills staged in previous knessets" op...
from __future__ import division, print_function, absolute_import from numpy import abs, cos, exp, log, arange, pi, roll, sin, sqrt, sum from .go_benchmark import Benchmark class BartelsConn(Benchmark): r""" Bartels-Conn objective function. The BartelsConn [1]_ global optimization problem is a multimodal ...
from __future__ import unicode_literals import datetime import re import sys from unittest import skipIf import warnings from xml.dom.minidom import parseString try: import pytz except ImportError: pytz = None from django.core import serializers from django.core.urlresolvers import reverse from django.db.models...
from machine import Pin from rp2 import PIO, StateMachine, asm_pio UART_BAUD = 115200 PIN_BASE = 10 NUM_UARTS = 8 @asm_pio(sideset_init=PIO.OUT_HIGH, out_init=PIO.OUT_HIGH, out_shiftdir=PIO.SHIFT_RIGHT) def uart_tx(): # fmt: off # Block with TX deasserted until data available pull() # Initialise bit cou...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: gcp_spanner_database_facts description: - Gather facts for GCP Database short_description: Gather facts...
import webob.exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import compute from nova import exception from nova import objects ALIAS = 'os-pci' soft_authorize = extensions.os_compute_soft_authorizer(ALIAS + ':pci_servers') authorize = extensions.os_compute_authorizer(ALIAS) ...
from rest_framework import serializers as ser from rest_framework import exceptions from framework.auth.oauth_scopes import public_scopes from website.models import ApiOAuth2PersonalToken from api.base.serializers import JSONAPISerializer, LinksField, IDField, TypeField class ApiOAuth2PersonalTokenSerializer(JSONAPISer...
import hashlib from twisted.internet import reactor from autobahn.twisted.websocket import WebSocketServerFactory, \ WebSocketServerProtocol, \ listenWS class MessageBasedHashServerProtocol(WebSocketServerProtocol): """ Message-based WebSockets server that computes a SHA-256 for every message it rec...
"""Errors used in the Python datastore API.""" class Error(Exception): """Base datastore error type. """ class BadValueError(Error): """Raised by Entity.__setitem__(), Query.__setitem__(), Get(), and others when a property value or filter value is invalid. """ class BadPropertyError(Error): """Raised by Ent...
import binascii import itertools import os import random import subprocess from weaver.stack import WeaverNests from weaver.util import Stash def nstdir(path): return os.path.join(CurrentNest().work_dir, path) TASKS = 25 SHARED = [ { 'count': 128, 'prefix': '1R-shared', 'size': lambda: r...
from ansible.compat.tests import unittest from ansible.modules.packaging.os.yum import YumModule yum_plugin_load_error = """ Plugin "product-id" can't be imported Plugin "search-disabled-repos" can't be imported Plugin "subscription-manager" can't be imported Plugin "product-id" can't be imported Plugin "search-disable...
from __future__ import division, absolute_import, print_function import os, signal import warnings import sys from distutils.command.config import config as old_config from distutils.command.config import LANG_EXT from distutils import log from distutils.file_util import copy_file from distutils.ccompiler import Compil...
{ 'name': 'Add "To Send" and "To Validate" states in Invoices', 'version': '8.0.1.0.1', 'category': 'Generic Modules/Invoicing', 'description': ''' This module adds 2 states between draft and open state in invoices: - To Validate: For invoices which need a validation - To Send: For all invoices that...
import os class URLMappings(object): def __init__(self, src_root, build_dir): self.mappings = { 'dart:mojo.internal': os.path.join(src_root, 'mojo/public/dart/sdk_ext/internal.dart'), 'dart:sky': os.path.join(build_dir, 'gen/sky/bindings/dart_sky.dart'), 'dart:sky.interna...
''' WikiLinks Extension for Python-Markdown ====================================== Converts [[WikiLinks]] to relative links. See <https://pythonhosted.org/Markdown/extensions/wikilinks.html> for documentation. Original code Copyright [Waylan Limberg](http://achinghead.com/). All changes Copyright The Python Markdown Pr...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: scaleway_sshkey short_description: Scaleway SSH keys management module version_added: "2....
import os import socket import struct import sys import traceback RUN_PATH = u'$RUN_PATH$' CONFIG_PATH = u'$CONFIG_PATH$' SYSTEM_PATH = u'$SYSTEM_PATH$' def print_usage(cmd): print(('Usage:\n' + ' {0} -h | -? | --help\n' + ' {0} [project_dir] [-w|--wait]\n' + ' {0} [-l|--line lin...
import sys from typing import Any, Dict, Optional, TYPE_CHECKING from pyspark import since, keyword_only from pyspark.ml.param.shared import ( HasPredictionCol, HasBlockSize, HasMaxIter, HasRegParam, HasCheckpointInterval, HasSeed, ) from pyspark.ml.wrapper import JavaEstimator, JavaModel from p...
s = rf"f<caret>oo{'bar'}"
"""Proides the constants needed for component.""" ATTR_APP_ID = "app_id" ATTR_APP_NAME = "app_name" ATTR_INPUT_SOURCE = "source" ATTR_INPUT_SOURCE_LIST = "source_list" ATTR_MEDIA_ALBUM_ARTIST = "media_album_artist" ATTR_MEDIA_ALBUM_NAME = "media_album_name" ATTR_MEDIA_ARTIST = "media_artist" ATTR_MEDIA_CHANNEL = "media...
from __future__ import with_statement import unittest import IECore class IgnoredExceptionsTest( unittest.TestCase ) : def test( self ) : def f( toRaise, toIgnore ) : with IECore.IgnoredExceptions( toIgnore ) : raise toRaise self.assertRaises( RuntimeError, f, RuntimeError, KeyError ) self.assertRaises( R...
""" Empty """
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: azure_rm_servicebusqueue version_added: "2.8" short_description...
import imp import os import threading from ycmd.utils import ForceSemanticCompletion from ycmd.completers.general.general_completer_store import ( GeneralCompleterStore ) from ycmd.completers.completer_utils import PathToFiletypeCompleterPluginLoader class ServerState( object ): def __init__( self, user_options )...
"""CLI Backend for the Analyzer Part of the Debugger. The analyzer performs post hoc analysis of dumped intermediate tensors and graph structure information from debugged Session.run() calls. The other part of the debugger is the stepper (c.f. stepper_cli.py). """ from __future__ import absolute_import from __future__ ...
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from setup.installer import VMInstaller from setup import Command class Linux32(VMInstaller): description = 'Build 32bit linux binary installer' INSTALL...
import requests import time import dblayer from sklearn.cluster import DBSCAN import plotly import plotly.graph_objs as go import pandas as pd import numpy as np import random import testfile color_list = [] def generate_color(ncluster): for i in range(ncluster): color = '#{:02x}{:02x}{:02x}'.format(*map(la...
"""Support for MySensors covers.""" from homeassistant.components import mysensors from homeassistant.components.cover import ATTR_POSITION, DOMAIN, CoverEntity from homeassistant.const import STATE_OFF, STATE_ON async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """Set up the my...
"""Load plugin assets from disk.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import tensorflow as tf _PLUGINS_DIR = "plugins" def _IsDirectory(parent, item): """Helper that returns if parent/item is a directory.""" return tf.gfile.Is...
"""Module with basic entity definitions for testing.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import with_statement # An extra future import for testing. def simple_function(x): """Docstring.""" return x # comment def nested_fu...
""" hg-to-git.py - A Mercurial to GIT converter Copyright (C)2007 Stelian Pop <stelian@popies.net> 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, or (at your option)...
import subprocess from .base import Installer __author__ = "Martine S. Lenders" __copyright__ = "Copyright (C) 2020 Freie Universität Berlin" __credits__ = ["Martine S. Lenders"] __license__ = "LGPLv2.1" __maintainer__ = "Martine S. Lenders" __email__ = "m.lenders@fu-berlin.de" class Apt(Installer): def _install(se...
import mock import uuid from cinder import context from cinder import exception from cinder import test from cinder.volume.drivers.dell import dell_storagecenter_api from cinder.volume.drivers.dell import dell_storagecenter_common from cinder.volume.drivers.dell import dell_storagecenter_iscsi from cinder.volume import...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callback: default type: stdout short_description: default Ansible screen output version_added: historical description: - This is the default output callback for ansible-playbook. e...
""" Compatibility functions for unified behavior between Python 2.x and 3.x. :author: Alex Grönholm """ from __future__ import unicode_literals, absolute_import import inspect import sys from threading import Thread if sys.version_info[0] < 3: def items(d): return d.items() def iteritems(d): ret...
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 'ImportedFile' db.create_table('projects_importedfile', ( ('id', self.gf('django.db.models.fields.AutoField'...
from oslo.config import cfg import webob from nova.api.openstack.compute import image_metadata from nova.openstack.common import jsonutils from nova import test from nova.tests.api.openstack import fakes CONF = cfg.CONF class ImageMetaDataTest(test.TestCase): def setUp(self): super(ImageMetaDataTest, self)....
"""Layers can merge several input tensors into a single output tensor. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.keras.python.keras import backend as K from tensorflow.contrib.keras.python.keras.engine.topology import Layer f...
"""AXScript Client Framework This module provides a core framework for an ActiveX Scripting client. Derived classes actually implement the AX Client itself, including the scoping rules, etc. There are classes defined for the engine itself, and for ScriptItems """ import sys from win32com.axscript import axscrip...
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from ansible.module_utils.common.arg_spec import ArgumentSpecValidator, ValidationResult from ansible.module_utils.errors import AnsibleValidationErrorMultiple from ansible.module_utils.six import PY2 INVALID_SPECS = [ ...
import gdb import os import re import sys def bt(demangle=True): # Find the newest frame. frame = gdb.selected_frame() while True: next = frame.newer() if not next: break frame = next if demangle: pipe = os.popen('c++filt', 'w') else: pipe = sys.st...
{ "name": "Reset a chart of accounts", "summary": ("Delete the accounting setup from an otherwise reusable " "database"), "version": "1.0", "author": "Therp BV,Odoo Community Association (OCA)", "category": 'Accounting & Finance', "depends": [ 'account', ], 'licen...
import os from django.contrib.auth import authenticate from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType from django.contrib.auth.context_processors import PermWrapper, PermLookupDict from djang...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module: pn_port_cos_bw author: "Pluribus Networks (@rajaspachipulusu17)...
from django.db import transaction from django.db import connection from taiga.projects import models def update_projects_order_in_bulk(bulk_data:list, field:str, user): """ Update the order of user projects in the user membership. `bulk_data` should be a list of tuples with the following format: [(<proj...
from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class FileToGoogleCloudStorageOperator(BaseOperator): """ Uploads a file to Google Cloud Storage :param src: Path to the local file :type src: str...
from profile_creators import cookie_profile_extender from profile_creators import history_profile_extender from profile_creators import profile_extender class LargeProfileExtender(profile_extender.ProfileExtender): """This class creates a large profile by performing a large number of url navigations.""" def Run(s...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import tinymce.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(set...
from __future__ import unicode_literals import copy import sys from functools import update_wrapper from django.utils.six.moves import zip import django.db.models.manager # Imported to register signal handler. from django.conf import settings from django.core.exceptions import (ObjectDoesNotExist, MultipleObjectsR...
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() sphere.SetThetaResolution(...
from . import test_convert from . import test_env
""" This module contains a set of functions for vectorized string operations and methods. .. note:: The `chararray` class exists for backwards compatibility with Numarray, it is not recommended for new development. Starting from numpy 1.4, if one needs arrays of strings, it is recommended to use arrays of `...
from . import models
"""Classes supporting configuration property editor and REST operations.""" __author__ = 'Pavel Simakov (psimakov@google.com)' import cgi import urllib from controllers import sites from controllers.utils import BaseRESTHandler from controllers.utils import XsrfTokenManager from models import config from models import ...
if __name__ == '__main__' : import sys import antlr import rewrite_l ### create lexer - shall read from stdin L = rewrite_l.Lexer() try: L.mSTART(1); token = L.getTokenObject() except antlr.TokenStreamException, e: print "error: exception caught while lexing: "
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from six.moves import StringIO import json import os import shlex from ansible import __version__ from ansible import constants as C from ansible.errors import AnsibleError from ansible.parsing.utils.jsonify import jsonify from ansi...
""" Finds revisions from the Thunderbird migration that don't have based_on set correctly, and are still relavent, and fixes that. Run this script like `./manage.py runscript fix_tb_basedon`. """ import sys from traceback import print_exc from django.db.models import Q from kitsune.wiki.models import Document, Revision...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: vmware_local_user_manager short_description: Manage local users on an ESXi host descripti...
from __future__ import print_function import struct import sys import numpy class Analyzer: """ The binary format is time since the beginning of the measurement : double unknown and irrelevant field : double momentary consumption calculated for the current time segment : double """ ...