content
string
"""Test functions for the sparse.linalg.interface module """ from __future__ import division, print_function, absolute_import from functools import partial from itertools import product import operator import nose from numpy.testing import TestCase, assert_, assert_equal, \ assert_raises import numpy as np ...
from framer import template from framer.util import cstring, unindent T_SHORT = "T_SHORT" T_INT = "T_INT" T_LONG = "T_LONG" T_FLOAT = "T_FLOAT" T_DOUBLE = "T_DOUBLE" T_STRING = "T_STRING" T_OBJECT = "T_OBJECT" T_CHAR = "T_CHAR" T_BYTE = "T_BYTE" T_UBYTE = "T_UBYTE" T_UINT = "T_UINT" T_ULONG = "T_ULONG" T_STRING_INPLAC...
import testtools from tempest.common import custom_matchers from tempest.common import waiters from tempest import config from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions from tempest.scenario import manager from tempest import test CONF = config.CO...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from textwrap import dedent from pants.util.contextutil import temporary_dir class ResolveJarsTestMixin(object): """Mixin for evaluating tasks which res...
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
"""Pseudo terminal utilities.""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. from select import select import os import tty __all__ = ["openpty","fork","spaw...
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 = 'textbox16.xlsx' ...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
"""Support for Verisure alarm control panels.""" import logging from time import sleep import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, ) from homeassistant.const import ( STATE_ALAR...
import stock_picking # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
""" Are incorporated the primitive datatypes defined by XML. Array is defined for the use of array of elements and his respective datatype. """ import inspect from tornadows import complextypes def createElementXML(name,type,prefix='xsd'): """ Function used for the creation of xml elements. """ return b'<%s:elem...
from openerp import SUPERUSER_ID from openerp.osv import osv, fields from openerp.tools import html2plaintext class note_stage(osv.osv): """ Category of Note """ _name = "note.stage" _description = "Note Stage" _columns = { 'name': fields.char('Stage Name', translate=True, required=True), ...
from __future__ import absolute_import from kombu.transport.virtual.scheduling import FairCycle from kombu.tests.case import Case class MyEmpty(Exception): pass def consume(fun, n): r = [] for i in range(n): r.append(fun()) return r class test_FairCycle(Case): def test_cycle(self): ...
""" Views for serving static textbooks. """ from django.contrib.auth.decorators import login_required from django.http import Http404 from edxmako.shortcuts import render_to_response from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.annotator_token import retrieve_token from courseware.acces...
# Source Generated with Decompyle++ # File: defSections.pyc (Python 2.7) from __future__ import division import xc_base import geom import xc from materials.ehe import EHE_materials areaFi8 = 5e-05 areaFi10 = 7.85e-05 areaFi12 = 0.000113 areaFi16 = 0.000201 areaFi20 = 0.000314 areaFi25 = 0.0004608 def getDiagIntSecti...
from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__", "__license__", "__copyright__", ] __title__ = "packaging" __summary__ = "Core utilities for Python packages" __uri__ = "https://github.com/pypa/packagin...
""" A base class is created. Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ import os import pdb from xml.parsers.expat import ExpatError from generated import compound class Base(object): class Duplicate(StandardError): ...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from io import StringIO from ansible.compat.tests import mock from ansible.compat.tests import unittest from ansible.errors import AnsibleError from ansible.playbook.play_context import PlayContext from ansible.plugins.connection...
import argparse import json import sys import boto3 from common import AV_STATUS_METADATA, LAMBDA_ENDPOINT from common import AV_TIMESTAMP_METADATA from common import S3_ENDPOINT # Get all objects in an S3 bucket that have not been previously scanned def get_objects(s3_client, s3_bucket_name): s3_object_list =...
import logging import random from pyleus.storm import Spout log = logging.getLogger('counter') LINES = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pharetra ante eget nunc blandit vestibulum. Curabitur tempus mi a risus lacinia egestas. Nulla faucibus elit vitae dignissim euismod. Fusce ac ...
import unittest from django.template.smartif import IfParser, Literal class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other test...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Qt widget integrating Tegaki/Tomoe handwriting character recognition for Japanese Kanji and Chinese Hanzi. Includes a QApplication demonstrating the wiget. 10.02.2009 Christoph Burgmer (<EMAIL>) History: * 11.02.2009, show boundaries and keep handwriting within them,...
from Namcap.tests.pkgbuild_test import PkgbuildTest import Namcap.rules.invalidstartdir as module class NamcapInvalidStartdirTest(PkgbuildTest): pkgbuild1 = """ # Contributor: Arch Linux <<EMAIL>> pkgname=mypackage pkgver=1.0 pkgrel=1 pkgdesc="This program does foobar" arch=('i686' 'x86_64') url="http://www.example....
""" Unsupervised evaluation metrics. """ # Authors: Robert Layton <<EMAIL>> # # License: BSD 3 clause import numpy as np from ...utils import check_random_state from ..pairwise import pairwise_distances def silhouette_score(X, labels, metric='euclidean', sample_size=None, random_state=None, **...
import argparse import keras import tensorflow as tf from keras.datasets import fashion_mnist from tensorflow.keras.layers import Dense, Flatten, Conv2D, Dense, Dropout, Activation, MaxPooling2D from tensorflow.keras.models import Sequential from tensorflow.keras import optimizers from polyaxon import tracking from ...
""" ====================== SVM with custom kernel ====================== Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface and the support vectors. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import svm, datasets # import some data...
"""cryptomath module This module has basic math/crypto code.""" import os import math import base64 import binascii import sha from compat import * # ************************************************************************** # Load Optional Modules # ****************************************************************...
from generate_utils import * # ---------------------------------------------------------------- def make_gr_fir_sysconfig_h (): out = open_and_log_name ('gr_fir_sysconfig.h', 'w') if not out: return out.write (copyright) out.write ( ''' /* * WARNING: This file is automatically generated by...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from django.contrib.auth.mixins import LoginRequiredMixin from .models import User class UserDetailView(Login...
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name'), 'state': osv.fie...
""" This is a Metropolis Adjusted Langevin Algorithm (MALA) proposal. Author: Ilias Bilionis """ __all__ = ['MALAProposal'] import numpy as np from scipy.stats import norm from . import GradProposal from . import SingleParameterTunableProposalConcept class MALAProposal(GradProposal, SingleParameterTunablePro...
import logging import unittest # Don't use unittest2 here as the autoinstaller may not have it yet. import sys from StringIO import StringIO class OutputCapture(object): # By default we capture the output to a stream. Other modules may override # this function in order to do things like pass through the outp...
""" Unit tests for the SSE backend. """ from __future__ import unicode_literals, absolute_import import json import unittest import mock from fmn.consumer.backends import SSEBackend @mock.patch('fmn.consumer.backends.sse.protocol.ClientCreator', mock.Mock()) class TestSSEBackend(unittest.TestCase): def test_f...
import copy import operator from functools import total_ordering, wraps from django.utils import six from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools.partial (on # CPython) is a type a...
"""engine.SCons.Tool.cvf Tool-specific initialization for the Compaq Visual Fortran compiler. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentatio...
"""Command-line tools for the git hooks.""" from __future__ import absolute_import, print_function import os import sys import click from ..hooks import run HOOKS = { "pre-commit", "prepare-commit-msg", "post-commit", } HOOK_PATH = os.path.join(".git", "hooks") @click.group() def githooks(): """I...
from openerp.osv import fields from openerp.osv import osv from openerp.tools.translate import _ class account_analytic_line(osv.osv): _inherit = 'account.analytic.line' _description = 'Analytic Line' _columns = { 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'), 'product...
#import sys, traceback import mal_readline import mal_types as types from mal_types import (MalSym, MalInt, MalStr, _keywordu, MalList, _list, MalVector, MalHashMap, MalFunc) import reader, printer # read def READ(str): return reader.read_str(str) # eval def eval_ast(...
''' Clipboard Pygame: an implementation of the Clipboard using pygame.scrap. ''' __all__ = ('ClipboardPygame', ) from kivy.utils import platform from kivy.compat import PY2 from kivy.core.clipboard import ClipboardBase if platform not in ('win', 'linux', 'macosx'): raise SystemError('unsupported platform for pyg...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import get_exception try: import pan.xapi from pan.xapi import PanXapiError impor...
""" Test VCCLCompilerTool EnableEnhancedInstructionSet setting. """ import TestGyp import os import sys if sys.platform == 'win32': test = TestGyp.TestGyp() CHDIR = 'compiler-flags' test.run_gyp('enable-enhanced-instruction-set.gyp', chdir=CHDIR) test.build('enable-enhanced-instruction-set.gyp', test.ALL, ...
#!/usr/bin/env python3 import argparse import pandas import os import json import re import numpy as np from scipy import stats from babyai import plotting as bp parser = argparse.ArgumentParser("Analyze performance of imitation learning") parser.add_argument("--path", default='.', help="path to model logs") par...
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : Versioning plugin for DB Manager Description : Set up versioning support for a table Date : Mar 12, 2012 copyright : (C) 2012 by Giuseppe Sucameli email ...
# *-* coding: UTF-8 *-* # standard library imports import logging import re import traceback import sys # related third party imports import webapp2 from google.appengine.api.users import NotAllowedError from webapp2_extras import jinja2 from webapp2_extras import auth from webapp2_extras import sessions from google.a...
from datetime import timedelta import airflow from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.python_operator import PythonOperator dag = DAG("example_passing_params_via_test_command", default_args={"owner": "airflow", "start_da...
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # # Program Parameters # import os import...
ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.0'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.ce import get_nc_config, set_nc_config from ansible.module_utils.ce import execute_nc_action, ce_argu...
__author__ = '' __docformat__ = 'plaintext' """Definition of the SRModuleConfig content type. See srmoduleconfig.py for more explanation on the statements below. """ from AccessControl import ClassSecurityInfo from elan.sitrep import DocpoolMessageFactory as _ from plone.autoform import directives from plone.dexterity...
data = ( 'Chey ', # 0x00 'Thak ', # 0x01 'Thak ', # 0x02 'Thang ', # 0x03 'Thayk ', # 0x04 'Thong ', # 0x05 'Pho ', # 0x06 'Phok ', # 0x07 'Hang ', # 0x08 'Hang ', # 0x09 'Hyen ', # 0x0a 'Hwak ', # 0x0b 'Wu ', # 0x0c 'Huo ', # 0x0d '[?] ', # 0x0e '[?] ', # 0x0f 'Zhong ', ...
import crm_claim import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# -*- coding: utf-8 -*- import StringIO import sys import time from nose import tools from docker_registry.core import exceptions import docker_registry.testing as testing from docker_registry.testing import mock_boto # noqa from . import mock_s3 # noqa class StringIOWithError(StringIO.StringIO): '''Throw...
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <<EMAIL>> and contributors. 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...
from .compat import callable, cmp, reduce, \ threading, py3k, py33, py36, py2k, jython, pypy, cpython, win32, \ pickle, dottedgetter, parse_qsl, namedtuple, next, reraise, \ raise_from_cause, text_type, safe_kwarg, string_types, int_types, \ binary_type, nested, \ quote_plus, with_metaclass, print_...
"""Backport of importlib.import_module from 3.x.""" # While not critical (and in no way guaranteed!), it would be nice to keep this # code compatible with Python 2.3. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex...
"""Classes to generate plain text from a message object tree.""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future.builtins import super from future.builtins import str __all__ = ['Generator', 'DecodedGenerat...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import getpass import locale import os import signal import sys from ansible.compat.six import string_types from ansible.executor.task_queue_manager import TaskQueueManager from ansible.playbook import Playbook from ansible.templ...
import logging from django import shortcuts from django.contrib import messages from django.core import validators from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import api from horizon import exceptions from horizon import forms LOG = logging.getLo...
import abc import collections from keystone.common import provider_api from keystone import exception AuthHandlerResponse = collections.namedtuple( 'AuthHandlerResponse', 'status, response_body, response_data') class AuthMethodHandler(provider_api.ProviderAPIMixin, object, metaclass=abc...
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) if HAS_GEOS: from .mode...
import Queue import threading import time import serial class ComMonitorThread(threading.Thread): """ A thread for monitoring a COM port. The COM port is opened when the thread is started. data_q: Queue for received data. Items in the queue are (data, ti...
import gdb class sd_dump_hashmaps(gdb.Command): "dump systemd's hashmaps" def __init__(self): super(sd_dump_hashmaps, self).__init__("sd_dump_hashmaps", gdb.COMMAND_DATA, gdb.COMPLETE_NONE) def invoke(self, arg, from_tty): d = gdb.parse_and_eval("hashmap_debug_...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class BitbucketOAuth2Account(ProviderAccount): def get_profile_url(self): return (self.account.extra_data .get('links', {}) .get('html...
import commands from lettuce.fs import FileSystem from nose.tools import assert_equals from tests.util import run_scenario current_directory = FileSystem.dirname(__file__) @FileSystem.in_directory(current_directory, 'django', 'brocolis') def test_harvest_with_debug_mode_enabled(): 'python manage.py harvest -d tu...
from subprocess import call import os import json BUILDER_PATH = os.path.dirname(os.path.abspath(__file__)) ROOT_PATH = os.path.join(BUILDER_PATH, '..') FONTS_FOLDER_PATH = os.path.join(ROOT_PATH, 'fonts') CSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'css') SCSS_FOLDER_PATH = os.path.join(ROOT_PATH, 'scss') LESS_FOLDER_...
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
import os from pycryptsetup import CryptSetup import iutil from ..errors import * import gettext _ = lambda x: gettext.ldgettext("anaconda", x) # Keep the character set size a power of two to make sure all characters are # equally likely GENERATED_PASSPHRASE_CHARSET = ("0123456789" "A...
import copy import default_flavor """iOS flavor utils, used for building for and running tests on iOS.""" class iOSFlavorUtils(default_flavor.DefaultFlavorUtils): def __init__(self, skia_api): super(iOSFlavorUtils, self).__init__(skia_api) self.ios_bin = self._skia_api.m.path['slave_build'].join( ...
from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/engine.h> """ TYPES = """ static const long Cryptography_HAS_ENGINE_CRYPTODEV; typedef ... ENGINE; typedef ... RSA_METHOD; typedef ... DSA_METHOD; typedef ... DH_METHOD; typedef struct { int (*bytes)(u...
import unittest from textwrap import dedent from unittest.mock import patch, Mock from blivet.size import Size from pyanaconda.core.constants import GROUP_PACKAGE_TYPES_REQUIRED, GROUP_PACKAGE_TYPES_ALL from pyanaconda.modules.common.constants.objects import DEVICE_TREE from pyanaconda.modules.common.constants.servic...
import mock import unittest from pcp_pidstat import ProcessStackUtil class TestProcessStackUtil(unittest.TestCase): def setUp(self): self.__metric_repository = mock.Mock() self.__metric_repository.current_value = mock.Mock(side_effect=self.metric_repo_current_value_side_effect) def metric_repo...
"""Command line tool for forwarding ports from a device to the host. Allows an Android device to connect to services running on the host machine, i.e., "adb forward" in reverse. Requires |host_forwarder| and |device_forwarder| to be built. """ import optparse import sys import time from pylib import android_commands...
"""Verifies that Google Test warns the user when not initialized properly.""" __author__ = '<EMAIL> (Zhanyong Wan)' import gtest_test_utils COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_uninitialized_test_') def Assert(condition): if not condition: raise AssertionError def AssertEq(expected, act...
from bongo.apps.bongo.tests import factories from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from django.utils.text import slugify import os """ Test content type models and related: test, video, PDF, photo, HTML, pullquote, post """ class TextTestCase(Te...
import argparse import optparse from typ.host import Host class _Bailout(Exception): pass DEFAULT_COVERAGE_OMIT = ['*/typ/*', '*/site-packages/*'] DEFAULT_STATUS_FORMAT = '[%f/%t] ' DEFAULT_SUFFIXES = ['*_test.py', '*_unittest.py'] class ArgumentParser(argparse.ArgumentParser): @staticmethod def add...
from __future__ import unicode_literals import frappe, os from frappe import _ from frappe.utils import cint, today, formatdate import frappe.defaults from frappe.model.document import Document from frappe.contacts.address_and_contact import load_address_and_contact class Company(Document): def onload(self): ...
import macpath from test import test_support, test_genericpath import unittest class MacPathTestCase(unittest.TestCase): def test_abspath(self): self.assertEqual(macpath.abspath("xx:yy"), "xx:yy") def test_isabs(self): isabs = macpath.isabs self.assertTrue(isabs("xx:yy")) sel...
#!/usr/bin/env python3 """ ############################# Server applycation version python: python3 based on socket ############################# """ import select import socket import sys import datetime from PyQt5 import QtWidgets from PyQt5.QtCore import QThread, QPoint import userf...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.iosxr import iosxr_user from units.modules.utils import set_module_args from .iosxr_module import TestIosxrModule, load_fixture class TestIosxrUserModule(TestIosxrM...
# NOTE: contains only one test, _est_cont_fit, that is renamed so that # nose doesn't run it # I put this here for the record and for the case when someone wants to # verify the quality of fit # with current parameters: relatively small sample size, default starting values # Ran 84 tests in 401.797s # ...
microcode = ''' def macroop PUNPCKLBW_MMX_MMX { unpack mmx, mmx, mmxm, ext=0, size=1 }; def macroop PUNPCKLBW_MMX_M { ldfp ufp1, seg, sib, disp, dataSize=8 unpack mmx, mmx, ufp1, ext=0, size=1 }; def macroop PUNPCKLBW_MMX_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 unpack mmx, mmx, uf...
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test compare_rendered_pictures.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1....
'''Pulsar HTTP test application:: python manage.py Implementation ====================== .. autoclass:: HttpBin :members: :member-order: bysource Server Hooks =================== This example shows how to use :ref:`server hooks <setting-section-application-hooks>` to log each request .. automodule:: exa...
"""Test lldb reloads the inferior after it was changed during the session.""" import os, time import unittest2 import lldb from lldbtest import * import lldbutil class ChangedInferiorTestCase(TestBase): mydir = os.path.join("functionalities", "inferior-changed") @unittest2.skipUnless(sys.platform.startswith...
from __future__ import absolute_import import inspect from django.utils import six def getargspec(func): if six.PY2: return inspect.getargspec(func) sig = inspect.signature(func) args = [ p.name for p in sig.parameters.values() if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWOR...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, urlencode_postdata, xpath_element, xpath_text, urljoin, update_url_query, ) class Laola1TvEmbedIE(InfoExtractor): IE_NAME = 'laola1tv:embed'...
"""Configuration and utilities for receiving inputs at serving time.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import os import time import six from tensorflow.python.framework import dtypes from tensorflow.python.framework im...
"""Availability zone helper functions.""" from oslo.config import cfg from nova import db from nova.openstack.common import log as logging availability_zone_opts = [ cfg.StrOpt('internal_service_availability_zone', default='internal', help='availability_zone to show internal service...
#!/usr/bin/env python # example basictreeview.py import pygtk pygtk.require('2.0') import gtk import os import dialogs class SnaphuConfigEditor: def snaphuParser(self, set=None, setFile=None): if setFile is None: setFile=self.setFile; if set is None: set=self.set; ...
"""Text class.""" import re import fnmatch import atomac.Clipboard as Clipboard from utils import Utils from keypress_actions import KeyComboAction, KeyPressAction, KeyReleaseAction from server_exception import LdtpServerException class Text(Utils): def generatekeyevent(self, data): """ Generates...
import aiohttp from registrar import AbstractCommand, bot_command @bot_command class Command(AbstractCommand): """ Template for bot command classes. """ _name = 'changepic' _aliases = ['changepic'] _enabled = True tags = {'misc': ['private'], 'args': {'req': ['pic'], 'nreq': []}} @staticmeth...
from spack import * class Gflags(CMakePackage): """The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used. Online documentation ...
from functools import partial from girder.models.model_base import ModelImporter from girder.exceptions import GirderException _allowedSearchMode = {} def getSearchModeHandler(mode): """ Get the handler function for a search mode :param mode: A search mode identifier. :type mode: str :returns: ...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import determine_ext class OnionStudiosIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?onionstudios\.com/(?:videos/[^/]+-|embed\?.*\bid=)(?P<id>\d+)(?!-)' _TESTS = [{ 'url': 'http:/...
# stdlib import unittest # project from aggregator import Histogram, MetricsAggregator from config import get_histogram_aggregates, get_histogram_percentiles class TestHistogram(unittest.TestCase): def test_default(self): stats = MetricsAggregator('myhost') for i in xrange(20): stats....
import logging import os from flask import Flask, json, render_template from flask_ask import Ask, request, session, question, statement app = Flask(__name__) ask = Ask(app, "/") logging.getLogger('flask_ask').setLevel(logging.DEBUG) COLOR_KEY = "COLOR" @ask.launch def launch(): card_title = render_template(...
""" Implementation of Harwell-Boeing read/write. At the moment not the full Harwell-Boeing format is supported. Supported features are: - assembled, non-symmetric, real matrices - integer for pointer/indices - exponential format for float values, and int format """ from __future__ import division, print_...
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() __title__ = 'logical-downlinks' __version__ = '0.0.1' __copyright__ = '(C) Copyright (2012-2016) H...
__author__ = "eloraiby" __date__ = "$5-Sep-2010 9:35:29 PM$" atomic_types = ["unsigned char", "unsigned short", "unsigned int", "signed char", "signed short", "signed int", "float", "double"] glsl_vector_types = ["tvec2", "tvec3", "tvec4"] glsl_matrix_types = ["tmat2x2", "tmat2x3", "tmat2x4", "tm...
import io import os import setuptools # Package metadata. name = "google-cloud-speech" description = "Google Cloud Speech API client library" version = "2.5.0" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' # 'Development Status :: 5 - Production/Stable' release_status = ...