gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tem...
class WatchDogException(Exception): """Exception raised for errors in the Watch Dog. Attributes: expr -- input expression in which the error occurred msg -- explanation of the error """ def __init__(self, expr, msg): self.expr = expr self.msg = msg class WatchDogC...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- ...
# 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...
"""Functions to visualize matrices of data.""" import itertools import colorsys import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np import pandas as pd from scipy.spatial import distance from scipy.cluster import hierarchy from .axisgrid import Grid from .palett...
#=============================================================================== # Copyright 2009 Matt Chaput # # 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/li...
# ATDM Bayesian networks # Jens Raaby, May 2013 """ This file contains the code for Bayesian Networks with Binary Random Variables Ancestral sampling and markov blanket sampling are implemented """ # We use the built in random generator and ordered dictionary libraries import random from collections import OrderedDi...
""" File: DaqInScan03.py Library Call Demonstrated: mcculw.ul.daq_in_scan() mcculw.ul.get_tc_values() Purpose: Synchronously scans Analog channels, Digital ports, and Thermocouple channels in the foreground. Demonstrati...
import numpy as np import matplotlib.pyplot as plt; plt.ioff() import copy from .class_utils import * from .utils import * from astropy.cosmology import Planck15 import astropy.constants as co c = co.c.value # speed of light, in m/s G = co.G.value # gravitational constant in SI units Msun = co.M_sun.value # solar mass...
# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2010-2012 Kevin Mehall <[email protected]> #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3, as published #by the Free Software Foundation. # #This program is distributed in th...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
# -*- coding: utf-8 -*- # Copyright (C) 2010-2014 Tobias Weber <[email protected]> # # 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 ...
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import uu...
"""Support to interface with Sonos players.""" from __future__ import annotations import datetime import logging from typing import Any import urllib.parse from soco import alarms from soco.core import ( MUSIC_SRC_LINE_IN, MUSIC_SRC_RADIO, PLAY_MODE_BY_MEANING, PLAY_MODES, ) import voluptuous as vol ...
#!/usr/bin/env python from xml.parsers import expat from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import AttributesImpl "Makes working with XML feel like you are working with JSON" """ Copyright (C) 2012 Martin Blech and individual contributors. Permission is hereby granted, free of charge, to any...
#!/usr/bin/env python # Copyright 2014 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. """A simple script to make building/testing Mojo components easier.""" import argparse from copy import deepcopy import logging import...
__doc__ = """ Neural network library, drawing inspiration from Torch's nn and nngraph """ import cgt from cgt import core, size import numpy as np from .nn_ops.im2col import im2col from .nn_ops.max_pool_2d import max_pool_2d #pylint: disable=W0611 from .nn_ops.cross_channel_lrn import cross_channel_lrn #pylint: disabl...
""" ====================================================== Corss validation on the data using multiple processes. ====================================================== """ from svmutil import * import commands import numpy import random import multiprocessing import sys class result(): # internal class passed t...
from __future__ import unicode_literals import boto3 import sure # noqa from moto import mock_ec2 from moto import mock_elbv2 from moto import mock_kms from moto import mock_rds2 from moto import mock_resourcegroupstaggingapi from moto import mock_s3 from tests import EXAMPLE_AMI_ID, EXAMPLE_AMI_ID2 @mock_ec2 @mock...
# -*- coding: utf-8 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 ...
"""Treadmill initialization and server presence daemon. This service register the node into the Treadmill cell and, as such, is responsible for publishing the node's capacity to the scheduler. This service is also responsible for shutting down the node, when necessary or requested, by disabling all traffic from and t...
# -*- coding: utf-8 -*- """ wakatime.base ~~~~~~~~~~~~~ wakatime module entry point. :copyright: (c) 2013 Alan Hamlett. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import base64 import logging import os import platform import re import sys import time i...
# (C) Datadog, Inc. 2010-2016 # (C) Jon Glick <[email protected]> 2014 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict # 3rd party from boto.s3.connection import S3Connection import simplejson as json # project from checks import AgentCheck from...
# # Copyright 2015-2016 IBM Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
"""Provides abstraction for couchbase objects.""" from couchbase.bucket import Bucket as CouchbaseBucket from couchbase.exceptions import CouchbaseError, NotFoundError import lib from collections import OrderedDict class CB(object): """Couchbase Abstraction Object.""" def __init__(self, override_config=Non...
# Copyright (c) 2012-2014 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
# 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...
from TASSELpy.java.lang.Comparable import Comparable from TASSELpy.java.lang.Number import Number, metaNumber from TASSELpy.java.lang.Integer import Integer, metaInteger from TASSELpy.java.lang.String import metaString from TASSELpy.utils.Overloading import javaOverload,javaConstructorOverload from TASSELpy.utils.helpe...
#!/usr/bin/env python3 # from inspect import trace from midi import MIDI # import sys # import re import copy import inspect import records from fractions import Fraction import util # event, ... , channel, params... PITCH_EVENTS = ['note', 'key_after_touch'] PITCH_INDEX = {'note': 4, 'key_after_touch': 3} DEBUG_ON...
import pytest import mock from marshmallow import ValidationError from puzzle_engine.hitori.schemas import ( CellSchema, BoardSchema, HitoriSolutionSchema ) class TestCellSchema: @pytest.fixture def data(self): return { 'id': 1, 'row_number': 1, 'col...
################################################### # header_common.py # This file contains common declarations. # DO NOT EDIT THIS FILE! ################################################### server_event_preset_message = 0 server_event_play_sound = 1 server_event_scene_prop_p...
#!/usr/bin/env python3 # # Copyright 2016 WebAssembly Community Group participants # # 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...
from copy import deepcopy from dpath.exceptions import InvalidGlob, InvalidKeyName, PathNotFound from dpath import options from fnmatch import fnmatchcase def kvs(node): ''' Return a (key, value) iterator for the node. kvs(node) -> (generator -> (key, value)) ''' try: return iter(node.ite...
# -*- coding: utf-8 -*- # # Copyright 2017 Big Datext 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 ...
from django.db.models import Case, CharField, Q, Value, When from guardian.shortcuts import get_objects_for_user from rest_framework.exceptions import ValidationError from rest_framework import generics from rest_framework import permissions as drf_permissions from rest_framework.exceptions import NotAuthenticated, Not...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# Time: O(nlogn) # Space: O(n) # On an infinite number line (x-axis), we drop given squares in the order they are given. # # The i-th square dropped (positions[i] = (left, side_length)) is a square # with the left-most point being positions[i][0] and sidelength positions[i][1]. # # The square is dropped with the bott...
import pygame, sys, os from pygame.locals import * if not pygame.font: print 'Warning, fonts disabled' if not pygame.mixer: print 'Warning, sound disabled' def loadimage(name, colorkey=None): fullname = os.path.join(name) try: image = pygame.image.load(fullname) except pygame.error, message: prin...
### # Copyright (c) 2013-2014, spline # All rights reserved. # # ### # libs import os import re import tailer from tbgrep import TracebackGrep # extra supybot libs. import supybot.conf as conf # supybot libs import supybot.utils as utils from supybot.commands import * import supybot.plugins as plugins import supybot.ir...
# orm/persistence.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to emit INSERT, UPDATE and DELETE sta...
#!/usr/bin/env python2 # 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. # # Test mining and broadcast of larger-than-1MB-blocks # from test_framework.test_framework import BitcoinTes...
#!/usr/bin/env python #=============================================================================# # # # NAME: util_plotTk.py # # ...
""" Machine models for atmosphere. """ import json import re import os from django.db import models from django.db.models import Q, Model from django.core.exceptions import ValidationError from django.utils import timezone from core.models.user import AtmosphereUser as User from core.models.application import creat...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 witho...
from lib import * #from keras.layers.merge import Concatenate from keras.layers import Merge import copy from collections import Counter from sklearn.metrics import confusion_matrix from sklearn.metrics import f1_score import math word2topic = pickle.load(open("word2topic", "r")) embedding = pickle.load(open("word2top...
# 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...
# # init_lib.py # # functions for initialization # from aws_lib import SpinupError import base64 from boto import vpc, ec2 from os import environ from pprint import pprint import re import sys import time from yaml_lib import yaml_attr def read_user_data( fn ): """ Given a filename, returns the file's co...
from ctypes import * import os from .util import * from .mjtypes import * osp = os.path if sys.platform.startswith("darwin"): libfile = osp.abspath(osp.join(osp.dirname(__file__),"../../vendor/mujoco/libmujoco131.dylib")) elif sys.platform.startswith("linux"): libfile = osp.abspath(osp.join(osp.dirname(__file_...
from __future__ import unicode_literals from django.db.models.fields import NOT_PROVIDED from django.utils import six from .base import Operation class AddField(Operation): """ Adds a field to a model. """ def __init__(self, model_name, name, field, preserve_default=True): self.model_name = ...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2016, wradlib Development Team. All Rights Reserved. # Distributed under the MIT License. See LICENSE.txt for more info. # -----------------------------------------------------------------------------...
import datetime import decimal import json import re from django.core import serializers from django.core.serializers.base import DeserializationError from django.core.serializers.json import DjangoJSONEncoder from django.db import models from django.test import SimpleTestCase, TestCase, TransactionTestCase from djang...
"""AuthZ Adapter implementations of cataloging managers.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods # Number of methods are defined in specification # pylint: disable=too-many-ancestors # Inheritance defined in specification from . imp...
# -*- test-case-name: twotp.test.test_node -*- # Copyright (c) 2007-2009 Thomas Herve <[email protected]>. # See LICENSE for details. """ Basic node protocol and node message handler classes. """ import os import time import random import inspect from hashlib import md5 from twisted.internet.protocol import Protocol f...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------------------------------------------------- # INFO: # ----------------------------------------------------------------------------------------------------------------------- """ Author: Evan Hub...
#!/usr/bin/python2 # ---------------------------------------------------------------------- # Copyright (2010) Aram Davtyan and Garegin Papoian # Papoian's Group, University of Maryland at Collage Park # http://papoian.chem.umd.edu/ # Last Update: 03/04/2011 # --------------------------------------------------------...
import time #import select import re from ophyd import Device #class SerialDevice(): # def __init__(self, prefix='', *args, read_attrs=None, configuration_attrs=None, # name='SerialDevice', parent=None, **kwargs): #super().__init__(prefix=prefix, *args, read_attrs=read_attrs, configur...
"""Test the Z-Wave JS lock platform.""" from zwave_js_server.const.command_class.lock import ATTR_CODE_SLOT, ATTR_USERCODE from zwave_js_server.event import Event from zwave_js_server.model.node import NodeStatus from homeassistant.components.lock import ( DOMAIN as LOCK_DOMAIN, SERVICE_LOCK, SERVICE_UNLOC...
""" Extract Patches This scripts reads in a shapefile and a raster image extracts patches to be used for machine learning algorithms. If the shapefile consists of points, then a rectangular patch centered at each point is extracted. If the shapefile consists of lines, then the first and second point are used to determ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # hack to make sure -m transformer/generator works as expected """ Poly-encoder agent that ingests image features. """ f...
# Webhooks for external integrations. from __future__ import absolute_import import re from functools import partial from six.moves import zip from typing import Any, Callable, Optional, Text from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.lib.actions imp...
from __future__ import division, print_function import imp import os import sys import shutil import pickle import copy import warnings import re from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var from setup_common import * # S...
#!/usr/bin/env python # # Copyright 2014 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 optparse import os import sys import webbrowser from profile_chrome import chrome_controller from profile_chro...
from __future__ import with_statement from sqlalchemy import Column from sqlalchemy import event from sqlalchemy import exc as sa_exc from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import select from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import testing from s...
"""Tests for the Home Assistant Websocket API.""" import asyncio from unittest.mock import patch, Mock from aiohttp import WSMsgType from async_timeout import timeout import pytest from homeassistant.core import callback from homeassistant.components import websocket_api as wapi from homeassistant.setup import async_...
# -*- coding: utf-8 -*- """This file contains BagMRU Windows Registry plugins (shellbags).""" from dtfabric.runtime import data_maps as dtfabric_data_maps from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions from plaso.lib import errors from plaso.parsers.shar...
# pylint: skip-file from __future__ import absolute_import import pytest from collections import OrderedDict import itertools import time from kafka.client_async import KafkaClient from kafka.consumer.fetcher import ( CompletedFetch, ConsumerRecord, Fetcher, NoOffsetForPartitionError ) from kafka.consumer.subscr...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # 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...
""" Core components of Home Assistant. Home Assistant is a Home Automation framework for observing the state of entities and react to changes. """ # pylint: disable=unused-import, too-many-lines import asyncio from concurrent.futures import ThreadPoolExecutor import enum import logging import os import re import signa...
#!/usr/bin/python import errno import getopt import math import os import progress import re import select import signal import socket import subprocess import sys import time from xml.dom.minidom import parse,parseString from xml.dom import DOMException from pprint import pprint from configtool import getConfigVal, s...
""" Support for Songpal-enabled (Sony) media devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.songpal/ """ import asyncio import logging from collections import OrderedDict import voluptuous as vol from homeassistant.components.medi...
# Copyright 2019 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, ...
import os import json import requests from flask import Flask,Blueprint,session, redirect, render_template, g, url_for, request from datetime import datetime from HitchHike.config import GOOGLE_API_KEY from flask_login import login_required, current_user from flask_socketio import SocketIO, send, emit, join_room, leav...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import uni...
#!/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 "License")...
import pytest from guardian.shortcuts import get_perms from tests.algorithms_tests.factories import AlgorithmJobFactory from tests.algorithms_tests.utils import TwoAlgorithms from tests.components_tests.factories import ComponentInterfaceValueFactory from tests.factories import GroupFactory, ImageFactory, UserFactory ...
# 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...
import json from django.test.testcases import TransactionTestCase from django_dynamic_fixture import G from mock import patch, call from entity_event.context_serializer import DefaultContextSerializer from entity_event.tests.models import TestModel class DefaultContextSerializerTests(TransactionTestCase): def se...
# # Unit Tests for the Task class # # Eric Jeschke ([email protected]) # Bruce Bon ([email protected]) 2007-08-31 # import unittest import time import random import logging from ginga.misc import Task import ginga.util.six as six LOGDEBUG = True # =======================================================================...
################################################################################ # Copyright (c) 2011-2021, National Research Foundation (SARAO) # # Licensed under the BSD 3-Clause License (the "License"); you may not use # this file except in compliance with the License. You may obtain a copy # of the License at # # ...
from ...core import AtomicExpr, Expr, Integer, Symbol, Tuple, sympify from ...core.assumptions import StdFactKB from ...core.decorators import _sympifyit, call_highest_priority from ...core.logic import fuzzy_bool from ...functions import adjoint, conjugate from ...logic import false from ...simplify import simplify fr...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
import os import rope.base.change from rope.base import libutils, utils, exceptions from rope.contrib import codeassist, generate, autoimport, findit from ropemode import refactor, decorators, dialog class RopeMode(object): def __init__(self, env): self.project = None self.old_content = None ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
import functools import operator import random from ..config import using from ..core import Dummy from ..domains.algebraicfield import AlgebraicElement from ..integrals.heurisch import _symbols from ..ntheory import nextprime from .modulargcd import (_euclidean_algorithm, _gf_gcdex, _minpoly_from_dense, ...
""" Provide a simple user friendly API to Theano-managed memory. """ # Standard imports from __future__ import absolute_import, print_function, division import copy import logging # Third-party imports import numpy # Theano imports from theano.gof import Container, Variable, generic, utils _logger = logging.getLog...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import unittest import warnings from six.moves import reload_module as reload from mock import patch from mock import MagicMock as Mock import pyrax import pyrax.exceptions as exc import pyrax.utils as utils from pyrax import fakes class PyraxIn...
# -*- coding: utf-8 -*- """ pygments.lexers.rebol ~~~~~~~~~~~~~~~~~~~~~ Lexers for the REBOL and related languages. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups from pygmen...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of t...
# -*- coding: utf-8 -*- import os try: import ujson as json except ImportError: import json import irc3 import shelve __doc__ = ''' ========================================== :mod:`irc3.plugins.storage` Storage plugin ========================================== Add a ``db`` attribute to the bot .. >>> fr...
# Copyright (c) 2016 PaddlePaddle 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 applic...
import shutil from typing import Dict, Tuple from dateparser import parse import urllib3 from CommonServerPython import * # Disable insecure warnings urllib3.disable_warnings() DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' class Client(BaseClient): """ Client to use in the Zimperium integration. Overrides BaseClient ...
# 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...
import copy import datetime import decimal import math import warnings from itertools import tee from django.db import connection from django.db.models.query_utils import QueryWrapper from django.conf import settings from django import forms from django.core import exceptions, validators from django.utils.datastructur...
# Copyright 2010-2011 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...
from __future__ import absolute_import import responses import os.path from mock import patch from sentry.models import Event, File, Release, ReleaseFile from sentry.testutils import TestCase BASE64_SOURCEMAP = 'data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlcyI6WyIvdGVzdC5qcyJ...
from StringIO import StringIO from ast import literal_eval from collections import defaultdict from contextlib import contextmanager import logging import os import re from threading import Thread import uuid # noinspection PyUnresolvedReferences from boto.sdb.domain import Domain # noinspection PyUnresolvedReferences...
# Copyright 2012 Nicira, 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 agr...
# 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 numpy as np from scipy.special import erf #--> The lnlikes #-> The lnlike calculated with generalized chi square #------------------------------------------------------------------------------# # Note: # When I compare the two different methods to compare the upperlimits, the # results are surprisingly consiste...