gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# 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, Cisco Systems # 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 ...
# Copyright 2020 Google LLC # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd from collections import namedtuple from functools import partial from os import environ import time import matplotlib as mpl...
# 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...
# _*_coding:utf-8_*_ from __future__ import print_function import glob import json import logging import os import re import socket import subprocess import sys import time import psutil try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import requests class Stanford...
from django.conf import settings from restclients.canvas import Canvas from restclients.exceptions import DataFailureException from restclients.models.canvas import Report, ReportType, Attachment from urllib3 import PoolManager from time import sleep import re class ReportFailureException(Exception): """ This...
"""A chart parser and some grammars. (Chapter 22)""" # (Written for the second edition of AIMA; expect some discrepanciecs # from the third edition until this gets reviewed.) from . utils import * from collections import defaultdict #______________________________________________________________________________ # Gr...
from .Exporter import Exporter from pyqtgraph.parametertree import Parameter from pyqtgraph.Qt import QtGui, QtCore, QtSvg import pyqtgraph as pg import re import xml.dom.minidom as xml import numpy as np __all__ = ['SVGExporter'] class SVGExporter(Exporter): Name = "Scalable Vector Graphics (SVG)" allowCopy...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Uhd Ais 2 # Generated: Sat Dec 17 00:59:04 2016 ################################################## if __name__ == '__main__': import ctypes import sys if sys.platform.sta...
# Copyright 2015 Cisco 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 # # Unless requir...
# -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, print_function from django.db import migrations data = {'nose': 'While fighting, he hit him in the nose. (Kassian)', 'dirty': 'This cup is clean and that one is di...
# Copyright 2013 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 2018-2019 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 2013 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...
# Copyright 2013: Mirantis 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 print_function import pickle import cPickle import numpy as np import os from sklearn.datasets import fetch_mldata from sklearn.metrics import precision_recall_curve, accuracy_score, auc from sklearn.metrics import precision_recall_fscore_support as prfs def make_sure_path_exists(path): '''Cr...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Service providing handler :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.5.7 :status: Beta .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC # Copyright 2011 Ilya Alekseyev # # 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://w...
#!/usr/bin/env python3 """ SAMTools - Tools (written in C using htslib) for manipulating next-generation sequencing data https://github.com/samtools/samtools """ import os import warnings from typing import Iterable, Optional import paleomix.common.versions as versions from paleomix.common.command import ( Atomic...
# Copyright 2014 OpenStack Foundation # Copyright 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Nicira, 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/lic...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011-2013 University of Southern California / ISI # 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 ...
# Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Ken Pepple # # Licensed under the Apache ...
#!/usr/bin/env python import re import os import json import collections import config def generate_package_json(name, version, directory): opam_file = os.path.join(directory, 'opam') files_directory = os.path.join(directory, 'files') package_url = None package_checksum = None version_file = os....
# -*- coding: utf-8 -*- from collections import OrderedDict from unittest.case import TestCase from unittest import mock from alamo_common.test.utils import override_settings from alamo_worker.plugins.druid import DruidResult from alamo_worker.plugins.evaluate import ResultEvaluator from alamo_worker.plugins.http_che...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
"""Bayesian Gaussian Mixture Models and Dirichlet Process Gaussian Mixture Models""" from __future__ import print_function # Author: Alexandre Passos (alexandre.tp@gmail.com) # Bertrand Thirion <bertrand.thirion@inria.fr> # # Based on mixture.py by: # Ron Weiss <ronweiss@gmail.com> # Fabian Ped...
""" ============================================================= Online Latent Dirichlet Allocation with variational inference ============================================================= This implementation is modified from Matthew D. Hoffman's onlineldavb code Link: http://www.cs.princeton.edu/~mdhoffma/code/onli...
from AbstractSyntaxTree import * class Visitor: def __init__(self, errorHandler=None): self.errorHandler = errorHandler def visitChildren(self, node): error = False for child in node.children: if not self.shouldVisitNextChild(node): pass child....
from flask import jsonify, request, Response, json, g from orlo.app import app from orlo import queries from orlo.config import config from orlo.exceptions import InvalidUsage from orlo.user_auth import token_auth from orlo.orm import db, Release, Package, PackageResult, ReleaseNote, \ ReleaseMetadata, Platform fro...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import os.path as op import sys import logging import numpy as np from jcvi.formats.base import LineFile from jcvi.apps.base import ( OptionParser, ActionDispatcher, need_update, sh, get_abs_path, which, ) class Sizes(LineFile): ""...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # 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 ...
""" Connection module for Amazon EFS .. versionadded:: 2017.7.0 :configuration: This module accepts explicit EFS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles or it can read them from the ~/.aws/credentials file or from these environment variables: AWS_ACCES...
import argparse import gevent import os import signal from client_management import MessageServerClient from gevent import Greenlet from gevent.queue import Queue from gevent_zeromq import zmq from JumpScale import j if not q._init_called: from JumpScale.core.InitBase import q # IMPORT INFORMATION # # ZMQ::RE...
# Copyright 2018 SAS Project 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 requ...
import socket import types from itertools import count from Queue import Empty, Queue as _Queue from kombu.connection import BrokerConnection from kombu.entity import Exchange, Queue from kombu.messaging import Consumer, Producer from kombu.tests.utils import unittest from kombu.tests.utils import module_exists # p...
# Microsoft Azure Linux Agent # # Copyright 2014 Microsoft 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 b...
#!/usr/bin/env python3 # # Copyright (c) 2020 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 import binascii import logging import struct from gdbstubs.gdbstub import GdbStub logger = logging.getLogger("gdbstub") class RegNum(): # Matches the enum amd64_regnum in GDB RAX = 0 RBX = 1 RCX...
import pytest import os class TestDOCS(object): def setup_method(self, method): import numpy as np from hyperion.model import ModelOutput from hyperion.util.constants import kpc from fluxcompensator.cube import * # read in from HYPERION ...
"""Opcode definitions for both Python 2 and Python 3.""" # We define all-uppercase classes, to match their opcode names: # pylint: disable=invalid-name HAS_CONST = 1 # references the constant table HAS_NAME = 2 # references the name table HAS_JREL = 4 # relative jump HAS_JABS = 8 # absolute jump HAS_JUNKNOWN = 16...
# coding=utf-8 # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.db.utils import DatabaseError class Migration(SchemaMigration): def forwards(self, orm): # Removing index on 'Category', fields ['visibility'] db.delete_index('c...
import datetime import decimal import uuid from functools import lru_cache from itertools import chain from django.conf import settings from django.core.exceptions import FieldError from django.db import utils from django.db.backends.base.operations import BaseDatabaseOperations from django.db.models import aggregates...
import operator import numpy as np from pandas._libs import index as libindex from pandas import compat from pandas.compat.numpy import function as nv from pandas.core.dtypes.generic import ABCCategorical, ABCSeries from pandas.core.dtypes.dtypes import CategoricalDtype from pandas.core.dtypes.common import ( is_...
# Copyright 2012 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 law or a...
# Copyright (c) 2013 - 2014 Huawei Technologies Co., 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....
""" A class help to create and manage a virtual test env """ import contextlib import copy import itertools from .log import get_logger from .dependency import Consumer, Provider, Cut, Graft, get_all_depend LOGGER = get_logger(__name__) class Env(object): """ TODO """ def __init__(self, data=None, p...
#!/usr/bin/env python """ Assignment 3-2: Use SNMPv3 to create two SVG image files. Image1: input/output bytes on pynet-rtr1-Fa4 Image2: input/output packets on pynet-rtr1-Fa4 Get bytes and packets every five minutes for an hour, compute the differences and graph each point over time Relevant OIDs: ('ifDescr_fa4',...
#!/usr/bin/env python """ * DocumentNGramGraph.java * * Created on 17/5/2017 16:00 * """ import logging import matplotlib.pyplot as plt import networkx as nx from networkx.algorithms.isomorphism import numerical_edge_match from networkx.drawing.nx_agraph import graphviz_layout logger = logging.getLogger(__name_...
# Sublime Text plugin for Parinfer # v0.8.0 # https://github.com/oakmac/sublime-text-parinfer # # More information about Parinfer can be found here: # http://shaunlebron.github.io/parinfer/ # # Copyright (c) 2015, Chris Oakman and other contributors # Released under the ISC license # https://github.com/oakmac/sublime-t...
""" The heart of the library. See ``README.rst`` and ``Configuration`` class for more details. """ import dataclasses import enum import os import warnings from typing import Any, Callable, Dict, NewType, Optional, Type, Union, get_type_hints # Aliased in order to avoid a conflict with the _Options.transform attribute...
from django.test import TestCase from django.conf import settings import mongoengine from mongoengine.django.auth import User import re from datetime import datetime from mumblr.entrytypes.core import TextEntry, HtmlComment, LinkEntry mongoengine.connect('mumblr-unit-tests') class MumblrTest(TestCase): urls ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import request from flask_restplus import Resource, reqparse from flask_restplus.reqparse import Argument from flask_jwt_extended import jwt_required, create_access_token, \ jwt_refresh_token_required from app import db, api from .models import * from .decora...
# -*- coding: utf-8 -*- # # Copyright 2014-2020 BigML # # 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 ...
''' Created on Apr 17, 2009 @author: Sergey Chikuyonok (http://chikuyonok.ru) ''' zen_settings = { 'indentation': '\t', 'html': { 'snippets': { 'cc:ie6': '<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->', 'cc:ie': '<!--[if IE]>\n\t${child}|\n<![endif]-->', 'cc:noie': '<!--[if !IE]><!-->\n\t${child}|\n<!--...
""" pin info: the staccato and hold buttons connect to generic digital GPIOs pin 37: hold pin 31: staccato_1 pin 33: staccato_2 pin 35: staccato_3 voice key 1 encoder is connected through SPI pin 19: SPI 0 MOSI pin 21: SPI 0 MISO pin 23: SPI 0 CLOCK pin 36: SPI 0 CHIP_SELECT_MASTER pin 2: +5VDC ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Info_email' db.create_table('blogs_info_email', ( ('id', self.gf('django.db.mode...
from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.showbase import BulletinBoardWatcher from panda3d.core import * from panda3d.direct import * from otp.distributed.TelemetryLimiter import RotationL...
# Copyright DataStax, 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 writing, softwa...
import collections import os import re import socket import sqlite3 import struct import tempfile from .queries import Queries from .wdetector import * unperlize_re = re.compile('^/?(.*)/([si]*)$') def make_empty_row(columns_dict): return dict((col, None) for col in columns_dict) class cached_property(object):...
# This represents the "top level" of the .xinfo hierarchy, and should # exactly correspond to the contents of the .xinfo file. from __future__ import annotations import inspect import json import logging import os import pathlib from xia2.Handlers.Phil import PhilIndex from xia2.Handlers.Syminfo import Syminfo from...
""" .. module: lemur.sources.service :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ import arrow from datetime import timedelta import copy from flask import current_app fr...
# 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...
from copy import deepcopy from uuid import uuid4 import simplejson as json def boolean (val): if isinstance (val, str): lower = val.lower () if lower == 'false': return False elif lower == 'f': return False elif lower == 'true': return True ...
# # Copyright (c) 2019, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of ...
from configparser import ConfigParser from unittest import mock import time import json import asyncio import pytest from zake.fake_client import FakeClient from kazoo.client import KazooState import kazoo.exceptions from zgres import sync from . import FakeSleeper class MyFakeClient(FakeClient): @property ...
import datetime from dateutil.tz import tzutc acm_certificate_list = { 'CertificateSummaryList': [ { 'DomainName': 'my.any-domain.com', 'CertificateArn': 'arn:aws:acm:eu-west-2:012345678:certificate/01234567-abcd-0123-0123-abcdfe01234' } ] } acm_result_find_certifica...
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import array, randn, ndarray, isinf, isnan, isscalar import logging from pybrain.utilities import setAllArgs, abstractMethod, DivergenceError from pybrain.rl.learners.directsearch.directsearch import DirectSearchLearner from pybrain.structure.parametercontainer impor...
import gym import tensorflow as tf import tensorflow.contrib.slim as slim import random import numpy as np import scipy.misc import time, requests import PIL from tensorflow.core.framework import summary_pb2 def sendStatElastic(data, endpoint="http://35.187.182.237:9200/reinforce/games"): data['step_time'] = time....
# Copyright 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 law or agreed to in...
# # 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 exceptions import ( NodeNotFoundError, NodeTypeNotFoundError, GraphAPIError, MissingNodeTypeError, InvalidPropertyError, MalformedUpdateDictionaryError, ) import py2neo import cypher_utils from py2neo_additions import CypherTransactionManager from node_model import Attribute, Relationship, NodeModel from d...
from testtools import TestCase from testtools.matchers import Equals, Is, MatchesListwise, raises from eliottree.test.tasks import ( action_task, action_task_end, message_task, nested_action_task, unnamed_message) from eliottree.tree import Tree, _TaskNode, task_name def _flattened_tasks(nodes): """ ...
import numpy import six from chainer.backends import _cpu from chainer.backends import cuda from chainer.backends import intel64 from chainer import serializer import chainerx class DictionarySerializer(serializer.Serializer): """Serializer for dictionary. This is the standard serializer in Chainer. The hi...
# # 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...
""" Extend pandas with custom array types. """ from __future__ import annotations from typing import ( TYPE_CHECKING, Any, TypeVar, ) import numpy as np from pandas._libs.hashtable import object_hash from pandas._typing import ( DtypeObj, type_t, ) from pandas.errors import AbstractMethodError ...
from __future__ import print_function import glob import json import os import shutil import subprocess import sys import tarfile import time import marvin.deployDataCenter import marvin.marvinInit import mysql.connector import nose import paramiko import requests import scp from jsonpath_ng import parse from cmds im...
#!/usr/bin/env python """Sample script of recurrent neural network language model. This code is ported from the following implementation written in Torch. https://github.com/tomsercu/lstm """ from __future__ import division from __future__ import print_function import argparse import numpy as np import chainer impo...
# Copyright (C) 2015 Henrique Pereira Coutada Miranda, Alejandro Molina-Sanchez # All rights reserved. # # This file is part of yambopy # from subprocess import Popen, PIPE import os import json from time import sleep import re class YamboIn(): """ Class to read, write, create and manipulate yambo input files ...
from contextlib import contextmanager from diesel import (Client, call, until_eol, receive, fire, send, first, fork, sleep) from diesel.util.queue import Queue, QueueTimeout import time import operator as op import itertools import uuid def flatten_arg_pairs(l): o = [] for i in l: o...
# Copyright (c) 2015 Red Hat, 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 require...
""" Tests for discrete models Notes ----- DECIMAL_3 is used because it seems that there is a loss of precision in the Stata *.dta -> *.csv output, NOT the estimator for the Poisson tests. """ # pylint: disable-msg=E1101 from statsmodels.compat.python import range import os import numpy as np from numpy.testing import ...
#! python # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # (C) 2001-2008 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt PARITY_NONE, PARITY_EVEN, PARITY_ODD, PARITY_MARK, PARITY_SPACE = \ 'N', 'E', 'O', 'M', 'S' STOPBITS_ONE, ...
import json import pytest from django.core.files.uploadedfile import SimpleUploadedFile from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from openslides.mediafiles.models import Mediafile from tests.count_queries import count_queries from tests.test_case impo...
from Izjave import * from Sudoku import * from Hadamard import * from CNF import * import time newPureValFound = True solutionVals = {} lockSolutionVals = False def DPLL(izjava): # Metoda dobi izjavo, ki jo obdela s pomocjo funkcije prepareStatement(izjava) # Ce izjava ni na zacetku False (zaradi praznega...
import operator from collections import Counter, defaultdict from functools import partial, reduce from itertools import chain from operator import attrgetter from django.db import IntegrityError, connections, transaction from django.db.models import query_utils, signals, sql class ProtectedError(IntegrityError): ...
# Copyright (c) 2015 Ericsson AB # 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 ...
# Copyright 2014 Red Hat, 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 writing, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # # Unle...
from collections import Counter, namedtuple from contextlib import contextmanager import json import logging import pprint from types import MethodType from tornado import gen, ioloop, web, websocket, template from tornado_cors import CorsMixin import toro from ..app import ChatNode max_waiting_partners = 100 custom...
# Copyright 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://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
import pytest from pycket.expand import expand from pycket.interpreter import * from pycket.values import * from pycket.impersonators import * from pycket.vector import * from pycket.prims import * from pycket.test.testhelper import run_fix, run, run_mod, execute, check_equal import sys def test_vec(): assert isin...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import time import threading import logging try: import queue except ImportError: import Queue as queue log = logging.getLogger(__name...
""" An alternate implementation of bound inner classes. http://code.activestate.com/recipes/577623-bound-inner-classes-using-an-alternate-approach/ See also, the original approach: http://code.activestate.com/recipes/577070-bound-inner-classes/ Copyright (C) 2011 by Larry Hastings Permission is hereby grant...
# -*- coding: utf-8 -*- # # Copyright 2017-2021 AVSystem <avsystem@avsystem.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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# # 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 -*- import sys sys.path[0:0] = [""] import copy import os import unittest import tempfile import gridfs from nose.plugins.skip import SkipTest from mongoengine import * from mongoengine.connection import get_db from mongoengine.python_support import PY3, b, StringIO try: from PIL import Imag...
# Copyright (c) 2016 Clinton Knight # 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 requir...
import unittest from pqhelper.versus import Advisor from pqhelper.base import Board, Actor class Test_Advisor(unittest.TestCase): # Common test data board_string_3_valid_swaps = '........\n' \ '........\n' \ '........\n' \ ...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 witho...