gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# # 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...
# pylint: disable=g-bad-file-header # 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/LICENS...
# 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...
# 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 2015 IBM Corp. # 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 app...
# -*- coding: utf-8 -*- """ Coinkit ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import os import json import ecdsa import hashlib import binascii from .entropy import random_secret_exponent from .passphrase import random_256bit_passphrase, random_1...
""" Interfaces for serializing Django objects. Usage:: from django.core import serializers json = serializers.serialize("json", some_queryset) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIALIZATION_MODULES = { ...
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import time import argparse import ConfigParser from vnc_api.vnc_api import * from cfgm_common.exceptions import * from vnc_admin_api import VncApiAdmin class VrouterProvisioner(object): def __init__(self, args_st...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python # Copyright (c) 2011-2016 Rackspace US, 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 app...
from __future__ import unicode_literals import json from moto.core.responses import BaseResponse from .models import redshift_backends class RedshiftResponse(BaseResponse): @property def redshift_backend(self): return redshift_backends[self.region] def create_cluster(self): cluster_kwa...
''' Generative structure search (SearchSPN). ''' import numpy as np import logging from spnss.mathutil import argmin_fair from fast import compute_weights_of from history import NetHistory import operators as ops import nbc import knobs import cc import deps def compute_edges(net, data): nodes = net.pot + net.v...
# Copyright (c) 2014 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import posixpath import shutil import stat import tarfile from naclports import configuration, package, util, error PAYLOAD_DIR = 'paylo...
# # Preferences.py -- Preferences plugin for fits viewer # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import math from ginga.misc import Widgets, ParamSet from gin...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.threadpool} """ import pickle, time, weakref, gc, threading from twisted.trial import unittest from twisted.python import threadpool, threadable, failure, context from twisted.internet import reactor from twisted.i...
# # 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 random import randrange from matplotlib import patches from tensorflow.examples.tutorials.mnist import input_data import numpy as np import matplotlib.pyplot as plt import pickle ''' Creates dataset of digit sequences by concatenating of mnist digits Params: dataset - dataset to use (mnist.train, mnist.vali...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pickle import unittest import numpy as np import properties class HP1(properties.HasProperties): a = properties.Integer('int a') class HP2(properties.Has...
import requests import re import json import sys import datetime import logging from logging.handlers import TimedRotatingFileHandler import ConfigParser # Importing db manager sys.path.insert(0, '../../resource-contextualization-import-db/abstraction') from DB_Factory import DBFactory # Importing utils sys.path.in...
from __future__ import print_function, unicode_literals from future.builtins import open import os import re import sys from contextlib import contextmanager from functools import wraps from getpass import getpass, getuser from glob import glob from importlib import import_module from posixpath import join from mezza...
# # 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 # ...
# -*- coding: utf-8 -*- """ sphinx.writers.html ~~~~~~~~~~~~~~~~~~~ docutils writers handling Sphinx' custom nodes. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import posixpath import os import copy import warnings from ...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Copyright (C) 2007 Alexandre Conrad, alexandre (dot) conrad (at) gmail (dot) com # # This module is part of FormAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import cgi import warnings import logging logger = logging.getLogger('formalchemy.' + __name__) MIN_SA_V...
# Copyright 2015 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 # # Copyright 2015 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...
""" discovery and running of std-library "unittest" style tests. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import traceback import _pytest._code from _pytest.compat import getimfunc from _pytest.config import hookimpl from _pytest.outco...
import os import sys # dmrs sub-directory directory = os.path.dirname(os.path.realpath(__file__)) # add pydmrs submodule to Python path sys.path.insert(1, os.path.join(directory, 'pydmrs')) from pydmrs.components import Pred, Sortinfo, EventSortinfo, InstanceSortinfo from pydmrs.core import Link, ListDmrs from pyd...
""" High level functional tests for minitrue. """ import urlparse from twisted.internet import reactor from twisted.trial.unittest import TestCase from twisted.web import server, resource from minitrue import misdirection, proxy from minitrue.utils import StringIO, Constructor from minitrue.test.observer import Obser...
# Copyright 2014 0xc0170 # # 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, soft...
from __future__ import annotations from datetime import datetime, timedelta, tzinfo from typing import Any, ClassVar, Sequence import attrs from tzlocal import get_localzone from ...abc import Trigger from ...marshalling import marshal_date, marshal_timezone, unmarshal_date, unmarshal_timezone from ...util import ti...
#!/usr/bin/env python """ This file contains code for detecting cones """ import numpy as np, cv2, argparse, time, sys import rospy, threading # Needed for publishing the messages from sensor_msgs.msg import Image from robo_magellan.msg import pose_data from robo_magellan.msg import location_msgs as location_data fro...
from sqlalchemy import create_engine from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey from sqlalchemy import exists from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.sql import select from...
from __future__ import print_function, division from math import log as _log from .sympify import _sympify from .cache import cacheit from .core import C from .logic import _fuzzy_group from .singleton import S from .expr import Expr from .evalf import PrecisionExhausted from .function import (_coeff_isneg, expand_co...
''' python modules ''' from sys import _getframe as getframe from types import IntType from types import ListType from types import TupleType ''' own modules ''' from main.io_module import add_Separator from main.information import Information from sge.fileclass import Fileclass from sge.sge import SGE class Gsnap(...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals import codecs import logging import multiprocessing import os import re import sys import threading import time import traceback from logging.handlers import BaseRotatingHandler, _MIDNIGHT from stat import...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import json from dataclasses import dataclass from textwrap import dedent import pytest from pants.backend.python.macros.python_artifact import Python...
"""Views for the node settings page.""" # -*- coding: utf-8 -*- from dateutil.parser import parse as dateparse import httplib as http import logging from flask import request, make_response from framework.exceptions import HTTPError from addons.base import generic_views from addons.github.api import GitHubClient, re...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import re import time import platform __author__ = 'Libao Jin' __create_date__ = '01/13/2017' __last_update_date__ = '02/07/2018' __copyright__ = "Copyright (c) 2018 Libao Jin" __license__ = "MIT" __version__ = "1.5.1" __maintainer__ = "Libao Jin" __email...
#!/usr/bin/env python # Author: Ryan Myers # Models: Jeff Styers, Reagan Heller # # Last Updated: 2015-03-13 # # This tutorial provides an example of creating a character # and having it walk around on uneven terrain, as well # as implementing a fully rotatable camera. from direct.showbase.ShowBase import ShowBase fr...
#!/usr/bin/env python """ API v1.0 Command and Control (C2) direct access routes: Enter direct access mode: /c2/instrument/<string:reference_designator>/direct_access/start Execute direct access command /c2/instrument/<string:reference_designator>/direct_access/execute Exit direct access mo...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
""" Platform that supports scanning iCloud. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.icloud/ """ import logging import random import os import voluptuous as vol from homeassistant.const import CONF_USERNAME, CONF_PASSWORD from home...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ Layer that transforms VNC config objects to ifmap representation """ from cfgm_common.zkclient import ZookeeperClient, IndexAllocator from gevent import ssl, monkey monkey.patch_all() import gevent import gevent.event import sys import time from ...
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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 applic...
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright 2015 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 2018 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...
from __future__ import division, print_function from collections import defaultdict import itertools import operator import re import os import subprocess import tempfile import warnings import time import sys import functools import array try: from scipy import sparse except ImportError: sparse = None try: ...
from functools import partial import logging import six import simplejson as json from bravado_core import schema from bravado_core.content_type import APP_JSON from bravado_core.exception import SwaggerMappingError from bravado_core.marshal import marshal_schema_object from bravado_core.unmarshal import unmarshal_sc...
from pymeta.bootbase import BootBase as GrammarBase import string class BootOMetaGrammar(GrammarBase): globals = globals() def rule_hspace(self): _locals = {'self': self} self.locals['hspace'] = _locals def _G_or_1(): _G_exactly_1, lastError = self.exactly(' ') se...
from jsonrpc import ServerProxy as ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "gwangcoinrpc" rpcpass = "BFZmHDbXwyjrwZeoHNJqLYPwS4LABVT8L84UzBNxAFWF" # ====== END USER SETTINGS ====== if rpcpass == ...
"""The tests for Tasmota device triggers.""" import copy import json from unittest.mock import Mock, patch from hatasmota.switch import TasmotaSwitchTriggerConfig import pytest import homeassistant.components.automation as automation from homeassistant.components.tasmota import _LOGGER from homeassistant.components.t...
""" homeassistant.components.http ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides an API and a HTTP interface for debug purposes. For more details about the RESTful API, please refer to the documentation at https://home-assistant.io/developers/api/ """ from datetime import timedelta import gzip from http import coo...
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyright n...
import os import random import re import shutil import signal import socket import subprocess import tempfile import time from djblets.util.filesystem import is_exe_in_path try: from P4 import P4Exception except ImportError: pass from reviewboard.diffviewer.parser import DiffParser from reviewboard.scmtools.c...
""" **REP** wrappers are derived from :class:`Classifier` and :class:`Regressor` depending on the problem of interest. Below you can see the standard methods available in the wrappers. """ from __future__ import division, print_function, absolute_import from abc import ABCMeta, abstractmethod import numpy import pan...
################################################################# # seTree.py # Originally from Tree.py # Altered by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004 # # This class actually decides the behavior of the sceneGraphExplorer # You might feel it realy looks like the original one, but we actually did a lots of chan...
#!/usr/bin/env python """Alerta WatchDog script to monitor Alerta service""" __author__ = "Mark Bradley (mbrad@github)" __version__ = "0.8.1" import urllib, urllib2, sys, os, smtplib, time, socket from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart from email.mime.text import MIMETex...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): t = orm.StateType.objects.get_or_create(slug="draft-iana-action", label="IANA Action state")[0] orm.State.objects.get_o...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Authors: Lars Buitinck # Dan Blanchard <dblanchard@ets.org> # License: BSD 3 clause from array import array from operator import itemgetter import numpy as np import scipy.sparse as sp from ..base import BaseEstimator, TransformerMixin from ..externals import six from ..externals.six.moves import xrange f...
# Copyright 2012-2017 The Meson development team # 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...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
''' @Summary: API endpoint for accessing company data from mysql database ''' from flask import jsonify, request from flask_restful import Resource, reqparse from api.sql.models import * #import all of the models from models.py from api.util.parse_json import json_decode, json_encode #for json request parsing from ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# -*- coding: utf-8 -*- from cms.exceptions import NoHomeFound from cms.models.managers import PageManager, PagePermissionsPermissionManager from cms.models.metaclasses import PageMetaClass from cms.models.placeholdermodel import Placeholder from cms.models.pluginmodel import CMSPlugin from cms.utils.copy_plugins impor...
# 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 a...
from robot.api import logger # noqa: F401 #pylint: disable=unused-import from TestStack.White.UIItems.ListBoxItems import ComboBox, ListBox from TestStack.White.UIItems import UIActionException from WhiteLibrary.exceptions import ItemDisabledError from WhiteLibrary.keywords.librarycomponent import LibraryComponent fr...
#!/usr/bin/env python # coding=utf8 import hashlib import hmac import os import tempfile from .decorator import StoreDecorator class _HMACFileReader(object): def __init__(self, hm, source): self.hm = hm self.source = source # "preload" buffer self.buffer = source.read(self.hm.di...
import unittest import numpy import six import chainer from chainer import cuda from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition def _uniform(*shape): return numpy.random.uniform(-1, 1, shape).astype(numpy.float32) def _full_...
# Copyright 2017--2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
#!/usr/bin/python3 import os, os.path, re, json from functools import wraps from flask import Flask, request, render_template, abort, Response import auth, utils from mailconfig import get_mail_users, get_mail_users_ex, get_admins, add_mail_user, set_mail_password, remove_mail_user from mailconfig import get_mail_u...
#!/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...
from django.db.models.expressions import Func, Value from django.db.models.fields import IntegerField from django.db.models.functions import Coalesce from django.db.models.lookups import Transform from django.db.utils import NotSupportedError class BytesToCharFieldConversionMixin: """ Convert CharField result...
"""Test the Volumio config flow.""" from unittest.mock import patch from homeassistant import config_entries from homeassistant.components import zeroconf from homeassistant.components.volumio.config_flow import CannotConnectError from homeassistant.components.volumio.const import DOMAIN from tests.common import Mock...
import math import warnings from sympy import Rational as frac from sympy import sqrt from ..helpers import article from ._helpers import C2Scheme, register from ._rabinowitz_richter import rabinowitz_richter_1 from ._tyler import tyler_2 source = article( authors=["Richard Franke"], title="Obtaining cubatur...
"""The Mazda Connected Services integration.""" from datetime import timedelta import logging import async_timeout from pymazda import ( Client as MazdaAPI, MazdaAccountLockedException, MazdaAPIEncryptionException, MazdaAuthenticationException, MazdaException, MazdaTokenExpiredException, ) impo...
#!/usr/bin/python from os.path import join,exists import numpy as np import pickle from sklearn.datasets import load_svmlight_file, dump_svmlight_file from uda_common import zero_pivot_columns, zero_nonpivot_columns, read_pivots, evaluate_and_print_scores, align_test_X_train, get_f1, find_best_c import os import scipy....
import json import mock from nose.tools import eq_ from pyquery import PyQuery as pq from olympia import amo from olympia.amo.tests import TestCase from olympia.amo.urlresolvers import reverse from olympia.addons.models import Addon from olympia.compat.models import CompatReport, CompatTotals # This is the structur...
# Copyright 2013 Nexenta 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 req...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # 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 Apach...
# 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...
from collections import OrderedDict def bl_components_glossary(name=None,return_list=False): if return_list: list1=[ "IC_PhotonBeamPencil", "IC_DriftSpace", "IC_Lens", "BC_ElectronBeamGaussian", "BC_BendingMagnet", ...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
#!/usr/bin/env python try: import cPickle as pickle except: import pickle try: from itertools import permutations except: from matchmaker.utils import permutations from datetime import date import MySQLdb as mysqldb import os from math import log from collections import defaultdict from pprint import ...
import os import subprocess import utility import ConfigParser import grapeConfig import StringIO class GrapeGitError(Exception): # arguments must be kept as keywords to allow pickling def __init__(self, errmsg='', returnCode=-1, gitOutput='', gitCommand='', cwd=os.getcwd()): self.msg = errmsg ...
from ciw.auxiliary import * from itertools import cycle import copy from operator import add, mul, sub, truediv from random import (expovariate, uniform, triangular, gammavariate, lognormvariate, weibullvariate) class Distribution(object): """ A general distribution from which all other dis...
# Copyright (C) 2014, Hitachi, 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...
# Copyright 2017 Battelle Energy Alliance, 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 t...
# 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...
from app import authentication from app import google_storage from app import models from app import schemas from app.models import db from app.es.googledailyresource import GoogleDailyResource from app.es.googlemetric import GoogleMetric from app.gcloud.utils import get_credentials_from_identity from collections impor...
from __future__ import division, print_function, absolute_import from warnings import warn import numpy as np from dipy.reconst.dti import fractional_anisotropy, color_fa from scipy.ndimage.filters import median_filter try: from skimage.filters import threshold_otsu as otsu except: from .threshold import ot...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os from StringIO import StringIO import sys from appengine_wrappers import webapp from appengine_wrappers import memcache from app...
import hashlib import os import re import subprocess import time import uuid from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.staticfiles.finders import find as find_static_path from django.utils.encoding import force_bytes import six from olympia...
"""Virtual Dwelling Generator - Generates a virtual dwelling stock """ import numpy as np from energy_demand.basic import lookup_tables from energy_demand.technologies import diffusion_technologies class Dwelling(object): """Dwelling or aggregated group of dwellings Arguments ---------- curr_yr : in...
"""This module provides utility classes and functions to load spike sorting data sets.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import os.path import re import xml.etree.Element...
# coding: utf-8 # PYTHON IMPORTS import operator import json from functools import reduce # DJANGO IMPORTS from django.http import HttpResponse from django.db import models, connection from django.db.models.constants import LOOKUP_SEP from django.db.models.query import QuerySet from django.views.decorators.cache impo...