gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python import argparse import multiprocessing import os import queue import re import pandas import pandas.io.formats.excel from Bio import SeqIO # Maximum columns allowed in a LibreOffice # spreadsheet is 1024. Excel allows for # 16,384 columns, but we'll set the lower # number as the maximum. Some...
"""Module for the v0 version of the `SPTrans API <http://www.sptrans.com.br/desenvolvedores/APIOlhoVivo/Documentacao.aspx?1>`_. The first thing you have to do, in order to use it, is to instantiate a client and authenticate to the API: :: from sptrans.v0 import Client client = Client() client.authentica...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Module to collect configuration to run specific jobs """ from __future__ import absolute_import, division, print_function import os import copy from fermipy.jobs.file_archive import FileFlags from fermipy.jobs.link import Link from fermipy.jobs.gtlin...
# Author : Martin Luessi mluessi@nmr.mgh.harvard.edu (2012) # License : BSD 3-clause # Parts of this code were copied from NiTime http://nipy.sourceforge.net/nitime import operator import numpy as np from scipy import linalg from ..parallel import parallel_func from ..utils import sum_squared, warn, verbose, logger ...
# -*- coding: UTF-8 -*- import scarlett from scarlett.commands import Command from scarlett.listener import * import pygst pygst.require('0.10') import gobject gobject.threads_init() from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) import gst, os import threading # import scarlett spea...
# Copyright 2016-2021 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 applicable law or...
# -*- coding: utf-8 -*- # Copyright 2020 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...
import warnings from typing import Any, List, Optional import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor from torchvision.models import inception as inception_module from torchvision.models.inception import InceptionOutputs from ..._internally_replaced_utils import load_state...
from quex.engine.misc.file_in import \ open_file_or_die, \ write_safely_and_close, \ get_current_line_info_number, \ error_msg from quex.engine.generator.code_f...
"""Worker which runs all computations on Cloud VMs. Evaluation of competition is split into work pieces. One work piece is a either evaluation of an attack on a batch of images or evaluation of a defense on a batch of adversarial images. All pieces of attack work are independent from each other and could be run in par...
# 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 os import cv2 import pdb import math import pickle import numpy as np import glob as glob from time import clock from scipy.io import loadmat,savemat from scipy.sparse import csr_matrix from matplotlib import pyplot as plt from DataPathclass import * DataPathobj = DataPath(dataSource,VideoIndex) from parameterC...
import os import sys from tarfile import open as tar_open import tarfile import tempfile import uuid import insights.client.utilities as util from insights.client.constants import InsightsConstants as constants import re import mock import six import pytest from mock.mock import patch from json import loads as json_loa...
# 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...
import os import re import time import pytest import logging from collections import defaultdict from cassandra import ConsistencyLevel from cassandra.query import SimpleStatement from dtest import DtestTimeoutError, Tester, create_ks since = pytest.mark.since logger = logging.getLogger(__name__) TRACE_DETERMINE_R...
import os, sys, inspect, shutil from collections import defaultdict from inspect import Parameter, Signature from types import FunctionType from pathlib import Path import param from pyviz_comms import extension as _pyviz_extension from ..core import ( Dataset, DynamicMap, HoloMap, Dimensioned, ViewableElement,...
""" Xref plugin for Hexrays Decompiler Author: EiNSTeiN_ <einstein@g3nius.org> Show decompiler-style Xref when the X key is pressed in the Decompiler window. - It supports any global name: functions, strings, integers, etc. - It supports structure member. """ import idautils import idaapi import idc import traceb...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
"""Test the Blink config flow.""" from blinkpy.auth import LoginError from blinkpy.blinkpy import BlinkSetupError from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.blink import DOMAIN from tests.async_mock import Mock, patch from tests.common import MockConfigEntry async...
#!/usr/bin/env python3 # Copyright (c) 2014-present, The osquery authors # # This source code is licensed as defined by the LICENSE file found in the # root directory of this source tree. # # SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) import json import os import subprocess import sys import time try: ...
#!/usr/bin/python # Copyright (c) 2003-2014 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: smbclient.py 1125 2014-01-27 19:58:16Z bethus@gmail.com $ # # Description: Min...
""" General tests for all estimators in sklearn. """ # Authors: Andreas Mueller <amueller@ais.uni-bonn.de> # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause import os import warnings import sys import re import pkgutil from inspect import isgenerator, signature from itertools import prod...
""" Test the API of the symtable module. """ import symtable import unittest TEST_CODE = """ import sys glob = 42 some_var = 12 class Mine: instance_var = 24 def a_method(p1, p2): pass def spam(a, b, *var, **kw): global bar bar = 47 some_var = 10 x = 23 glob def internal():...
from __future__ import print_function import sys import os from collections import Counter, OrderedDict import time import datetime as dt from argparse import ArgumentParser import random import cProfile import pstats import numpy as np import pylab as plt from load_settings import settings from results import Storm...
from typing import Optional, Callable, Iterator, IO, List from struct import unpack, pack from itertools import repeat from jawa.constants import UTF8 from jawa.util.flags import Flags from jawa.util.descriptor import method_descriptor, JVMType from jawa.attribute import AttributeTable from jawa.attributes.code import...
# Copyright (c) 2010-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 # # Unless required by applicable law or agree...
# -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Sync a git repository to a given manifest. This script is intended to define all of the ways that a source checkout can be def...
import effects import datetime from time import * from numpy import * from Tkinter import * import random import english, german from constants import * import fonts import util offset = -5 * 3600 def next_time(*args, **kw): clocktwo.offset += 60 clocktwo.update() def last_time(*args, **kw): clocktwo.off...
#!/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 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
''' MiniFridge is a dict-like class with optional self-destruct timers. CacheOutput is a decorator which caches outputs of function calls. ''' import datetime as dt from threading import Lock class MiniFridge(object): ''' A MiniFridge is like a dictionary, but with 2 extra rules: 1. If another ...
from sqlobject import * from sqlobject.tests.dbtest import * class TestSO1(SQLObject): name = StringCol(length=50, dbName='name_col') name.title = 'Your Name' name.foobar = 1 passwd = StringCol(length=10) class sqlmeta: cacheValues = False def _set_passwd(self, passwd): self....
# -*- coding: utf-8 -*- """ Created on Tue Mar 10 11:28:57 2015 @author: dp11 This code implements PCA-based registration of image sequences """ #============================================================================== # Imports #============================================================================== imp...
#!/usr/bin/env python3 # Copyright 2013 The Font Bakery Authors. # Copyright 2017 The Google Font Tools 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/l...
import copy import re import warnings from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from...
# # This source file is part of the EdgeDB open source project. # # Copyright 2020-present MagicStack Inc. and the EdgeDB 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...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.core import serializers from django.test.client import Client from transifex.languages.models import Language from transifex.resources.models import Resource, Translation from transifex.txcommon.tests.base import BaseTestCase from django....
import pytest def _type_length(): # Not a fixture as we need to parameterize tests on this from ..loadxl import ORDER from pkg_resources import resource_stream import codecs import json utf8 = codecs.getreader("utf-8") return { name: len(json.load(utf8(resource_stream('encoded', 't...
"""ACME AuthHandler.""" import itertools import logging import time import zope.component from acme import challenges from acme import messages from letsencrypt import achallenges from letsencrypt import constants from letsencrypt import errors from letsencrypt import interfaces logger = logging.getLogger(__name__...
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
#!/usr/bin/env python __all__ = ["TextPreprocessor", "FeatureGenerator", "ClassMapping", "Text2svmConverter", "convert_text"] import sys, os import unicodedata, re from collections import defaultdict if sys.version_info[0] >= 3: xrange = range import pickle as cPickle izip = zip def unicode(string, s...
#!/usr/bin/env python # encoding: utf-8 from exp_tools import Trial from psychopy import event import numpy as np from scipy import stats class FlashTrial(Trial): """ Class that runs a single FlashTrial. Parent for FlashTrialSaccade and FlashTrialKeyboard, which should actually be initiadted (rather than this...
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
#!/usr/bin/env python # 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. """Routines to list, select, and load masters and builders in master.cfg. These routines help to load up master.cfgs in all direct...
#!/usr/bin/env python3 # 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 "Lic...
"""Command-line arguments for tests. This enables some common command-line arguments: ``--runslow`` Run tests flagged with @pytest.fixture.slow ``--runperf`` Run tests flagged with @pytest.fixture.performance ``--ingest-v2`` Run tests flagged with @pytest.fixture.ingest_v2 ``--redis-address`` hostname:portnum...
""" logger/message.py: Python logger base for expfactory Copyright (c) 2016-2022 Vanessa Sochat 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 ...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
"""Support to select a date and/or a time.""" import logging import datetime import voluptuous as vol from homeassistant.const import ATTR_ENTITY_ID, CONF_ICON, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers....
#!/usr/bin/env python # Python 2.7 backward compatibility from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import import paramiko import paramiko.py3compat import os import os.path import sys import errno from stat import S_ISDIR, S_ISLNK, S_ISREG, S_IMODE,...
#!/usr/bin/env python2.7 # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this lis...
""" Tests which exist to pinpoint specific bugs and verify that they are fixed. """ import os import signal import string import sys import tempfile import time import traceback import unittest from jobmon import config, launcher, protocol, service, transport # Not in /etc/services, probably safe TEST_CMD_PORT = 1232...
from sympy import (Lambda, Symbol, Function, Derivative, Subs, sqrt, log, exp, Rational, Float, sin, cos, acos, diff, I, re, im, E, expand, pi, O, Sum, S, polygamma, loggamma, expint, Tuple, Dummy, Eq, Expr, symbols, nfloat) from sympy.utilities.pytest import XFAIL, raises from sympy.abc import ...
# -*- coding: utf-8 -*- import contextlib import errno import importlib import itertools import json import os import queue import sys from atomicwrites import atomic_write import click import click_threading from . import cli_logger from .. import BUGTRACKER_HOME, DOCS_HOME, exceptions from ..sync import IdentCon...
# 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 use ...
# -*- coding: utf-8 -*- """ Created on Sat Jan 16 13:04:06 2016 @author: lilian """ #from onvif import ONVIFCamera from cameraUtils import IPCamera import urllib import logging import time class PTZCamera(IPCamera): def __init__(self, host, port ,user, passwd): IPCamera.__init__(self, host, port, user, ...
from ev import Object, Character, utils, create_object, create_channel, search_object_tag from game.gamesrc.commands.world.character_commands import CharacterCmdSet import random from prettytable import PrettyTable class Hero(Character): """ Main player character class This class will be a very large pa...
#!/usr/bin/python3 import fontforge # import os.path import re import collections import contextlib import logging from dvilike import OpcodeCommandsMachine, VFProcessor def parse_map(map_file): """Extracts font names, encodings, and Type1 glyph files from a map file. This parser was built using the format ...
# Copyright 2010 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...
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ from __future__ import unicode_literals import functools import re im...
# # Renderer class # # A glue layer between SimObject and UI from pose import Pose from math import tan, sqrt, atan2 class Renderer: """ The Renderer class is an abstract class describing a generalized drawing engine. It has to be subclassed to implement the drawing in a way specific to the...
""" HTML based serializers. """ import urllib from tiddlyweb.serializations import SerializationInterface from tiddlyweb.web.util import encode_name, escape_attribute_value, tiddler_url from tiddlyweb.wikitext import render_wikitext class Serialization(SerializationInterface): """ Serialize entities and col...
"""Z-Wave discovery schemas.""" from . import const DEFAULT_VALUES_SCHEMA = { "power": { const.DISC_SCHEMAS: [ { const.DISC_COMMAND_CLASS: [const.COMMAND_CLASS_SENSOR_MULTILEVEL], const.DISC_INDEX: [const.INDEX_SENSOR_MULTILEVEL_POWER], }, ...
# # 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...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import cop...
""" Copyright (c) 2016, John Deutscher Description: Sample Python script for Motion Detection processor License: MIT (see LICENSE.txt file for details) Documentation : https://azure.microsoft.com/en-us/documentation/articles/media-services-motion-detection/ """ import os import json import amspy import time import sys...
import dcos.marathon import json import pytest import re import shakedown import sdk_cmd as cmd import sdk_install as install import sdk_marathon as marathon import sdk_spin as spin import sdk_tasks as tasks import sdk_test_upgrade from tests.config import ( PACKAGE_NAME, DEFAULT_TASK_COUNT, configured_ta...
#!/usr/bin/env python2 import os import sys import time import struct import signal import shutil from subprocess import call from ignition import ProgramGroup from manus_starter.privileged import run_upgrade, run_shutdown try: from manus import VERSION except ImportError: VERSION = 'N/A' LOCAL_CAMERA = os...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.apac...
import numpy as np from rllab.misc import tensor_utils from rllab.misc import special2 as special from rllab.algos import util import rllab.misc.logger as logger class Sampler(object): def start_worker(self): """ Initialize the sampler, e.g. launching parallel workers if necessary. """ ...
from common_fixtures import * # NOQA from cattle import ApiError def _create_stack(client): env = client.create_stack(name=random_str()) env = client.wait_success(env) assert env.state == "active" return env def test_service_add_remove_service_link(client, context): env = _create_stack(client) ...
from __future__ import absolute_import from __future__ import unicode_literals import datetime import logging import operator from functools import reduce import enum from docker.errors import APIError from . import parallel from .config import ConfigurationError from .config.config import V1 from .config.sort_servi...
from __future__ import unicode_literals import keyword import re from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django.db import connections, DEFAULT_DB_ALIAS from django.utils import six class Command(NoArgsCommand): help = "Introspects the database tab...
#!/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. """Writes a build_config file. The build_config file for a target is a json file containing information about how to build that targ...
#!/usr/bin/env python __author__ = 'Michael Meisinger' from mock import Mock from nose.plugins.attrib import attr from pyon.util.int_test import IonIntegrationTestCase from pyon.util.unit_test import IonUnitTestCase from pyon.public import RT, PRED, OT, log, IonObject from ion.core.ooiref import OOIReferenceDesignat...
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2010-2011 OpenStack, 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/lice...
import sys import nose from nose.tools import assert_raises from mpl_toolkits.mplot3d import Axes3D, axes3d from matplotlib import cm from matplotlib.testing.decorators import image_comparison, cleanup import matplotlib.pyplot as plt import numpy as np @image_comparison(baseline_images=['bar3d'], remove_text=True) de...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, DataCanvasIO # 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 copyri...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals __author__ = "Bharat Medasani" __copyright__ = "Copyright 2013, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "bkmed...
# Copyright 2013 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/LICENSE-2...
""" Examples: >>> table1(''' ... James 10 2 ... Mark 7 3 ... Lila 74 1 ... ''') >>> sql("select * from table1") a | b | c -------------- James | 10 | 2 Mark | 7 | 3 Lila | 74 | 1 >>> sql("coutput '../../tests/output' split:2 mode:rcfile select hashmodar...
# # 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
#County Road Inventory Mapbooks #Adam Breznicky. January 2014 #requires installation of ReportLab and PyPDF22 #T:\DATAMGT\MAPPING\Programs\Arc10\Arc10_Tools\Modules # # # # #imports import arcpy, os, string, zipfile, shutil, PyPDF2 from arcpy import mapping from arcpy import env from PyPDF2 import PdfFileMerger, PdfFi...
# 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...
import os import pprint import sys import textwrap import py import pytest from _pytest.config import ExitCode from _pytest.main import _in_venv from _pytest.main import Session from _pytest.pytester import Testdir class TestCollector: def test_collect_versus_item(self): from pytest import Collector, It...
# 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 (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import mimetypes import random from io import BytesIO from os.path i...
# Copyright (c) 2015 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. 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://w...
# # Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
""" =============================================================== Partial Dependence and Individual Conditional Expectation Plots =============================================================== Partial dependence plots show the dependence between the target function [2]_ and a set of features of interest, marginaliz...
from __future__ import absolute_import, division, print_function import math import itertools import operator import pytest from datetime import datetime, date import datashape from collections import Iterator, Iterable import blaze from blaze.compute.python import (nunique, mean, rrowfunc, rowfunc, ...
from __future__ import division, print_function, absolute_import from warnings import warn import numpy as np from numpy import asarray, empty, ravel, nonzero from scipy.sparse import (isspmatrix_csc, isspmatrix_csr, isspmatrix, SparseEfficiencyWarning, csc_matrix) from . import _superlu n...
import numpy as np import pandas as pd import pyflux as pf # Set up some data to use for the tests countdata = np.random.poisson(3,500) x1 = np.random.normal(0,1,500) x2 = np.random.normal(0,1,500) data = pd.DataFrame([countdata,x1,x2]).T data.columns = ['y', 'x1', 'x2'] x1_oos = np.random.normal(0,1,30) x2_oos = np...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division, absolute_import from logging import getLogger from urllib import quote from requests.exceptions import RequestException from flexget import plugin, validator from flexget.event import event from flexget.utils import json, requests from flexge...
""" Module to define and register Terminal IPython shortcuts with :mod:`prompt_toolkit` """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import warnings import signal import sys from typing import Callable from prompt_toolkit.application.current import get_app...
# # Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Various utilities used by the plot package. """ try: from PIL import ImageFont, ImageColor except ImportError: import ImageFont, ImageColor import datetime import time import math import we...
# 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...