gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# encoding: UTF-8 """Library for using local store for channel data.""" __copyright__ = "Copyright (c) 2015, Facility for Rare Isotope Beams" __author__ = "Dylan Maxwell" from collections import OrderedDict class ChannelStore(object): """ Local store for channel data. :param owner: default owner for...
from __future__ import division from __future__ import unicode_literals import logging import numbers import sys import pyvips from pyvips import ffi, vips_lib, gobject_lib, \ glib_lib, Error, _to_bytes, _to_string, type_name, type_from_name logger = logging.getLogger(__name__) _is_PY2 = sys.version_info.major ...
""" Module for managing Solaris logadm based log rotations. """ import logging import shlex import salt.utils.args import salt.utils.decorators as decorators import salt.utils.files import salt.utils.stringutils try: from shlex import quote as _quote_args # pylint: disable=E0611 except ImportError: from pip...
import copy from soundrts.lib.sound import distance from soundrts.lib.nofloat import square_of_distance try: from hashlib import md5 except ImportError: from md5 import md5 import os.path import Queue import re import string import time from lib import collision from constants import COLLISION_RADIUS, VIRTUAL_...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: label-transform-param.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from googl...
from typing import Any, Dict, List, Optional, Tuple, Union from cleo.styles import OutputStyle from sdoc.sdoc2.helper.Enumerable import Enumerable from sdoc.sdoc2.Position import Position inline_creators = {} """ Map from inline commands to node creators. :type: dict[str,callable] """ block_creators = {} """ Map f...
from __future__ import division import re from collections import Counter import math import heapq import sys class PhraseMining(object): """ PhraseMining performs frequent pattern mining followed by agglomerative clustering on the input corpus and then stores the results in intermediate files. :param ...
from __future__ import division import abc import numpy as np from copy import deepcopy from menpo.fit.base import Fitter from menpo.fit.fittingresult import FittingResultList from menpo.transform import AlignmentAffine, Scale from menpo.landmark import LandmarkGroup from .fittingresult import MultilevelFittingResult...
# ****************************************************************************** # Copyright 2014-2018 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.apa...
# 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...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines the events signaled by abinit during the execution. It also provides a parser to extract these events form the main output file and the log file. """ import sys import os.path import dat...
""" Module to set up run time parameters for Clawpack -- classic code. The values set in the function setrun are then written out to data files that will be read in by the Fortran code. """ import os import numpy as np #------------------------------ def setrun(claw_pkg='amrclaw'): #--------------------------...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import str from past.builtins import basestring from collections import defaultdict from datetime import datetime import getpass import logging import signa...
from jinja2 import Template from autonetkit.design.utils import filters from autonetkit.design.utils.filters import find_node_by_label from autonetkit.design.utils.general import group_by from autonetkit.design.utils.graph_utils import topology_to_nx_graph, wrap_node_ids from autonetkit.network_model.network_model imp...
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of cha...
# coding=utf-8 #!/usr/bin/env python2 # Welcome to {Game Title} # This is a text based game inspired by Fallout written in Python # # @copyright 2015 Alexander Young, Noah Hayes # @license MIT Licence <https://github.com/meun5/camel-game-python/blob/master/LICENSE> # @link Github <...
############################################################################### # The MIT License (MIT) # # Copyright (c) 2014 Justin Lovinger # # 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 Softwar...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) """kubernetes check Collects metrics from cAdvisor instance """ # stdlib from collections import defaultdict from fnmatch import fnmatch import numbers import re import time import calendar # 3rd party import req...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it unde...
# # 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 # ...
# 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 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...
# Copyright 2015 AirPlug 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...
# # 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...
from __future__ import unicode_literals import keyword import re from collections import OrderedDict from click import BaseCommand, BaseException from config import DEFAULT_DB_ALIAS from ibu import connection as connections class Command(BaseCommand): help = "Introspects the database tables in the given databas...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
# -*- coding: utf-8 -*- # Copyright 2013 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 requir...
# pylint: disable-all import json import os import pprint import unittest from unittest.mock import MagicMock from circleci.api import Api from circleci.error import BadKeyError, BadVerbError, InvalidFilterError class TestCircleCIApi(unittest.TestCase): def setUp(self): self.c = Api(os.getenv('CIRCLE_TO...
# Version: 0.10 """ The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, and 3.2, 3.3 [![Build Status](https://travis-ci.org/warner/python-versioneer.png?branch=master)](https://tr...
import hashlib import logging from flask import flash, redirect, render_template, request, url_for from flask_login import current_user, login_required, login_user, logout_user from redash import __version__, limiter, models, settings from redash.authentication import current_org, get_login_url from redash.authentica...
#-*- coding: utf-8 -*- # stino/menu.py import os import json from . import constant from . import fileutil from . import serial class MainMenu: def __init__(self, language, arduino_info, file_name): self.language = language self.file = os.path.join(constant.stino_root, file_name) self.arduino_info = arduino_i...
import os import stat from typing import Union, Optional, AnyStr, Iterator from ._root import NO_ROOT, Root from ..types import AnyPath class PathAdapter(object): """A recreation of os.DirEntry which can be constructed from a path""" def __init__(self, path): if isinstance(path, (bytes, str, os.PathL...
"""Support for Vallox ventilation units.""" from datetime import timedelta import ipaddress import logging from vallox_websocket_api import PROFILE as VALLOX_PROFILE, Vallox from vallox_websocket_api.constants import vlxDevConstants from vallox_websocket_api.exceptions import ValloxApiException import voluptuous as v...
#------------------------------------------------------------------------------ # Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved. # # Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved. # # Portions Copyright 2001-2007, Computronix (Canada) Ltd., Edmonton, Alberta, # Canada. Al...
# Copyright 2016 Uri Laserson # # 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,...
# coding=utf-8 # Copyright 2022 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 2013-2015 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 writi...
import copy import shelve import logging from hashlib import sha256 from urllib import quote from urllib import unquote from saml2 import SAMLError from saml2.s_utils import rndstr from saml2.s_utils import PolicyError from saml2.saml import NameID from saml2.saml import NAMEID_FORMAT_PERSISTENT from saml2.saml import...
# Author : Antoine Broyelle # Licence : MIT # inspired by : KTH - DD2432 : Artificial Neural Networks and Other Learning Systems # https://www.kth.se/student/kurser/kurs/DD2432?l=en import numpy as np import sys class MLP: '''Multi-layers Perceptron.''' def __init__(self, inputs, targets, nbNodes=1, outputTy...
import collections import contextlib import errno import hashlib import json import os import io import re import shutil import stat import struct import tarfile import tempfile import zipfile from datetime import datetime, timedelta from django import forms from django.conf import settings from django.core.files.sto...
# -*- coding: utf-8 -*- from __future__ import with_statement from django.test import TestCase from transifex.languages.models import Language from transifex.resources.formats.validators import * class TestValidators(TestCase): def test_empty_translation(self): old = 'old' new = '' v = B...
# Copyright (c) 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...
# Copyright 2009 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 ...
# Copyright 2014 Koert van der Veer # 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 import numpy import chainer from chainer import backend from chainer.backends import cuda from chainer import links from chainer import testing from chainer.testing import attr # TODO(hvy): Remove the following import once testing.backend is imported # in testing/__init__.py import chainer.testing.bac...
"""Spectral Embedding""" # Author: Marina Meila <mmp@stat.washington.edu> # James McQueen <jmcq@u.washington.edu> # LICENSE: Simplified BSD https://github.com/mmp2/megaman/blob/master/LICENSE # # after the scikit-learn version by # Gael Varoquaux <gael.varoquaux@normalesup.org> # Wei LI...
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
# -*- encoding: utf-8 -*- # # 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...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible HTML table reader and writer. html.py: Classes to read and write HTML tables `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_ must be installed to read HTML tables. """ from __future__ import absolute_import, division,...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio 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 python3 # coding: utf-8 # Copyright 2013 The Font Bakery Authors. All Rights Reserved. # Copyright 2017 The Google Font Tools Authors # Copyright 2018 The Font Classification Tool Authors: # - Felipe C. da S. Sanches # - Dave Crossland # # Licensed under the Apache License, ...
# coding=utf-8 import logging, commands, os, pexpect, sys, time from app.modules.common.pipelines import * from app.modules.common.tasks import * from app.modules.common.errors import * from app.modules.common.utils import * from pexpect import * log = logging.getLogger(__name__) class ImportOraclePipeLine(Pipelin...
""" Testing for the boost module (sklearn.ensemble.boost). """ import numpy as np from numpy.testing import assert_array_equal, assert_array_less from numpy.testing import assert_array_almost_equal from numpy.testing import assert_equal from nose.tools import assert_raises from sklearn.grid_search import GridSearchCV...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyowm.airpollutionapi30 import airpollution_client, coindex, no2index, ozone, so2index, airstatus from pyowm.airpollutionapi30.uris import ROOT_POLLUTION_API_URL, NEW_ROOT_POLLUTION_API_URL from pyowm.commons.http_client import HttpClient from pyowm.constants import A...
"""Service calls related dependencies for LCN component.""" import pypck import voluptuous as vol from homeassistant.const import ( CONF_ADDRESS, CONF_BRIGHTNESS, CONF_STATE, CONF_UNIT_OF_MEASUREMENT) import homeassistant.helpers.config_validation as cv from .const import ( CONF_CONNECTIONS, CONF_KEYS, CONF_L...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
# 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...
# 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...
#!/usr/bin/env python import r2pipe import sys import os import json import re import networkx as nx from time import time from datetime import datetime from argparse import ArgumentParser from base64 import b64decode from graphityOut import toNeo, fromNeo, printGraph, printGraphInfo, plotSeGraph from graphityUtils 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 use ...
# Copyright 2016 - Nokia Networks. # Copyright 2016 - Brocade Communications Systems, 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/L...
""" Functions --------- .. autosummary:: :toctree: generated/ line_search_armijo line_search_wolfe1 line_search_wolfe2 scalar_search_wolfe1 scalar_search_wolfe2 """ from __future__ import division, print_function, absolute_import from warnings import warn from scipy.optimize import minpack2 i...
"""Class to hold all camera accessories.""" import asyncio from datetime import timedelta import logging from haffmpeg.core import FFMPEG_STDERR, HAFFmpeg from pyhap.camera import ( VIDEO_CODEC_PARAM_LEVEL_TYPES, VIDEO_CODEC_PARAM_PROFILE_ID_TYPES, Camera as PyhapCamera, ) from pyhap.const import CATEGORY_...
# 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 ...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines 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 ap...
#! /usr/bin/env python # # Copyright (C) 2015-2016 Rich Lewis <rl403@cam.ac.uk> # License: 3-clause BSD """ # skchem.io.sdf Defining input and output operations for sdf files. """ from functools import wraps import warnings from rdkit import Chem import pandas as pd from ..core import Mol from ..utils import Suppr...
# Copyright 2013-2016 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 writi...
from mudwyrm_users.admin.achaea import ScriptState from mudwyrm_users.admin.achaea.action import Action, Outcome, EventOutcome from mudwyrm_users.admin.achaea.trigger import Trigger, Alias, OnEvent from mudwyrm_users.admin.achaea.common import not_ from mudwyrm_users.admin.achaea.scripts.char import \ balance, sta...
#!/usr/bin/env vpython # Copyright 2019 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. """Unittests for run.py.""" import json import mock import re import unittest import run import test_runner_test class UnitTest(uni...
# -*- 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...
#!/usr/bin/env python #============================================================================ # Copyright (C) Microsoft Corporation, All rights reserved. #============================================================================ import os import imp import re import codecs import shutil import string import ...
#minecraft traffic lights - simple #import the minecraft.py module from the minecraft directory import minecraft.minecraft as minecraft #import minecraft block module import minecraft.block as block #import time, so delays can be used import time #import threading so I can make asynchronous calls! import threading #im...
from datetime import datetime import unittest from pheme.util.config import Config from pheme.util.pg_access import AlchemyAccess from pheme.warehouse.tables import create_tables from pheme.warehouse.tables import HL7_Dx from pheme.warehouse.tables import HL7_Msh from pheme.warehouse.tables import HL7_Nte from pheme.w...
from ..Qt import QtGui, QtCore, QtWidgets, USE_PYSIDE if not USE_PYSIDE: import sip from .. import multiprocess as mp from .GraphicsView import GraphicsView from .. import CONFIG_OPTIONS import numpy as np import mmap, tempfile, ctypes, atexit, sys, random __all__ = ['RemoteGraphicsView'] class RemoteGraphicsView...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import math from . import Command from ..benchmarks import Benchmarks from ..console import log from ..machine import Ma...
# implements a factory to create codec instances for a given java charset import codecs from array import array from functools import partial from java.lang import StringBuilder from java.nio import ByteBuffer, CharBuffer from java.nio.charset import Charset, IllegalCharsetNameException from StringIO import StringIO ...
import unittest import numpy as np import numpy.testing as npt from .. import nodes, rv class TestDiscrete(unittest.TestCase): def setUp(self): self.x1 = nodes.VNode("x1", rv.Discrete) self.x2 = nodes.VNode("x2", rv.Discrete) self.rv1 = rv.Discrete([0.6, 0.4], self.x1) self.rv2...
# -*- coding: utf-8 -*- """ carrier.py """ from decimal import Decimal from suds import WebFault from suds.client import Client from suds.plugin import MessagePlugin from trytond.pool import PoolMeta, Pool from trytond.model import fields, ModelView from trytond.pyson import Eval from trytond.wizard import Wizar...
# Copyright 2015 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 in writing, s...
import os import re import numpy import datetime import json import logging import netCDF4 import cmor import cmor_utils import cmor_source import cmor_target import cmor_task import cdo from ece2cmor3 import cdoapi import Ngl import warnings # Logger object log = logging.getLogger(__name__) # Experiment name exp_nam...
from django.conf import settings from django import forms from django.forms.widgets import RadioSelect from crits.campaigns.campaign import Campaign from crits.core import form_consts from crits.core.forms import add_bucketlist_to_form, add_ticket_to_form from crits.core.widgets import CalWidget, ExtendedChoiceField f...
import base64 import json from cattle import ApiError, ClientApiError from common_fixtures import * # NOQA from datetime import timedelta import time def test_container_create_count(client, context): cs = client.create_container(imageUuid=context.image_uuid, count=3) assert...
# GENERATED FILE - DO NOT EDIT THIS FILE UNLESS YOU ARE A WIZZARD #pylint: skip-file from heat.engine import properties from heat.engine import constraints from heat.engine import attributes from heat.common.i18n import _ from avi.heat.avi_resource import AviResource from avi.heat.avi_resource import AviNestedResource...
from pytz import timezone, utc from datetime import datetime, timedelta from datetime import date from dateutil.relativedelta import relativedelta import calendar import pandas as pd class EasyDate(): ###################################################### # setup and manipulate reference date local and utc ...
import itertools import threading import unittest2 from nose.tools import * from gutter.client.arguments import Container as BaseArgument from gutter.client import arguments from gutter.client.models import Switch, Manager, Condition from durabledict import MemoryDict from durabledict.base import DurableDict from gutt...
from urllib.parse import urlparse from django.contrib.auth.forms import PasswordChangeForm, SetPasswordForm from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.tokens import default_token_generator from django.core import mail from django.core.cache import cache from django.urls import ...
import logging import pandas as pd import numpy as np import pyprind import six from joblib import Parallel, delayed import py_entitymatching.catalog.catalog_manager as cm from py_entitymatching.blocker.blocker import Blocker from py_entitymatching.utils.catalog_helper import log_info, get_name_for_key, add_key_colum...
#!/usr/bin/env python # $Id: NameMapper.py,v 1.2 2006-12-19 13:32:47 skyostil Exp $ """This module supports Cheetah's optional NameMapper syntax. Overview ================================================================================ NameMapper provides a simple syntax for accessing Python data structures, functio...
""" Base Module for datasets to specify the interface for these """ import yaml import os import logging import logging.handlers import warnings import socket import cPickle from pySPACE.run.scripts import md_creator # import bz2 from collections import defaultdict class UnknownDatasetTypeException(Exception): "...
""" CMCCAT2000 Chromatic Adaptation Model ===================================== Defines the *CMCCAT2000* chromatic adaptation model objects: - :class:`colour.adaptation.InductionFactors_CMCCAT2000` - :class:`colour.VIEWING_CONDITIONS_CMCCAT2000` - :func:`colour.adaptation.chromatic_adaptation_forward_CMCCAT2000...
from . import version from .constants import * from shared.messages import * from shared.protocol import JSONReceiver from collections import Counter import random class ClientProtocol(JSONReceiver): def __init__(self, factory): JSONReceiver.__init__(self, factory) self.addCallback(MODE_CLIENT_AUTHENTIFICAT...
""" Module that uses CMAC 2.0 to remove and correct second trip returns, correct velocity and more. A new radar object is then created with all CMAC 2.0 products. """ import copy import json import sys import netCDF4 import numpy as np import pyart from .cmac_processing import ( do_my_fuzz, get_melt, get_texture...
"""Runs a test suite against Sublime Text. Usage: 1. cd path/to/PACKAGE 2. python path/to/run_tests.py PACKAGE """ from __future__ import print_function import json import optparse import os import re import shutil import subprocess import sys import time # todo: allow different sublime versions PACKAGES_DIR_PATH ...
#!/usr/bin/env python2 """Display multi-page text with a quiz at the end.""" # TappingWithTrTiming_Movie_d3.py # Created 11/09/15 by DJ based on DistractionTask_practice_d3.py # Updated 12/4/15 by DJ - made movie version # Updated 12/7/15 by DJ - updated prompts, general cleanup # Updated 1/12/16 by DJ - moved from mov...
# Copyright 2016 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. from recipe_engine import recipe_api from . import default import subprocess # TODO(borenet): No! Remove this. """Android flavor, used for running code ...
# 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...
from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout from keras.optimizers import RMSprop from keras.models import load_model from keras.layers.normalization import BatchNormalization import sklearn import numpy a...
#!/usr/bin/env python # # Copyright 2011-2015 Splunk, 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...
# # 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 # ...
######## ## ## Wrapper to hold results of a tournament ## ######## class TournamentResults(object): """ Calculates and wraps results of tournaments """ def __init__(self, botList, interactions, payoffs): """ Calculate the scores of the interactions and the total scores for the ...