gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2018 DeepMind Technologies Limited. # # 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 agre...
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) """Element Software volume clone""" from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
import os from netlib.http.http1 import read_response, read_request from netlib import tcp, websockets, http, tutils from netlib.http import status_codes from netlib.tutils import treq from netlib.exceptions import * from .. import tservers class WebSocketsEchoHandler(tcp.BaseHandler): def __init__(self, conne...
"""Module used to handle a API Server.""" import logging import os import sys import warnings from urllib.error import URLError from urllib.request import urlopen from flask import Flask, request, send_from_directory from flask_socketio import SocketIO, join_room, leave_room class APIServer: """Api server used t...
""" Import map data. """ from eve_db.models import map as map_models from importer_classes import SQLImporter, parse_int_bool, parse_char_notnull class Importer_mapUniverse(SQLImporter): model = map_models.MapUniverse pks = (('id', 'universeID'),) field_map = (('name', 'universeName'), (...
from crowdcomputer import settings from django.contrib.auth.models import User, Group from django.db.models import Q from django.http.response import HttpResponse, Http404 from django.shortcuts import get_object_or_404 from general.models import Process, Application, Reward, Task, TaskActiviti, \ TaskInstance from ...
# 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 ...
# Copyright 2017 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...
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
from __future__ import absolute_import import itertools import time from sentry.similarity.backends.abstract import AbstractIndexBackend from sentry.utils.iterators import chunked from sentry.utils.redis import load_script index = load_script('similarity/index.lua') def band(n, value): assert len(value) % n =...
from sympy.core.add import Add from sympy.core.numbers import Rational, Float from sympy.core.basic import C, sympify, cacheit from sympy.core.singleton import S from sympy.core.function import Function, ArgumentIndexError from miscellaneous import sqrt #################################################################...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ========================= Test for qplotutils.bench ========================= Autogenerated package stub. """ import unittest import logging import sys import os import numpy as np from qtpy.QtCore import * from qtpy.QtGui import * from qtpy.QtOpenGL import * from ...
# -*- coding: utf-8 -*- ''' A module to manage software on Windows :depends: - win32com - win32con - win32api - pywintypes ''' # Import python libs from __future__ import absolute_import import errno import os import locale import logging import time from distutils.version import...
# Copyright 2016 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 math import interpolators import scipy.interpolate import numpy as np import scipy as sp from scipy import stats import sys import pandas as pd class PowerCurve: def __init__(self, powerCurveLevels, referenceDensity, rotorGeometry, powerCol, turbCol, wsCol = None, countCol = None, fixedTur...
# Copyright 2015-2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 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....
# Copyright (c) 2017 Intel Corporation # # 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 i...
# -*- coding: utf-8 -*- """ Vertical electrical sounding (VES) manager class. """ import numpy as np import pygimli as pg # from pygimli.frameworks import Modelling, Block1DModelling from pygimli.frameworks import Block1DModelling, MethodManager1d from pygimli.frameworks.modelling import DEFAULT_STYLES class VESMode...
# # @file TestReaction_newSetters.py # @brief Reaction unit tests for new set function API # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically...
TThostFtdcTraderIDType = "string" TThostFtdcInvestorIDType = "string" TThostFtdcBrokerIDType = "string" TThostFtdcBrokerAbbrType = "string" TThostFtdcBrokerNameType = "string" TThostFtdcExchangeInstIDType = "string" TThostFtdcOrderRefType = "string" TThostFtdcParticipantIDType = "string" TThostFtdcUserIDType = "string"...
# # Copyright (c) SAS Institute 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 w...
import functools import operator import logging from django.contrib import messages from django.contrib.auth import logout as django_logout, login as django_login from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.db import IntegrityError from django.db.m...
# 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 use ...
""" Title: OCR model for reading Captchas Author: [A_K_Nain](https://twitter.com/A_K_Nain) Date created: 2020/06/14 Last modified: 2020/06/26 Description: How to implement an OCR model using CNNs, RNNs and CTC loss. """ """ ## Introduction This example demonstrates a simple OCR model built with the Functional API. Ap...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
#! /usr/bin/env python # # video_play.py -- video playback example with Ginga # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ This example shows how Ginga has a fast enough refresh rate to play smooth video. I was able to play HD video at 30 fps on 20...
# -*- coding:utf-8 -*- import logging logger = logging.getLogger(__name__) import re SEMVER_SPEC_VERSION = '2.0.0' class _R(object): def __init__(self, i): self.i = i def __call__(self): v = self.i self.i += 1 return v def value(self): return self.i class Exten...
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http...
import os import json import unittest from copy import deepcopy from unittest import TestCase from random import randint from elasticsearch import Elasticsearch from mme_server.schemas import validate_request, validate_response, ValidationError EXAMPLE_REQUEST = { 'patient': { 'id': '1', 'label'...
# 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 ...
#!/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. import logging import os import shutil import pyauto_functional # Must be imported before pyauto import pyauto import test_utils ...
# Copyright 2012 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 requ...
# Copyright 2013 NEC Corporation # # 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...
# Most of this code was selectively copied from developmentseed/landsat-util # https://github.com/developmentseed/landsat-util # Minor modifications by Jwely@Github import json import time import requests import geocoder import re API_URL = 'https://api.developmentseed.org/landsat' # Geocoding confidence scores, # ...
import json from rest_framework import status from rest_framework.test import APITestCase class SiteTest(APITestCase): fixtures = [ 'dcim', 'ipam', 'extras', ] standard_fields = [ 'id', 'name', 'slug', 'tenant', 'facility', 'asn', ...
# -*- coding: utf-8 -*- from __future__ import print_function from acq4.util import Qt from collections import OrderedDict from .Map import Map import acq4.util.DatabaseGui as DatabaseGui from . import MapCtrlTemplate from acq4.Manager import logMsg, logExc import acq4.pyqtgraph as pg import os class DBCtrl(Qt.QWidget...
"""``tornado.gen`` is a generator-based interface to make it easier to work in an asynchronous environment. Code using the ``gen`` module is technically asynchronous, but it is written as a single generator instead of a collection of separate functions. For example, the following asynchronous handler:: class Asy...
#todo #zip up the files (duh) #scp it to the remote machine #ssh to remote machine #blow away old location #unzip and redeploy it over there #drop in the build number and revision number? #get username, password, hostname, location from environmental variables import os import sys import tarfile import gzip import lo...
#!/usr/bin/env python # Copyright (c) 2011 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. """Generates profile dictionaries for Autofill. Used to test autofill.AutofillTest.FormFillLatencyAfterSubmit. Can be used as a st...
import logging from PyQt4.QtGui import ( QGraphicsItem, QGraphicsPathItem, QGraphicsWidget, QGraphicsTextItem, QGraphicsDropShadowEffect, QPainterPath, QPainterPathStroker, QPolygonF, QColor, QPen ) from PyQt4.QtCore import ( Qt, QPointF, QSizeF, QRectF, QLineF, QEvent, qVersion ) from PyQt4.QtCore ...
""" wsproto/handshake ~~~~~~~~~~~~~~~~~~ An implementation of WebSocket handshakes. """ from collections import deque from typing import ( cast, Deque, Dict, Generator, Iterable, List, Optional, Sequence, Union, ) import h11 from .connection import Connection, ConnectionState, Con...
#!/usr/bin/python # -*- coding: utf-8 -*- import logging import calendar from flask import Flask, jsonify, render_template, request, abort, redirect, url_for, make_response from flask.json import JSONEncoder from datetime import datetime import time import json import threading import random import string import os f...
# 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...
import json import logging as logmodule import os import re import sys import tempfile import uuid from django.core.files import File as DjFile from django.core.management import call_command from django.core.management.base import BaseCommand from le_utils.constants import content_kinds from le_utils.constants import...
# -*- coding: utf-8 -*- import unittest import sys sys.path[0:0] = [""] import os import pymongo from nose.plugins.skip import SkipTest from datetime import datetime from mongoengine import * from mongoengine.connection import get_db, get_connection __all__ = ("IndexesTest", ) class IndexesTest(unittest.TestCase)...
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
#!/usr/bin/env python import argparse import cPickle import traceback import logging import time import sys import numpy import experiments.nmt from experiments.nmt import\ RNNEncoderDecoder,\ prototype_state,\ prototype_search_with_coverage_state,\ parse_input from experiments.nmt.numpy_compat impo...
#!/usr/bin/env python3 # 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 ...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.hoverlabel" _valid_props = { "align"...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ###### THIS IS A MODIFIED VERSION OF TORNADO'S HTTPSERVER FROM TORNADO 2.2 ####### # # It has been modified to support a callback after headers finish, and # another callback on close. # # HTTPRequest.__repr__ has also been modified to not show body (POST can # contain se...
""" Koalas 0.0.1 abstract pandas utilities """ import os import sys import pandas import numpy as np import bokeh from bokeh import charts, io modself = sys.modules[__name__] class AbstractFrame(object): """ Abstract frame wrapper Passes ALL to self.frame Can be initialized with pandas.DataFrame, pandas.Series...
import socket import time from OpenSSL import SSL from netlib import tcp, http, socks from netlib.certutils import SSLCert from netlib.http import authentication from libpathod import pathoc, pathod from libmproxy.proxy.config import HostMatcher from libmproxy.protocol import KILL, Error from libmproxy.protocol.http ...
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, biocore development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------...
#!/usr/bin/env python """Debugging flows for the console.""" import getpass import os import pdb import pickle import tempfile import time from grr.client import actions from grr.lib import access_control from grr.lib import aff4 from grr.lib import flow from grr.lib import queue_manager from grr.lib import rdfvalue...
''' This file is part of ConfigShell. Copyright (c) 2011-2013 by Datera, 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 appli...
import unittest from test.support import check_syntax_error, run_unittest import warnings warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "<test string>") warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "<string>") class ScopeTests(unittest.TestCase): def testSimpleNesting(self): ...
# -*- coding: utf-8 -*- # Copyright 2014, 2015 Metaswitch Networks # Copyright (c) 2015 Cisco Systems. 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...
import logging import synapse.common as s_common import synapse.lookup.phonenum as s_l_phone from synapse.lib.types import DataType import synapse.lib.module as s_module logger = logging.getLogger(__name__) intls = ( ('us', '1', '011', 10), ) def genTelLocCast(iso2, cc, idd, size): ''' Generate a gener...
# coding: utf-8 """ Copyright 2015 SmartBear Software 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 #************************************************************************* # # REDWOOD CONFIDENTIAL # Author: Aaron Edsinger # __________________ # # [2012] - [+] Redwood Robotics Incorporated # All Rights Reserved. # # All information contained herein is, and remains # the property of Redwood...
# 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 ...
# 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...
"""Prodigy integration for W&B User can upload Prodigy annotated datasets directly from the local database to W&B in Tables format. Example usage: ```python import wandb from wandb.integration.prodigy import upload_dataset run = wandb.init(project='prodigy') upload_dataset("name_of_dataset") wandb.finish() ``` """ ...
# changelog.py - changelog class for mercurial # # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from .i18n import _ from .node impo...
#!/usr/bin/env python2 # # Copyright (C) 2014 eNovance SAS <licensing@enovance.com> # # Author: Erwan Velu <erwan.velu@enovance.com> # # 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 # # h...
#!/usr/bin/python3 # Halide tutorial lesson 13: Tuples # This lesson describes how to write Funcs that evaluate to multiple # values. # On linux, you can compile and run it like so: # g++ lesson_13*.cpp -g -I ../include -L ../bin -lHalide -lpthread -ldl -o lesson_13 -std=c++11 # LD_LIBRARY_PATH=../bin ./lesson_13 # ...
# -*- coding: utf-8 -*- """ pygments.lexers.fortran ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Fortran languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, include, words, usin...
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from datetime import datetime import dateutil from dateutil.tz import tzutc from datetime import datetime import stix import stix.bindings.campaign as campaign_binding from stix.common import (Activity, Confidence...
''' Created on June 28, 2016 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' import utilities.utilities as utilities import index import importlib # Maximum number of attempts for any one command MAX_ATTEMPTS = 20...
#!/usr/bin/env python ############################################################################# # barcodeHasher.py # 2015 James A. Stapleton # # This program sorts short reads into a dictionary on the basis of barcode # sequences. Output is a JSON-dumped file called unpairedDict.txt or # pairedDi...
# -*- coding: utf-8 -*- """ Converts model for WebDNN to run on web browser 1. ResNet feature extractor + image feature embedding 2. Sentence generator Targeting for WebDNN 1.1.0. It does not support LSTM layer's conversion and input switching (image feature / word vector), so constructing IR manually is needed. Mo...
# 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 ...
""" This file contains the plotting functionalities that are available for Pastas. Examples -------- ml.plot.decomposition() """ import logging import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import MultipleLocator from pandas import DataFrame, Timestamp, concat from scipy.stats import...
#!/usr/bin/python from collections import defaultdict from NodeGraphQt import QtWidgets, QtCore, QtGui from NodeGraphQt.constants import (NODE_PROP_QLABEL, NODE_PROP_QLINEEDIT, NODE_PROP_QCOMBO, NODE_PROP_QCHECKBOX...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from oauthlib.common import Request from oauthlib.oauth1 import SIGNATURE_RSA, SIGNATURE_PLAINTEXT from oauthlib.oauth1 import SIGNATURE_TYPE_BODY, SIGNATURE_TYPE_QUERY from oauthlib.oauth1.rfc5849 import Client, bytes_type from ...unitte...
######### # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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) 2015 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...
import warnings import weakref import six from chainer.backends import cuda from chainer import configuration # for backward compatibility from chainer.function_hook import FunctionHook # NOQA from chainer import function_node from chainer import variable def no_backprop_mode(): """Make a context manager which...
########################################################################## # # Copyright 2008-2009 VMware, Inc. # 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 withou...
# 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...
# -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate 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 ...
# Copyright 2018 The TensorFlow Probability 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 law o...
""" Oracle DataBase connection module :maintainer: Vladimir Bormotov <bormotov@gmail.com> :maturity: new :depends: cx_Oracle :platform: all :configuration: module provide connections for multiple Oracle DB instances. **OS Environment** .. code-block:: yaml ORACLE_HOME: path to oracle product ...
################################################################################ # Copyright (C) 2011-2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ import numpy as np from bayespy.utils import misc from .node im...
# # 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...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from contextlib import contextmanager from case import Mock from vine.abstract import Thenable from kombu.exceptions import HttpError from kombu.five import WhateverIO from kombu.asynchronous import http from kombu.asynchronous.aws.con...
# jsb.plugs.common/forward.py # # """ forward incoming trafic on a bot to another bot through xmpp. """ ## jsb imports from jsb.lib.commands import cmnds from jsb.lib.callbacks import callbacks, remote_callbacks, last_callbacks, first_callbacks from jsb.lib.eventbase import EventBase from jsb.lib.persist import Plug...
# Author: # Rudiger Birkner (Networked Systems Group ETH Zurich) from ss_lib import vmac_next_hop_mask, vmac_participant_match, vmac_participant_mask, vmac_next_hop_match, vmac_part_port_match # PRIORITIES (Values can be in [0,65535], 0 is miss) FLOW_MISS_PRIORITY = 0 # outbound switch priorities OUTBOUND_HIT_PR...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
# Copyright [2015] Hewlett-Packard Development Company, L.P. # 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...
# Copyright 2020 The Tilt Brush 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 law or agreed to ...
import uuid import unittest import pickle import datetime from .. import connector from .. import queue from .. import encoder class QueueTestCase: @classmethod def setUpClass( cls, ): cls.test_queue_name = 'test_queue_name' cls.enqueued_value_first = { 'str': 'string1...
# 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 ...
from __future__ import unicode_literals from __future__ import absolute_import from collections import namedtuple import logging import re import os import sys from operator import attrgetter import six from docker.errors import APIError from docker.utils import create_host_config, LogConfig from . import __version__...
''' Copyright 2016, EMC, Inc. Purpose: This test script consists of tests to verify the task service API returned data. ''' import os import sys import subprocess import json sys.path.append(subprocess.check_output("git rev-parse --show-toplevel", shell=True).rstrip("\n") + "/test/common") import fit_common #Uti...
from xmltodict import parse, ParsingInterrupted import collections import unittest try: from io import BytesIO as StringIO except ImportError: from xmltodict import StringIO from xml.parsers.expat import ParserCreate from xml.parsers import expat def _encode(s): try: return bytes(s, 'ascii') ...
from itertools import product import glob import os import os.path as op import pickle import shutil import numpy as np from scipy import sparse from numpy.testing import (assert_array_equal, assert_array_almost_equal, assert_equal) import pytest from mne.datasets import testing from mne ...
import os import re import sys import time import logging import subprocess if sys.version_info[:2] >= (3, 0): # pylint: disable=E0611,F0401,I0011 from urllib.request import build_opener from urllib.error import HTTPError, URLError from urllib.parse import parse_qs, urlparse uni, pyver = str, 3 el...