gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
#!/usr/bin/env python ''' The MIT License (MIT) Copyright (c) <2016> <Mathias Lesche> 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 ...
# Copyright 2012 Nebula, 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 agree...
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
#!/usr/bin/env python3 # Copyright (c) 2015 Andrew Ruder <andy@aeruder.net> # # 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...
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys from decimal impor...
#!/usr/bin/env python3 # encoding: utf-8 import sqlite3 import operator import os import re import sys import datetime class reader(): """A class for the easy analysis of iOS text message databases.""" def __init__(self): """ Initializes the reader instance variables. """ # ...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Fourth Paradigm Development, Inc. # # Licensed under the Apache License, Version 2.0 (the "Licen...
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import Repr import os import re import pprint import traceback class Restart(Exception): """Causes a debugger to be restarted for the debugged python program.""" pa...
# # 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 # ...
""" Ridge regression """ # Author: Mathieu Blondel <mathieu@mblondel.org> # Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com> # Fabian Pedregosa <fabian@fseoane.net> # License: Simplified BSD from abc import ABCMeta, abstractmethod import warnings import numpy as np from scipy import linalg f...
# Copyright (C) 2006-2007 Red Hat, Inc. # Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # 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 2 of the License, or # ...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import codecs import shutil import argparse from functools import partial import six from six.moves import configparser from . import docs, __version__ from .objects import KeyMap PACKAGE = os.path.dirname(__file__) HOME = os.path.expanduser(...
# 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 bson import bson.json_util import pymongo import json from bson import ObjectId # from pymongo import Connection import string import tangelo import numpy as np import networkx as nx from networkx.readwrite import json_graph import rpy2.robjects as robjects import rpy2.robjects.numpy2ri rpy2.robjects.numpy2ri.a...
import contextlib from django.core.exceptions import ValidationError as DjangoValidationError # Remants from MODM days # TODO: Remove usages of aliased Exceptions ValidationError = DjangoValidationError ValidationValueError = DjangoValidationError ValidationTypeError = DjangoValidationError class TokenError(Excepti...
''' Zstack KVM Checker Factory. @author: YYK ''' import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.header.vm as vm_header import zstackwoodpecker.header.volume as volume_header import zstackwoodpecker.header.image as image_header import zstackwoodpecker.header.security_g...
#!/usr/bin/env python3 # Copyright 2015 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 . import html_checker from os import path as os_path import re from sys import path as sys_path from . import test_util import un...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from datetime import datetime, timedelta import logging from operator import attrgetter import sys import time # project from checks.check_status import ForwarderStatus from util import get_tornado_ioloo...
#!/usr/bin/env python # Copyright 2015 The Crashpad 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 # # Unles...
"""Support to select a date and/or a time.""" import logging import datetime import voluptuous as vol from homeassistant.const import ATTR_DATE, ATTR_TIME, CONF_ICON, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA from homeassis...
# Lint as: python3 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
#!/usr/bin/python # Copyright Abel Sinkovics (abel@sinkovics.hu) 2015. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import sys import argparse import re import os def remove_last_dot(s): if s.en...
import asyncio from graphql import ( GraphQLArgument, GraphQLEnumType, GraphQLEnumValue, GraphQLField, GraphQLInputField, GraphQLInputObjectType, GraphQLInt, GraphQLInterfaceType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLSchema, GraphQLString, get_i...
"""Unit tests for cloudtrail-supported APIs.""" import boto3 import pytest import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError from datetime import datetime from moto import mock_cloudtrail, mock_s3, mock_sns from moto.core import ACCOUNT_ID from uuid import uuid4 @mock_s3...
#!/usr/bin/python3 ''' Gathers endpoints for services from kubernetes-api and generates a haproxy.cfg from it. Since not all endpoints should always be exposed, the endpoints have to be annotated to be considered for haproxy-config generation. The required keywords are domain - The domain-name under which the service i...
import sys import yaml from twisted.internet import protocol, defer from twisted.internet.error import ConnectionDone from oonib import log def read_pcap(filename): """ @param filename: Filesystem path to the pcap. Returns: [{"client": "\x17\x52\x15"}, {"server": "\x17\x15\x13"}] """ from ...
# Copyright 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 writing, s...
import os import cv2 import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from torch.utils.data import DataLoader, Dataset import albumentations as albu import warnings from augs import ( get_training_augmentation, get_validation_augmentation, get_preprocessing, ) ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# 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...
""" django-helpdesk - A Django powered ticket tracker for small enterprise. (c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. urls.py - Mapping of URL's to our various views. Note we always used NAMED views for simplicity in linking later on. """ from django.conf import settings impor...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from io import BytesIO import os from django.conf import settings from django.core.files.storage import Storage from django.core.files.base import File from django.core.exceptions import ImproperlyConfigured from django.utils.six.moves.urllib.parse impo...
import unittest, time, sys, random, logging sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_glm import h2o_exec as h2e, h2o_jobs DO_IMPORT_CHECK = True class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmetho...
# Copyright (c) 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 required by applicable law or agreed to in writ...
"""Integration tests for Repositories.""" import github3 import github3.exceptions as exc import pytest from . import helper class TestRepository(helper.IntegrationHelper): """Integration tests for the Repository object.""" def test_add_collaborator(self): """Test the ability to add a collaborator...
# protoc plugin to map from FileDescriptorProtos to Envoy doc style RST. # See https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto # for the underlying protos mentioned in this file. See # http://www.sphinx-doc.org/en/stable/rest.html for Sphinx RST syntax. from collections import defau...
#!/usr/bin/env python # Copyright (c) 2014 Cloudera, Inc. All rights reserved. # Tests admission control import pytest import threading import re from time import sleep, time from tests.beeswax.impala_beeswax import ImpalaBeeswaxException from tests.common.custom_cluster_test_suite import CustomClusterTestSuite from ...
""" Copyright 2014 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 agreed to in...
#!/usr/bin/env python # coding=utf-8 # Copyright 2011 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 ap...
"""Parsing espresso files""" from e_nodes import * from e_error import ParseError from e_input import Input from e_operators import * def parse_string_literal(input_handler, end_ch): string = "" while True: if input_handler.eof(): raise ParseError(input_handler, "end of input_handler insid...
# -*- coding: utf-8 -*- import os import os.path from StringIO import StringIO from time import time __all__ = ['Parser', 'IncrementalParser', 'DispatchParser'] import xml.dom as xd import xml.dom.minidom as xdm import xml.sax as xs import xml.sax.handler as xsh import xml.sax.saxutils as xss from xml.sax.saxutils i...
import sys import traceback from catalyst.errors import ZiplineError def silent_except_hook(exctype, excvalue, exctraceback): if exctype in [PricingDataBeforeTradingError, PricingDataNotLoadedError, SymbolNotFoundOnExchange, NoDataAvailableOnExchange, ExchangeAuthEmpty]: ...
''' This module exposes several classes related to currency markets ''' from datetime import datetime, timedelta from decimal import Decimal from abc import ABCMeta, abstractmethod from collections import defaultdict import copy import six from mexbtcapi.currency import ExchangeRate, Amount, Currency, CurrencyPair fr...
""" Data structures for the line input. It holds the text, cursor position, history, etc... """ from __future__ import unicode_literals from .completion import Completion from .validation import ValidationError from .document import Document from .enums import IncrementalSearchDirection from .history import History fr...
import collections from rest_framework.parsers import JSONParser from rest_framework.exceptions import ParseError from api.base.utils import is_bulk_request from api.base.renderers import JSONAPIRenderer from api.base.exceptions import JSONAPIException NO_ATTRIBUTES_ERROR = 'Request must include /data/attributes.' NO...
#!/usr/bin/env python # # Copyright 2014 Chundong Wang # import logging import json import os import flask import time from datetime import datetime,timedelta import traceback from model import DateTimeEncoder,Room from flask import render_template,abort from google.appengine.api import users from google.appengine.api...
"""Crust combines the shell and filling into one control.""" __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>" __cvsid__ = "$Id: crust.py 44235 2007-01-17 23:05:14Z RD $" __revision__ = "$Revision: 44235 $"[11:-2] import wx import os import pprint import re import sys import dispatcher import editwindow from ...
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
"""Copyright 2008 Orbitz WorldWide 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 traceback import json import requests from .models import ( Log, RequestLog, EventLog, ) class NoRequestException(Exception): pass class NoExceptionException(Exception): pass class ObjectLogger(object): def log_request(self, log=None, request=None, request_body=None): # --...
# 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 required by applicable law or agree...
import pygame all_sprites = pygame.sprite.Group() class BaseWidget(pygame.sprite.Sprite): def __init__(self, pos=(0, 0), size=(0, 0)): super(BaseWidget, self).__init__() self._rect = pygame.Rect(pos, size) self._image = pygame.Surface(self._rect.size) self.should_update = True ...
"""Backup Dropbox Business files. See README.md for full instructions. """ import argparse from datetime import date, datetime from concurrent.futures import ThreadPoolExecutor from functools import partial import json import logging import logging.config import os import re import string import sys import time from ...
############################################################################### # drawtools.py # Some drawing tools. ############################################################################### import sys import numpy as np import numpy.linalg as linalg import scipy as sp import scipy.constants import scipy.inter...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on Feb, 27 2013 .. codeauthor: Heinz-Peter Lang <lang@weblyzard.com> .. codeauthor: Albert Weichselbraun <Weichselbraun@weblyzard.com> .. codeauthor: Fabian Fischer <fabian.fischer@modul.ac.at> Handles the new (http://www.weblyzard.com/wl/2013#) weblyzard XML form...
import tensorflow as tf # neural network for function approximation import gym # environment import numpy as np # matrix operation and math functions from gym import wrappers import gym_morph # customized environment for cart-pole import matplotlib.pyplot as plt import time # Hyperparameters RANDOM_NUMBER_SEED = 1 # ...
#!/usr/bin/env python # coding=utf-8 import pygraphviz as pgv from pdb import * gdata = [ ['A', '->', 'B',1], ['A', '->', 'C',1], ['B', '->', 'C',1], ['B', '->', 'D',1], ['C', '->', 'D',1], ['D', '->', '',1], ] graph = { 'A': ['B', 'C'], 'B': ['C', 'D'], 'C': ['D'], 'D':[] } def...
# These are all the modules we'll be using later. Make sure you can import them # before proceeding further. from __future__ import print_function import numpy as np import tensorflow as tf from six.moves import cPickle as pickle # pickle_file = 'notMNIST.pickle' pickle_file = 'notMNIST_santinized.pickle' with open(...
# encoding=utf8 import datetime from distutils.version import StrictVersion import hashlib import os.path import random from seesaw.config import realize, NumberConfigValue from seesaw.item import ItemInterpolation, ItemValue from seesaw.task import SimpleTask, LimitConcurrent from seesaw.tracker import GetItemFromTrac...
# Copyright 2015, 2016 OpenMarket Ltd # # 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 ...
# ============================================================================= # COPYRIGHT 2013-14 Brain Corporation. # License under MIT license (see LICENSE file) # ============================================================================= import argparse import collections import distutils.core import fnmatch i...
import boto from boto import s3 from boto.s3 import connection from wal_e import log_help logger = log_help.WalELogger(__name__) _S3_REGIONS = { # A map like this is actually defined in boto.s3 in newer versions of boto # but we reproduce it here for the folks (notably, Ubuntu 12.04) on older # versions....
# Copyright 2015 CloudByte 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...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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 t...
#!/usr/bin/env python # 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 required by app...
"""Helper to check the configuration file.""" from __future__ import annotations from collections import OrderedDict import logging import os from pathlib import Path from typing import List, NamedTuple, Optional import voluptuous as vol from homeassistant import loader from homeassistant.config import ( CONF_CO...
import sys sys.path.insert(0,'..') sys.path.insert(0,'../sanitize') from app.models import * import urllib3 import json import requests from pprint import pprint from date_utils import * from trueskill_functions import * from misc_utils import print_ignore # To be converted into TournamentHeader objects class Tourna...
# -*- coding: utf-8 -*- import numpy as np from ..Qt import QtGui, QtCore, QtSvg, QT_LIB from ..graphicsItems.ROI import ROI from .. import SRTTransform, ItemGroup if QT_LIB == 'PySide': from . import TransformGuiTemplate_pyside as TransformGuiTemplate elif QT_LIB == 'PyQt4': from . import TransformGuiTemplate_...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
import json from deciders.test_01 import test_01 from deciders.test_02 import test_02 from deciders.test_03 import test_03 from deciders.test_04 import test_04 from deciders.test_05 import test_05 from deciders.test_06 import test_06 from deciders.test_07 import test_07 from deciders.test_08 import test_08 from decide...
# Copyright 2018 The Oppia 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 applicable ...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. This grew out of my personal needs, specifically the code repetition that went into pulling geometries and fields out of...
# -*- coding: utf-8 -*- """ eve.methods.delete ~~~~~~~~~~~~~~~~~~ This module imlements the DELETE method. :copyright: (c) 2015 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ from flask import current_app as app, abort from eve.utils import config, debug_error_message, Parse...
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2017 by the Jinja Team. :license: BSD. """ import sys from itertools import chain from types import MethodType from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup,...
import os, json Simon_curves = { "n-Propane" : { "BibTeX" : "Reeves-JCP-1964", "T_m": -187.75 + 273.15, "parts": [{"T_0" : 85.3, "a" : 7.180e8, "c" : 1.283, "p_0" : 0.0, "T_max" : 168.63}] }, "n-Pentane" : { "BibTeX" : "Reeves-JCP-1964", "T_m": -129.89 + 273.15, "parts": [{"T_0" : 143.5, "...
""" Tests for the app_util module """ import unittest import biokbase.auth from biokbase.narrative.app_util import ( check_tag, system_variable, get_result_sub_path, map_inputs_from_job, map_outputs_from_state, ) from .narrative_mock.mockclients import get_mock_client import os import mock from . im...
"""Mayavi/traits GUI visualization elements""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) import os import numpy as np # allow import without traits try: from mayavi.mlab import pipeline, text3d from mayavi.modules.glyph import Glyph from mayavi.modules.surface ...
import pytest import aioredis from asynctest import CoroutineMock, MagicMock, patch, ANY from aiocache import RedisCache from aiocache.base import BaseCache from aiocache.serializers import JsonSerializer from aiocache.backends.redis import RedisBackend, conn, AIOREDIS_BEFORE_ONE @pytest.fixture def redis_connectio...
# Copyright (c) 2011 Openstack, LLC. # 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 requi...
""" Tests that work on both the Python and C engines but do not have a specific classification into the other test modules. """ from datetime import datetime from io import StringIO import os import pytest from pandas import ( DataFrame, Index, MultiIndex, ) import pandas._testing as tm xfail_pyarrow = p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012-2013 Michal Kalewski <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHO...
import numpy as np import keras.backend as K from keras.activations import linear from keras.models import Model as K_Model from keras.layers import Input, Activation, TimeDistributed, Dense from keras.optimizers import Adam from keras.layers.core import Lambda from keras.layers.merge import Concatenate from learn.mod...
# Copyright (c) 2014 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...
# Copyright 2011 VMware, 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 ...
"""This module provides provides a dataset for the extension of RAM.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from .DummyDataset import DummyDataset from .IndexGenerator import IndexGenerator import itertools import numpy as np class GroupDataset...
#---------------------------------------------------------------------- # Copyright (c) 2014 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
''' TODO Add a proper introduction of the package. ''' from pyPaSWAS.Core.Exceptions import InvalidOptionException from datetime import datetime try: import ConfigParser except ImportError: import configparser as ConfigParser import logging import optparse import os import sys def set_logger(settings...
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ from __future__ import unicode_literals ...
""" addon-voxel-painter.py Copyright (c) 2013 Luke Frisken 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,...
#import getopt import argparse import emails import sys import re import os import subprocess import time import signal from collections import defaultdict #import our libs from emails import EmailTemplate from utils import Utils from display import Display from gather import Gather from mydns import Dns from webprofi...
# This testfile tests SymPy <-> NumPy compatibility # Don't test any SymPy features here. Just pure interaction with NumPy. # Always write regular SymPy tests for anything, that can be tested in pure # Python (without numpy). Here we test everything, that a user may need when # using SymPy with NumPy try: from nu...
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
# # Copyright 2013 Quantopian, 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 wr...
"""Utilities for input validation""" # Authors: Olivier Grisel # Gael Varoquaux # Andreas Mueller # Lars Buitinck # Alexandre Gramfort # Nicolas Tresegnie # License: BSD 3 clause import warnings import numbers import numpy as np import scipy.sparse as sp from ..externals i...
import datetime from django.core.exceptions import ObjectDoesNotExist from django.db import IntegrityError from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.contrib import messages from django.http import HttpResponse, JsonResponse from dja...