gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
'''A Context Free Grammar class along with peripheral classes, data structures, and algorithms.''' import itertools import cgi from util.tree import Tree from util.mixin import Comparable, Keyed, Subscripted, Primed class Symbol(Comparable, Keyed): '''A base class for symbols which appear in a grammar. Terminal ...
# Copyright 2005 Divmod, Inc. See LICENSE file for details import os import sys import struct import getpass from twisted.protocols.amp import AMP from vertex import q2q, sigma from twisted.python.usage import Options from twisted.python import log from twisted.python.failure import Failure from twisted.internet i...
# 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...
import unittest from winnow.utils import json_dumps, json_loads import winnow from winnow.models.base import WinnowVersion from winnow.utils import deep_copy_dict as deepcopy from winnow.exceptions import OptionsExceptionFailedValidation from decimal import Decimal from db import MockKVStore BASE_PRODUCT = {u"na...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014, Blue Box Group, Inc. # Copyright (c) 2014, Craig Tracey <[email protected]> # # 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...
# -*- coding: utf-8 -*- import abc from nose.tools import * # noqa: import re import pytest from api.base.settings.defaults import API_BASE from tests.base import ApiAddonTestCase from osf_tests.factories import AuthUserFactory from addons.bitbucket.tests.factories import BitbucketAccountFactory from addons.box.tes...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("account", "0001_initial"), ) def forwards(self, orm): # Adding model 'Ta...
# # Copyright 2015 Hewlett Packard Development Company, LP # Copyright 2015 Universidade Federal de Campina Grande # # 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://...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
<<<<<<< HEAD <<<<<<< HEAD """Synchronization primitives.""" __all__ = ['Lock', 'Event', 'Condition', 'Semaphore', 'BoundedSemaphore'] import collections from . import events from . import futures from .coroutines import coroutine class _ContextManager: """Context manager. This enables the following idiom ...
#!/usr/bin/env python # chapparse.py import sys, re, getopt, os from string import Template name = 'chapparse.py' version = '0.4' rat = re.compile('(\d+)(?:/|:)(\d+)') chapre = re.compile("CHAPTER\d+=(\S+)",re.I) x264 = 'x264-64' ffmpeg = 'ffmpeg' mkvmerge = 'mkvmerge' avs2yuv = 'avs2yuv' timeCodes = frameNumbers = me...
# 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. import time import json import StringIO from perf_tools import smoothness_metrics from telemetry.page import page_measurement #TODO(ernstm,etc): remove...
#!/usr/bin/env python2 """Execute the tests for the seqan_tcoffee program. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the directory that contains the 'projects' directory. ...
#!/usr/bin/python # # Copyright 2011 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 b...
from __future__ import division from __future__ import unicode_literals import math import logging import progressbar from pymongo.errors import DuplicateKeyError from modularodm import Q from modularodm.storage.base import KeyExistsException from framework.mongo import database from framework.analytics import clea...
import time, datetime import hmac, hashlib import urllib, urllib2, socket import json """SERPmetrics Python-SDK""" class SMapi(object): VERSION = 'v0.0.2' api_url = 'http://api.serpmetrics.com' user_agent = 'SERPmetrics Python Library' retries = 3 _http_status = None _credentials = {'key':Non...
# encoding: utf-8 """ exabgp.py Created by Thomas Mangin on 2009-08-30. Copyright (c) 2009 Exa Networks. All rights reserved. """ import os import sys import time import signal import select from bagpipe.exabgp.network.peer import Peer from bagpipe.exabgp.version import version from bagpipe.exabgp.daemon import Dae...
import sys import time import socket import warnings from celery import conf from celery import log from celery import platform from celery.datastructures import ExceptionInfo from celery.execute.trace import TaskTrace from celery.loaders import current_loader from celery.registry import tasks from celery.utils import...
""" Newlove extension for clans. Supports filtering for new planlove and ordering planlove by time. """ import json from datetime import datetime import os.path import sys import io from clans.util import json_output, ISO8601_UTC_FMT if sys.version_info < (3,): str = unicode # extension globals lovelog = None...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# Lint as: python3 # 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 ...
#!/usr/bin/env python """sorno_cloud_vision.py makes using the Google Cloud Vision API easier. Doc: https://cloud.google.com/vision/docs The script generates requests for the given photos, sends the requests to Cloud Vision, then puts the results into the corresponding response files. Copyright 2016 Heung Ming T...
""" Export neuroimaging results created with feat in FSL following NIDM-Results specification. @author: Camille Maumet <[email protected]> @copyright: University of Warwick 2013-2014 """ import re import os import sys import glob import json import numpy as np import subprocess import warnings # If "nidmres...
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis...
from __future__ import unicode_literals from __future__ import print_function from .compat import text_type, implements_to_string from .tools import textual_list class ArchiveError(Exception): """Error occurred with an archive operation""" class LogicError(Exception): hide_py_traceback = True error_typ...
""" Lightweight connection pooling for peewee. In a multi-threaded application, up to `max_connections` will be opened. Each thread (or, if using gevent, greenlet) will have it's own connection. In a single-threaded application, only one connection will be created. It will be continually recycled until either it exce...
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
''' Created on May 2014 @author: Mirna Lerotic, 2nd Look Consulting http://www.2ndlookconsulting.com/ ''' from __future__ import division import string import numpy as np import h5py import xml.etree.ElementTree as ET from file_util import call_function_with_retry class scan: def __init__(self): self.scan_n...
# # 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 writing, software # distributed under...
# -*- coding=utf-8 -*- from selenium.webdriver import Firefox, Chrome, FirefoxProfile from selenium.webdriver.chrome.options import Options as ChromeOptions from selenium.webdriver.support.ui import Select from selenium.webdriver.support.events import (EventFiringWebDriver, ...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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 applicable...
# ------------------------------------------------------------------------------ # Name: plot_cg_ppi_example.py # Purpose: show a few examples on how to use wradlib.vis.plot_cg_ppi # # Author: Kai Muehlbauer # # Created: 25.02.2014 # Copyright: (c) Kai Muehlbauer 2014 # Licence: The MIT Licens...
# Copyright 2011 Justin Santa Barbara # 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 requ...
import time from struct import pack from electrum import ecc from electrum.i18n import _ from electrum.util import UserCancelled, UserFacingException from electrum.keystore import bip39_normalize_passphrase from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path from electrum.logging i...
#!/router/bin/python from .stl_general_test import CStlGeneral_Test, CTRexScenario from trex_stl_lib.api import * import os, sys import glob from nose.tools import nottest def get_error_in_percentage (golden, value): if (golden==0): return(0.0); return abs(golden - value) / float(golden) def get_stl_p...
#The MIT License (MIT) #Copyright (c) 2015-2016 mh4x0f P0cL4bs Team #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 to #use, copy, mo...
#!/usr/bin/env python # # Copyright 2011 Google Inc. All Rights Reserved. # Using opensource naming conventions, pylint: disable=g-bad-name import unittest from google.appengine.ext import db from mapreduce import control from mapreduce import input_readers from mapreduce import model from mapreduce import outpu...
# # epydoc.html: HTML colorizers # Edward Loper # # Created [10/16/02 09:49 PM] # $Id: html_colorize.py 1477 2007-02-13 20:27:31Z edloper $ # """ Functions to produce colorized HTML code for various objects. Currently, C{html_colorize} defines functions to colorize Python source code. """ __docformat__ = 'epytext en' ...
import tensorflow as tf import numpy as np from neupy.utils import tensorflow_session from neupy.core.properties import BoundedProperty, ProperFractionProperty from .base import BaseOptimizer __all__ = ('RPROP', 'IRPROPPlus') class RPROP(BaseOptimizer): """ Resilient backpropagation (RPROP) is an optimizat...
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # 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 # #...
import pafy import datetime import os class Stream_Generator(): def __init__(self, url, start_time, end_time, format_type, chosen_format, top_dir): self.url = url self.start_time = start_time self.end_time = end_time self.start_time_set = False self.end_time...
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for cros_portage_upgrade.py.""" import exceptions import mox from chromite.lib import cros_test_lib from chromite....
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from onnx import checker, helper, ModelProto, TensorProto, GraphProto, NodeProto from typing import Sequence, Text, Tuple, List, Callable from onnx import numpy_helper i...
# Copyright 2020 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
"""Previous versions of message store models.""" from calendar import timegm from datetime import datetime from vumi.message import ( TransportUserMessage, TransportEvent, format_vumi_date, parse_vumi_date) from vumi.persist.model import Model from vumi.persist.fields import ( VumiMessage, ForeignKey, ListOf,...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division import collections from sc2reader.events import * from sc2reader.engine.events import InitGameEvent, EndGameEvent, PluginExit class GameEngine(object): """ GameEngine Specification -----------------...
"""Frigate HTTP views.""" from __future__ import annotations import asyncio from http import HTTPStatus from ipaddress import ip_address import logging from typing import Any, Optional, cast import aiohttp from aiohttp import hdrs, web from aiohttp.web_exceptions import HTTPBadGateway, HTTPUnauthorized import jwt fro...
# # Copyright (c) 2011 Daniel Truemper [email protected] # # test_frontier.py 27-Jan-2011 # # 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....
from ConfigParser import SafeConfigParser, NoSectionError, NoOptionError import logging import os from os import path import re from megdc.util.paths import gpg logger = logging.getLogger('ceph_deploy.conf') cd_conf_template = """ # # ceph-deploy configuration file # [ceph-deploy-global] # Overrides for some of cep...
# Authors: Lars Buitinck # Dan Blanchard <[email protected]> # License: BSD 3 clause from array import array from collections.abc import Mapping, Iterable from operator import itemgetter from numbers import Number import numpy as np import scipy.sparse as sp from ..base import BaseEstimator, TransformerMix...
import os import sys import threading from . import process from . import reduction __all__ = [] # things are copied from here to __init__.py # # Exceptions # class ProcessError(Exception): pass class BufferTooShort(ProcessError): pass class TimeoutError(ProcessError): pass class Authentic...
# -*- coding: utf-8 -*- import numpy as np import cantera as ct import pandas as pd import re import warnings import copy ################################### # 1a. system setup ################################### def get_initial_mole_fractions(stoich_ratio, fuel_mole_ratios, ...
# -*- coding: utf-8 -*- import mock from zerver.lib.actions import do_create_realm, do_create_user, \ check_add_realm_emoji from zerver.lib.test_classes import ZulipTestCase from zerver.lib.test_helpers import get_test_image_file from zerver.models import Realm, RealmEmoji, UserProfile, get_realm class RealmEmoj...
# 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...
import requests as _requests from goldsberry._apiFunc import * class anthro: def __init__(self, season='2014', league='NBA'): self._url = "http://stats.nba.com/stats/draftcombineplayeranthro?" self._api_param = {'LeagueID':_nbaLeague(league), 'SeasonYear':_nbaSeason(seaso...
""" Copyright (c) 2014-2018 Alex Forencich 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 to use, copy, modify, merge, publish, distr...
"""IDLE Configuration Dialog: support user customization of IDLE by GUI Customize font faces, sizes, and colorization attributes. Set indentation defaults. Customize keybindings. Colorization and keybindings can be saved as user defined sets. Select startup options including shell/editor and default window size. ...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
# 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 logging import subprocess from telemetry.core import exceptions from telemetry.internal.platform import android_platform_backend as \ android_platf...
""" Importer from EMSA file format """ # Standard library modules. import datetime # Third party modules. import numpy as np # Local modules. from pyhmsa.fileformat.importer.importer import _Importer, _ImporterThread from pyhmsa.fileformat.common.emsa import calculate_checksum from pyhmsa.datafile import DataFile f...
# Copyright 2011 OpenStack Foundation. # 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 req...
import logging import os from adles.interfaces import Interface from adles.utils import get_vlan, pad, read_json from adles.vsphere import Vsphere from adles.vsphere.folder_utils import format_structure from adles.vsphere.network_utils import create_portgroup from adles.vsphere.vm import VM from adles.vsphere.vsphere_...
''' interval.py - Deal with intervals. author: Xiao-Ou Zhang <[email protected]> version: 1.0 ''' import copy class Interval(object): ''' Class: Interval Maintainer: Xiao-Ou Zhang Version: 1.0 Usage: a = Interval(list) (nested list: [[x,x,f1...],[x,x,f2...]...] / [[x,x],[x,x]...] or ...
#!/usr/bin/env python3 # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contracts tests. These tests mainly check API sanity in terms of returned types and APIs availability. Some of these are duplica...
# 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 a...
import uuid from unicore.ask.service.tests import DBTestCase from unicore.ask.service.models import QuestionOption, Question class QuestionApiTestCase(DBTestCase): def create_question_option(self, session=None, **attrs): return self.create_model_object(QuestionOption, session, **attrs) def create_q...
#!/usr/bin/python # -*- coding: utf-8 -*- from Tkinter import * from ttk import Style import platform import tkMessageBox if platform.system() != "windows": try: import ImageTk, Image except ImportError: tkMessageBox.showerror('Error!', 'Python Imaging Library (PIL) is required!') exit(...
#!/usr/bin/python3 from amazonia.classes.hosted_zone import HostedZone from amazonia.classes.single_instance import SingleInstance from amazonia.classes.single_instance_config import SingleInstanceConfig from amazonia.classes.sns import SNS from amazonia.classes.subnet import Subnet from amazonia.classes.util import g...
from django.db.models import Prefetch, Q from django.utils.encoding import force_text from rest_framework import serializers from rest_framework.decorators import action from rest_framework.exceptions import ( NotAuthenticated, ParseError, PermissionDenied) from rest_framework.permissions import AllowAny, IsAuthen...
from __future__ import print_function import hashlib import logging import stat from argparse import ArgumentParser import posixpath import requests import os import shutil from . import utils, repo from .compat import ConfigParser, urlsplit, urljoin, FileExistsException logger = logging.getLogger(__name__) def ...
#!/usr/bin/env python import optparse from sys import * import os,sys,re from optparse import OptionParser import glob import subprocess from os import system import linecache import numpy as np import matplotlib.pyplot as plt import Image import pylab from matplotlib.ticker import MultipleLocator, FormatStrFormatter...
from __future__ import unicode_literals from collections import defaultdict import codebase.models as cmodel import recommender.models as rmodel import codebase.linker.context as ctx from docutil.progress_monitor import NullProgressMonitor, CLIProgressMonitor from docutil.str_util import tokenize from docutil.commands_...
"""Helper class to quickly write a loop over all standard input files. Typical use is: import fileinput for line in fileinput.input(): process(line) This iterates over the lines of all files listed in sys.argv[1:], defaulting to sys.stdin if the list is empty. If a filename is '-' it is also replace...
import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full import Queue as _ # Platform-specific: Windows fr...
"""Support for the Daikin HVAC.""" import logging import re import voluptuous as vol from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_FAN_MODE, ATTR_OPERATION_MODE, ATTR_SWING_MODE, STATE_AUTO, STATE...
# -*- coding: utf-8 -*- """ Test cases related to XPath evaluation and the XPath class """ import unittest, sys, os.path this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert(0, this_dir) # needed for Py3 from common_imports import etree, HelperTestCase, _bytes, BytesIO from common_i...
# Copyright 2020 Google LLC. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# -*- coding: utf-8 -*- """ Creating ``tf.data.Dataset`` instance for image window sampler. """ from __future__ import absolute_import, division, print_function import inspect import numpy as np import tensorflow as tf # pylint: disable=no-name-in-module from tensorflow.python.data.util import nest from tensorflow.py...
# Copyright 2016 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...
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgsharedarray" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgViewer # Translated from file 'osgsharedarray.cpp' # OpenSceneGraph exampl...
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # # IOOS System Test: [Extreme Events Theme] # (https://github.com/ioos/system-test/wiki/Development-of-Test-Themes# # wiki-theme-2-extreme-events): Inundation # # ### Compare modeled water levels with observations for a specified bounding box # an...
# 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 random import pygame from pygame.math import Vector3 as V3 import thorpy import parameters, drawing, light, camera import alphabet, scenario from garage import get_vessel_element wordgen1 = alphabet.Dictionnary("thorn.txt","thorn_precisions.txt") namel = 3 nameL = 8 def get_etitle(name,rect="screen"): e =...
# 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 may ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from imp import reload from django.test import TestCase from django.db.models import QuerySet from janyson.decorators import add_fields from . import models def add_fields_to_item_model(*args, **kwargs): if not kwargs.pop('no_reload', False): ...
# -*- coding: utf-8 -*- """ pyClanSphere.utils.net ~~~~~~~~~~~~~~~~~~~~~~ This module implements various network related functions and among others a minimal urllib implementation that supports timeouts. :copyright: (c) 2009 - 2010 by the pyClanSphere Team, see AUTHORS for more det...
# Copyright 2012-2013 OpenStack Foundation # # 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 la...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # The MIT License # # Copyright (c) 2016 Grigory Chernyshev # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
# coding: utf-8 """ Tts API Description # noqa: E501 The version of the OpenAPI document: 2.0.0 Contact: [email protected] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import logging import multiprocessing import sys import urllib3 import ...
# Copyright 2016 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) 2016 Hitachi Data Systems, 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 # # U...
import os, time, pickle, errno, zipfile from twisted.python import filepath from twisted.python.runtime import platform from twisted.trial import unittest class AbstractFilePathTestCase(unittest.TestCase): f1content = "file 1" f2content = "file 2" def _mkpath(self, *p): x = os.path.abspath(os.p...
# Copyright 2018 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/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Kevin Breit (@kbreit) <[email protected]> # 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 = { ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Customize Form is a Single DocType used to mask the Property Setter Thus providing a better UI from user perspective """ import frappe import frappe.translate from frappe im...
import os import zlib import json import click import urlparse import logging from datetime import datetime from subprocess import Popen, PIPE from contextlib import contextmanager HERE = os.path.abspath(os.path.dirname(__file__)) SENTRY_CONFIG = os.path.join(HERE, 'sentry.conf.py') # No sentry or django imports bef...
# -*- coding: utf-8 -*- from __future__ import absolute_import from behave.tag_expression import TagExpression import pytest import unittest # ---------------------------------------------------------------------------- # BASIC TESTS: 0..1 tags, not @tag # ------------------------------------------------------------...
''' Created on Feb 23, 2013 @author: nino ''' import unittest from mock import Mock, patch from marx.workflow.step import Step, LogicUnit, ArgSpec, ResultSpec,\ ResultObject import nose.tools from tests.workflow.example_1 import run as run_example_1 from marx.workflow.context import DefaultContext class Test(uni...