gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Bagging meta-estimator.""" # Author: Gilles Louppe <g.louppe@gmail.com> # License: BSD 3 clause import itertools import numbers import numpy as np from abc import ABCMeta, abstractmethod from warnings import warn from joblib import Parallel from ._base import BaseEnsemble, _partition_estimators from ..base impo...
#!/usr/bin/env """ Chuckchi_Winds_NARR_model_prep.py Retrieve NARR winds for one locations Icy Cape Line, Ckip2 Latitude = 70.8401 Longitude = 163.2054 Filter NARR winds with a triangular filter (1/4, 1/2, 1/4) and output every 3hrs Provide U, V Save in EPIC NetCDF standard python 2.7 only """ #System St...
#!/usr/bin/env python3 # # Copyright (c) 2018-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Lint format strings: This program checks that the number of arguments passed # to a variadic format ...
"""Tests for the Start.ca sensor platform.""" from homeassistant.bootstrap import async_setup_component from homeassistant.components.startca.sensor import StartcaData from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, DATA_GIGABYTES, HTTP_NOT_FOUND, PERCENTAGE, ) from homeassistant.helpers.aio...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * def ge...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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. """Provides stubs for os, sys and subprocess for testing This test allows one to test code that itself uses os, sys, and subprocess. """ import os import r...
"""Nearly exact trust-region optimization subproblem.""" from __future__ import division, print_function, absolute_import import numpy as np from scipy.linalg import (norm, get_lapack_funcs, solve_triangular, cho_solve) from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproble...
import re import sys from config import panda_config # logger from pandalogger.PandaLogger import PandaLogger _logger = PandaLogger().getLogger('SiteMapper') # PandaIDs from PandaSiteIDs import PandaSiteIDs # default site from taskbuffer.SiteSpec import SiteSpec defSite = SiteSpec() defSite.sitename = panda_config...
# Copyright (C) 2013 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 ...
# -*- coding: utf-8 -*- """ Sahana Eden Scenario Model @copyright: 2009-2012 (c) Sahana Software Foundation @license: MIT 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 with...
""" Vector Autoregressive Moving Average with eXogenous regressors model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn from statsmodels.compat.collections import OrderedDict import pandas as pd import numpy as np from .kalma...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
# # 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...
# OneShot Save Utility # https://github.com/hunternet93/oneshot-save-utility # =========== # UI Settings # =========== bgcolor = '#13041B' textcolor = '#FFFFAA' highlightcolor = '#888844' font = ('vgasys', 14) # =============== # Initial imports # =============== from rubymarshal.reader import load as rb_load from...
# Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # for py2/py3 compatibility from __future__ import print_function from functools import reduce from collections import OrderedDict import json import mult...
# -*- coding: utf-8 -*- """Validation classes for various types of data.""" from __future__ import unicode_literals import re from operator import attrgetter from marshmallow.compat import basestring, text_type, zip_longest from marshmallow.exceptions import ValidationError class Validator(object): """Base abs...
# -*- 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...
"""Test the tractive config flow.""" from unittest.mock import patch import aiotractive from homeassistant import config_entries, setup from homeassistant.components.tractive.const import DOMAIN from homeassistant.core import HomeAssistant from tests.common import MockConfigEntry USER_INPUT = { "email": "test-e...
# 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 os import unittest from telemetry import benchmark from telemetry import story from telemetry.internal.results import base_test_results_unittest from...
# 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...
############################################################################### ## ## Copyright (C) 2014-2016, 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. ## ## ...
"""VPX platform.""" import asyncio from typing import Dict, Optional import logging from mpf.platforms.interfaces.driver_platform_interface import DriverPlatformInterface, PulseSettings, HoldSettings from mpf.platforms.interfaces.light_platform_interface import LightPlatformInterface from mpf.platforms.interfaces.swi...
import unittest import sys import numpy as np import scipy.sparse as sp import joblib from io import StringIO from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.utils import deprecated from sklearn.utils._testing import (assert_raises_regex, ignore_warnings, ...
# 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
import os import os.path import socket import textwrap import shutil import subprocess import contextlib import sys import tempfile import time import random try: import pytest except ImportError: print >> sys.stderr, "Integ tests require pytests!" sys.exit(1) def pytest_funcarg__servers(request): "R...
from django.http import HttpRequest from django.test import TestCase, Client from django.contrib.auth.models import User from django.urls import reverse from django.core import mail from django.test.utils import override_settings from lfs.addresses.models import Address from lfs.addresses.utils import AddressManagemen...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless req...
#!/usr/bin/python #title :gentotsv.py #description :Script to process impute files .gz and create a csv file #author :Diego Alvarez #date :2016-06-05 #python_version :3.5 #============================================================================== import gzip import os import fn...
#!/usr/bin/env python """ Functions to do automatic visualization of activation-like maps. For 2D-only visualization, only matplotlib is required. For 3D visualization, Mayavi, version 3.0 or greater, is required. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # License: BSD # Standard libr...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the timezone Windows Registry plugin.""" import unittest from dfdatetime import filetime as dfdatetime_filetime from dfwinreg import definitions as dfwinreg_definitions from dfwinreg import fake as dfwinreg_fake from plaso.parsers.winreg_plugins import time...
# # 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...
# -*- coding: utf-8 -*- """ Sahana Eden Vulnerability Controller """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # @ToDo: deployment_setting #countries = ["TL", "VN"] countries = ["VN"] # --------------...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/env python """ Where you at? """ __author__ = "Alex Drlica-Wagner" __email__ = "kadrlica@fnal.gov" __version__ = "0.0.0" """ TODO: - by default, show all images from current night - clip bad data for previous nights - 5-frame, 1 per band plots, including survey history - (reach) upcoming exposures - (rea...
import os import unittest from unittest.mock import MagicMock, patch import dbt.clients.system import dbt.compilation import dbt.exceptions import dbt.flags import dbt.linker import dbt.parser import dbt.config import dbt.utils import dbt.parser.manifest from dbt.contracts.graph.manifest import FilePath, SourceFile, F...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free ...
import cassiopeia.type.dto.common import cassiopeia.type.core.common if cassiopeia.type.dto.common.sqlalchemy_imported: import sqlalchemy import sqlalchemy.orm @cassiopeia.type.core.common.inheritdocs class RawStats(cassiopeia.type.dto.common.CassiopeiaDto): """ assists in...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals import warnings from decimal import Decimal import mock from django.forms import ValidationError from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from vcr imp...
# Copyright 2020 The Matrix.org Foundation C.I.C. # # 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...
import datetime as dt import pytest import pytz from stix2.base import _STIXBase from stix2.exceptions import ( CustomContentError, ExtraPropertiesError, STIXError, ) from stix2.properties import ( BinaryProperty, BooleanProperty, EmbeddedObjectProperty, EnumProperty, FloatProperty, HashesProperty, HexPro...
import csv import json import logging import os import sys import time from .qt import * from . import config as cfg from .document import Document, Track, Event from .info import InfoWindow from .mplayer import MPlayer from .status import StatusWindow from .templates import templates from .timeline import TimelineW...
# -*- coding: utf-8 -*- from re import compile, UNICODE from expanders import Expander from macro_caller import get_macro_name, expand_macro_from_stream __all__ = ('ExpanderRegister', 'ParserRegister', 'Register', 'RegisterMap') class RegisterMap(dict): """ Register map is dictionary holding macro : register_wi...
# # BaseImage.py -- Abstraction of an generic data image. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy as np import logging from ginga.misc import Bunch, Callback from ginga import trcalc, AutoCuts class ImageError(Exception): pass ...
# Copyright 2007 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import pango import gtk import data_format import do...
"""Tests for vizier.pyvizier.shared.trial.""" import copy import datetime import numpy as np from vizier.pyvizier.shared import trial from absl.testing import absltest from absl.testing import parameterized Metric = trial.Metric Measurement = trial.Measurement class MetricTest(absltest.TestCase): def testMetric...
"""Contains the hardware interface and drivers for the Open Pinball Project platform hardware, including the solenoid, input, incandescent, and neopixel boards. """ # opp.py # Mission Pinball Framework # Written by Hugh Spahr # Released under the MIT License. (See license info at the end of this file.) # Documentati...
import unittest from unittest import mock from django.test import override_settings # Fixes the Cache-Control error in tests. Must appear before view imports. mock.patch('django.views.decorators.cache.never_cache', lambda x: x).start() from tethys_portal.views.user import profile, settings, change_password, social_di...
"""Helper functions for items""" import json from flask import jsonify, request from hydra_python_core.doc_writer import HydraStatus, HydraError from hydrus.data import crud from hydrus.data.exceptions import ( ClassNotFound, InstanceNotFound, InstanceExists, InvalidDateTimeFormat, PropertyNotFoun...
from nose.tools import * # noqa from framework.auth.core import Auth from tests.base import OsfTestCase from tests.factories import AuthUserFactory, ProjectFactory, BookmarkCollectionFactory from scripts.analytics.addon_snapshot import AddonSnapshot from website.models import Node from framework.auth.core import U...
from __future__ import unicode_literals import json from unittest import TestCase from datetime import datetime, date from collections import Sequence, Set import pytest import cherrypy from sideboard.lib._services import _Services from sideboard.lib import Model, serializer, ajax, is_listy, log class TestServices(...
# 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 t...
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at: # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
# coding: utf-8 """ This module contains extra functions/shortcuts used to render HTML. """ import json import re import sys from django import template from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import Http...
# -*- 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...
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import pytest from openpyxl.xml.constants import CHART_DRAWING_NS, SHEET_DRAWING_NS from openpyxl.xml.functions import Element, fromstring, tostring from openpyxl.tests.helper import compare_xml from openpyxl.tests.schema import drawing_schema...
import sys from multiprocessing import Pool from django.conf import settings from django.core.exceptions import ValidationError from django.db import connection as db_connection from django.db.models import Q from django.template import Context, Template from .connections import connections from .models import Email...
# Copyright 2012 Cloudbase Solutions Srl # 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 r...
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
from django import forms from django.contrib import admin from django.contrib.admin import AdminSite from django.contrib.auth.backends import ModelBackend from django.contrib.auth.middleware import AuthenticationMiddleware from django.contrib.contenttypes.admin import GenericStackedInline from django.contrib.messages.m...
# Copyright 2014 Andrea Micheli and Marco Gario # # 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...
"""Solvers for Ridge and LogisticRegression using SAG algorithm""" # Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org> # # License: BSD 3 clause import numpy as np import warnings from ..exceptions import ConvergenceWarning from ..utils import check_array from ..utils.extmath import row_norms from .base import ...
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1alpha1...
import os import glob import re import shutil import sqlalchemy import traceback import importlib from rapidfuzz import fuzz from traitlets.config import LoggingConfigurable, Config from traitlets import Bool, List, Dict, Integer, Instance, Type, Any from traitlets import default, validate from textwrap import dedent ...
from nltk.tree import Tree from np_shallow_neural_classifier import ShallowNeuralClassifier from np_rnn_classifier import RNNClassifier from np_autoencoder import Autoencoder from np_tree_nn import TreeNN import numpy as np import pytest import utils __author__ = "Christopher Potts" __version__ = "CS224u, Stanford, Sp...
import copy import operator from functools import wraps import sys import warnings from django.utils import six from django.utils.deprecation import RemovedInDjango19Warning from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and retu...
""" Takes in the source of samples (e.g., superformular variables or glassware images), and gets the xy coordinates of their contours. data : shape representation using xy coordinates of the contours data_l : shape representation after dimensionality reduction of data Usage: python parametric_space.py Author(s): Wei...
# # Handle the special case of the first scenario # self.notebook.switchScenario(0,scenarioType="Powder") # # # tab = self.notebook.mainTab tab.settings['Program'] = 'vasp' tab.settings['Output file name'] = 'OUTCAR' tab.settings['Excel file name'] = 'application_note_mie.xlsx' tab.settings['Script file name'] = 'appli...
from stat import S_IFREG from functools import partial import errno import traceback import sys import os from os.path import realpath from threading import Lock import subprocess import yaml from xattr import xattr from fuse import FUSE from fuse import LoggingMixIn, Operations, FuseOSError if not hasattr(__buil...
# Copyright 2011 Justin Santa Barbara # # 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...
import json import mock import netaddr from neutron_lib import exceptions as n_exc from quark import exceptions as qexceptions from quark.tests.functional.plugin_modules import test_floating_ips class TestScalingIP(test_floating_ips.BaseFloatingIPTest): def setUp(self): super(TestScalingIP, self).setUp(...
from __future__ import unicode_literals import csv import pytz from furl import furl from datetime import datetime, timedelta from django.db.models import Q from django.views.defaults import page_not_found from django.views.generic import FormView, DeleteView, ListView, TemplateView from django.contrib.auth.mixins imp...
import unittest import numpy as np import unittest # from mock_plpy import MockPlPy # plpy = MockPlPy() # # import sys # sys.modules['plpy'] = plpy from helper import plpy, fixture_file import crankshaft.space_time_dynamics as std from crankshaft import random_seeds import json class SpaceTimeTests(unittest.TestCa...
# Copyright (C) 2010 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 or agreed to in writ...
from __future__ import division from cocos.actions import AccelDeccel from cocos.actions import Delay from cocos.actions import FadeTo from cocos.actions import JumpBy from cocos.actions import Move from cocos.actions import MoveBy from cocos.actions import Repeat from cocos.actions import Reverse from cocos.actions i...
from __future__ import absolute_import from sentry.utils.rust import merge_rust_info_frames, starts_with, strip_symbol STACKTRACE = """ stacktrace: stack backtrace: 0: 0x111e51cf4 - backtrace::backtrace::trace::h38e3b1de9f341e04 at /.cargo/registry/src/github.com-1ecc6299db9ec823/ba...
import numpy as np from utils import Utils, WordDict import time from kernel_density import NonParametricPdf class TickerCore(): """ This is file contains the core algorithm of ticker. Input: * i_select_thresh: If p(word|clicks) > word_select_thresh, we'll ask the user if he/she wants to...
from kivy.uix.scrollview import ScrollView from kivy.properties import ObjectProperty, NumericProperty, StringProperty,\ BoundedNumericProperty, BooleanProperty, OptionProperty from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.checkbox import CheckBox from kivy.uix.spinner impo...
# -*- Mode: Python -*- # attempting a version of core utils for random binaries (as opposed to python core dumps) import os import parse_elf import struct import sys from pprint import pprint as pp W = sys.stderr.write elf_data = {} # this should be set by the elf data psize = None def read_map (filename, base=0):...
# Created by: Jack Button, Aditya Dua # 10 June, 2017 import unittest import numpy as np from math import pi from .test_common import matrices_equal, matrix_mismatch_string_builder from ..base import transforms # ---------------------------------------------------------------------------------------# # ...
import numpy as np from scipy.stats import skew, kurtosis, shapiro, pearsonr, ansari, mood, levene, fligner, bartlett, mannwhitneyu from scipy.spatial.distance import braycurtis, canberra, chebyshev, cityblock, correlation, cosine, euclidean, hamming, jaccard, kulsinski, matching, russellrao, sqeuclidean from sklearn.p...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# 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 ...
# -*- coding: utf-8 -*- """ Volunteer Management """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) s3db.hrm_vars() # ============================================================================= def index...
"""Fixer for __metaclass__ = X -> (metaclass=X) methods. The various forms of classef (inherits nothing, inherits once, inherits many) don't parse the same in the CST so we look at ALL classes for a __metaclass__ and if we find one normalize the inherits to all be an arglist. For one-liner classes ('cl...
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Anshuman Bhaduri # Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2013 xarvh # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Sebastien Blot # # Permission is hereby granted, free of cha...
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import numpy as np from sklearn import datasets from sklearn.base import clone from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import GradientBoostingRegressor from sklearn.ensemble.gradient_boosting i...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import re import json import ctypes import distutils.dir_util as dir_util from os.path import expanduser from zipfile import * import webbrowser try: from Tkinter import Tk except ImportError: pass def define_operation_system(): platform_name...
### # Copyright (c) 2017 Diamond Light Source Ltd. # # Contributors: # Charles Mita - initial API and implementation and/or initial documentation # ### import itertools from scanpointgenerator.compat import np class Dimension(object): """ An unrolled set of generators joined by excluders. Represents a...
#!/usr/bin/env python # # Setup script for Review Board. # # A big thanks to Django project for some of the fixes used in here for # MacOS X and data files installation. import json import os import subprocess import sys from distutils.command.install import INSTALL_SCHEMES from distutils.core import Command from set...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# encoding: utf-8 # # Copyright (C) 2011, 2012 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
from __future__ import print_function from __future__ import unicode_literals import logging import os import subprocess from collections import defaultdict import re from imagemounter import _util from imagemounter.exceptions import ArgumentError, SubsystemError, ModuleNotFoundError logger = logging.getLogger(__na...
import configparser import logging import multiprocessing import multiprocessing.managers import multiprocessing.synchronize import numbers import os import re from typing import Optional, Set, Iterable, List, Tuple, Final, Iterator, Union import appdirs import numpy as np from PyQt5 import QtCore from .calculations....
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
# orm/__init__.py # Copyright (C) 2005-2014 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 """ Functional constructs for ORM configuration. See the SQLAlchemy object relational...
# Copyright (c) 2014 OpenStack Foundation # Copyright (c) 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...
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.utils import six from djblets.util.decorators import augment_method_from from djblets.webapi.decorators import (webapi_login_required, webapi_r...