repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
sdvillal/manysources | manysources/analyses/substructures.py | 1 | 31188 | from collections import defaultdict
import os.path as op
from itertools import izip
import warnings
import cPickle as pickle
import glob
import math
import os
import h5py
import pandas as pd
import numpy as np
from rdkit import Chem
import matplotlib.pyplot as plt
from manysources import MANYSOURCES_ROOT
from manysou... | bsd-3-clause |
MazamaScience/ispaq | ispaq/concierge.py | 1 | 32479 | """
ISPAQ Data Access Expediter.
:copyright:
Mazama Science
:license:
GNU Lesser General Public License, Version 3
(http://www.gnu.org/copyleft/lesser.html)
"""
from __future__ import (absolute_import, division, print_function)
import os
import re
import glob
import pandas as pd
import obspy
from obspy... | gpl-3.0 |
466152112/scikit-learn | sklearn/svm/tests/test_svm.py | 116 | 31653 | """
Testing for Support Vector Machine module (sklearn.svm)
TODO: remove hard coded numerical results when possible
"""
import numpy as np
import itertools
from numpy.testing import assert_array_equal, assert_array_almost_equal
from numpy.testing import assert_almost_equal
from scipy import sparse
from nose.tools im... | bsd-3-clause |
wasade/American-Gut | tests/test_diversity_analysis.py | 5 | 38742 | #!/usr/bin/env python
from __future__ import division
from unittest import TestCase, main
import numpy as np
import numpy.testing as npt
import skbio
from os import rmdir
from os.path import realpath, dirname, join as pjoin, exists
from pandas import Series, DataFrame, Index
from pandas.util.testing import assert_in... | bsd-3-clause |
sunshineDrizzle/FreeROI | froi/algorithm/meshtool.py | 2 | 36643 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import subprocess
import numpy as np
from scipy import sparse
from scipy.spatial.distance import cdist, pdist
from scipy.stats import pearsonr
def _fast_cross_3d(x, y):
"""Compute cross pr... | bsd-3-clause |
bajibabu/merlin | src/work_in_progress/oliver/run_tpdnn.py | 2 | 101142 |
import pickle
import gzip
import os, sys, errno
import time
import math
# numpy & theano imports need to be done in this order (only for some numpy installations, not sure why)
import numpy
# we need to explicitly import this in some cases, not sure why this doesn't get imported with numpy itself
import numpy.distut... | apache-2.0 |
wooga/airflow | tests/providers/apache/hive/hooks/test_hive.py | 1 | 34850 | #
# 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... | apache-2.0 |
SnakeJenny/TensorFlow | tensorflow/contrib/learn/python/learn/estimators/estimator_test.py | 8 | 42354 | # 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... | apache-2.0 |
gautam1858/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimator.py | 14 | 62926 | # 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... | apache-2.0 |
horance-liu/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimator_test.py | 21 | 53471 | # 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... | apache-2.0 |
webmasterraj/FogOrNot | flask/lib/python2.7/site-packages/pandas/tseries/tests/test_base.py | 2 | 51601 | from __future__ import print_function
import re
from datetime import datetime, timedelta
import numpy as np
import pandas as pd
from pandas.tseries.base import DatetimeIndexOpsMixin
from pandas.util.testing import assertRaisesRegexp, assert_isinstance
from pandas.tseries.common import is_datetimelike
from pandas import... | gpl-2.0 |
vorwerkc/pymatgen | pymatgen/analysis/graphs.py | 1 | 112413 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Module for graph representations of crystals.
"""
import copy
import logging
import os.path
import subprocess
import warnings
from collections import defaultdict, namedtuple
from itertools import combinati... | mit |
RomainBrault/scikit-learn | sklearn/grid_search.py | 5 | 40816 | """
The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters
of an estimator.
"""
from __future__ import print_function
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# ... | bsd-3-clause |
Kate-Willett/HadISDH_Build | F10_MissingAdjUnc_AdjPlots.py | 1 | 30317 | # PYTHON 3
# >module load scitools/default-current
#
# Author: Kate Willett
# Created: 1 February 2013 (IDL)
# Last update: 1 December 2020 (Python 3 from 1st Dec 2020)
# Location: /home/h04/hadkw/HadISDH_Code/HADISDH_BUILD/
# GitHub: https://github.com/Kate-Willett/HadISDH_Build
# -----------------------
# CODE ... | cc0-1.0 |
JPFrancoia/scikit-learn | sklearn/decomposition/dict_learning.py | 13 | 46149 | """ Dictionary learning
"""
from __future__ import print_function
# Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort
# License: BSD 3 clause
import time
import sys
import itertools
from math import sqrt, ceil
import numpy as np
from scipy import linalg
from numpy.lib.stride_tricks import as_strided
from ..b... | bsd-3-clause |
rgommers/scipy | scipy/stats/_multivariate.py | 7 | 153934 | #
# Author: Joris Vankerschaver 2013
#
import math
import numpy as np
from numpy import asarray_chkfinite, asarray
import scipy.linalg
from scipy._lib import doccer
from scipy.special import gammaln, psi, multigammaln, xlogy, entr, betaln
from scipy._lib._util import check_random_state
from scipy.linalg.blas import dro... | bsd-3-clause |
mpoquet/execo | src/execo_g5k/planning.py | 1 | 49114 | # Copyright 2009-2016 INRIA Rhone-Alpes, Service Experimentation et
# Developpement
#
# This file is part of Execo.
#
# Execo 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... | gpl-3.0 |
chrhartm/SORN | common/sorn_stats.py | 2 | 74077 | from __future__ import division
from pylab import *
import utils
utils.backup(__file__)
from stats import AbstractStat
from stats import HistoryStat
from stats import _getvar
from common.sources import TrialSource
from utils.lstsq_reg import lstsq_reg
import cPickle as pickle
import gzip
def load_source(name,c):
... | mit |
JackKelly/neuralnilm_prototype | scripts/e445.py | 2 | 38141 | from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import (Net, RealApplianceSource,
BLSTMLayer, DimshuffleLayer,
Bidirectio... | mit |
mehdidc/scikit-learn | sklearn/svm/classes.py | 3 | 36924 | import warnings
import numpy as np
from .base import _fit_liblinear, BaseSVC, BaseLibSVM
from ..base import BaseEstimator, RegressorMixin
from ..linear_model.base import LinearClassifierMixin, SparseCoefMixin, \
LinearModel
from ..feature_selection.from_model import _LearntSelectorMixin
from ..utils import check_X... | bsd-3-clause |
jiangxb1987/spark | python/pyspark/sql/session.py | 3 | 37802 | #
# 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... | apache-2.0 |
adrienpacifico/openfisca-france-data | openfisca_france_data/input_data_builders/build_openfisca_survey_data/step_06_rebuild.py | 2 | 38058 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redist... | agpl-3.0 |
0x0all/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/quiver.py | 69 | 36790 | """
Support for plotting vector fields.
Presently this contains Quiver and Barb. Quiver plots an arrow in the
direction of the vector, with the size of the arrow related to the
magnitude of the vector.
Barbs are like quiver in that they point along a vector, but
the magnitude of the vector is given schematically by t... | gpl-3.0 |
mbayon/TFG-MachineLearning | venv/lib/python3.6/site-packages/sklearn/preprocessing/data.py | 5 | 94481 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Eric Martin <eric@ericmart.in>
# Giorgio Patrini <giorgio.patrini@anu.edu.au>
# Lic... | mit |
mikeireland/pymfe | pymfe/rv.py | 1 | 37463 | """This module/class contains functionality for computing (and plotting) radial
velocities and creating reference spectra for extracted fluxes. This should
ideally remain independent of the extraction method, such that it does not
matter which spectrograph took the data, nor what "Spectrograph" object was
used for e... | mit |
kdebrab/pandas | pandas/tests/io/json/test_pandas.py | 2 | 50233 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0612,E1101
import pytest
from pandas.compat import (range, lrange, StringIO,
OrderedDict, is_platform_32bit)
import os
import numpy as np
from pandas import (Series, DataFrame, DatetimeIndex, Timestamp,
read_json, compat)
from... | bsd-3-clause |
jangorecki/h2o-3 | h2o-py/dynamic_tests/testdir_algos/glm/pyunit_glm_binomial_large.py | 4 | 116214 | from __future__ import print_function
import sys
sys.path.insert(1, "../../../")
import random
import os
import math
import numpy as np
import h2o
import time
from builtins import range
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h2o.grid.grid_search import H2OG... | apache-2.0 |
spacether/pycalculix | pycalculix/partmodule.py | 1 | 40690 | """This module stores the Part class. It is used to make 2D parts.
"""
import numpy as np # needed for linspace on hole creation
from . import base_classes
from . import geometry #point, line, area
class Part(base_classes.Idobj):
"""This makes a part.
Args:
parent: parent FeaModel
Attributes:
... | apache-2.0 |
menpo/menpo | menpo/visualize/base.py | 2 | 57597 | try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable
import numpy as np
from menpo.base import MenpoMissingDependencyError
class Menpo3dMissingError(MenpoMissingDependencyError):
r"""
Exception that is thrown when an attempt is made to import a 3D
visuali... | bsd-3-clause |
librosa/librosa | librosa/util/utils.py | 1 | 64787 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Utility functions"""
import warnings
import scipy.ndimage
import scipy.sparse
import numpy as np
import numba
from numpy.lib.stride_tricks import as_strided
from .._cache import cache
from .exceptions import ParameterError
# Constrain STFT block sizes to 256 KB
MAX_M... | isc |
webmasterraj/FogOrNot | flask/lib/python2.7/site-packages/pandas/tests/test_generic.py | 2 | 53567 | # -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,W0612
from datetime import datetime, timedelta
import nose
import numpy as np
from numpy import nan
import pandas as pd
from pandas import (Index, Series, DataFrame, Panel,
isnull, notnull, date_range, period_range)
from pandas.core.index import ... | gpl-2.0 |
sys-bio/tellurium | tellurium/tests/sedml/test_phrasedml.py | 2 | 30460 | """
Testing phrasedml.
test_sedml_phrasedml.py : phrasedml based tests.
test_sedml_kisao.py : SED-ML kisao support
test_sedml_omex.py : SED-ML tests based on Combine Archives
test_sedml_sedml.py : sed-ml tests
"""
from __future__ import absolute_import, print_function, division
import os
import shutil... | apache-2.0 |
wdwvt1/scikit-bio | skbio/stats/ordination/tests/test_ordination.py | 3 | 35844 | # ----------------------------------------------------------------------------
# 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.
# --------------------------------------------... | bsd-3-clause |
psi-rking/psi4 | psi4/driver/qcdb/mpl.py | 7 | 54234 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2021 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 |
feranick/SpectralMachine | Archive/20170609c/SpectraLearnPredict.py | 1 | 60594 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
**********************************************************
*
* SpectraLearnPredict
* Perform Machine Learning on Raman spectra.
* version: 20170609c
*
* Uses: Deep Neural Networks, TensorFlow, SVM, PCA, K-Means
*
* By: Nicola Ferralis <feranick@hotmail.com>
*
*********... | gpl-3.0 |
zerothi/sids | sisl/supercell.py | 1 | 37042 | """ Define a supercell
This class is the basis of many different objects.
"""
import math
import warnings
from numbers import Integral
import numpy as np
from numpy import dot
from ._internal import set_module
from . import _plot as plt
from . import _array as _a
from .utils.mathematics import fnorm
from .shape.pris... | lgpl-3.0 |
balajiln/mondrianforest | src/mondrianforest.py | 1 | 72853 | #!/usr/bin/env python
#
# Example usage:
#
# NOTE:
# optype=real: Gaussian parametrization uses a non-linear transformation of split times
# variance should decrease as split_time increases:
# variance at node j = variance_coef * (sigmoid(sigmoid_coef * t_j) - sigmoid(sigmoid_coef * t_{parent(j)}))
# non-linear ... | mit |
mganeva/mantid | MantidPlot/pymantidplot/proxies.py | 1 | 37572 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
"""
Module containing classes that act as pro... | gpl-3.0 |
AleKit/TFGDM17 | dm_spectra_f.py | 1 | 30644 | import numpy as np
import pylab as pl
import scipy as sp
import bisect
from scipy.interpolate import interp1d
from scipy.interpolate import spline
from matplotlib import pyplot as plt
import pyfits
pl.rcParams['figure.figsize'] = (10.0, 7.0)
pl.rcParams['font.size'] = 18
pl.rcParams['font.family'] = 'serif'
pl.rcPara... | gpl-3.0 |
dnidever/noaosourcecatalog | python/nsc_instcal_combine_qacuts.py | 1 | 31160 | #!/usr/bin/env python
import os
import sys
import numpy as np
import warnings
from astropy.io import fits
from astropy.utils.exceptions import AstropyWarning
from astropy.table import Table, vstack, Column
from astropy.time import Time
import healpy as hp
from dlnpyutils import utils as dln, coords
#import subprocess
... | mit |
catalyst-cooperative/pudl | src/pudl/output/pudltabl.py | 1 | 35324 | """
This module provides a class enabling tabular compilations from the PUDL DB.
Many of our potential users are comfortable using spreadsheets, not databases,
so we are creating a collection of tabular outputs that contain the most
useful core information from the PUDL data packages, including additional keys
and hum... | mit |
ryfeus/lambda-packs | LightGBM_sklearn_scipy_numpy/source/sklearn/metrics/pairwise.py | 7 | 47000 | # -*- coding: utf-8 -*-
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Robert Layton <robertlayton@gmail.com>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Philippe Gervais <philippe.gervais@inria.fr>
# Lars Buitinck
... | mit |
toobaz/pandas | pandas/tests/indexing/test_loc.py | 1 | 33581 | """ test label based indexing with loc """
from io import StringIO
import re
from warnings import catch_warnings, filterwarnings
import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, Series, Timestamp, date_range
from pandas.api.types import is_scalar
from pandas.tests.indexing.common imp... | bsd-3-clause |
MartinDelzant/scikit-learn | sklearn/ensemble/gradient_boosting.py | 50 | 67625 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... | bsd-3-clause |
Jimmy-Morzaria/scikit-learn | sklearn/linear_model/tests/test_sgd.py | 13 | 43295 | import pickle
import unittest
import numpy as np
import scipy.sparse as sp
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_greater
from sklearn.utils.testing ... | bsd-3-clause |
hrjn/scikit-learn | sklearn/model_selection/_split.py | 7 | 68700 | """
The :mod:`sklearn.model_selection._split` module includes classes and
functions to split the data based on a preset strategy.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# Ragha... | bsd-3-clause |
zzcclp/spark | python/pyspark/pandas/series.py | 9 | 197528 | #
# 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... | apache-2.0 |
MartinThoma/algorithms | ML/50-mlps/07-autokeras/hasy_tools.py | 12 | 46221 | #!/usr/bin/env python
"""
Tools for the HASY dataset.
Type `./hasy_tools.py --help` for the command line tools and `help(hasy_tools)`
in the interactive Python shell for the module options of hasy_tools.
See https://arxiv.org/abs/1701.08380 for details about the dataset.
"""
import csv
import json
import logging
im... | mit |
jswoboda/SimISR | SimISR/analysisplots.py | 2 | 36407 | #!/usr/bin/env python
"""
Created on Wed May 6 13:55:26 2015
analysisplots.py
This module is used to plot the output from various stages of the simulator to debug
problems. This is also helpful for presentations.
@author: John Swoboda
"""
from . import Path
import matplotlib
import matplotlib.pyplot as plt
import matp... | mit |
AustereCuriosity/numpy | numpy/linalg/linalg.py | 2 | 75877 | """Lite version of scipy.linalg.
Notes
-----
This module is a lite version of the linalg.py module in SciPy which
contains high-level Python interface to the LAPACK library. The lite
version only accesses the following LAPACK functions: dgesv, zgesv,
dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr... | bsd-3-clause |
ChristopherHogan/numpy | numpy/fft/fftpack.py | 72 | 45497 | """
Discrete Fourier Transforms
Routines in this module:
fft(a, n=None, axis=-1)
ifft(a, n=None, axis=-1)
rfft(a, n=None, axis=-1)
irfft(a, n=None, axis=-1)
hfft(a, n=None, axis=-1)
ihfft(a, n=None, axis=-1)
fftn(a, s=None, axes=None)
ifftn(a, s=None, axes=None)
rfftn(a, s=None, axes=None)
irfftn(a, s=None, axes=None... | bsd-3-clause |
greenoaktree/MissionPlanner | Lib/site-packages/scipy/signal/filter_design.py | 53 | 63381 | """Filter design.
"""
import types
import warnings
import numpy
from numpy import atleast_1d, poly, polyval, roots, real, asarray, allclose, \
resize, pi, absolute, logspace, r_, sqrt, tan, log10, arctan, arcsinh, \
cos, exp, cosh, arccosh, ceil, conjugate, zeros, sinh
from numpy import mintypecode
from scipy... | gpl-3.0 |
rsivapr/scikit-learn | sklearn/metrics/pairwise.py | 2 | 37180 | # -*- coding: utf-8 -*-
"""
The :mod:`sklearn.metrics.pairwise` submodule implements utilities to evaluate
pairwise distances or affinity of sets of samples.
This module contains both distance metrics and kernels. A brief summary is
given on the two here.
Distance metrics are a function d(a, b) such that d(a, b) < d(... | bsd-3-clause |
WillemWybo/SGF_formalism | source/functionFitter.py | 1 | 43613 | """
Author: Willem Wybo
Date: 18/08/2015
Place: BBP, Geneva
"""
import numpy as np
import numpy.polynomial.polynomial as npol
import scipy.linalg as la
import scipy.optimize as op
import scipy.integrate as integ
import matplotlib.pyplot as pl
from scipy.cluster.vq import kmeans2
from scipy.cluster.vq import kmeans
i... | mit |
dmigo/incubator-superset | superset/db_engine_specs.py | 1 | 56036 | # -*- coding: utf-8 -*-
# pylint: disable=C,R,W
"""Compatibility layer for different database engines
This modules stores logic specific to different database engines. Things
like time-related functions that are similar but not identical, or
information as to expose certain features or not and how to expose them.
For... | apache-2.0 |
jaidevd/scikit-learn | sklearn/preprocessing/data.py | 5 | 68210 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Eric Martin <eric@ericmart.in>
# Giorgio Patrini <giorgio.patrini@anu.edu.au>
# Lic... | bsd-3-clause |
chaluemwut/fbserver | venv/lib/python2.7/site-packages/scipy/stats/morestats.py | 7 | 78330 | # Author: Travis Oliphant, 2002
#
# Further updates and enhancements by many SciPy developers.
#
from __future__ import division, print_function, absolute_import
import math
import warnings
import numpy as np
from numpy import (isscalar, r_, log, sum, around, unique, asarray,
zeros, arange, sort, amin, amax, an... | apache-2.0 |
upliftaero/MissionPlanner | Lib/site-packages/numpy/lib/function_base.py | 53 | 108301 | __docformat__ = "restructuredtext en"
__all__ = ['select', 'piecewise', 'trim_zeros', 'copy', 'iterable',
'percentile', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex',
'disp', 'extract', 'place', 'nansum', 'nanmax', 'nanargmax',
'nanargmin', 'nanmin', 'vectorize', 'asarray_chkfinite', 'av... | gpl-3.0 |
pizzathief/numpy | numpy/lib/polynomial.py | 4 | 40727 | """
Functions to operate on polynomials.
"""
from __future__ import division, absolute_import, print_function
__all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd',
'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d',
'polyfit', 'RankWarning']
import functools
import re
import warnings
i... | bsd-3-clause |
daniel20162016/my-first | read_xml_all/calcul_matrix_je_le_qui_dans_de_192_matrix_compare_df_good.py | 2 | 34715 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 31 15:45:22 2016
@author: wang
"""
#from matplotlib import pylab as plt
#from numpy import fft, fromstring, int16, linspace
#import wave
from read_wav_xml_good_1 import*
from matrix_24_2 import*
from max_matrix_norm import*
import numpy as np
# open a wave file
#filenam... | mit |
blondegeek/pymatgen | pymatgen/io/abinit/works.py | 2 | 74708 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Works for Abinit
"""
import os
import shutil
import time
import abc
import collections
import numpy as np
import copy
from monty.collections import AttrDict
from monty.itertools import chunks
from monty.fu... | mit |
mrshu/scikit-learn | sklearn/ensemble/forest.py | 1 | 49130 | """Forest of trees-based ensemble methods
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls the ... | bsd-3-clause |
lrq3000/author-detector | authordetector/run.py | 1 | 33417 | #!/usr/bin/env python
# encoding: utf-8
#
# AuthorDetector
# Copyright (C) 2013 Larroque Stephen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your ... | gpl-3.0 |
feuerchop/increOCSVM | results/profile_mnist/line_profiler_mnist_10000_0.2_10.py | 1 | 44650 | ['../evaluation_tmp.py', '10000']
mnist classes = 2
size: 10000
(2609,)
(7391,)
data size: 10000, nu: 0.2, gamma: 1
============ 1. Fold of CV ============
1) Incremental OCSVM
0 data points processed
1000 data points processed
2000 data points processed
3000 data points processed
4000 data points processed
5000 data p... | gpl-2.0 |
DTOcean/dtocean-core | dtocean_core/utils/database.py | 1 | 40368 | # -*- coding: utf-8 -*-
# Copyright (C) 2016-2018 Mathew Topper
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | gpl-3.0 |
sanketloke/scikit-learn | sklearn/svm/classes.py | 3 | 40654 | import warnings
import numpy as np
from .base import _fit_liblinear, BaseSVC, BaseLibSVM
from ..base import BaseEstimator, RegressorMixin
from ..linear_model.base import LinearClassifierMixin, SparseCoefMixin, \
LinearModel
from ..feature_selection.from_model import _LearntSelectorMixin
from ..utils import check_X... | bsd-3-clause |
anielsen001/scipy | scipy/stats/tests/test_morestats.py | 4 | 54238 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (TestCase, run_module_suite, assert_array_equal,
... | bsd-3-clause |
hlin117/statsmodels | statsmodels/iolib/summary.py | 22 | 33071 | from statsmodels.compat.python import range, lrange, lmap, lzip, zip_longest
import numpy as np
from statsmodels.iolib.table import SimpleTable
from statsmodels.iolib.tableformatting import (gen_fmt, fmt_2,
fmt_params, fmt_base, fmt_2cols)
#from statsmodels.iolib.summary2... | bsd-3-clause |
BigDataforYou/movie_recommendation_workshop_1 | big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/io/tests/parser/common.py | 1 | 41697 | # -*- coding: utf-8 -*-
import csv
import os
import platform
import re
import sys
from datetime import datetime
import nose
import numpy as np
from numpy.testing.decorators import slow
from pandas.lib import Timestamp
import pandas as pd
import pandas.util.testing as tm
from pandas import DataFrame, Series, Index, ... | mit |
terkkila/scikit-learn | sklearn/feature_extraction/tests/test_text.py | 75 | 34122 | from __future__ import unicode_literals
import warnings
from sklearn.feature_extraction.text import strip_tags
from sklearn.feature_extraction.text import strip_accents_unicode
from sklearn.feature_extraction.text import strip_accents_ascii
from sklearn.feature_extraction.text import HashingVectorizer
from sklearn.fe... | bsd-3-clause |
magic2du/contact_matrix | Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_04_27_2015_parallel_for_final.py | 1 | 43408 |
# coding: utf-8
# In[5]:
import sys, os
sys.path.append('../../../libs/')
import os.path
import IO_class
from IO_class import FileOperator
from sklearn import cross_validation
import sklearn
import csv
from dateutil import parser
from datetime import timedelta
from sklearn import svm
import numpy as np
import pandas... | gpl-2.0 |
Erotemic/plottool | plottool_ibeis/interact_annotations.py | 1 | 52275 | """
Interactive tool to draw mask on an image or image-like array.
TODO:
* need concept of subannotation
* need to take options on a right click of an annotation
* add support for arbitrary polygons back in .
* rename species_list to label_list or category_list
* Just use metadata instead of specie... | apache-2.0 |
DGrady/pandas | pandas/core/algorithms.py | 2 | 51643 | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
from __future__ import division
from warnings import warn, catch_warnings
import numpy as np
from pandas import compat, _np_version_under1p8
from pandas.core.dtypes.cast import maybe_promote
from pandas.c... | bsd-3-clause |
Srisai85/scipy | scipy/stats/stats.py | 18 | 169352 | # Copyright (c) Gary Strangman. All rights reserved
#
# Disclaimer
#
# This software is provided "as-is". There are no expressed or implied
# warranties of any kind, including, but not limited to, the warranties
# of merchantability and fitness for a given application. In no event
# shall Gary Strangman be liable fo... | bsd-3-clause |
crowdresearch/daemo | crowdsourcing/models.py | 2 | 38402 | import json
import os
import pandas as pd
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.postgres.fields import ArrayField, JSONField
from django.db import models
from django.utils import timezone
from crowdsourcing.utils import get_delimiter, get_worker_cache
class... | mit |
andyraib/data-storage | python_scripts/env/lib/python3.6/site-packages/pandas/tests/test_internals.py | 7 | 47893 | # -*- coding: utf-8 -*-
# pylint: disable=W0102
from datetime import datetime, date
import nose
import numpy as np
import re
import itertools
from pandas import (Index, MultiIndex, DataFrame, DatetimeIndex,
Series, Categorical)
from pandas.compat import OrderedDict, lrange
from pandas.sparse.arra... | apache-2.0 |
IndraVikas/scikit-learn | sklearn/mixture/gmm.py | 128 | 31069 | """
Gaussian Mixture Models.
This implementation corresponds to frequentist (non-Bayesian) formulation
of Gaussian Mixture Models.
"""
# Author: Ron Weiss <ronweiss@gmail.com>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Bertrand Thirion <bertrand.thirion@inria.fr>
import warnings
import numpy as... | bsd-3-clause |
mattgiguere/scikit-learn | sklearn/cross_validation.py | 3 | 57208 | """
The :mod:`sklearn.cross_validation` module includes utilities for cross-
validation and performance evaluation.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
from... | bsd-3-clause |
NelisVerhoef/scikit-learn | sklearn/metrics/tests/test_classification.py | 83 | 49782 | from __future__ import division, print_function
import numpy as np
from scipy import linalg
from functools import partial
from itertools import product
import warnings
from sklearn import datasets
from sklearn import svm
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import la... | bsd-3-clause |
jimsrc/seatos | shared_lib/shared_funcs_ii.py | 1 | 31654 | from numpy import *
from pylab import *
from datetime import datetime, time, timedelta
import numpy as np
import console_colors as ccl
from scipy.io.netcdf import netcdf_file
from ShiftTimes import *
import os
import matplotlib.patches as patches
import matplotlib.transforms as transforms
#from read_NewTable import ts... | mit |
andyraib/data-storage | python_scripts/env/lib/python3.6/site-packages/matplotlib/backends/backend_gtk.py | 10 | 37753 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import os, sys, warnings
def fn_name(): return sys._getframe(1).f_code.co_name
if six.PY3:
warnings.warn(
"The gtk* backends have not been tested with Python 3.x",
ImportWarning... | apache-2.0 |
ogeniz/programming | Python/dsp/thinkdsp/thinkdsp.py | 2 | 37046 | """This file contains code used in "Think DSP",
by Allen B. Downey, available from greenteapress.com
Copyright 2013 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import array
import copy
import math
import numpy
import random
import scipy
... | gpl-2.0 |
wholmgren/pvlib-python | pvlib/solarposition.py | 1 | 48876 | """
Calculate the solar position using a variety of methods/packages.
"""
# Contributors:
# Rob Andrews (@Calama-Consulting), Calama Consulting, 2014
# Will Holmgren (@wholmgren), University of Arizona, 2014
# Tony Lorenzo (@alorenzo175), University of Arizona, 2015
# Cliff hansen (@cwhanse), Sandia National Laborator... | bsd-3-clause |
ilo10/scikit-learn | sklearn/ensemble/tests/test_gradient_boosting.py | 127 | 37672 | """
Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting).
"""
import warnings
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.grad... | bsd-3-clause |
chrisjsewell/PyGauss | pygauss/molecule.py | 1 | 78698 | # -*- coding: utf-8 -*-
"""
Created on Fri May 01 21:24:31 2015
@author: chris
"""
import os
from io import BytesIO
import PIL
from PIL import Image, ImageChops
import copy
import warnings
from math import degrees, atan2, sqrt, acos
import numpy as np
from scipy.signal import argrelextrema
import matplotlib as mpl... | gpl-3.0 |
webmasterraj/GaSiProMo | flask/lib/python2.7/site-packages/pandas/io/excel.py | 4 | 49188 | """
Module parse to/from Excel
"""
#----------------------------------------------------------------------
# ExcelFile class
import os
import datetime
import abc
import numpy as np
from pandas.io.parsers import TextParser
from pandas.io.common import _is_url, _urlopen
from pandas.tseries.period import Period
from pan... | gpl-2.0 |
jjtoharia/KaggleOutbrain | pySpark/temp_spark.py | 1 | 32616 | # -*- coding: utf-8 -*-
"""
Editor de Spyder
Este es un archivo temporal
"""
#
# Esto en [pyspark | GoogleCloud] NO hace falta (ya hay una seasión de spark lanzada y un sparkContext creado):
# C:\Archivos de programa\Google\Cloud SDK>gcloud compute instances start cluster-jjtzapata-m cluster-jjtzapata-... | mit |
architecture-building-systems/CEAforArcGIS | cea/technologies/solar/photovoltaic_thermal.py | 2 | 42510 | """
Photovoltaic thermal panels
"""
import os
import time
from itertools import repeat
from math import *
import geopandas as gpd
import numpy as np
import pandas as pd
from geopandas import GeoDataFrame as gdf
from numba import jit
import cea.inputlocator
import cea.utilities.parallel
import cea.utilities.worke... | mit |
sandeepkrjha/pgmpy | pgmpy/models/BayesianModel.py | 1 | 36803 | #!/usr/bin/env python3
import itertools
from collections import defaultdict
import logging
from operator import mul
import networkx as nx
import numpy as np
import pandas as pd
from pgmpy.base import DirectedGraph
from pgmpy.factors.discrete import TabularCPD, JointProbabilityDistribution, DiscreteFactor
from pgmpy.... | mit |
e-koch/TurbuStat | turbustat/statistics/dendrograms/dendro_stats.py | 2 | 34290 | # Licensed under an MIT open source license - see LICENSE
from __future__ import print_function, absolute_import, division
'''
Dendrogram statistics as described in Burkhart et al. (2013)
Two statistics are contained:
* number of leaves + branches vs. $\delta$ parameter
* statistical moments of the intensity ... | mit |
marcsans/cnn-physics-perception | phy/lib/python2.7/site-packages/numpy/lib/function_base.py | 15 | 150516 | from __future__ import division, absolute_import, print_function
import warnings
import sys
import collections
import operator
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarr... | mit |
andrewcbennett/iris | lib/iris/tests/test_analysis.py | 3 | 50729 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 |
GuessWhoSamFoo/pandas | pandas/core/internals/blocks.py | 1 | 114866 | # -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
import functools
import inspect
import re
import warnings
import numpy as np
from pandas._libs import internals as libinternals, lib, tslib, tslibs
from pandas._libs.tslibs import Timedelta, conversion, is_null_datetimelike
import pandas.compat as... | bsd-3-clause |
ellisk42/TikZ | synthesizer.py | 1 | 30155 | from learnedRanking import learnToRank
from similarity import analyzeFeatures
from render import render
#from fastRender import fastRender
from sketch import synthesizeProgram
from language import *
from utilities import showImage,loadImage,saveMatrixAsImage,mergeDictionaries,frameImageNicely
from recognitionModel impo... | gpl-3.0 |
rseubert/scikit-learn | sklearn/metrics/tests/test_ranking.py | 11 | 37239 | from __future__ import division, print_function
import numpy as np
from itertools import product
import warnings
from sklearn import datasets
from sklearn import svm
from sklearn import ensemble
from sklearn.datasets import make_multilabel_classification
from sklearn.random_projection import sparse_random_matrix
fro... | bsd-3-clause |
mikeireland/pyhermes | hermes.py | 1 | 83192 | """This module contains the HERMES data reduction class.
"""
#Example setup analysis for all channels:
#import hermes
#hermes.go_all('/Users/mireland/data/hermes/140310/data/', '/Users/mireland/tel/hermes/140310/', '/Users/mireland/python/pyhermes/cal/')
#Example setup analysis for a full night: blue
#hm = he... | mit |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/numpy/linalg/linalg.py | 11 | 77339 | """Lite version of scipy.linalg.
Notes
-----
This module is a lite version of the linalg.py module in SciPy which
contains high-level Python interface to the LAPACK library. The lite
version only accesses the following LAPACK functions: dgesv, zgesv,
dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr... | apache-2.0 |
chrsrds/scikit-learn | sklearn/linear_model/logistic.py | 1 | 91847 | """
Logistic Regression
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Fabian Pedregosa <f@bianp.net>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Manoj Kumar <manojkumarsivaraj334@gmail.com>
# Lars Buitinck
# Simon Wu <s8wu@uwaterloo.ca>
# ... | bsd-3-clause |
tamasgal/km3pipe | km3pipe/io/hdf5.py | 1 | 37296 | # Filename: hdf5.py
# pylint: disable=C0103,R0903,C901
# vim:set ts=4 sts=4 sw=4 et:
"""
Read and write KM3NeT-formatted HDF5 files.
"""
from collections import OrderedDict, defaultdict, namedtuple
from functools import singledispatch
import os.path
import warnings
from uuid import uuid4
import numpy as np
import ta... | mit |
rohit21122012/DCASE2013 | runs/2016/baseline32/src/dataset.py | 37 | 78389 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import urllib2
import socket
import locale
import zipfile
import tarfile
from sklearn.cross_validation import StratifiedShuffleSplit, KFold
from ui import *
from general import *
from files import *
class Dataset(object):
"""Dataset base class.
The sp... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.