repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
facaiy/spark | python/pyspark/sql/dataframe.py | 4 | 90501 | #
# 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 |
Neuroglycerin/hail-seizure | testing/test_testing.py | 1 | 31374 | #!/usr/bin/env python3
import random
import copy
import numpy as np
import sklearn.pipeline
import json
import unittest
import glob
import warnings
import subprocess
import os
import python.utils as utils
import csv
import h5py
class testHDF5parsing(unittest.TestCase):
'''
Unittests for the function that par... | apache-2.0 |
nicproulx/mne-python | mne/tests/test_epochs.py | 2 | 91453 | # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
from copy import deepcopy
from nose.tools import (assert_true, assert_equal, assert_raises,
assert_not_equal)
from numpy.... | bsd-3-clause |
jeffery-do/Vizdoombot | doom/lib/python3.5/site-packages/matplotlib/artist.py | 4 | 46827 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.externals import six
import re
import warnings
import inspect
import numpy as np
import matplotlib
import matplotlib.cbook as cbook
from matplotlib.cbook import mplDeprecation
from matplotlib i... | mit |
geodynamics/burnman | misc/pyrolite_uncertainty.py | 2 | 38422 | from __future__ import absolute_import
from __future__ import print_function
# This file is part of BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and Planetary Sciences
# Copyright (C) 2012 - 2015 by the BurnMan team, released under the GNU
# GPL v2 or later.
import os.path
import sys
if not os.pa... | gpl-2.0 |
ForkedReposBak/mxnet | python/mxnet/numpy/multiarray.py | 2 | 394970 | #!/usr/bin/env python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | apache-2.0 |
NovaSyst/chocolate | chocolate/space.py | 1 | 36188 | """This module provides common building blocks to define a search space.
Search spaces are defined using dictionaries, where the keys are the parameter
names and the values their distribution. For example, defining a two
parameter search space is done as follow ::
space = {"x": uniform(-5, 5),
"y": q... | bsd-3-clause |
mhogg/scipy | scipy/special/add_newdocs.py | 11 | 70503 | # Docstrings for generated ufuncs
#
# The syntax is designed to look like the function add_newdoc is being
# called from numpy.lib, but in this file add_newdoc puts the
# docstrings in a dictionary. This dictionary is used in
# generate_ufuncs.py to generate the docstrings for the ufuncs in
# scipy.special at the C lev... | bsd-3-clause |
zeratul2099/plist-qt | dialogs.py | 1 | 30532 | # -*- coding: utf-8 -*-
# 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 version.
#
# This program is distributed in the ho... | gpl-3.0 |
jreback/pandas | pandas/tests/indexing/test_coercion.py | 1 | 39801 | from datetime import timedelta
import itertools
from typing import Dict, List
import numpy as np
import pytest
from pandas.compat import IS64, is_platform_windows
import pandas as pd
import pandas._testing as tm
###############################################################
# Index / Series common tests which may ... | bsd-3-clause |
buntyke/GPy | GPy/util/datasets.py | 8 | 64882 | from __future__ import print_function
import csv
import os
import copy
import numpy as np
import GPy
import scipy.io
import zipfile
import tarfile
import datetime
import json
import re
import sys
from .config import *
ipython_available=True
try:
import IPython
except ImportError:
ipython_available=False
try:
... | mit |
jreback/pandas | pandas/core/indexes/interval.py | 1 | 41420 | """ define the IntervalIndex """
from functools import wraps
from operator import le, lt
import textwrap
from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Union, cast
import numpy as np
from pandas._config import get_option
from pandas._libs import lib
from pandas._libs.interval import Interval, Interval... | bsd-3-clause |
valexandersaulys/prudential_insurance_kaggle | venv/lib/python2.7/site-packages/pandas/stats/tests/test_ols.py | 9 | 31424 | """
Unit test suite for OLS and PanelOLS classes
"""
# pylint: disable-msg=W0212
from __future__ import division
from datetime import datetime
from pandas import compat
from distutils.version import LooseVersion
import nose
import numpy as np
from numpy.testing.decorators import slow
from pandas import date_range, ... | gpl-2.0 |
ashhher3/seaborn | seaborn/tests/test_categorical.py | 8 | 75157 | import numpy as np
import pandas as pd
import scipy
from scipy import stats
import matplotlib as mpl
import matplotlib.pyplot as plt
from distutils.version import LooseVersion
pandas_has_categoricals = LooseVersion(pd.__version__) >= "0.15"
import nose.tools as nt
import numpy.testing as npt
from numpy.testing.decora... | bsd-3-clause |
anntzer/scikit-learn | sklearn/multioutput.py | 7 | 30307 | """
This module implements multioutput regression and classification.
The estimators provided in this module are meta-estimators: they require
a base estimator to be provided in their constructor. The meta-estimator
extends single output estimators to multioutput estimators.
"""
# Author: Tim Head <betatim@gmail.com>... | bsd-3-clause |
xzturn/tensorflow | tensorflow/python/keras/engine/data_adapter_test.py | 2 | 42927 | # Copyright 2019 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 |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/dask/array/tests/test_array_core.py | 2 | 110011 | from __future__ import absolute_import, division, print_function
import copy
import pytest
np = pytest.importorskip('numpy')
import os
import sys
import time
from distutils.version import LooseVersion
import operator
from operator import add, sub, getitem
from threading import Lock
import warnings
from toolz import ... | gpl-3.0 |
pnedunuri/scipy | scipy/stats/_distn_infrastructure.py | 15 | 113133 | #
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
from __future__ import division, print_function, absolute_import
from scipy._lib.six import string_types, exec_
import sys
import keyword
import re
import inspect
import types
import warnings
from scipy.misc impor... | bsd-3-clause |
themrmax/scikit-learn | sklearn/preprocessing/data.py | 2 | 68159 | # 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 |
mbayon/TFG-MachineLearning | vbig/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.py | 13 | 33171 | """
Helpers for embarrassingly parallel code.
"""
# Author: Gael Varoquaux < gael dot varoquaux at normalesup dot org >
# Copyright: 2010, Gael Varoquaux
# License: BSD 3 clause
from __future__ import division
import os
import sys
from math import sqrt
import functools
import time
import threading
import itertools
fr... | mit |
mugizico/scikit-learn | sklearn/metrics/tests/test_common.py | 43 | 44042 | from __future__ import division, print_function
from functools import partial
from itertools import product
import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer
from sklearn.utils.multiclass impo... | bsd-3-clause |
cmbclh/vnpy1.7 | archive/datayes/api.py | 11 | 43801 | #encoding: UTF-8
import os
import json
import time
import requests
import pymongo
import pandas as pd
from datetime import datetime, timedelta
from Queue import Queue, Empty
from threading import Thread, Timer
from pymongo import MongoClient
from requests.exceptions import ConnectionError
from errors import (VNPAST_C... | mit |
python-control/python-control | control/freqplot.py | 1 | 56813 | # freqplot.py - frequency domain plots for control systems
#
# Author: Richard M. Murray
# Date: 24 May 09
#
# This file contains some standard control system plots: Bode plots,
# Nyquist plots and pole-zero diagrams. The code for Nichols charts
# is in nichols.py.
#
# Copyright (c) 2010 by California Institute of Tec... | bsd-3-clause |
nmartensen/pandas | pandas/tests/frame/test_alter_axes.py | 4 | 37525 | # -*- coding: utf-8 -*-
from __future__ import print_function
import pytest
from datetime import datetime, timedelta
import numpy as np
from pandas.compat import lrange
from pandas import (DataFrame, Series, Index, MultiIndex,
RangeIndex, date_range, IntervalIndex,
to_dateti... | bsd-3-clause |
subodhchhabra/airflow | airflow/hooks/hive_hooks.py | 3 | 36631 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 |
joequant/zipline | zipline/assets/assets.py | 8 | 34670 | # Copyright 2015 Quantopian, 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... | apache-2.0 |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/stats/tests/test_morestats.py | 7 | 55766 | # 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 (assert_array_equal,
assert_almost_equal, ass... | gpl-3.0 |
hiuwo/acq4 | acq4/analysis/tools/Utility.py | 1 | 37603 | """
Utils.py - general utility routines
- power spectrum
- elliptical filtering
- handling very long input lines for dictionaries
- general measurement routines for traces (mean, std, spikes, etc)
"declassed", 7/28/09 p. manis
Use as:
import Utility as Utils
then call Utils.xxxxx()
"""
# January, 2009
# Paul B. Manis... | mit |
esteinig/netviewP | program/win/0.7.1/netview.py | 1 | 37628 | #!/usr/bin/env python
# NetView P v.0.7.1 - Windows
# Dependencies: PLINK
# Eike Steinig
# Zenger Lab, JCU
# https://github.com/esteinig/netview
import os
import time
import json
import shutil
import argparse
import subprocess
import numpy as np
import multiprocessing as mp
import scipy.sparse.csgraph as csg
import sc... | gpl-2.0 |
idlead/scikit-learn | sklearn/linear_model/logistic.py | 9 | 66155 |
"""
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>
im... | bsd-3-clause |
toastedcornflakes/scikit-learn | sklearn/svm/tests/test_svm.py | 2 | 34260 | """
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 numpy.testing import assert_allclose
fr... | bsd-3-clause |
taborlab/FlowCal | FlowCal/excel_ui.py | 1 | 67063 | """
``FlowCal``'s Microsoft Excel User Interface.
This module contains functions to read, gate, and transform data from a set
of FCS files, as specified by an input Microsoft Excel file. This file
should contain the following tables:
- **Instruments**: Describes the instruments used to acquire the
samples li... | mit |
morrisonwudi/zipline | tests/test_assets.py | 8 | 31178 | #
# Copyright 2015 Quantopian, 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 wr... | apache-2.0 |
sstoma/CellProfiler | contrib/tifffile.py | 3 | 53026 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tifffile.py
# Copyright (c) 2008-2009, The Regents of the University of California
# Produced by the Laboratory for Fluorescence Dynamics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | gpl-2.0 |
joshloyal/scikit-learn | sklearn/linear_model/stochastic_gradient.py | 16 | 50617 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
from abc import ABCMeta, abstractmethod
from ..externals.joblib import ... | bsd-3-clause |
ClimbsRocks/scikit-learn | sklearn/grid_search.py | 2 | 38534 | """
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 |
psteinb/vigra | vigranumpy/lib/__init__.py | 2 | 62874 | #######################################################################
#
# Copyright 2009-2010 by Ullrich Koethe
#
# This file is part of the VIGRA computer vision library.
# The VIGRA Website is
# http://hci.iwr.uni-heidelberg.de/vigra/
# Please direct questions, bug reports, and contributions... | mit |
bloyl/mne-python | mne/viz/topomap.py | 1 | 108149 | """Functions to plot M/EEG data e.g. topographies."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Robert Luke <mail@robertluke.net>
#
#... | bsd-3-clause |
TaylorOshan/pysal | pysal/esda/smoothing.py | 4 | 70320 | from __future__ import division
"""
Apply smoothing to rate computation
[Longer Description]
Author(s):
Myunghwa Hwang mhwang4@gmail.com
David Folch dfolch@asu.edu
Luc Anselin luc.anselin@asu.edu
Serge Rey srey@asu.edu
"""
__author__ = "Myunghwa Hwang <mhwang4@gmail.com>, David Folch <dfolch@asu.edu... | bsd-3-clause |
dominicelse/scipy | scipy/signal/fir_filter_design.py | 17 | 36232 | # -*- coding: utf-8 -*-
"""Functions for FIR filter design."""
from __future__ import division, print_function, absolute_import
from math import ceil, log
import warnings
import numpy as np
from numpy.fft import irfft, fft, ifft
from scipy.special import sinc
from scipy.linalg import toeplitz, hankel, pinv
from scipy... | bsd-3-clause |
avistous/QSTK | qstkutil/tsutil.py | 1 | 30959 | '''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on Jan 1, 2011
@author:Drew Bratcher
@contact: dbratcher@gatech.edu
@summary: Contains tutorial for backteste... | bsd-3-clause |
equialgo/scikit-learn | sklearn/svm/classes.py | 19 | 40871 | 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 ..utils import check_X_y
from ..utils.validation import _num_samples
from ..utils.mult... | bsd-3-clause |
mrcslws/nupic.research | projects/rsm/rsm.py | 3 | 31047 | # Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2019, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it unde... | agpl-3.0 |
caseyclements/pennies | pennies/market/interpolate.py | 1 | 33087 | """Curve Interpolators"""
from __future__ import absolute_import, division, print_function
import numpy as np
from scipy.interpolate import PPoly, CubicSpline, interp1d
from scipy.linalg import solve_banded, solve
from numpy import repeat, prod, arange
from numpy.matlib import repmat
from six import string_types
cl... | apache-2.0 |
techaddict/spark | python/pyspark/sql/dataframe.py | 5 | 94645 | #
# 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 |
montoyjh/pymatgen | pymatgen/io/gaussian.py | 3 | 58608 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import re
import numpy as np
import warnings
from pymatgen.core.operations import SymmOp
from pymatgen import Element, Molecule, Composition
from monty.io import zopen
from pymatgen.core.units import Ha_to_eV... | mit |
dereneaton/ipyrad | ipyrad/analysis/pca.py | 1 | 30237 | #!/usr/bin/env python
""" Scikit-learn principal componenents analysis for missing data """
from __future__ import print_function, division
import os
import sys
import itertools
import numpy as np
import pandas as pd
# ipyrad tools
from .snps_extracter import SNPsExtracter
from .snps_imputer import SNPsImputer
from... | gpl-3.0 |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/sklearn/metrics/tests/test_common.py | 1 | 41603 | from __future__ import division, print_function
from functools import partial
from itertools import product
import numpy as np
import scipy.sparse as sp
from sklearn.datasets import make_multilabel_classification
from sklearn.metrics import accuracy_score
from sklearn.metrics import average_precision_score
from sklea... | mit |
coderbone/SickRage-alt | lib/dateutil/parser/_parser.py | 5 | 57682 | # -*- coding: utf-8 -*-
"""
This module offers a generic date/time string parser which is able to parse
most known formats to represent a date and/or time.
This module attempts to be forgiving with regards to unlikely input formats,
returning a datetime object even for dates which are ambiguous. If an element
of a dat... | gpl-3.0 |
RPGOne/scikit-learn | sklearn/gaussian_process/gaussian_process.py | 6 | 35051 | # -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# License: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize
from ..base import BaseEstimator, RegressorMixin
from ..metrics... | bsd-3-clause |
amolkahat/pandas | pandas/core/resample.py | 2 | 53140 | from datetime import timedelta
import numpy as np
import warnings
import copy
from textwrap import dedent
import pandas as pd
from pandas.core.groupby.base import GroupByMixin
from pandas.core.groupby.ops import BinGrouper
from pandas.core.groupby.groupby import (
_GroupBy, GroupBy, groupby, _pipe_template
)
from ... | bsd-3-clause |
EducationalTestingService/factor_analyzer | factor_analyzer/confirmatory_factor_analyzer.py | 1 | 43411 | """
Confirmatory factor analysis using ML.
:author: Jeremy Biggs (jbiggs@ets.org)
:date: 2/05/2019
:organization: ETS
"""
import pandas as pd
import numpy as np
import warnings
from copy import deepcopy
from scipy.optimize import minimize
from scipy.linalg import block_diag
from sklearn.base import BaseEstimator, T... | gpl-2.0 |
shubhamchopra/spark | python/pyspark/sql/functions.py | 2 | 81722 | #
# 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 |
kevin-intel/scikit-learn | sklearn/datasets/_base.py | 3 | 41022 | """
Base IO code for all datasets
"""
# Copyright (c) 2007 David Cournapeau <cournape@gmail.com>
# 2010 Fabian Pedregosa <fabian.pedregosa@inria.fr>
# 2010 Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
import csv
import hashlib
import os
import shutil
from collections im... | bsd-3-clause |
themrmax/scikit-learn | sklearn/feature_extraction/text.py | 3 | 52600 | # -*- coding: utf-8 -*-
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Lars Buitinck
# Robert Layton <robertlayton@gmail.com>
# Jochen Wersdörfer <jochen@wersdoerfer.de>
# Roman Sinayev <roman.sinayev@gmail.com>
#
# License: B... | bsd-3-clause |
yugangzhang/chxanalys | chxanalys/xpcs_timepixel.py | 1 | 34039 | from numpy import pi,sin,arctan,sqrt,mgrid,where,shape,exp,linspace,std,arange
from numpy import power,log,log10,array,zeros,ones,reshape,mean,histogram,round,int_
from numpy import indices,hypot,digitize,ma,histogramdd,apply_over_axes,sum
from numpy import around,intersect1d, ravel, unique,hstack,vstack,zeros_like
fro... | bsd-3-clause |
SU-ECE-17-7/ibeis | _broken/report_results.py | 1 | 32262 | # flake8: noqa
#!/usr/env python
from __future__ import absolute_import, division, print_function
# Matplotlib
import matplotlib
matplotlib.use('Qt4Agg')
# Python
import os
import sys
import textwrap
import warnings
from os.path import join, exists
# Scientific imports
import numpy as np
import scipy
# Tool
from plotto... | apache-2.0 |
RomainBrault/scikit-learn | sklearn/mixture/tests/test_gaussian_mixture.py | 19 | 40215 | # Author: Wei Xue <xuewei4d@gmail.com>
# Thierry Guillemot <thierry.guillemot.work@gmail.com>
# License: BSD 3 clauseimport warnings
import sys
import warnings
import numpy as np
from scipy import stats, linalg
from sklearn.covariance import EmpiricalCovariance
from sklearn.datasets.samples_generator import... | bsd-3-clause |
cbertinato/pandas | pandas/io/parsers.py | 1 | 131584 | """
Module contains tools for processing files into DataFrames or other objects
"""
from collections import defaultdict
import csv
import datetime
from io import StringIO
import re
import sys
from textwrap import fill
import warnings
import numpy as np
import pandas._libs.lib as lib
import pandas._libs.ops as libops... | bsd-3-clause |
rosswhitfield/mantid | Framework/PythonInterface/test/python/mantid/plots/mantidaxesTest.py | 3 | 38987 | # 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 & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 |
ufoym/agpy | agpy/pyflagger.py | 6 | 109393 | #!python
import math
import warnings
warnings.filterwarnings('ignore','masked')
warnings.simplefilter('ignore')
import pylab
from pylab import *
for k,v in pylab.__dict__.iteritems():
if hasattr(v,'__module__'):
if v.__module__ is None:
locals()[k].__module__ = 'pylab'
import matplotlib
impor... | mit |
gbrammer/grizli | grizli/aws/db.py | 1 | 120121 | """
Interact with the grizli AWS database
"""
import os
import glob
import numpy as np
try:
import pandas as pd
except:
pd = None
from .. import utils
FLAGS = {'init_lambda': 1,
'start_beams': 2,
'done_beams': 3,
'no_run_fit': 4,
'start_redshift_fit': 5,
'fit_... | mit |
jbgastineau/cxphasing | cxphasing/CXPhasing2.py | 1 | 38868 | """
.. module:: CXPhasing2.py
:platform: Unix
:synopsis: Implements phase retrieval algorithms.
.. moduleauthor:: David Vine <djvine@gmail.com>
"""
import os
import numpy as np
import scipy as sp
import pylab
import time
import math
import pdb
from numpy.random import uniform
import multiprocessing as mp
imp... | mit |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/core/indexes/period.py | 1 | 36091 | from datetime import datetime, timedelta
import warnings
import weakref
import numpy as np
from pandas._libs import index as libindex
from pandas._libs.tslibs import NaT, frequencies as libfrequencies, iNaT, resolution
from pandas._libs.tslibs.period import DIFFERENT_FREQ, IncompatibleFrequency, Period
from pandas.ut... | apache-2.0 |
Geosyntec/wqio | wqio/tests/test_ros.py | 2 | 39488 | from textwrap import dedent
from io import StringIO
import pytest
import numpy.testing as nptest
import pandas.testing as pdtest
from wqio.tests import helpers
import numpy
import pandas
from wqio import ros
@pytest.fixture
def basic_data():
df = (
helpers.getTestROSData()
.assign(conc=lambda d... | bsd-3-clause |
FRESNA/PyPSA | pypsa/linopf.py | 1 | 42701 | ## Copyright 2019 Tom Brown (KIT), Fabian Hofmann (FIAS)
## 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 version.
## This p... | gpl-3.0 |
ccd-utexas/2015_SDSSJ1600 | code/utils.py | 3 | 81416 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""Utilities for reproducing Harrold et al 2015 on SDSS J160036.83+272117.8.
"""
# Import standard packages.
from __future__ import absolute_import, division, print_function
import collections
import copy
import pdb
import re
import warnings
# Import installed packages.... | mit |
Eric89GXL/sphinx-gallery | sphinx_gallery/gen_rst.py | 1 | 32159 | # -*- coding: utf-8 -*-
# Author: Óscar Nájera
# License: 3-clause BSD
"""
RST file generator
==================
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'.
"""
# Don't use unicode_literals here (be explicit with u"..." inste... | bsd-3-clause |
wazeerzulfikar/scikit-learn | sklearn/linear_model/ridge.py | 8 | 52900 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>
# Fabian Pedregosa <fabian@fseoane.net>
# Michael Eickenberg <michael.eickenberg@nsup.org>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
impor... | bsd-3-clause |
tzk/EDeN | eden/graph.py | 2 | 42083 | #!/usr/bin/env python
"""Provides vectorization of graphs."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import joblib
import networkx as nx
import math
import numpy as np
from sklearn import metrics
from sklearn.cluster import MiniBatchKMeans
from sci... | gpl-3.0 |
zfrenchee/pandas | pandas/tests/computation/test_eval.py | 1 | 70748 | import warnings
from warnings import catch_warnings
import operator
from itertools import product
import pytest
from numpy.random import randn, rand, randint
import numpy as np
from pandas.core.dtypes.common import is_bool, is_list_like, is_scalar
import pandas as pd
from pandas.core import common as com
from pandas... | bsd-3-clause |
pravsripad/jumeg | jumeg/epocher/jumeg_epocher_events.py | 2 | 72402 | '''Class JuMEG_Epocher_Events
Class to extract event/epoch information and save to hdf5
extract mne-events per condition, save to HDF5 file
----------------------------------------------------------------
Author:
--------
Frank Boers <f.boers@fz-juelich.de>
Updates:
-------------------------------------... | bsd-3-clause |
WarrenWeckesser/scipy | scipy/interpolate/_bsplines.py | 5 | 34585 | import operator
import numpy as np
from numpy.core.multiarray import normalize_axis_index
from scipy.linalg import (get_lapack_funcs, LinAlgError,
cholesky_banded, cho_solve_banded)
from . import _bspl
from . import _fitpack_impl
from . import _fitpack as _dierckx
from scipy._lib._util import... | bsd-3-clause |
m3wolf/scimap | scimap/xrd_map.py | 1 | 53817 | # -*- coding: utf-8 --*
import warnings
import logging
log = logging.getLogger(__name__)
import re
from matplotlib import pyplot, patches, colors, cm, rcParams
import numpy as np
import scipy
import pandas as pd
from . import exceptions
from .units_ import units
from .plots import new_axes, set_outside_ticks, dual_a... | gpl-3.0 |
marcsans/cnn-physics-perception | phy/lib/python2.7/site-packages/sklearn/model_selection/_validation.py | 5 | 36967 | """
The :mod:`sklearn.model_selection._validation` module includes classes and
functions to validate the model.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# License: BSD 3 clause
from __... | mit |
nisse3000/pymatgen | pymatgen/io/abinit/pseudos.py | 4 | 63668 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides objects describing the basic parameters of the
pseudopotentials used in Abinit, and a parser to instantiate pseudopotential objects..
"""
from __future__ import unicode_literals, divisio... | mit |
pbmanis/acq4 | acq4/analysis/tools/Fitting.py | 3 | 36863 | #!/usr/bin/env python
from __future__ import print_function
"""
Python class wrapper for data fitting.
Includes the following external methods:
getFunctions returns the list of function names (dictionary keys)
FitRegion performs the fitting
Note that FitRegion will plot on top of the current data using MPlots routines... | mit |
BryanCutler/spark | python/pyspark/pandas/tests/test_ops_on_diff_frames.py | 1 | 73877 | #
# 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 |
tengpeng/spark | python/pyspark/ml/clustering.py | 2 | 50138 | #
# 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 |
WillieMaddox/scipy | scipy/cluster/hierarchy.py | 3 | 91947 | """
========================================================
Hierarchical clustering (:mod:`scipy.cluster.hierarchy`)
========================================================
.. currentmodule:: scipy.cluster.hierarchy
These functions cut hierarchical clusterings into flat clusterings
or find the roots of the forest f... | bsd-3-clause |
nicproulx/mne-python | mne/preprocessing/ica.py | 2 | 104266 | # Authors: Denis A. Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Juergen Dammers <j.dammers@fz-juelich.de>
#
# License: BSD (3-clause)
from inspect import isfunction
from collections import namedtuple
from copy import deepcopy
import os
import ... | bsd-3-clause |
zrhans/pythonanywhere | .virtualenvs/django19/lib/python3.4/site-packages/pandas/tseries/period.py | 9 | 37251 | # pylint: disable=E1101,E1103,W0232
from datetime import datetime, timedelta
import numpy as np
import pandas.tseries.frequencies as frequencies
from pandas.tseries.frequencies import get_freq_code as _gfc
from pandas.tseries.index import DatetimeIndex, Int64Index, Index
from pandas.tseries.base import DatelikeOps, Dat... | apache-2.0 |
adykstra/mne-python | mne/viz/topo.py | 1 | 38656 | """Functions to plot M/EEG data on topo (one axes per channel)."""
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Denis Engemann <denis.engemann@gmail.com>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: Simplified... | bsd-3-clause |
rohit21122012/DCASE2013 | runs/2013/xgboost50/task1_scene_classification.py | 4 | 36728 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DCASE 2016::Acoustic Scene Classification / Baseline System
from src.ui import *
from src.general import *
from src.files import *
from src.features import *
from src.dataset import *
from src.evaluation import *
import numpy
import csv
import argparse
import textwra... | mit |
joshloyal/scikit-learn | sklearn/grid_search.py | 16 | 40213 | """
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 |
0x0all/scikit-learn | sklearn/linear_model/stochastic_gradient.py | 3 | 49778 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification and regression using Stochastic Gradient Descent (SGD)."""
import numpy as np
import scipy.sparse as sp
from abc import ABCMeta, abstractmethod
from ... | bsd-3-clause |
Delosari/dazer | bin/lib/Astro_Libraries/AstroClass.py | 1 | 53736 | from os import chdir
from shutil import copy
from subprocess import Popen, PIPE, STDOUT
from matplotlib import pyplot as plt
from matplotlib.cm import hot as cm_hot
from numpy import lo... | mit |
NixaSoftware/CVis | venv/lib/python2.7/site-packages/pandas/tests/io/formats/test_to_html.py | 2 | 48009 | # -*- coding: utf-8 -*-
import re
from textwrap import dedent
from datetime import datetime
from distutils.version import LooseVersion
import pytest
import numpy as np
import pandas as pd
from pandas import compat, DataFrame, MultiIndex, option_context, Index
from pandas.compat import u, lrange, StringIO
from pandas.... | apache-2.0 |
ryfeus/lambda-packs | Tensorflow_Pandas_Numpy/source3.6/pandas/io/parsers.py | 3 | 123349 | """
Module contains tools for processing files into DataFrames or other objects
"""
from __future__ import print_function
from collections import defaultdict
import re
import csv
import sys
import warnings
import datetime
from textwrap import fill
import numpy as np
from pandas import compat
from pandas.compat import... | mit |
averagehat/scikit-bio | skbio/sequence/_sequence.py | 3 | 74880 | # ----------------------------------------------------------------------------
# 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 |
BlueBrain/NEST | topology/pynest/hl_api.py | 4 | 35464 | # -*- coding: utf-8 -*-
#
# hl_api.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 2 of the License, or
# (a... | gpl-2.0 |
0asa/scikit-learn | sklearn/tests/test_cross_validation.py | 3 | 43729 | """Test the cross_validation module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy import stats
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import assert_equal
from sklearn... | bsd-3-clause |
MJuddBooth/pandas | pandas/core/arrays/base.py | 1 | 38982 | """An interface for extending pandas with custom arrays.
.. warning::
This is an experimental API and subject to breaking changes
without warning.
"""
import operator
import numpy as np
from pandas.compat import PY3, set_function_name
from pandas.compat.numpy import function as nv
from pandas.errors import Ab... | bsd-3-clause |
xcompass/pandas-gbq | pandas_gbq/gbq.py | 1 | 42111 | import warnings
from datetime import datetime
import json
from time import sleep
import uuid
import time
import sys
import numpy as np
from distutils.version import StrictVersion
from pandas import compat, DataFrame, concat
from pandas.compat import lzip, bytes_to_str
def _check_google_client_version():
try:
... | bsd-3-clause |
jesuscript/topo-mpi | contrib/modelfit.py | 1 | 198416 | from topo.pattern.basic import Gabor, SineGrating, Gaussian
import __main__
import numpy
import pylab
import matplotlib
from numpy import array, size, mat, shape, ones, arange
from topo import numbergen
#from topo.base.functionfamily import IdentityTF
from topo.transferfn.misc import PatternCombine
from topo.transferfn... | bsd-3-clause |
rosswhitfield/mantid | scripts/SANS/sans/algorithm_detail/batch_execution.py | 3 | 79314 | # 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 & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | gpl-3.0 |
jhamman/xray | xarray/tests/test_dataset.py | 1 | 148959 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from copy import copy, deepcopy
from textwrap import dedent
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import dask.array as da
except ImportError:
... | apache-2.0 |
trungnt13/scikit-learn | sklearn/preprocessing/tests/test_data.py | 14 | 37957 | import warnings
import numpy as np
import numpy.linalg as la
from scipy import sparse
from distutils.version import LooseVersion
from sklearn.utils.testing import assert_almost_equal, clean_warning_registry
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_array_equal... | bsd-3-clause |
beiko-lab/gengis | bin/Lib/site-packages/matplotlib/offsetbox.py | 4 | 51692 | """
The OffsetBox is a simple container artist. The child artist are meant
to be drawn at a relative position to its parent. The [VH]Packer,
DrawingArea and TextArea are derived from the OffsetBox.
The [VH]Packer automatically adjust the relative postisions of their
children, which should be instances of the OffsetBo... | gpl-3.0 |
Edu-Glez/Bank_sentiment_analysis | env/lib/python3.6/site-packages/pandas/tests/frame/test_operators.py | 7 | 45846 | # -*- coding: utf-8 -*-
from __future__ import print_function
from datetime import datetime
import operator
import nose
from numpy import nan, random
import numpy as np
from pandas.compat import lrange
from pandas import compat
from pandas import (DataFrame, Series, MultiIndex, Timestamp,
date_... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.