text
stringlengths
475
200k
from test import test_support import random import sys import unittest try: import java except ImportError: pass verbose = test_support.verbose nerrors = 0 def check(tag, expected, raw, compare=None): global nerrors if verbose: print " checking", tag orig = raw[:] # save input in ca...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import posixpath import sys import unittest from environment_wrappers import CreateUrlFetcher from extensions_paths import ( ...
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, or ntpath - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos' - os.curdir is a string representing the current di...
################################# 1. 宣告原始碼 coding, 導入必要模組 #coding=utf-8 import cherrypy import random # for path setup import os # for mako from mako.lookup import TemplateLookup ################################# 2. 全域變數設定, 近端與遠端目錄設定 cwd = os.getcwd() if 'OPENSHIFT_REPO_DIR' in os.environ.keys(): # 表示程式在雲端執行 ...
""" String field classes: - String: Fixed length string (no prefix/no suffix) ; - CString: String which ends with nul byte ("\0") ; - UnixLine: Unix line of text, string which ends with "\n" ; - PascalString8, PascalString16, PascalString32: String prefixed with length written in a 8, 16, 32-bit integer (use parent e...
"""Store and retrieve wheel signing / verifying keys. Given a scope (a package name, + meaning "all packages", or - meaning "no packages"), return a list of verifying keys that are trusted for that scope. Given a package name, return a list of (scope, key) suggested keys to sign that package (only the verifying key...
""" The access backend object base class """ from collections import defaultdict from passlib.apps import custom_app_context as pwd_context from pyramid.security import (Authenticated, Everyone, effective_principals, Allow, Deny, ALL_PERMISSIONS) from pyramid....
"""Sync contribution/abstract friendly ids Revision ID: 258db7e5a3e5 Revises: 3ca8e62e6c36 Create Date: 2016-04-21 16:56:20.113767 """ import sqlalchemy as sa from alembic import context, op # revision identifiers, used by Alembic. revision = '258db7e5a3e5' down_revision = '3ca8e62e6c36' def _sync_last_contrib_id...
import os.path as op import numpy as np from utils import set_directory import mne from jumeg.decompose.ica_replace_mean_std import ICA, read_ica, apply_ica_replace_mean_std from jumeg.jumeg_preprocessing import get_ics_cardiac, get_ics_ocular from jumeg.jumeg_plot import plot_performance_artifact_rejection # , plot_...
import sys import os from glob import glob from collections import Counter import MeCab def main(): """ """ input_dir = sys.argv[1] tagger = MeCab.Tagger('') tagger.parse('') frequency = Counter() count_processed = 0 for path in glob(os.path.join(input_dir, '*', 'wiki_*')): p...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Creates a zip archive for the Chrome Remote Desktop Host installer. This script builds a zip file that contains all the files n...
import sys sys.path.append("../") from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn import decomposition import jieba import time import glob import sys import os import random if len(sys.argv)<2: print("usage: extract_topic.py di...
# # 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 documentation files (the # "Software"), to deal in the Software without restriction, including # without limitati...
# -*- coding: utf-8 -*- """ *************************************************************************** pct2rgb.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************************...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('books', '0004_goodsinfo'), ] operations = [ migrations.AddField( model_name='bookinfo', name='author...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
from collections import Counter import contextlib import random import subprocess as sp import time from astropy.io import fits import numpy as np import pytest from pyds9 import pyds9 parametrize = pytest.mark.parametrize type_mapping = parametrize('bitpix, dtype ', [(8, np.dtype(np.uint...
#!/usr/bin/env python # # Copyright 2015 clowwindy # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
# Global settings for core project. import os ########## PATH CONFIGURATION PROJECT_DIR = os.path.dirname(os.path.dirname(__file__)) PUBLIC_DIR = os.path.join(PROJECT_DIR, 'public') # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'fabric_bolt.core.wsgi.application' ########...
import json from nltk.tokenize import TreebankWordTokenizer def read_referrence_data(filename): with open(filename, "r") as f: lines = f.readlines() return [l.strip('\n\r') for l in lines] def span_tokenize(text): tokens = TreebankWordTokenizer().tokenize(text) dt = 0 end = 0 ...
# -*- coding: utf-8 -*- """ zang.connectors.carrier_services_connector ~~~~~~~~~~~~~~~~~~~ Module for communication with `Carrier` endpoint """ from zang.connectors.base_connector import BaseConnector from zang.helpers.helpers import flatDict from zang.domain.carrier_lookup import CarrierLookup from zang.domain.list...
import sys from distutils.core import setup from distutils.extension import Extension try: from Cython.Distutils import build_ext except ImportError: sys.stderr.write(""" ================================================== Please install Cython (http://cython.org/), which is required to build tre...
""" Views file for the Darklang Django App """ from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.utils.translation import LANGUAGE_SESSION_KEY from django.utils.translation import ugettext as _ from django.views.generic.base import View from opene...
# Copyright (C) 2013 Rob Boyle / Legit Inc # # 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 3 of the License, or # (at your option) any later version. # # This program is dist...
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi ([EMAIL]), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details on the presubmit API built into depot_tools. """ def Ch...
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct from . i...
from bearlibterminal import terminal from clubsandwich.ui import ( UIScene, SingleLineTextInputView, LabelView, CyclingButtonView, ButtonView, LayoutOptions, WindowView, ) from components.needs import Needs from data.python_templates.classes import character_class_templates from data.python...
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
"""Coreference version of the Winogender dataset. Each instance has two edges, one between the pronoun and the occupation and one between the pronoun and the participant. The pronoun is always span1. There are 120 templates in the Winogender set, 60 coreferent with the occupation, and 60 coreferent with the participa...
# Copyright (c) 2014 Mirantis Inc. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), either version 3 of the ...
""" Steam OpenId backend, docs at: http://psa.matiasaguirre.net/docs/backends/steam.html """ from social.backends.open_id import OpenIdAuth from social.exceptions import AuthFailed USER_INFO = 'http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?' class SteamOpenId(OpenIdAuth): name = 'steam' ...
# # Copyright (C) 1997-2017 JDE Developers Team # # 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 3 of the License, or # (at your option) any later version. # # This program...
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <[EMAIL]>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version ...
#! /usr/bin/env python # encoding: utf-8 import sys if sys.hexversion < 0x020400f0: from sets import Set as set import os,imp,sys,shlex,shutil from Utils import md5 import Build,Utils,Configure,Task,Options,Logs,TaskGen from Constants import* from Configure import conf,conftest cfg_ver={'atleast-version':'>=','exact-ve...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applica...
"""SCons.Tool.cyglink Customization of gnulink for Cygwin (http://www.cygwin.com/) 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. """ from __future__ import absolute_import, print_function import re import os ...
# -*- coding: utf-8 -*- import six from django.conf import settings from django.contrib import messages from django.contrib.messages.api import MessageFailure from django.shortcuts import redirect from django.utils.http import urlquote from social.exceptions import SocialAuthBaseException from social.utils import soc...
"""California housing dataset. The original database is available from StatLib http://lib.stat.cmu.edu/ The data contains 20,640 observations on 9 variables. This dataset contains the average house value as target variable and the following input variables (features): average income, housing average age, averag...
#! /usr/bin/env python # -*- coding: utf-8 -*- """Use finances.gouv.fr web simulator as an API to compute income taxes.""" import argparse import collections import logging import os import sys import urllib2 from lxml import etree app_name = os.path.splitext(os.path.basename(__file__))[0] log = logging.getLogger...
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # Created by Pearu Peterson, August 2002 from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('fftpack',paren...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Este script hace accounting de todos los correos que mueve postfix. # # Con esta información se pretende poder controlar el flujo de mensajes # salientes de postfix. # # # TODO # - Implementar un decorador needs_root que verifique si el usuario que ejecuta # el scri...
from __future__ import unicode_literals from django.core.cache import InvalidCacheBackendError, caches from django.core.cache.utils import make_template_fragment_key from django.template import ( Library, Node, TemplateSyntaxError, VariableDoesNotExist, ) register = Library() class CacheNode(Node): def __in...
# This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
""" This module contains tests for the pulp.server.webservices.views.search module. """ import unittest import mock from django import http from base import assert_auth_READ from pulp.server import exceptions from pulp.server.webservices.views import search class TestSearchView(unittest.TestCase): """ Test ...
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A library to assist automatically downloading files. This library is used by scripts that download tarballs, zipfiles, etc. as...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
import os, string import unittest from test_all import db, dbobj, test_support, get_new_environment_path, \ get_new_database_path #---------------------------------------------------------------------- class dbobjTestCase(unittest.TestCase): """Verify that dbobj.DB and dbobj.DBEnv work properly""" d...
# Copyright (c) 2011-2012 OpenStack, LLC. # All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless ...
# # Copyright (C) 2011,2012 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # This program is distributed in the...
#! /usr/bin/env python # # clean-xliff.py <l10n_folder> # # Remove targets from a locale, remove target-language attribute # from glob import glob from lxml import etree import argparse import os NS = {'x':'urn:oasis:names:tc:xliff:document:1.2'} def indent(elem, level=0): # Prettify XML output # http://eff...
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any la...
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django.db import models from haystack.exceptions import NotHandled class BaseSignalProcessor(object): """ A convenient way to attach Haystack to Django's signals & cause things to index. By de...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ import collections import decimal import sys from io import StringIO import yaml from django.core.serializers.base import DeserializationError from django.core.serializers.python import ( Deserializer as PythonDes...
import os from distutils import log import itertools from setuptools.extern.six.moves import map flatten = itertools.chain.from_iterable class Installer: nspkg_ext = '-nspkg.pth' def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: return filenam...
import fnmatch from conans.errors import ConanException class BuildMode(object): """ build_mode => ["*"] if user wrote "--build" => ["hello*", "bye*"] if user wrote "--build hello --build bye" => ["hello/0.1@foo/bar"] if user wrote "--build hello/0.1@foo/bar" ...
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
""" Unit tests for hxl-proxy dao module David Megginson February 2016 License: Public Domain """ import unittest, os from hxl_proxy import app, dao from . import base class AbstractDAOTest(base.AbstractDBTest): """Abstract base class for DAO tests.""" def setUp(self): super().setUp() def t...
import numpy as np import timeit from concurrent.futures import ThreadPoolExecutor, wait from .common import Benchmark, safe_import with safe_import(): from scipy.signal import (lfilter, firwin, decimate, butter, sosfilt, medfilt2d) class Decimate(Benchmark): param_names = ['q'...
import gc import sys import types import unittest import weakref from test import support class ClearTest(unittest.TestCase): """ Tests for frame.clear(). """ def inner(self, x=5, **kwargs): 1/0 def outer(self, **kwargs): try: self.inner(**kwargs) ...
import os import re from subprocess import ( check_call, check_output, ) ################################################## # loopback device helpers. ################################################## def loopback_devices(): ''' Parse through 'losetup -a' output to determine currently mapped lo...
data = ( 'kax', # 0x00 'ka', # 0x01 'kap', # 0x02 'kuox', # 0x03 'kuo', # 0x04 'kuop', # 0x05 'kot', # 0x06 'kox', # 0x07 'ko', # 0x08 'kop', # 0x09 'ket', # 0x0a 'kex', # 0x0b 'ke', # 0x0c 'kep', # 0x0d 'kut', # 0x0e 'kux', # 0x0f 'ku', # 0x10 'kup', # 0x11 'kurx',...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # Copyright 2016 The Kubernetes Authors. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applic...
import contextlib import os import tempfile import questionary from commitizen import factory, git, out from commitizen.config import BaseConfig from commitizen.cz.exceptions import CzException from commitizen.exceptions import ( CommitError, CustomError, DryRunExit, NoAnswersError, NoCommitBackup...
""" Tests of the encryption and decryption utilities in the ssencrypt module. """ import base64 from lms.djangoapps.verify_student.ssencrypt import ( aes_decrypt, aes_encrypt, decode_and_decrypt, encrypt_and_encode, rsa_decrypt, rsa_encrypt ) AES_KEY_BYTES = b'32fe72aaf2abb44de9e161131b5435c8...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Module containing class to create an ion """ __author__ = "Sai Jayaraman" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.0" __maintainer__ = "Sai Jayaraman" __email__ = "[EMAIL]"...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta from numpy import nan import numpy as np import pandas as pd import pandas._libs.index as _index from pandas.core.dtypes.common import is_integer, is_scalar from pandas import (Index, Series, DataFrame, isnull, ...
""" Tests for the threading module. """ import test.support from test.support import verbose, strip_python_stderr, import_module, cpython_only from test.script_helper import assert_python_ok import random import re import sys _thread = import_module('_thread') threading = import_module('threading') import time import...
import sys from scipy.stats.stats import pearsonr import matplotlib from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import matplotlib.mlab as mlab def main(f): fh = open(f, 'r') zic1_expression = [] other_expression = {} for line in fh:...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for Chromium UI resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the pr...
# -*- coding: utf-8 -*- """ jinja2.testsuite ~~~~~~~~~~~~~~~~ All the unittests of Jinja2. These tests can be executed by either running run-tests.py using multiple Python versions at the same time. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ i...
# Copyright 2011 Canonical Ltd. # # This file is part of u1db. # # u1db is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # u1db is distributed in the hope that it will be useful, # but WITHOU...
""" Convert use of sys.exitfunc to use the atexit module. """ # Author: Benjamin Peterson from lib2to3 import pytree, fixer_base from lib2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms class FixExitfunc(fixer_base.BaseFix): keep_line_order = True BM_compatible = True PATTERN = """ ...
# Copyright (c) 2017 Citrix Systems # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # ...
#!/usr/bin/env python # encoding: utf-8 """ process.py Copyright (c) 2011 Adam Cohen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
## Copyright (C) 2017 ThornCreek Church ## ## 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 3 of the License, or ## (at your option) any later version. ## ## This program...
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
from django.conf import settings from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker class GoogleMapException(Exception): pass # The default Google Maps URL (for the API javascript) # T...
#@PydevCodeAnalysisIgnore """create and manipulate C data types in Python""" import os as _os, sys as _sys from itertools import chain as _chain # special developer support to use ctypes from the CVS sandbox, # without installing it # XXX Remove this for the python core version _magicfile = _os.path.join(_os.path.dir...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # IkaLog # ====== # Copyright (C) 2015 Takeshi HASEGAWA # # Licensed 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.org/l...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Implementation of "INVENTORY VALUATION TESTS (With valuation layers)" spreadsheet. """ from odoo.tests import Form, tagged from odoo.addons.stock_account.tests.test_stockvaluationlayer import TestStockValuationCommo...
from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks from autobahn.wamp.types import PublishOptions, SubscribeOptions from autobahn.twisted.wamp import ApplicationSession from autobahn.twisted.wamp import ApplicationRunner from autobahn.twisted.util import sleep class MyComponent(A...
# -*- coding: utf-8 -*- # # Copyright (C) 2009 Rene Liebscher # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your option) any # later version....
from django.db.backends import BaseDatabaseIntrospection import cx_Oracle import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_re...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, [EMAIL] # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ Test f...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
from django.conf.urls import url from haystack.views import search_view_factory from oscar.core.application import Application from oscar.core.loading import get_class from oscar.apps.search import facets class SearchApplication(Application): name = 'search' search_view = get_class('search.views', 'FacetedSe...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed 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.org/licenses/LICENSE-2.0 # # Unless required by applica...
import os, sys from soup.utils.pluginloader import PluginLoader class EnvironmentWrapper(object): @classmethod def enabled(cls, opts): return True def prepare_environment(self): """ Modify the environment that the tests are running in """ pass def decorate_test(self, test):...
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import pytest from ansible.modules import pip pytestmark = pytest.mark.usefixtures('p...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013, 2016 CERN. ## ## Invenio 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 of the ## License, or (at your opt...
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine ([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, e...