gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# stdlib import re import time # 3p import pymongo # project from checks import AgentCheck from util import get_hostname DEFAULT_TIMEOUT = 30 GAUGE = AgentCheck.gauge RATE = AgentCheck.rate class MongoDb(AgentCheck): SERVICE_CHECK_NAME = 'mongodb.can_connect' SOURCE_TYPE_NAME = 'mongodb' # METRIC LIST...
# 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...
"""Support for UpCloud.""" import dataclasses from datetime import timedelta import logging from typing import Dict, List import requests.exceptions import upcloud_api import voluptuous as vol from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.switch impor...
from JXGServerModule import JXGServerModule import JXG import numpy import os # Should be changed to something more persistent but must be writable by # the webserver (usually user www-data) if not 'MPLCONFIGDIR' in os.environ: os.environ['MPLCONFIGDIR'] = '/tmp/' # os.environ['MPLCONFIGDIR'] = 'C:/xampp/tmp' ...
#!/usr/bin/env python """ Module task :Company: SwissTech Consulting :Author: Patrick Glass <patrickglass@swisstech.ca> :Copyright: Copyright 2015 SwissTech Consulting This software is used for flow development and execution of pipelines """ import logging import warnings import threading import multiprocessing impor...
# Authors: Fabian Pedregosa <fabian@fseoane.net> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Nelle Varoquaux <nelle.varoquaux@gmail.com> # License: BSD 3 clause import numpy as np from scipy import interpolate from scipy.stats import spearmanr import warnings import math from .base import B...
# -*- coding: utf-8 -*- import json from urllib.parse import unquote from scrapy.utils.misc import load_object from scrapy.utils.serialize import ScrapyJSONEncoder from twisted.internet.defer import Deferred from twisted.python.failure import Failure from twisted.web import resource, server from twisted.web.error impo...
# !/usr/bin/python # coding=utf-8 # original code "https://gist.github.com/rygwdn/394885" ################################################################################ import os import sys import curses import getopt from curses import wrapper #######################################################################...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os import signal import sys import time import numpy as np import pytest import ray import ray.ray_constants as ray_constants from ray.tests.cluster_utils import Cluster from ray.tests.util...
# 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...
""" This module implements the "new" binary OpenEphys format. In this format channels are interleaved in one file. See https://open-ephys.github.io/gui-docs/User-Manual/Recording-data/Binary-format.html Author: Julia Sprenger and Samuel Garcia """ import os import re import json from pathlib import Path import n...
# # 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...
import logging from lib import constant_pool from lib import instruction from lib import read_bytes SAME = 0 SAME_LOCALS_1_STACK_ITEM = 64 SAME_LOCALS_1_STACK_ITEM_EXTENDED = 247 CHOP = 248 SAME_FRAME_EXTENDED = 251 APPEND = 252 FULL_FRAME = 255 def parse(fd, class_file): '''Parse attributes ''' count =...
"""Class to run redmapper on a single pixel, for distributed runs. """ import os import numpy as np import glob from ..configuration import Configuration from ..utilities import make_lockfile from ..run_firstpass import RunFirstPass from ..run_likelihoods import RunLikelihoods from ..run_percolation import RunPercolat...
import datetime from rest_framework import generics, status from rest_framework.response import Response from openbudgets.apps.international.utilities import translated_fields from openbudgets.apps.sheets import serializers from openbudgets.apps.sheets import models from openbudgets.apps.accounts.models import Account ...
from pandac.PandaModules import Point3, CollisionSphere, CollisionNode, CollisionHandlerEvent, NodePath, TextNode from direct.distributed.ClockDelta import globalClockDelta from direct.interval.IntervalGlobal import Wait, LerpFunctionInterval, LerpHprInterval, Sequence, Parallel, Func, SoundInterval, ActorInterval, Pro...
""" Functional tests using Selenium. See: ``docs/testing/selenium.rst`` for details. """ from django.utils.text import slugify import time from django.conf import settings from django.utils.unittest.case import skipUnless from bluebottle.bb_projects.models import ProjectPhase from bluebottle.test.factory_models.accou...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import unittest import os import shutil import numpy as np from monty.json import MontyDecoder from pymatgen.io.vasp.sets import MITVaspInputSet, MITHSEVaspInputSet, \...
from __future__ import absolute_import import collections import time from .cache import Cache, _deprecated class _Link(object): __slots__ = ('key', 'expire', 'next', 'prev') def __init__(self, key=None, expire=None): self.key = key self.expire = expire def __reduce__(self): r...
#!/usr/bin/env python """ Subband Autocorrelation Classification (SAcC) Pitch Tracker feature Based on Matlab code by Byung Suk Lee and Dan Ellis Python port based on SRI Feature template. 2013-08-25 Dan Ellis dpwe@ee.columbia.edu """ import os import numpy as np import scipy.signal import scipy.io import scipy.clus...
# 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 ...
from __future__ import print_function from collections import defaultdict import datetime import json import re from six import text_type from stacktraces import process_model, thread_analyzer from stacktraces.python import stacktrace def get_process_from_traceback(traceback_lines, name=None): p = process_mode...
from __future__ import absolute_import, print_function, division import operator from collections import OrderedDict from petl.compat import next, string_types, text_type from petl.errors import ArgumentError from petl.util.base import Table, expr, rowgroupby, Record from petl.transform.sorts import sort def fiel...
import os import pickle import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone, appendNewEntriesToHbaFile from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.gplog import * from gppylib.commands import unix from gppylib.commands import gp from gppyli...
import discord_logging import traceback from datetime import datetime log = discord_logging.get_logger() import counters import utils import static from classes.subscription import Subscription from classes.comment import DbComment from praw_wrapper import ReturnType, id_from_fullname, PushshiftType def process_com...
from django.contrib import messages from django.db.models import Max from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from django.views.generic import DetailView, DeleteView, CreateView, UpdateView from ..forms import ( ProductForm, ProductReleaseCreateForm, ...
#!/usr/bin/python import logging import traceback import json import yaml import sys import base64 import uuid import collections sys.path.append('/opt/contrail/fabric_ansible_playbooks/filter_plugins') sys.path.append('/opt/contrail/fabric_ansible_playbooks/common') from contrail_command import CreateCCNode, CreateC...
import numpy as np import os import dill import tempfile import tensorflow as tf import zipfile from absl import flags import baselines.common.tf_util as U from baselines import logger from baselines.common.schedules import LinearSchedule from baselines import deepq from baselines.deepq.replay_buffer import ReplayBu...
"""Classic mountain car task.""" from rlpy.Tools import plt, bound, fromAtoB from rlpy.Tools import lines from .Domain import Domain import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney...
import unittest2 from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.auth_type import AuthType from consts.event_type import EventType from consts.media_type import MediaType from helpers.media_helper import MediaParser from helpers.suggestions.suggestion_creator import Suggestion...
import os import time import typing from datetime import datetime import cauldron from cauldron import environ from cauldron.environ import Response from cauldron.runner import html_file from cauldron.runner import markdown_file from cauldron.runner import python_file from cauldron.runner import redirection from cauld...
XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXX X XXX XXXXXXXXX X XXXXXX XXX XXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXX...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.db import models from django.utils.functional import cached_property from paypal.standard.helpers import duplicate_txn_id, check_secret from paypal.standard.conf import RECEIVER_EMAIL, POSTBACK_ENDPOINT, SANDBOX_POSTBACK_ENDPOINT ST_PP_ACTIVE = 'Active' ST_PP_...
#!/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...
# Author: Christopher M. Shymansky <CMShymansky@gmail.com>, # License: ALv2 # Date created: 2016-11-25 # Basic tools import itertools # Scalers from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import Normalizer from sklearn.preprocessing import MinMaxScaler from sklearn.preprocessing import...
# 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 (t...
# 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...
''' Created on Jun 22, 2017 opyright 2017, Institute for Systems Biology. 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 ...
import networkx as nx import numpy as np from bayesianpy.jni import bayesServer import bayesianpy.data import pandas as pd import math import scipy.stats as ss from typing import List, Dict import sklearn.metrics import logging class NetworkLayout: def __init__(self, jnetwork): self._jnetwork = jnetwork...
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compl...
import csv from os.path import basename import pickle import wx OK_BACKGROUND_COLOR = 'PALE GREEN' def determine_wildcard(extension=None, file_type=None): """ Assemble a wildcard string of the form: [[file_type ](*.extension)|*.extension|]<all_files> """ all_files = 'All files|*' if extension is not None: ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Dict client protocol implementation. @author: Pavel Pergamenshchik """ from twisted.protocols import basic from twisted.internet import defer, protocol from twisted.python import log from io import BytesIO def parseParam(line): """Chew...
# Copyright 2015 Hitachi Data Systems. # 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...
# coding: utf-8 import json from typing import Union from django.db.models import Q from django.db.models.signals import pre_delete from django.http import Http404 from django.shortcuts import get_object_or_404 from django.utils import six from django.utils.translation import ugettext as _ from rest_framework import ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function """ Poisson point process penalised likelihood regression. """ try: import autograd import autograd.numpy as np import autograd.scipy as sp have_autograd = True except I...
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Nov 09, 2015 12:47$" from contextlib import contextmanager import collections import copy import gc import itertools import math import numbers import os from time import sleep from psutil import cpu_count import numpy import zarr import dask imp...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
#!/usr/bin/env python # pylint: disable=missing-docstring # # Copyright 2017, 2018 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
# 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...
""" Strategy Transformers -- class decorators that transform the behavior of any strategy. See the various Meta strategies for another type of transformation. """ import inspect import random import collections from numpy.random import choice from .actions import Actions, flip_action from .random_ import random_cho...
#!/usr/bin/env python # Fit proper motion and parallax using ra/dec/mjd data # Most of this code was taken from here: # https://github.com/ctheissen/WISE_Parallaxes/blob/master/WISE_Parallax.py import os, sys import numpy as np from astropy.table import Table, vstack, join #import matplotlib.pyplot as plt from astro...
# Copyright 2012 SINA Corporation # 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/licens...
""" Notes on functionals in pyquante2. 1. I would like for all operations here to be array-scale operations. - This means e.g. np.power rather than pow 2. I would like as few memory copies as possible. 3. Need to decide how to handle redundant information, i.e. - rhoa and rhob when non-spin-polarized ...
r"""OS routines for NT or Posix depending on what system we're on. This exports: - all functions from posix or nt, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - os.name is either 'posix' or 'nt' - os.curdir is a string representing the current directory ('.' or ':') - os.pardir is a strin...
#!/usr/bin/python # Copyright (c) 2012 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 collections import glob import optparse import re import subprocess import sys import test_format NCVAL_VERDICT = { ...
## # Copyright (c) 2005-2015 Apple 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 l...
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # 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/license...
# exported win32 api from ctypes import WINFUNCTYPE, GetLastError, windll, pythonapi, cast, c_buffer from ctypes import create_string_buffer, c_ushort, c_ubyte, c_char, c_short,\ c_int, c_uint, c_ulong, c_long, c_void_p, byref, c_char_p,\ Structure, Union, py_object, POINTER, poin...
# Shell python script to test a live SSO set up - Ed Crewe 26 Nov 2010 # It can be really fiddly testing out SSO proxy auth via typing in URLs etc # see Dave Spencer's guide at https://wiki.jasig.org/display/CAS/Proxy+CAS+Walkthrough # This does script does it for you against the deployed servers # Run via python 2.4...
# 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 # distribu...
# 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 the rights to use, copy, ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! Inc. All Rights Reserved. # Copyright (C) 2013 Rackspace Hosting All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with th...
# Copyright 2012, VMware, 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 agre...
import operator import dask.dataframe as dd import numpy as np import pandas as pd import pytest from dask.dataframe.utils import tm from pytest import param import ibis from ibis.common.exceptions import IbisTypeError def test_array_length(t, df): expr = t.projection( [ t.array_of_float64.l...
import re import salt.modules.jboss7_cli as jboss7_cli from salt.exceptions import CommandExecutionError from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import patch from tests.support.unit import TestCase class CmdMock: commands = [] command_response_func = None # if you want...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Linux preprocess plug-ins.""" from __future__ import unicode_literals import unittest from dfvfs.helpers import fake_file_system_builder from dfvfs.path import fake_path_spec from plaso.preprocessors import linux from tests.preprocessors import test_l...
# Copyright 2015 The Tornado 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 to in w...
#!/usr/bin/env python # # 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 # "...
#------------------------------------------------------------------------------- # Name: Raster information from vector relations # Purpose: Classify features of interest based on a raster with pixels that have classification values. # Having a catalog in a vector layer with adresses of images ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import theano import theano.tensor as T from theano.tensor.signal import downsample from .. import activations, initializations, regularizers, constraints from ..utils.theano_utils import shared_zeros, on_gpu from ..layers.core import Layer if on_gpu(): ...
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
#!/usr/bin/env python # # pKaTool - scripts for analysing chemical shift perturbations # Copyright (C) 2010 Predrag Kukic & Jens Erik Nielsen # # 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, ei...
# pylint: disable-msg=W0104,R0914 # public symbols __all__ = ["ExprEvaluator"] import __builtin__ import ast import math import weakref from openmdao.main.index import INDEX, ATTR, CALL, SLICE, EXTSLICE from openmdao.main.printexpr import _get_attr_node, _get_long_name, \ transform_expression, ExprPrinter def ...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors impor...
"""Logic for reading list behavior across all properties.""" from django.conf import settings from django.core.cache import cache from elasticsearch import TransportError from elasticsearch_dsl import filter as es_filter from bulbs.content.filters import NegateQueryFilter, SponsoredBoost from bulbs.content.models imp...
## ####################################################################################################################### # # Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associ...
################################################################################################## # Copyright (c) 2012 Brett Dixon # # 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 r...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications Copyright 2017 Abigail See # # 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...
from __future__ import unicode_literals import logging from django.conf import settings from django.core.exceptions import ImproperlyConfigured from paramiko.hostkeys import HostKeyEntry import paramiko from reviewboard.ssh.errors import UnsupportedSSHKeyError class SSHHostKeys(paramiko.HostKeys): """Manages k...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: wallet.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflec...
# -*- coding: utf-8 -*- # Copyright (C) 2020 by Cristina Garcia-Cardona <cgarciac@lanl.gov> # Brendt Wohlberg <brendt@ieee.org> # All rights reserved. BSD 3-clause License. # This file is part of the SPORCO package. Details of the copyright # and user license can be found in the 'LICENSE.txt' file...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( get_element_by_attribute, int_or_none, limit_length, lowercase_escape, try_get, ) class InstagramIE(InfoExtractor): _VALID_URL = r'(?P<url>https?://(?:www...
""" Player The Player class is a simple extension of the django User model using the 'profile' system of django. A profile is a model that tack new fields to the User model without actually editing the User model (which would mean hacking into django internals which we want to avoid for future compatability reasons). ...
import numpy as np import h5py from sklearn.decomposition import PCA import math import Starfish from Starfish.grid_tools import HDF5Interface, determine_chunk_log from Starfish.covariance import Sigma, sigma, V12, V22, V12m, V22m from Starfish import constants as C def Phi(eigenspectra, M): ''' Warning: for ...
import unittest import os from sqlalchemy.orm.collections import InstrumentedList from app import app, db from app.models.shopcart import Shopcart from app.models.product import Product from app.models.dataerror import DataValidationError DATABASE_URI = os.getenv('DATABASE_URI', 'mysql+pymysql://root:@localhost:3306/s...
#===----------------------------------------------------------------------===## # # The LLVM Compiler Infrastructure # # This file is dual licensed under the MIT and the University of Illinois Open # Source Licenses. See LICENSE.TXT for details. # #===------------------------------------------------...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Test a Fast R-CNN network on an imdb (image database).""" from fast...
import os import sys import re import math from orbit.utils import orbitFinalize #=============================================================== class _possibleElementType: """ Class. Specifies all possible element types """ def __init__(self): """ Constructor. Creates list of element types. """ ...
# -*- coding: utf-8 -*- """Docker Swarm Client API.""" from typing import List import re import os import logging import copy import docker import yaml LOG = logging.getLogger('sip.ec.docker_swarm_client') class DockerSwarmClient: """Docker Swarm Client Interface.""" def __init__(self): """Initial...
import itertools import random import pytest import numpy as np import moldesign as mdt from moldesign import units as u from . import helpers registered_types = {} def typedfixture(*types, **kwargs): """This is a decorator that lets us associate fixtures with one or more arbitrary types. We'll later use...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
#!/usr/bin/env python import sys import os import inspect import traceback import yaml import pycurl import json import csv import logging from optparse import OptionParser from email import message_from_string # For headers handling import time try: from cStringIO import StringIO except: try: from St...
# Copyright (c) 2013 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 cStringIO import ctypes import os import re import subprocess import sys import tempfile import objdump_parser # Some constants from valid...
#!/usr/bin/env python ''' @package ion.services.dm.utility.granule.record_dictionary @file ion/services/dm/utility/granule/record_dictionary.py @author Tim Giguere @author Luke Campbell <LCampbell@ASAScience.com> @brief https://confluence.oceanobservatories.org/display/CIDev/Record+Dictionary ''' from pyon.container....
# Copyright 2012 10gen, 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, softw...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytz import pytest from datetime import timedelta, datetime from distutils.version import LooseVersion from numpy import nan import numpy as np import pandas as pd from pandas import (Series, DataFrame, isnull, date_range, MultiIndex, Index...
# Copyright 2013-2016 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
# Copyright (c) 2014 Ahmed H. Ismail # 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...