content
string
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Fútbol Para Todos # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ # # Autor: Juan Pablo Candioti (@JPCandioti) # Desarrollo basado sobre otros canales de tvalacarta #---------------------------------...
# -*- coding: utf-8 *-* import pyglet from . import util from . import resources from . import physicalobject from . import ship as ship_ import random def asteroid(player_pos=(-1000,-1000), screensize=(800,600), score=0, *args, **kwargs): """spawns an asteroid at random position""" pos = util.random_pos(sc...
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import dihedral_fast import tmp_dnn import tta validation_split_path = "splits/bagging_split_17.pkl" patch_sizes = [(95, 95), (47, 47)] augmentation_params = { 'zoom_ran...
import network import time from umqtt.simple import MQTTClient from lights import * from traffic import * # Config wifi_ssid = "HaSi-Kein-Internet-Legacy" wifi_psk = "bugsbunny" mqtt_server = "mqtt.hasi" mqtt_client_name = "traffic_light" mqtt_topic = "hasi/lights/traffic_light" # State lights_on = True mqtt_client =...
# -*- coding: utf-8 -*- """ Tests for tipfyext.mako """ import os import sys import unittest from tipfy import RequestHandler, Request, Response, Tipfy from tipfy.app import local from tipfyext.mako import Mako, MakoMixin import test_utils current_dir = os.path.abspath(os.path.dirname(__file__)) templates_dir = ...
''' Tesselate Demonstration ======================= This demonstrates the experimental library for tesselating polygons. You should see a hollow square with some buttons below it. You can click and drag to create additional shapes, watching the number of vertexes and elements at the top of the screen. The 'debug' butt...
import httplib import myparser import time import sys class search_baidu: def __init__(self, word, limit): self.word = word self.total_results = "" self.server = "www.baidu.com" self.hostname = "www.baidu.com" self.userAgent = "(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-U...
from io import StringIO from django.core.management import call_command from django.test import TestCase from django.utils import timezone from geotrek.feedback.models import Report from geotrek.feedback.factories import ReportFactory class TestRemoveEmailsOlders(TestCase): """Test command erase_emails, if olde...
import time from openerp import api, fields, models, _ import openerp.addons.decimal_precision as dp from openerp.exceptions import UserError class SaleAdvancePaymentInv(models.TransientModel): _name = "sale.advance.payment.inv" _description = "Sales Advance Payment Invoice" @api.model def _count(sel...
import unittest2 from st2common.util import hash as hash_utils from st2common.util import auth as auth_utils class TestHashWithApiKeys(unittest2.TestCase): def test_hash_repeatability(self): api_key = auth_utils.generate_api_key() hash1 = hash_utils.hash(api_key) hash2 = hash_utils.hash(...
from tests.unit import unittest from tests.compat import mock from boto.ec2.elb import ELBConnection from boto.ec2.elb import LoadBalancer from boto.ec2.elb.attributes import LbAttributes ATTRIBUTE_GET_TRUE_CZL_RESPONSE = b"""<?xml version="1.0" encoding="UTF-8"?> <DescribeLoadBalancerAttributesResponse xmlns="http:...
from .mbcharsetprober import MultiByteCharSetProber from .codingstatemachine import CodingStateMachine from .chardistribution import SJISDistributionAnalysis from .jpcntx import SJISContextAnalysis from .mbcssm import SJISSMModel from . import constants import sys from .constants import eStart, eError, eItsMe ...
import urlparse try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.utils.decorators import available_attrs def user_passes_test(test_func, login...
from ryu import cfg import socket import netaddr from ryu.base import app_manager from ryu.controller import handler from ryu.services.protocols.vrrp import event as vrrp_event from ryu.services.protocols.vrrp import api as vrrp_api from ryu.lib import rpc from ryu.lib import hub from ryu.lib import mac VRRP_RPC_PORT...
"""Contains model definitions for versions of the Oxford VGG network. These model definitions were introduced in the following technical report: Very Deep Convolutional Networks For Large-Scale Image Recognition Karen Simonyan and Andrew Zisserman arXiv technical report, 2015 PDF: http://arxiv.org/pdf/1409.15...
""" Test vlans alloc/dealloc. """ from neutron.db import api as db from neutron.openstack.common import context from neutron.plugins.brocade import vlanbm as vlan_bitmap from neutron.tests import base class TestVlanBitmap(base.BaseTestCase): """exercise Vlan bitmap .""" def setUp(self): super(TestVl...
import urwid import blinker import textwrap from mitmproxy.tools.console import layoutwidget from mitmproxy.tools.console import signals HELP_HEIGHT = 5 command_focus_change = blinker.Signal() class CommandItem(urwid.WidgetWrap): def __init__(self, walker, cmd, focused): self.walker, self.cmd, self.focu...
"""Python 'uu_codec' Codec - UU content transfer encoding. This codec de/encodes from bytes to bytes and is therefore usable with bytes.transform() and bytes.untransform(). Written by Marc-Andre Lemburg (<EMAIL>). Some details were adapted from uu.py which was written by Lance Ellinghouse and modified by Jack Jansen ...
import os from common import util from common.util import LOG class Client(): def install(bundle): if not os.path.isfile("/usr/share/clear/bundles/" + str(bundle)) and \ not os.path.isfile("/usr/share/clear/bundles/" "openstack-all-in-one"): LOG.info...
"""Views fo the node settings page.""" # -*- coding: utf-8 -*- import logging import httplib as http from dropbox.rest import ErrorResponse from dropbox.client import DropboxClient from urllib3.exceptions import MaxRetryError from framework.exceptions import HTTPError from website.addons.dropbox.serializer import Dro...
from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Useless command." def add_arguments(self, parser): parser.add_argument('args', metavar='app_label', nargs='*', help='Specify the app label(s) to works on.') parser.add_argument('-...
import socket import msgpack from oslo.config import cfg import oslo.messaging from oslo.utils import units from ceilometer import dispatcher from ceilometer.dispatcher import redis_database from ceilometer import messaging from ceilometer.openstack.common.gettextutils import _ from ceilometer.openstack.common.gettex...
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as AddressProvider class Provider(AddressProvider): """ Korean Address Provider ======================= Korea has two address and postal code system. Address ------- - Address based on land parcel numbers ...
#!/usr/bin/env python3 import shutil, os, argparse, sys, stat,errno import CppHeaderParser from string import replace from argparse import Action sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), "pyUtils")) from color_text import ColorText as CT from headInGraph import * testerBodyTemplate = "...
from google.appengine.ext import webapp from model.queuestatus import QueueStatus class ShowResults(webapp.RequestHandler): def get(self, status_id): status = QueueStatus.get_by_id(int(status_id)) if not status: self.error(404) return self.response.headers["Content...
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
from airflow.executors.base_executor import BaseExecutor class TestExecutor(BaseExecutor): """ TestExecutor is used for unit testing purposes. """ def execute_async(self, key, command, queue=None): self.logger.debug("{} running task instances".format(len(self.running))) self.logger.deb...
from setuptools import setup def read(path): """ Read the contents of a file. """ with open(path) as f: return f.read() setup( classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independen...
import os import time try: from proxmoxer import ProxmoxAPI HAS_PROXMOXER = True except ImportError: HAS_PROXMOXER = False VZ_TYPE=None def get_instance(proxmox, vmid): return [ vm for vm in proxmox.cluster.resources.get(type='vm') if vm['vmid'] == int(vmid) ] def content_check(proxmox, node, ostemplate, te...
from __future__ import (absolute_import, division) __metaclass__ = type import sys import json from units.mock.procenv import swap_stdin_and_argv from ansible.compat.tests import unittest from ansible.compat.tests.mock import MagicMock class TestModuleUtilsBasic(unittest.TestCase): @unittest.skipIf(sys.version...
import signal import socket import struct import os import uuid from functools import partial from ansible.module_utils.basic import get_exception from ansible.module_utils._text import to_bytes, to_native, to_text def send_data(s, data): packed_len = struct.pack('!Q', len(data)) return s.sendall(packed_len...
from itertools import izip from django.db.backends.util import truncate_name from django.db.models.sql import compiler from django.db.models.sql.constants import TABLE_NAME from django.db.models.sql.query import get_proxied_model SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(compiler.SQLCompiler): def ...
""" Tests for utility functions in external_auth module """ from django.test import TestCase from external_auth.views import _safe_postlogin_redirect class ExternalAuthHelperFnTest(TestCase): """ Unit tests for the external_auth.views helper function """ def test__safe_postlogin_redirect(self): ...
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import logging from base64 import b64encode from .compat import urlparse, str from .utils import parse_dict_header log = logging.getLogger(__nam...
"""Updates the Chrome reference builds. Use -r option to update a Chromium reference build, or -b option for Chrome official builds. Usage: $ cd /tmp $ /path/to/update_reference_build.py -r <revision> $ cd reference_builds/reference_builds $ gcl change $ gcl upload <change> $ gcl commit <change> """ impo...
import StringIO import pooler from report.render import render from report.interface import report_int from datetime import datetime import time from pychart import * import pychart.legend import _burndown class report_tasks(report_int): def create(self, cr, uid, ids, datas, context=None): if context is...
from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.models import Site from django.core import urlresolvers from django.utils.encoding import smart_str from django.core.paginator import EmptyPage, PageNotAnInteger def index(request, sitemaps): current_site = S...
from libcloud.compute.providers import Provider from libcloud.compute.base import Node, NodeImage, NodeSize from libcloud.compute.drivers.cloudstack import CloudStackNodeDriver class KTUCloudNodeDriver(CloudStackNodeDriver): "Driver for KTUCloud Compute platform." EMPTY_DISKOFFERINGID = '0' type = Provid...
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Episode(models.Model): name = models.CharField(max_length=100) length = models.CharField(max_length=100, blank=True) auth...
""" Windows/OS2 Bitmap (BMP) this could have been a perfect show-case file format, but they had to make it ugly (all sorts of alignment or """ from construct import * #=============================================================================== # pixels: uncompressed #==============================================...
from nose.tools import ok_, eq_ from elasticsearch_dsl import query from kuma.wiki.models import Document from kuma.wiki.search import WikiDocumentType from . import ElasticTestCase class WikiDocumentTypeTests(ElasticTestCase): fixtures = ElasticTestCase.fixtures + ['wiki/documents.json'] def test_get_exc...
import unittest as ut import importlib_wrapper import numpy as np if '@TEST_SUFFIX@' == 'rouse': params = {} elif '@TEST_SUFFIX@' == 'zimm': params = {'LOOPS': 2000, 'POLYMER_MODEL': 'Zimm', 'gpu': True} tutorial, skipIfMissingFeatures = importlib_wrapper.configure_and_import( "@TUTORIALS_DIR@/lattice_bol...
"""The ``spyne.const.xml`` module contains various XML-related constants like namespace prefixes, namespace values and schema uris. """ NS_XML = 'http://www.w3.org/XML/1998/namespace' NS_XSD = 'http://www.w3.org/2001/XMLSchema' NS_XSI = 'http://www.w3.org/2001/XMLSchema-instance' NS_WSA = 'http://schemas.xmlsoap.org/w...
from .api import list_subtitles, download_subtitles from .async import Pool from .core import (SERVICES, LANGUAGE_INDEX, SERVICE_INDEX, SERVICE_CONFIDENCE, MATCHING_CONFIDENCE) from .infos import __version__ import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Ha...
from __future__ import absolute_import, division, print_function, unicode_literals import re from guessit.patterns.list import list_parser, all_separators_re from guessit.plugins.transformers import Transformer from guessit.matcher import GuessFinder from guessit.patterns import sep, build_or_pattern from guessit.con...
""" 17. Custom column/table names If your database column name is different than your model attribute, use the ``db_column`` parameter. Note that you'll use the field's name, not its column name, in API usage. If your database table name is different than your model name, use the ``db_table`` Meta attribute. This has...
#!/usr/bin/env python import sys for i in range(0, len(sys.argv)): if sys.argv[i] == '-A' and i < len(sys.argv)-1: sys.path = sys.path + [sys.argv[i+1]] import vtk from vtk.util.misc import vtkRegressionTestImage, vtkGetDataRoot # create planes # Create the RenderWindow, Renderer # ren = vtk.vtkRenderer...
import ConfigParser import getpass import tempfile try: import MySQLdb except ImportError: mysqldb_found = False else: mysqldb_found = True VALID_PRIVS = frozenset(('CREATE', 'DROP', 'GRANT', 'GRANT OPTION', 'LOCK TABLES', 'REFERENCES', 'EVENT', 'ALTER', 'D...
import functools import uuid from ..protobuf import utils from . import get as base_get from . import get_all as base_get_all from . import TYPE from . import msg_type_map get = functools.partial(base_get, kind=TYPE['HOST']) get_all = functools.partial(base_get_all, kind=TYPE['HOST']) def get_dict(sock, obj_uuid): ...
"""Contains metaclasses used to create protocol service and service stub classes from ServiceDescriptor objects at runtime. The GeneratedServiceType and GeneratedServiceStubType metaclasses are used to inject all useful functionality into the classes output by the protocol compiler at compile-time. """ __author__ = '...
from __future__ import unicode_literals import json from django.contrib.gis.geos import LinearRing, Point, Polygon from django.core import serializers from django.test import TestCase, mock, skipUnlessDBFeature from django.utils import six from .models import City, MultiFields, PennsylvaniaCity @skipUnlessDBFeatur...
""" The Ramer-Douglas-Peucker algorithm roughly ported from the pseudo-code provided by http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm """ from math import sqrt def distance(a, b): return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) def point_line_distance(point, start, end): if (start == en...
"""Text Views With Headers This package defines several text views with headers """ class HeaderView(object): """A Text View With a Header This view simply serializes the model and places the given header on top. :param header: the header (can be anything on which str() can be called) """ ...
doc = """\ crashmailbatch.py [--interval=<batch interval in minutes>] [--toEmail=<email address>] [--fromEmail=<email address>] [--subject=<email subject>] [--smtpHost=<hostname or address>] Options: --interval - batch cycle length (in minutes). The default is 1.0 minute. ...
from __future__ import print_function import signal import subprocess import sys import logging from datetime import datetime from threading import Thread from Queue import Queue, Empty # # This code comes from Honcho. Didn't need the whole Honcho # setup, so I just swiped this part which is what the build # pa...
from kolekto.commands import Command from kolekto.printer import printer from kolekto.helpers import get_hash class FlagCommand(Command): flags = [] # Flags to set when this flag is set unset_flags = [] # Flags to unset when this flag is set unflag_unset_flags = [] # Flags to unset when this flag is u...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'core'} DOCUMENTATION = r''' --- module: debconf short_description: Configure a .deb package descr...
from Imports_Basic import * #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| class Base_Encoder(object): #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| #Name = None #EncBin = None #DecBin = res("~/lib_Codecs/HM_13.0_Std/bin/TAppDecoder") #Ini = self.get_...
import unittest from mock import * from rabbit import settings from rabbit.app import App from rabbit.config import Config from rabbit.command import Command from rabbit.group import Group class TestApp(unittest.TestCase): def test_it_creates_CONFIG_FILE_global(self): self.assertNotEqual(settings.CONFIG_FILE, Non...
'''This node demonstrates a simple udp controller.''' import socket # Functions used by this node def send_udp_string(msg): #open socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: sock.sendto(msg, (param_ipAddress, param_port)) except socket.error, msg: print "error: %s\n" % msg ...
from nox.lib.core import * import logging logger = logging.getLogger('nox.coreapps.examples.countdown') numbers = ["one","two","three"] index = 0 class countdown(Component): def __init__(self, ctxt): Component.__init__(self, ctxt) def install(self): # call every second se...
from django.conf import settings from django.test import TestCase from django.test.utils import override_settings import track.tracker as tracker from track.backends import BaseBackend SIMPLE_SETTINGS = { 'default': { 'ENGINE': 'track.tests.test_tracker.DummyBackend', 'OPTIONS': { 'fl...
"""Test the customize helper.""" import homeassistant.helpers.customize as customize from voluptuous import MultipleInvalid import pytest class MockHass(object): """Mock object for HassAssistant.""" data = {} class TestHelpersCustomize(object): """Test homeassistant.helpers.customize module.""" de...
""" >>> from django.core.paginator import Paginator >>> from pagination.templatetags.pagination_tags import paginate >>> from django.template import Template, Context >>> p = Paginator(range(15), 2) >>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages'] [1, 2, 3, 4, 5, 6, 7, 8] >>> p = Paginator(range(17), 2)...
"""distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object """ im...
from __future__ import absolute_import, division, print_function import os import re import shutil import stat def ensure_directory(directory, *args, **kwargs): # Fail if the destination exists and it's not a directory if not os.path.isdir(directory): os.makedirs(directory, *args, **kwargs) def cop...
# Brownian motion -- an example of a NON multi-threaded Tkinter program ;) # By Michele Simoniato, inspired by brownian.py from Tkinter import * import random import sys WIDTH = 400 HEIGHT = 300 SIGMA = 10 BUZZ = 2 RADIUS = 2 LAMBDA = 10 FILL = 'red' stop = 0 # Set when main loop exits...
"""Ops to use variables as resources.""" # pylint: disable=g-bad-name from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import common_shapes from tensorflow.python.framework import ops from tensorflow.python.framework import t...
"""RequestContext: context for requests that persist through all of nova.""" import copy from keystoneclient import auth from keystoneclient import service_catalog from oslo_context import context from oslo_log import log as logging from oslo_utils import timeutils import six from nova import exception from nova.i18...
from __future__ import absolute_import, division, print_function, \ with_statement import errno import traceback import socket import logging import json import collections from shadowsocks import common, eventloop, tcprelay, udprelay, asyncdns, shell BUF_SIZE = 1506 STAT_SEND_LIMIT = 100 class Manager(object...
"""recipeIdentifier.py This module contains code for creating hashes to identify recipes based on title & instructions (recipe hash) or based on ingredients (ingredient hash). The hash_recipe function is a convenience function that provide both a recipe hash and an ingredient hash. For individual hashes, use the get...
import sys import os import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_TOOLS_DIR = os.path.dirname(SCRIPT_DIR) sys.path.append(BUILD_TOOLS_DIR) import sdk_tools.config as config class TestSdkToolsConfig(unittest.TestCase): def testInvalidSyntax(self): invalid_json = "# oops\n" ...
""" Tests for the rss_proxy views """ from django.test import TestCase from django.core.urlresolvers import reverse from mock import patch, Mock from rss_proxy.models import WhitelistedRssUrl class RssProxyViewTests(TestCase): """ Tests for the rss_proxy views """ def setUp(self): super(RssProxyViewT...
import gtk import gpodder _ = gpodder.gettext N_ = gpodder.ngettext from gpodder import util from gpodder.gtkui.interface.common import BuilderWidget from gpodder.gtkui.interface.common import Orientation from gpodder.gtkui.frmntl.portrait import FremantleRotation import hildon class gPodderPreferences(BuilderWid...
""" CodeHilite Extension for Python-Markdown ======================================== Adds code/syntax highlighting to standard Python-Markdown code blocks. Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/). Project website: <http://packages.python.org/Markdown/extensions/code_hilite.html> Contact: <EMAIL...
# -*- coding: utf-8 -*- from openerp.osv import osv class account_invoice(osv.Model): _inherit = 'account.invoice' def invoice_validate_send_email(self, cr, uid, ids, context=None): Composer = self.pool['mail.compose.message'] for invoice in self.browse(cr, uid, ids, context=context): ...
data = ( 'Cu ', # 0x00 'Qu ', # 0x01 'Chao ', # 0x02 'Wa ', # 0x03 'Zhu ', # 0x04 'Zhi ', # 0x05 'Mang ', # 0x06 'Ao ', # 0x07 'Bie ', # 0x08 'Tuo ', # 0x09 'Bi ', # 0x0a 'Yuan ', # 0x0b 'Chao ', # 0x0c 'Tuo ', # 0x0d 'Ding ', # 0x0e 'Mi ', # 0x0f 'Nai ', # 0x10 'Ding ...
"""The Finger User Information Protocol (RFC 1288)""" from twisted.protocols import basic import string class Finger(basic.LineReceiver): def lineReceived(self, line): parts = string.split(line) if not parts: parts = [''] if len(parts) == 1: slash_w = 0 els...
"""Date and time functions Refactored from Cufflinks' 'date_tools.py' module. Credits to @jorgesantos. """ import datetime as dt def get_date_from_today(delta, strfmt='%Y%m%d'): """ Returns a string that represents a date n numbers of days from today. Parameters ---------- delta : int ...
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal class GetChainTipsTest (BitcoinTestFramework): def run_test (self): BitcoinTestFramework.run_test (self) tips = self.nodes[0].getchaintips () assert_equal (len (tips), 1) as...
"""TFGAN losses and penalties. Losses can be used with individual arguments or with GANModel tuples. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # Collapse losses into a single namespace. from tensorflow.contrib.gan.python.losses.python import loss...
""" """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('build/all.gyp', chdir='src') test.relocate('src', 'relocate/src') test.build('build/all.gyp', test.ALL, chdir='relocate/src') chdir = 'relocate/src/build' # The top-level Makefile is in the directory where gyp was run. # TODO(mmoss) Should the Makefil...
# -*- coding: utf-8 -*- """ Tablib - YAML Support. """ import sys try: import yaml except ImportError: if sys.version_info[0] > 2: import tablib.packages.yaml3 as yaml else: import tablib.packages.yaml as yaml import tablib title = 'yaml' extentions = ('yaml', 'yml') def export_se...
"""MIME-Type Parser This module provides basic functions for handling mime-types. It can handle matching mime-types against a list of media-ranges. See section 14.1 of the HTTP specification [RFC 2616] for a complete explaination. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 Contents: - par...
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv, fields import openerp.addons.decimal_precision as dp from openerp.tools.translate import _ class ProcurementOrder(osv.Model): _inherit = "procurement.order" def create(self, cr, user, vals, context=None): if contex...
""" This module presents some classes that help with streaming data for inter-component communication. """ import io #To use the standard I/O streams as helper. class BytesStreamReader: """ A stream that wraps around a ``BufferedReader`` instance and allows iterating byte-by-byte. For the rest, the reader behave...
r"""System for specifying garbage collection (GC) of path based data. This framework allows for GC of data specified by path names, for example files on disk. gc.Path objects each represent a single item stored at a path and may be a base directory, /tmp/exports/0/... /tmp/exports/1/... ... or a fully qualified...
import unohelper import traceback from .FaxWizardDialogImpl import FaxWizardDialogImpl, Desktop from com.sun.star.lang import XServiceInfo from com.sun.star.task import XJobExecutor # pythonloader looks for a static g_ImplementationHelper variable g_ImplementationHelper = unohelper.ImplementationHelper() g_implName ...
"""Per job config for map jobs.""" from google.appengine.ext.mapreduce import hooks from google.appengine.ext.mapreduce import input_readers from google.appengine.ext.mapreduce import output_writers from google.appengine.ext.mapreduce import parameters from google.appengine.ext.mapreduce import util from google.appengi...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} from traceback import format_exc from ansible.module_utils.basic import AnsibleModule from ...
"""SCons.Tool.sunf90 Tool-specific initialization for sunf90, the Sun Studio F90 compiler. 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. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is...
from distutils.spawn import find_executable import re import subprocess import sys import tempfile from wptrunner import update as wptupdate from wptrunner.update.tree import Commit, CommitMessage, get_unique_name class HgTree(wptupdate.tree.HgTree): def __init__(self, *args, **kwargs): self.commit_cls =...
import datetime import iso8601 from nova.api.openstack.compute import availability_zone as az_v21 from nova.api.openstack.compute import extension_info from nova.api.openstack.compute import servers as servers_v21 from nova import availability_zones from nova.compute import api as compute_api from nova.compute import...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from avatar.configuration.configurationFactory import ConfigurationFactory from avatar.system impor...
# -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file 'DOChannelTemplate.ui' # # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 e...
"""Test the Data services.""" import uuid import datetime from backends.filesync.data.testing.testdata import get_fake_hash from backends.filesync.data.testing.testcase import StorageDALTestCase from backends.filesync.data.services import ( get_abandoned_uploadjobs, get_node_for_shard, get_user_info_for_s...
import crossovered_analytic # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# -*- coding: utf-8 -*- """Parallelisation function for crt_prf_tcmdl.""" # Part of py_pRF_mapping library # Copyright (C) 2016 Ingo Marquardt # # 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,...
"""Helpers for common ways to work with pokedex queries These include identifier- and name-based lookup, filtering out base forms of pokemon, and filtering/ordering by name. """ from sqlalchemy.orm import aliased from sqlalchemy.sql.expression import func from sqlalchemy.sql.functions import coalesce from sqlalchemy....
import time from openerp.osv import fields, osv class yearly_salary_detail(osv.osv_memory): _name ='yearly.salary.detail' _description = 'Hr Salary Employee By Category Report' _columns = { 'employee_ids': fields.many2many('hr.employee', 'payroll_emp_rel', 'payroll_id', 'employee_id', 'Employees', r...