gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # 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 # ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- import librosa import numpy as np from scipy.spatial.distance import cdist import pytest from test_core import srand @pytest.mark.xfail(raises=librosa.ParameterError) def test_1d_input(): X = np.array([[1], [3], [3], [8], [1]]) Y = np.array([[2], [0], [0], [8]...
# Copyright 2015, Pinterest, 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...
class Point: def __init__(self, x=0, y=0): self.x = x self.y = y class Block: def __init__(self, ll, ur): self.ll = ll self.ur = ur def is_overlap(self, p, scale=1): if self.ll.x * scale <= p.x <= self.ur.x * scale and \ self.ll.y * scale <= p.y <= se...
# -*- coding: utf-8 -*- """Main module.""" import sys import matplotlib.pyplot as plt import numpy as np from matplotlib.patheffects import RendererBase from matplotlib import transforms from matplotlib.font_manager import FontProperties from matplotlib.ticker import MultipleLocator from matplotlib.ticker import For...
# # 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...
from django.conf.urls import url import lfs.manage import lfs.manage.actions.views import lfs.manage.categories.category import lfs.manage.categories.portlet import lfs.manage.categories.products import lfs.manage.categories.view import lfs.manage.customer_tax.views import lfs.manage.discounts.views import lfs.manage....
#!/usr/bin/env python # -*- coding: utf-8 -*- # Original source: github.com/okfn/bibserver # Authors: # markmacgillivray # Etienne Posthumus (epoz) # Francois Boulogne <fboulogne at april dot org> import sys import logging logger = logging.getLogger(__name__) __all__ = ['BibTexParser'] if sys.version_info >= (3, ...
# -*- coding: utf-8 -*- # Copyright 2022 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...
"""The tests for the automation component.""" import asyncio import pytest from homeassistant.components import logbook import homeassistant.components.automation as automation from homeassistant.components.automation import ( ATTR_SOURCE, DOMAIN, EVENT_AUTOMATION_RELOADED, EVENT_AUTOMATION_TRIGGERED,...
import threading from logging import getLogger from os import urandom from hashlib import sha1 from redis import StrictRedis from redis.exceptions import NoScriptError __version__ = "2.2.0" logger = getLogger(__name__) UNLOCK_SCRIPT = b""" if redis.call("get", KEYS[1]) == ARGV[1] then redis.call("del", ...
from __future__ import print_function import grtrans_batch as gr import pickle import numpy as np import copy import sys def load_pickle(file): with open(file, 'rb') as f: if sys.version_info.major > 2: data = pickle.load(f, encoding='latin1') else: data = pickle.load(f) ...
# Author: Alexander M. Terp # Date created: January, 2016 # Description: Contains code responsible for the functions used in the # calculations for SVA. import csv from math import ceil # Used to help user in case they enter information incorrectly. from window import status # De...
#!/usr/bin/env python """ Command line interface to interact with a VNC Server (c) 2010 Marc Sibson MIT License """ import getpass import optparse import sys import os import shlex import logging import logging.handlers from twisted.python.log import PythonLoggingObserver from twisted.internet import reactor, protoc...
# drizzle/base.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2010-2011 Monty Taylor <mordred@inaugust.com> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: drizz...
# -*- coding: utf-8 -*- ''' Test module for syslog_ng ''' # Import Python modules from __future__ import absolute_import from textwrap import dedent # Import Salt Testing libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASO...
import os import json import gzip import math from . import Interpolate from . import Extrapolate from . import vehicles from . import log class EmissionsJsonParser: def __init__(self, vehicle, pollutants, filename="roadTransport.json.gz"): self._filename = filename self._data = None self...
"""Provides SeriesLoader object and helpers, used to read Series data from disk or other filesystems. """ from collections import namedtuple import json from numpy import array, arange, frombuffer, load, ndarray, unravel_index, vstack from numpy import dtype as dtypeFunc from scipy.io import loadmat from cStringIO impo...
# -*- coding: utf-8 -*- # 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 require...
# -*- coding: utf-8 -*- import base64 import datetime import os from unittest import TestSuite, TestLoader from flask import url_for, current_app from spkrepo.ext import db from spkrepo.models import Build, Role, Architecture, Firmware from spkrepo.tests.common import (BaseTestCase, BuildFactory, create_spk, PackageF...
from inspect import isclass from django.conf import settings from django.core.files.storage import get_storage_class from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',) class _LOG(object): action_class = None class CREATE_ADDON(_LOG...
# Copyright 2014 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 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
import datetime from sqlalchemy import desc from SpiderKeeper.app import db, Base class Project(Base): __tablename__ = 'sk_project' project_name = db.Column(db.String(50)) @classmethod def load_project(cls, project_list): for project in project_list: existed_project = cls.query.f...
from numpy.testing import ( assert_allclose, assert_array_equal, ) import numpy as np import pytest from sklearn.datasets import make_classification from sklearn.compose import make_column_transformer from sklearn.exceptions import NotFittedError from sklearn.linear_model import LogisticRegression from sklearn...
# Copyright 2010-2015 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...
import os import re import logging from datetime import datetime from taca.utils.filesystem import chdir from taca.illumina.Runs import Run from taca.utils import misc from flowcell_parser.classes import SampleSheetParser from io import open logger = logging.getLogger(__name__) TENX_GENO_PAT = re.compile('SI-GA-[A-H...
# 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 u...
# 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 # d...
""" Each function tests specific Config class method. """ import sys import pytest sys.path.append('../..') from batchflow import Config def test_dict_init(): """ Tests Config.__init__() using input of dictionary type. For inner structure check Config.flatten() is used. """ #Slashed-structured ...
# 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 ...
""" Ax_Metrics - Logic for generating TimeFrame steps for a query. ------------------------------------------------------------------------------ Author: Dan Kamins <dos at axonchisel dot net> Copyright (c) 2014 Dan Kamins, AxonChisel.net """ # ------------------------------------------------------------------------...
"""Device that implements a ball save.""" from typing import Optional from mpf.core.delays import DelayManager from mpf.core.device_monitor import DeviceMonitor from mpf.core.events import event_handler from mpf.core.mode import Mode from mpf.core.mode_device import ModeDevice from mpf.core.system_wide_device import S...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Este script se asegura de monitorizar la web para asegurarse de que si algo # se rompe vuelva a estar en estado operativo. import os import glob import re import socket import sys import time import urllib2 # START config webapp = 'gamersmafia' homeurl = 'gamersmafia.co...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
from random import * from math import * deg_to_rad = 0.01745329252 rad_to_deg = 57.2957795131 def EquipLoadout(UI, loadout): UI.EquipLoadout(loadout) def AutoConfigurePlatform(UI, setupName): UI.AutoConfigurePlatform(setupName) def MovePlatform(UI, lon, lat): UI.MovePlatform(lon,...
# Copyright 2016 Pinterest, 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...
#!/usr/bin/python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import subprocess import fbchisellldbbase as fb import fbchisellldbobjcruntimehelp...
# Brain Tumor Classification # Load and Split dataset into training set, # validation set and testing set. # Author: Qixun QU # Copyleft: MIT Licience # ,,, ,,, # ;" '; ;' ", # ; @.ss$$$$$$s.@ ; # `s$$$$$$$$$$$$$$$' # $$$$$$$$$$$$$$$$$$ # $$$$P""Y$$$Y""W$$$$$ # $$$$ p"$$$"q $$$$$ # $...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np import random from collections import deque, namedtuple from DeepRTS.contrib.agents import Agent BUFFER_SIZE = int(1e5) # Replay memory size BATCH_SIZE = 64 # Number of experiences to sample from memory...
import collections.abc import copy import pickle import sys import unittest class DictSetTest(unittest.TestCase): def test_constructors_not_callable(self): kt = type({}.keys()) self.assertRaises(TypeError, kt, {}) self.assertRaises(TypeError, kt) it = type({}.items()) self....
from elasticsearch import Elasticsearch, TransportError from elasticsearch.helpers import scan import requests import pandas as pd import numpy as np import re from ipaddress import IPv4Address as ipv4, AddressValueError import time from bokeh.plotting import figure, output_file, show, save from bokeh.models import Fun...
from app import app, db from app.models import User, Role from flask import jsonify, request, g import jwt from app.exceptions import UserNotFound, UserCannotRegister, ErrorNoToken, InvalidUsage, NotAuthorized, InvalidToken from app.api.v1.resources.utils import get_users_json from flask_restful import Resource from ...
"""Matrix factorization with Sparse PCA""" # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD import numpy as np from ..utils import check_random_state from ..linear_model import ridge_regression from ..base import BaseEstimator, TransformerMixin from .dict_learning import dict_learning, dict_l...
#!/usr/bin/env python import logging from operator import itemgetter import os import re import sys import tempfile from apiclient.discovery import build from apiclient.http import MediaFileUpload from httplib2 import Http from oauth2client.client import AccessTokenCredentials import requests from robobrowser import R...
''' MFEM example 20 See c++ version in the MFEM library for more detail ''' import os import mfem.ser as mfem from mfem.ser import intArray from os.path import expanduser, join, dirname import numpy as np from numpy import sin, cos, exp, sqrt m_ = 1.0 k_ = 1.0 def run(order=1, prob=0, nste...
import experience_replay as er import match_processing as mp import champion_info as cinfo import draft_db_ops as dbo from draftstate import DraftState from models.inference_model import QNetInferenceModel, SoftmaxInferenceModel import json import pandas as pd import numpy as np import tensorflow as tf import sqlite3 ...
# Copyright 2015 PerfKitBenchmarker 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 appli...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2019 Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to u...
'Utility functions for the main scripts.' # # System includes # from baxter_interface import CHECK_VERSION import Queue import baxter_dataflow import baxter_interface import math import re import rospy import select import time # # File-local variables # _button_presses = Queue.Queue(1) # thread-safe place for but...
"""Tests for Momentum.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow as tf class MomentumOptimizerTest(tf.test.Te...
import json import os from ctypes import addressof, byref, c_double from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.driver import Driver from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import raster as capi from django.contrib.gis.gdal.rast...
import json import logging import re import requests import six import socket import time import websocket from .exceptions import SocketIOError, ConnectionError, TimeoutError TRANSPORTS = 'websocket', 'xhr-polling', 'jsonp-polling' BOUNDARY = six.u('\ufffd') TIMEOUT_IN_SECONDS = 3 _log = logging.getLogger(__name__)...
# 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 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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 2018 The Exoplanet ML 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 t...
# Copyright 2015 ETH Zurich # # 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, sof...
from . import base from . import messages from grow.pods import locales from grow.pods import urls import fnmatch import mimetypes import re import webob import os mimetypes.add_type('application/font-woff', '.woff') mimetypes.add_type('image/svg+xml', '.svg') mimetypes.add_type('text/css', '.css') SKIP_PATTERNS = [...
# 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...
import numpy as np import tensorflow as tf import tflearn from common_settings import CommonSettings GAMMA = 0.99 A_DIM = CommonSettings.A_DIM ENTROPY_WEIGHT = 0.5 ENTROPY_EPS = 1e-6 # S_INFO = 4 class ActorNetwork(object): """ Input to the network is the state, output is the distribution of all actions....
"""geomath.py: transcription of GeographicLib::Math class.""" # geomath.py # # This is a rather literal translation of the GeographicLib::Math class to # python. See the documentation for the C++ class for more information at # # https://geographiclib.sourceforge.io/html/annotated.html # # Copyright (c) Charles Kar...
import re from cStringIO import StringIO from datetime import datetime from django import forms from django.conf import settings from django.contrib.auth.models import User from django.core.files.uploadedfile import UploadedFile from django.forms.models import BaseInlineFormSet, inlineformset_factory import django_fi...
#!/usr/bin/python3 ''' Elementary black-box testing tool. This module provides a bunch of classes and subroutines for automated tests launching and stress testing. All that is left to a programmer is a test generation per se. Typical testing script could look like any of the following ones. # Predefined tests from b...
# Copyright 2014-2015 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """Defines :class:`scopedef_t` class""" import time import warnings from . import algorithm from . import templates from . i...
import struct import hashlib import math import binascii from functools import reduce class SvgNode: fillColor = '' strokeColor = '' strokeWidth = '' class Svg(SvgNode): width = '' height = '' children = [] def __init__(self, width, height): self.width = width self.heigh...
import os, asana, json from datetime import datetime from asana.error import ForbiddenError class IGF_asana: ''' A python class for accessing Asana :params asana_config: A json config file with personal token e.g. { "asana_personal_token" : "zyx" } :param asana_project_id: A project ...
from __future__ import generators import sys import os.path from itertools import count packagedir = os.path.dirname(__file__) # look for ctypes in the system path, then try looking for a private ctypes # distribution try: import ctypes except ImportError: private_ctypes = os.path.join(packagedir, 'pvt_ctypes...
import cvxpy as cvx import numpy as np from sklearn.metrics import make_scorer from sklearn.utils import check_X_y from .base_cvxproblem import Relevance_CVXProblem from .base_initmodel import InitModel from .base_type import ProblemType class OrdinalRegression(ProblemType): @classmethod def parameters(cls):...
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, c...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ #####...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
# 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 u...
# -*- coding: utf-8 -*- # # Copyright (C) 2017 KuraLabs S.R.L # # 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 applicabl...
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2012,2013 Contributor # # 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...
# 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 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 # distributed under the Li...
# -*- coding: utf-8 -*- # Copyright 2013 Metacloud, Inc. # 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...
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
#!/usr/bin/env python from __future__ import print_function import hdr_parser, sys, re, os from string import Template if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO ignored_arg_types = ["RNG*"] gen_template_check_self = Template(""" if(!PyObject_TypeCheck(self,...
#!/usr/bin/env python # filter_qc 0.0.1 # Generated by dx-app-wizard. # # Basic execution pattern: Your app will run on a single machine from # beginning to end. # # See https://wiki.dnanexus.com/Developer-Portal for documentation and # tutorials on how to modify this file. # # DNAnexus Python Bindings (dxpy) documenta...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
from astropy import units as u from panoptes.pocs.camera.gphoto.base import AbstractGPhotoCamera from panoptes.utils import error from panoptes.utils.time import current_time from panoptes.utils.utils import get_quantity_value class Camera(AbstractGPhotoCamera): def __init__(self, readout_time: float = 1.0, file...
# Copyright 2013 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 ag...
from __future__ import absolute_import from django.core.exceptions import ImproperlyConfigured from django.db import connection, transaction from django.db.transaction import commit_on_success, commit_manually, TransactionManagementError from django.test import TransactionTestCase, skipUnlessDBFeature from django.test...
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
""" @package mi.instrument.sunburst.test.test_driver @file marine-integrations/mi/instrument/sunburst/driver.py @author Kevin Stiemke @brief Common test case code for SAMI instrument drivers USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t testnam...
# -*- coding: utf-8 -*- # -- Dual Licence ---------------------------------------------------------- ############################################################################ # GPL License # # ...
# Purpose: Script containing Settings for the Model # # Info: Change the Parameters at the top of the scrip to change how the Agent interacts # # Developed as part of the Software Agents Course at City University # # Dev: Dan Dixey and Enrico Lopedoto # # Updated: 10/3/2016 # import json import os import numpy...
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # 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. Redistrib...
# coding=utf-8 # Copyright 2013 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
""" Filter effects structure. """ from __future__ import absolute_import, unicode_literals import attr import io import logging from psd_tools.psd.base import BaseElement, ListElement from psd_tools.utils import ( read_fmt, write_fmt, read_length_block, write_length_block, is_readable, write_by...
# Copyright (c) 2014 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 appli...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Test the fileview interface.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from absl import app from future.builtins import range from grr_response_core.lib import rdfvalue from grr_respon...
from dispel4py.workflow_graph import WorkflowGraph from dispel4py.provenance import * from dispel4py.new.processor import * import time import random import numpy import traceback from dispel4py.base import create_iterative_chain, GenericPE, ConsumerPE, IterativePE, SimpleFunctionPE from dispel4py.new.simple_process i...
# -*- coding: utf-8 -*- # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
""" Defines classes to represent each Babel type in Python. These classes should be used to validate Python objects and normalize them for a given type. The data types defined here should not be specific to an RPC or serialization format. This module should be dropped into a project that requires the use of Babel. In...
# coding=utf-8 # Copyright 2018 The Dopamine 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...
from __future__ import division import datetime from django.core.urlresolvers import reverse from django.db import models from django.db.models import F, Q, Sum, Count from django.utils import timezone from django.utils.text import slugify from django.contrib.auth.models import User from django.conf import settings f...