content
stringlengths
4
20k
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from diskusage impor...
import logging import optparse import os import sys import webbrowser from profile_chrome import chrome_controller from profile_chrome import ddms_controller from profile_chrome import flags from profile_chrome import perf_controller from profile_chrome import profiler from profile_chrome import systrace_controller fr...
DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, G.i" TIME_FORMAT = 'G.i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATETIME_FORMAT = 'd-m-Y G.i' FIRST_DAY_OF_WEEK = 1 # Monday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see http://docs.python.org/l...
from spack import * import sys class Valgrind(AutotoolsPackage): """An instrumentation framework for building dynamic analysis. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new...
"""Imports a protobuf model as a graph in Tensorboard.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys from tensorflow.python.client import session from tensorflow.python.framework import importer from tensorflow.python.framew...
from __future__ import print_function, division, absolute_import import unittest import os.path import desisurvey.config import desisurvey.scripts.surveyinit import surveysim.stats import surveysim.exposures import surveysim.scripts.surveysim from desisurvey.test.base import Tester class TestSimulator(Tester): ...
#!/usr/bin/env python3 import os,sys from ftplib import FTP from tempfile import mkdtemp from shutil import rmtree from http.client import HTTPConnection from urllib.parse import urlsplit def get_temp_dir(work_dir,prefix='temp'): ''' This function returns a temporary directory ''' try: temp_dir=mkdtemp(p...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} # TODO: Disabled the RETURN as it was breaking docs building. Someone needs to # fix this from ansible.module_utils.six import iteritems from ansible.module_utils.basic import Ans...
"""Blobstore to GCS migration functions.""" from mapreduce import operation as op from google.appengine.api import images as images_api from google.appengine.ext import blobstore import cloudstorage as gcs BUCKET = 'bs2gcs' def migrate(image): """Copies blobs stored in Blobstore over to a GCS bucket. Args: im...
"""JsLex: a lexer for Javascript""" # Originally from https://bitbucket.org/ned/jslex import re class Tok(object): """ A specification for a token class. """ num = 0 def __init__(self, name, regex, next=None): self.id = Tok.num Tok.num += 1 self.name = name self.reg...
__author__ = 'Gaetan de Menten, <<EMAIL>>' __version__ = '0.1.0' import psycopg import optparse import ConfigParser # ----- parser = optparse.OptionParser(version="Tiny ERP server migration script " + __version__) parser.add_option("-c", "--config", dest="config", help="specify path to Tiny ERP config file") group...
""" Setup for nrw_python_utils A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os i...
"""Tests for ceilometer.meter.notifications """ import datetime import mock from oslo_config import fixture as fixture_config from ceilometer.meter import notifications from ceilometer import sample from ceilometer.tests import base as test def fake_uuid(x): return '%s-%s-%s-%s' % (x * 8, x * 4, x * 4, x * 12)...
import re,string def reverse(text): return text[::-1]; def isPalindomeIgnorePunctation(text): # test if word is palindrome ignore punctation regex = re.compile('[%s]' % re.escape(string.punctuation)); text = regex.sub('',text); return isPalindome(text) def isPalindome(text): # test if word is palindrome # ab...
import textwrap from pip.locations import build_prefix, src_prefix from pip.util import display_path, backup_dir from pip.log import logger from pip.exceptions import InstallationError from pip.commands.install import InstallCommand class BundleCommand(InstallCommand): """Create pybundles (archives containing mul...
"""Various constants for Constant Special Item ID list (CSIDLs)""" __docformat__ = "restructuredtext en" __all__ = [ "CSIDL_DESKTOP", "CSIDL_INTERNET", "CSIDL_PROGRAMS", "CSIDL_CONTROLS", "CSIDL_PRINTERS", "CSIDL_MY_DOCUMENTS", "CSIDL_FAVORITES", "CSIDL_STARTUP", "CSIDL_RECENT", "CSIDL_SENDTO", "CSIDL_BITB...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} import traceback try: import ldap import ldap.sasl HAS_LDAP = True except Imp...
""" Tests import_csv functionality with varying parameters""" import unittest from sparktkregtests.lib import sparktk_test class FrameCreateTest(sparktk_test.SparkTKTestCase): def setUp(self): """Build frames to be exercised and establish known baselines""" super(FrameCreateTest, self).setUp() ...
from thespian.actors import * class EncodeThis(object): """This is the message requesting an encoding and noting the original encoding requester.""" def __init__(self, rawstr, requester): self.rawstr = rawstr self.requester = requester class Encoded(object): """This is a message s...
import pandas as pd from syscore.dateutils import ROOT_BDAYS_INYEAR from syscore.objects import missing_data from sysdata.config.configdata import Config from sysdata.sim.sim_data import simData from sysquant.estimators.vol import robust_vol_calc from systems.stage import SystemStage from systems.system_cache impor...
import util def build_network(**kwargs): from keras.models import Model from keras.layers import Dense, Reshape, Flatten, Input, merge defaults = { "board_side_length": 8, "conv_layers": 4, "num_filters": 32, "dropout": 0.5, "dense_layers": 2, "dense_hidden"...
""" Definition of data structure """ class DataRecord: def __init__(self, datalist, fileName): self.fileName = fileName self.datalist = datalist self.numberOfL1Responses = 0 self.numberOfL2Responses = 0 self.numberOfInfusions = 0 self.totalPumpDuration = 0 ...
# COMMON CODE FOR MIGRATION import re from ansible.module_utils.basic import get_exception from ansible.module_utils.netcfg import NetworkConfig, ConfigLine from ansible.module_utils.shell import ShellError try: from ansible.module_utils.nxos import get_module except ImportError: from ansible.module_utils.nxo...
"""HTTP client module. """ import logging import pycurl import threading from cStringIO import StringIO from ganeti import http from ganeti import compat from ganeti import netutils from ganeti import locking class HttpClientRequest(object): def __init__(self, host, port, method, path, headers=None, post_data=No...
from .. import fixtures, config from ..config import requirements from .. import exclusions from ..assertions import eq_ from .. import engines from sqlalchemy import Integer, String, select, util from ..schema import Table, Column class LastrowidTest(fixtures.TablesTest): run_deletes = 'each' __backend__ ...
"""Write a program which removes specific characters from a string. INPUT SAMPLE: The first argument is a path to a file. The file contains the source strings and the characters that need to be scrubbed. Each source string and characters you need to scrub are delimited by comma. For example: how are you, abc hello ...
#!/usr/bin/env python """ hg-to-git.py - A Mercurial to GIT converter Copyright (C)2007 Stelian Pop <<EMAIL>> 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 (a...
import logging import operator import pytest from cassandra import ConsistencyLevel from pytest import mark from dtest import Tester, create_ks, create_cf from tools.data import insert_c1c2 since = pytest.mark.since logger = logging.getLogger(__name__) opmap = { operator.eq: "==", operator.gt: ">", oper...
""" Utililty classes and functions for the polynomial modules. This module provides: error and warning objects; a polynomial base class; and some routines used in both the `polynomial` and `chebyshev` modules. Error objects ------------- .. autosummary:: :toctree: generated/ PolyError base class fo...
"""This example illustrates how to create an account. Note by default this account will only be accessible via parent MCC. Tags: CreateAccountService.mutate Api: AdWordsOnly """ __author__ = '<EMAIL> (Kevin Winter)' from datetime import datetime import os import sys sys.path.insert(0, os.path.join('..', '..', '..',...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2, 7): pytestmark = pytest.mark.skip("F5 Ansible modules require Python >= 2.7") from ansible.module_utils.basic import AnsibleModule try: from librar...
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from StringIO import StringIO import collections from lxml import etree from alp.request.bs4.element import Comment, Doctype, NamespacedAttribute from alp.request.bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, Tree...
# -*- test-case-name: yadis.test.test_etxrd -*- """ ElementTree interface to an XRD document. """ __all__ = [ 'nsTag', 'mkXRDTag', 'isXRDS', 'parseXRDS', 'getCanonicalID', 'getYadisXRD', 'getPriorityStrict', 'getPriority', 'prioSort', 'iterServices', 'expandService', 'ex...
#! /usr/bin/python # Find the current balances for known addresses import blockchain_info, electrum_client import json import locale import pycoin.key.BIP32Node, pycoin.key.Key, pycoin.key.electrum from pycoin.tx.pay_to import address_for_pay_to_script, build_hash160_lookup, build_p2sh_lookup, ScriptMultisig class a...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from opinel.utils.aws import connect_service from opinel.utils.cli_parser import OpinelArgumentParser from opinel.utils.console import configPrintException, printInfo, printException from opinel.utils.credentials import read_creds from opinel.utils.gl...
import time import base64 from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.report import report_sxw class partner_vat_intra(osv.osv_memory): """ Partner Vat Intra """ _name = "partner.vat.intra" _description = 'Partner VAT Intra' def _get_xml_data(self, ...
"""Fixture module to skip the datasets loading when offline Mock urllib2 access to mldata.org and create a temporary data folder. """ from os import makedirs from os.path import join import numpy as np import tempfile import shutil from sklearn import datasets from sklearn.utils.testing import install_mldata_mock fr...
from lxml import etree def xml_from_string(xmlstr): """ Returns an lxml.etree._ElementTree object from a string containing a valid XML document. """ try: return etree.XML(str(xmlstr).strip()) except etree.XMLSyntaxError: return None def xml_from_file(filepath): """ Ret...
""" http://isometric.sixsided.org/_/gates_in_the_head/ """ import os # Win32 imports import win32api import win32con import win32event import win32file import win32pipe import win32process import win32security import pywintypes # security attributes for pipes PIPE_ATTRS_INHERITABLE = win32security.SECURITY_ATTRIBUT...
import fnmatch import glob import os import re import sys from itertools import dropwhile from optparse import make_option from subprocess import PIPE, Popen import django from django.core.management.base import CommandError, NoArgsCommand from django.utils.text import get_text_list from django.utils.jslex import prep...
# -*- coding: utf-8 -*- """ Python evaluation of blaze AIR. """ from __future__ import absolute_import, division, print_function from pykit.ir import interp import blaze # Use numpy for now until dynd supports reshape import numpy as np #------------------------------------------------------------------------ # I...
import sys sys.path.append('.') import omero.gateway import omero.model from omero.rtypes import * import os import subprocess import re import time import urllib2 from types import StringTypes from path import path BASEPATH = os.path.dirname(os.path.abspath(__file__)) TESTIMG_URL = 'http://users.openmicroscopy.org....
""" Parse commandline args for running unittests. Used by the overall run_all.py script, or the various indivudial test modules that need settings for connecting to a broker. """ # Copyright (C) 2007-2008 Barry Pederson <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the ...
""" Demo platform that has two fake remotes. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.remote import RemoteDevice from homeassistant.const import DEVICE_DEFAULT_NAME # pylint: disable=unused-argument def setup_...
#!/usr/bin/env python """ @package mi.core.instrument.test.test_data_particle @file mi/core/instrument/test/test_data_particle.py @author Steve Foley @brief Test cases for the base data_particle module """ __author__ = 'Steve Foley' __license__ = 'Apache 2.0' import json import base64 import time import ntplib fro...
from pyspark import SparkContext, SparkConf, SparkFiles from pyspark.sql import SQLContext, Row import configparser import os from vina_utils import get_files_log from json_utils import create_jsondata_from_docking_output_file, create_json_file from os_utils import make_directory def log_to_json(log_file): ...
import inward_type # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re import sys from ansible import constants as C ANSIBLE_COLOR = True if C.ANSIBLE_NOCOLOR: ANSIBLE_COLOR = False elif not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty(): ANSIBLE_COLOR = False else: t...
#!/usr/bin/env python """ connectfour.py The connect four gameplay application. """ """ Copyright 2012 Michael Bell This file is part of connectfour. connectfour 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...
#!/usr/bin/env python import sys if sys.version_info[0] >= 3: raise NotImplementedError('Py3 not supported in this test yet') import os import shutil import tempfile from distutils.command.install import INSTALL_SCHEMES from string import Template from urllib2 import urlopen try: import subprocess def _s...
""" Utilities for reading and writing Mach-O headers """ import os import sys from altgraph.Graph import Graph from altgraph.ObjectGraph import ObjectGraph from macholib.mach_o import * from macholib.dyld import dyld_find from macholib.MachO import MachO from macholib.itergraphreport import itergraphreport __all__ ...
def main() -> None: N = int(input()) A = [int(x) for x in input().split()] rev_A = A[:] left = [-1] * N left_cnt = [0] * N A_left = [A[0]] for i in range(1, N): if rev_A[i-1] < rev_A[i]: cnt = 0 while rev_A[i-1] pass elif rev_A[i-1] < rev_A...
__authors__ = "Daniel Kesler" __license__ = "GPL - https://opensource.org/licenses/GPL-3.0" __version__ = "1.0" # Import standard python module import gettext import json import os, re # Import external modules # Import internal modules from fabtotum.utils.translation import _, setLanguage from fabtotum.utils.common...
from twisted.spread import pb class StatusClient(pb.Referenceable): """To use this, call my .connected method with a RemoteReference to the buildmaster's StatusClientPerspective object. """ def __init__(self, events): self.builders = {} self.events = events def connected(self, r...
"""Tests for KafkaDataset.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.kafka.python.ops import kafka_dataset_ops from tensorflow.python.data.ops import dataset_ops from tensorflow.python.data.ops import iterator_ops from tenso...
from __future__ import print_function _A=None import sys from .compat import string_types if False:from typing import Dict,Any,Text class Node: __slots__='tag','value','start_mark','end_mark','comment','anchor' def __init__(A,tag,value,start_mark,end_mark,comment=_A,anchor=_A):A.tag=tag;A.value=value;A.start_mark=sta...
"""Implementation of Inspector abstraction for VMware vSphere""" from oslo_config import cfg from oslo_utils import units from oslo_vmware import api import six from ceilometer.compute.virt import inspector as virt_inspector from ceilometer.compute.virt.vmware import vsphere_operations from ceilometer.i18n import _ ...
{ 'name': 'Payroll Period', 'version': '1.0', 'category': 'Generic Modules/Human Resources', 'description': """ Easy Payroll Management ======================= This module implements a more formal payroll cycle. This cycle is based on payroll period schedules configured by the user. An end-of-pay-period...
import lixie as lix import psutil import time import commands # VARIABLES ----------------- MODE_INTERVAL = 5 # How often (in seconds) to switch data types TEMP_UNITS = "F" # Can be "F" or "C" # --------------------------- modeIndex = 0 modes = ["TEMP","CPU","MEM","DISK"] lastSwitch = 0 lix.begin(4) # Number of d...
from __future__ import unicode_literals from __future__ import absolute_import from compose.cli.utils import split_buffer from .. import unittest class SplitBufferTest(unittest.TestCase): def test_single_line_chunks(self): def reader(): yield b'abc\n' yield b'def\n' yie...
#!/usr/bin/env python # this script generates the CtCp_all_nonredundant_file # USE: generate_CtCp.py <kin_matrix_full.txt> import sys import re # get orientations of reference transposons refs="/lscr2/andersenlab/kml436/git_repos2/Transposons2/files/WB_pos_element_names.gff" ref_tes={} with open(refs, 'r') as IN: f...
import operator import random import time from matplotlib import pyplot as plt import numpy as np from pybrain.datasets import SequentialDataSet from pybrain.tools.shortcuts import buildNetwork from pybrain.structure.modules import LSTMLayer from pybrain.supervised import RPropMinusTrainer from predict import genera...
"""RPC communication.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.rpc.python.ops.gen_rpc_op import rpc from tensorflow.contrib.rpc.python.ops.gen_rpc_op import try_rpc from tensorflow.python.framework import ops ops.NotDifferen...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2, 7): pytestmark = pytest.mark.skip("F5 Ansible modules require Python >= 2.7") from ansible.module_utils.basic import AnsibleModule try: from librar...
from typing import Any, Dict from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.decorator import webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_error, json_success from zerver.lib.webhooks.common...
from nova.compute import api as compute_api from nova.tests.functional.v3 import test_servers from nova.tests.unit.image import fake class PreserveEphemeralOnRebuildJsonTest(test_servers.ServersSampleBase): extension_name = 'os-preserve-ephemeral-rebuild' def _test_server_rebuild_preserve_ephemeral(self, val...
from django.db import connection, migrations, models from ...models import models as gis_models ops = [ migrations.CreateModel( name='Neighborhood', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.C...
import optparse import os import shutil import subprocess import sys import tempfile def GetTests(test_dir, argv): def _YieldRecursiveFiles(directory): for (root, dirs, files) in os.walk(directory): for file in files: yield os.path.join(root, file) def _GetTests(test_dir, argv): tests = [] ...
""" globals attached to frappe module + some utility functions that should probably be moved """ from __future__ import unicode_literals from werkzeug.local import Local, release_local import os, importlib, inspect, logging, json # public from frappe.__version__ import __version__ from .exceptions import * from .util...
#!/usr/bin/env python __all__ = ['nicovideo_download'] from ..common import * def nicovideo_login(user, password): data = "current_form=login&mail=" + user +"&password=" + password + "&login_submit=Log+In" response = request.urlopen(request.Request("https://secure.nicovideo.jp/secure/login?site=niconico", he...
""" Miscellaneous utility functions for working with tor. **These functions are not being vended to stem users. They may change in the future, use them at your own risk.** **Module Overview:** :: is_valid_fingerprint - checks if a string is a valid tor relay fingerprint is_valid_nickname - checks if a string is...
import unittest from coalib.bearlib.languages.documentation.DocstyleDefinition import ( DocstyleDefinition) from coalib.bearlib.languages.documentation.DocumentationComment import ( DocumentationComment) from coalib.bearlib.languages.documentation.DocumentationExtraction import ( extract_documentation) fro...
""" Stub implementation of ORA service. This is an extremely simple version of the service, with most business logic removed. In particular, the stub: 1) Provides an infinite number of peer and calibration essays, with dummy data. 2) Simulates a set number of pending submissions for each student; grades submi...
from __future__ import absolute_import, division, print_function import binascii import pytest from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, _Reasons ) from cryptography.hazmat.primitives import interfaces from cryptography.hazmat.primitives.ciphers import ( Cipher, a...
{ 'name': 'Warehouse Management', 'version': '1.1', 'author': 'OpenERP SA', 'summary': 'Inventory, Logistic, Storage', 'description': """ Manage multi-warehouses, multi- and structured stock locations ============================================================== The warehouse and inventory managem...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='EndNode', fields=[ ('id', models.AutoField(verb...
from hashlib import sha256 import itertools from StringIO import StringIO from tests.unit import unittest from mock import ( call, Mock, patch, sentinel, ) from nose.tools import assert_equal from boto.glacier.layer1 import Layer1 from boto.glacier.vault import Vault from boto.glacier.writer import Wr...
import logging import posixpath import requests import urllib from django.utils.encoding import iri_to_uri, smart_str from requests import exceptions from requests.auth import HTTPBasicAuth from requests_kerberos import HTTPKerberosAuth, OPTIONAL __docformat__ = "epytext" LOG = logging.getLogger(__name__) class R...
"""The tests the cover command line platform.""" import os import tempfile from unittest import mock import pytest from homeassistant.components.cover import DOMAIN import homeassistant.components.command_line.cover as cmd_rs from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_CLOSE_COVER, SERVICE_OPEN_COVE...
"""Monkey's Audio streams with APEv2 tags. Monkey's Audio is a very efficient lossless audio compressor developed by Matt Ashland. For more information, see http://www.monkeysaudio.com/. """ __all__ = ["MonkeysAudio", "Open", "delete"] import struct from ._compat import endswith from mutagen import StreamInfo from...
# test that modtls produces a numerical error message when out of heap try: import usocket as socket, ussl as ssl, sys except: import socket, ssl, sys try: from micropython import alloc_emergency_exception_buf, heap_lock, heap_unlock except: print("SKIP") raise SystemExit # test with heap locked ...
""" Django settings for materialenapp project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ imp...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} import re import time from ansible.module_utils.network.routeros.routeros import run_comm...
from .ref import Ref from .files import ModifiedFile SHA1_LENGTH = 40 class Commit(Ref): def __init__(self, repo, sha): sha = str(sha).lower() if len(sha) < SHA1_LENGTH: sha = repo._getCommitByPartialHash(sha).hash super(Commit, self).__init__(repo, sha) self.hash = sha...
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_sql(self, with_limits=True, with_col_aliases=False): """ Creates the SQL for this query. Returns the SQL string and list of parameters. This is overridden from the original Query class to han...
""" Container page in Studio """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise from . import BASE_URL from .utils import click_css, confirm_prompt, type_in_codemirror class ContainerPage(PageObject): """ Container page in Studio """ NAME_SELECTOR = '....
"""Test config entries API.""" import pytest from homeassistant.auth import models as auth_models from homeassistant.components.config import auth as auth_config from tests.common import CLIENT_ID, MockGroup, MockUser @pytest.fixture(autouse=True) def setup_config(hass, aiohttp_client): """Fixture that sets up ...
# -*- coding: utf-8 -*- """ pygments.styles.autumn ~~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.to...
import HTMLParser as _HTMLParser import re import sys current_version = sys.version_info use_workaround = ( (current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) if not use_workaround: HTMLParser = _HTMLParser.HTMLParser else: class HTMLParser(_HTMLParser.HTML...
# -*- coding: utf-8 -*- """ *************************************************************************** MultipartToSingleparts.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************...
import invoice import stock import purchase import sale
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
from __future__ import unicode_literals from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz from django.core.exceptions import FieldDoesNotExist from django.db import DEFAULT_DB_ALIAS, connections from django.h...
#._cv_part guppy.gsl.SpecNodes ## # Specification entity object # # Collects information about a particular system entity or aspect. # # The entity is of a general kind # It is defined by the particular aspects defined for it # The aspects must be 'compatible', which can be relatively checked. # The specobject is use...
"""Utilities for manipulating qualified names. A qualified name is a uniform way to refer to simple (e.g. 'foo') and composite (e.g. 'foo.bar') syntactic symbols. This is *not* related to the __qualname__ attribute used by inspect, which refers to scopes. """ from __future__ import absolute_import from __future__ im...
from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) with db.database.transaction(): migrate( migrator.add_column('queries', 'updated_at', ...
from ryu.app import (conf_switch_key, rest_nw_id) from ryu.base import app_manager from ryu.controller import (conf_switch, dpset, handler, network, tunnels) import ryu.exception as ryu_e...
""" Represents a Route Table """ from boto.ec2.ec2object import TaggedEC2Object from boto.resultset import ResultSet class RouteTable(TaggedEC2Object): def __init__(self, connection=None): super(RouteTable, self).__init__(connection) self.id = None self.vpc_id = None self.routes =...
import os from toolchains.toolchain import Toolchain from utils.utils import Timed, have_exec # .asc version field just says "DiamondNG" # guess that was the code name... # no seed support? -n just does more passes class Radiant(Toolchain): '''Lattice Radiant based toolchains''' carries = None # FIXME: s...
import os import subprocess import sys import pyauto_functional # Must be imported before pyauto import pyauto import pyauto_errors import test_utils sys.path.append('/usr/local') # To make autotest libs importable. from autotest.cros import cros_ui from autotest.cros import cryptohome class ChromeosLogin(pyauto...