repo_name
string
path
string
copies
string
size
string
content
string
license
string
vdrhtc/Measurement-automation
lib3/core/drivers/keysightM3202A.py
1
32533
""" product link: https://www.keysight.com/en/pd-2747446-pn-M3202A/pxie-arbitrary-waveform-generator-1-gs-s-14-bit-400-mhz?cc=RU&lc=en user's guide for Keysight SD1 version 2.x https://literature.cdn.keysight.com/litweb/pdf/M3201-90001.pdf?id=2787170 user's guide for Keysight SD1 version 3.x https://literature.cdn.ke...
gpl-3.0
lesgo-jhu/lesgo
HITData/colormaps.py
1
50555
# New matplotlib colormaps by Nathaniel J. Smith, Stefan van der Walt, # and (in the case of viridis) Eric Firing. # # This file and the colormaps in it are released under the CC0 license / # public domain dedication. We would appreciate credit if you use or # redistribute these colormaps, but do not impose any legal r...
gpl-3.0
ndingwall/scikit-learn
sklearn/linear_model/tests/test_ridge.py
3
49780
import numpy as np import scipy.sparse as sp from scipy import linalg from itertools import product import pytest from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_allclose from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import as...
bsd-3-clause
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/indexing/test_floats.py
1
33188
from warnings import catch_warnings import numpy as np import pytest from pandas import DataFrame, Float64Index, Index, Int64Index, RangeIndex, Series import pandas.util.testing as tm from pandas.util.testing import assert_almost_equal, assert_series_equal ignore_ix = pytest.mark.filterwarnings("ignore:\\n.ix:Future...
apache-2.0
statgen/pheweb
pheweb/load/phenolist/__init__.py
1
33093
from ...utils import PheWebError from ...file_utils import get_generated_path, make_basedir, get_filepath, read_maybe_gzip from ..read_input_file import PhenoReader import os import string import json import csv import glob import re import itertools import sys import copy import boltons.iterutils import tqdm import ...
agpl-3.0
edhuckle/statsmodels
statsmodels/iolib/foreign.py
25
43125
""" Input/Output tools for working with binary data. The Stata input tools were originally written by Joe Presbrey as part of PyDTA. You can find more information here http://presbrey.mit.edu/PyDTA See also --------- numpy.lib.io """ from statsmodels.compat.python import (zip, lzip, lmap, lrange, string_types, long,...
bsd-3-clause
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/colorbar.py
1
49819
''' Colorbar toolkit with two classes and a function: :class:`ColorbarBase` the base class with full colorbar drawing functionality. It can be used as-is to make a colorbar for a given colormap; a mappable object (e.g., image) is not needed. :class:`Colorbar` the derived class ...
mit
hrjn/scikit-learn
sklearn/gaussian_process/gaussian_process.py
19
34705
# -*- 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
sgibbes/carbon-budget
carbon_pools/create_BGC_deadwood_litter_soil_totalC_in_emis_year.py
1
30001
import datetime import sys import pandas as pd import os import numpy as np import rasterio sys.path.append('../') import constants_and_names as cn import universal_util as uu # Creates a dictionary of biomass in belowground, deadwood, and litter pools to aboveground biomass pool def mangrove_pool_ratio_dict(gain_tabl...
apache-2.0
jlandmann/oggm
deployment/fabfile.py
2
41370
#---------written by Felix Oesterle (FSO)----------------- #-DESCRIPTION: # This is based on fabfile from Raincloud Project (simplified) # #-Last modified: Thu Jul 09, 2015 13:10 #@author Felix Oesterle #----------------------------------------------------------- from __future__ import with_statement, print_function...
gpl-3.0
kaichogami/scikit-learn
sklearn/linear_model/logistic.py
9
67760
""" 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
mrustl/flopy
flopy/modflow/mfsfr2.py
1
94999
__author__ = 'aleaf' import sys sys.path.insert(0, '..') import textwrap import os import numpy as np from numpy.lib import recfunctions from ..pakbase import Package from flopy.utils.util_list import MfList from ..utils.flopy_io import line_parse class ModflowSfr2(Package): """ Streamflow-R...
bsd-3-clause
fprados/nipype
nipype/algorithms/rapidart.py
5
30079
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The rapidart module provides routines for artifact detection and region of interest analysis. These functions include: * ArtifactDetect: performs artifact detection on functional images * Stimulu...
bsd-3-clause
dsullivan7/scikit-learn
sklearn/decomposition/dict_learning.py
16
43638
""" 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, floor, ceil import numpy as np from scipy import linalg from numpy.lib.stride_tricks import as_strided f...
bsd-3-clause
nmartensen/pandas
pandas/tests/plotting/test_series.py
4
33941
# coding: utf-8 """ Test cases for Series.plot """ import itertools import pytest from datetime import datetime import pandas as pd from pandas import Series, DataFrame, date_range from pandas.compat import range, lrange import pandas.util.testing as tm import numpy as np from numpy.random import randn import pa...
bsd-3-clause
jyhmiinlin/cineFSE
CsTransform/pynufft3.py
1
57204
'''@package docstring @author: Jyh-Miin Lin (Jimmy), Cambridge University @address: jyhmiinlin@gmail.com Created on 2013/1/21 ================================================================================ This file is part of pynufft. pynufft is free software: you can redistribute it and/or modify it u...
gpl-3.0
freedomtan/tensorflow
tensorflow/python/keras/preprocessing/image.py
1
48044
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
fraricci/pymatgen
pymatgen/analysis/pourbaix_diagram.py
2
39890
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module is intended to be used to compute Pourbaix diagrams of arbitrary compositions and formation energies. If you use this module in your work, please consider citing the following: General formalis...
mit
imsparsh/librosa
librosa/feature/spectral.py
2
38170
#!/usr/bin/env python # -*- coding: utf-8 -*- """Spectral feature extraction""" import numpy as np from .. import util from .. import filters from ..util.exceptions import ParameterError from ..core.time_frequency import fft_frequencies from ..core.audio import zero_crossings from ..core.spectrum import logamplitude...
isc
pratapvardhan/pandas
pandas/io/json/json.py
1
33517
# pylint: disable-msg=E1101,W0613,W0603 from itertools import islice import os import numpy as np import pandas._libs.json as json from pandas._libs.tslib import iNaT from pandas.compat import StringIO, long, u, to_str from pandas import compat, isna from pandas import Series, DataFrame, to_datetime, MultiIndex from p...
bsd-3-clause
jmmauricio/pypstools
pypstools/publisher.py
2
62263
""" Tools for plotting and publishing power system simulations and analysis results. (c) 2015 Juan Manuel Mauricio https://www.packtpub.com/books/content/plotting-geographical-data-using-basemap """ from __future__ import division, print_function import numpy as np import scipy.linalg import matplotlib.pyplot as p...
gpl-3.0
toobaz/pandas
pandas/tests/reshape/test_concat.py
2
100605
from collections import OrderedDict, abc, deque import datetime as dt from datetime import datetime from decimal import Decimal from io import StringIO from itertools import combinations from warnings import catch_warnings import dateutil import numpy as np from numpy.random import randn import pytest from pandas.cor...
bsd-3-clause
materialsproject/pymatgen
pymatgen/analysis/surface_analysis.py
1
81689
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines tools to analyze surface and adsorption related quantities as well as related plots. If you use this module, please consider citing the following works:: R. Tran, Z. Xu, B. Radhakri...
mit
agilgur5/LTLMoP
src/lib/handlers/share/MotionControl/BugControllerHandler.py
8
39771
#!/usr/bin/env python # -*- coding: utf-8 -*- """ =================================================================== BugController.py - Bug Algorithm Motion Controller =================================================================== This motion controller uses the Bug 2 algorithm developed by V. Lumelsky and A. St...
gpl-3.0
guedou/scapy-codecov
scapy/layers/inet.py
1
61293
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ IPv4 (Internet Protocol v4). """ import os,time,struct,re,socket,new from select import select from collections impo...
gpl-2.0
blab/nextstrain-augur
augur/frequency_estimators.py
1
47158
# estimates clade frequencies from __future__ import division, print_function from collections import defaultdict import numpy as np import pandas as pd from scipy.interpolate import interp1d from scipy.stats import norm import sys import time debug = False log_thres = 10.0 def get_pivots(observations, pivot_interva...
agpl-3.0
datapythonista/pandas
pandas/conftest.py
1
39966
""" This file is very long and growing, but it was decided to not split it yet, as it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989 Instead of splitting it was decided to define sections here: - Configuration / Settings - Autouse fixtures - Common arguments - Missing values & co. - Classes - Indices - Serie...
bsd-3-clause
Astroua/TurbuStat
turbustat/statistics/scf/scf.py
2
37874
# Licensed under an MIT open source license - see LICENSE from __future__ import print_function, absolute_import, division import numpy as np from astropy import units as u from astropy.wcs import WCS from six import string_types import statsmodels.api as sm from warnings import warn from astropy.utils.console import ...
mit
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/scipy/signal/filter_design.py
7
139256
"""Filter design. """ from __future__ import division, print_function, absolute_import import math import operator import warnings import numpy import numpy as np from numpy import (atleast_1d, poly, polyval, roots, real, asarray, resize, pi, absolute, logspace, r_, sqrt, tan, log10, ...
mit
MJuddBooth/pandas
pandas/core/base.py
1
49638
""" Base and utility classes for pandas objects. """ from collections import OrderedDict import textwrap import warnings import numpy as np import pandas._libs.lib as lib import pandas.compat as compat from pandas.compat import PYPY, builtins, map, range from pandas.compat.numpy import function as nv from pandas.erro...
bsd-3-clause
dch312/numpy
numpy/core/code_generators/ufunc_docstrings.py
2
90047
""" 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 numpy/core/code_generators/generate_umath.py to generate the docstrings for the ufuncs in numpy.co...
bsd-3-clause
juliantaylor/scipy
scipy/signal/ltisys.py
2
30883
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Aug 2013: Juan Luis Cano # Rewrote abcd_normaliz...
bsd-3-clause
ConnectedSystems/veneer-py
veneer/general.py
1
30440
try: from urllib2 import quote import httplib as hc except: from urllib.request import quote import http.client as hc import json import re from .bulk import VeneerRetriever from .server_side import VeneerIronPython from .utils import SearchableList,_stringToList,read_veneer_csv,objdict import pandas a...
isc
puotila/PORA-IP
PORAIPHydrography.py
1
62045
#!/usr/bin/env python """ Plot Polar ORA-IP annual mean profiles (T and S), and Hiroshi Sumata's and WOA13 1995-2004 profiles. """ import os import sys import re import copy import glob import string import cPickle import gzip import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt i...
gpl-3.0
mortonjt/american-gut-web
amgut/lib/locale_data/british_gut.py
1
111728
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division from amgut.lib.config_manager import AMGUT_CONFIG # ----------------------------------------------------------------------------- # Copyright (c) 2014--, The American Gut Project Development Team. # # Distributed under the terms of the BSD 3...
bsd-3-clause
perimosocordiae/scipy
scipy/fft/_basic.py
12
62710
from scipy._lib.uarray import generate_multimethod, Dispatchable import numpy as np def _x_replacer(args, kwargs, dispatchables): """ uarray argument replacer to replace the transform input array (``x``) """ if len(args) > 0: return (dispatchables[0],) + args[1:], kwargs kw = kwargs.copy()...
bsd-3-clause
blakedewey/nipype
nipype/algorithms/modelgen.py
7
34756
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The modelgen module provides classes for specifying designs for individual subject analysis of task-based fMRI experiments. In particular it also includes algorithms for generating regressors for sparse...
bsd-3-clause
gasuperdev/sifra
sifra/fit_model.py
1
33083
from __future__ import print_function from sifraclasses import * import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from scipy import stats from scipy.optimize import curve_fit import lmfit import pandas as pd pd.options.display.float_format = '{:,.4f}'.format impor...
apache-2.0
alephu5/Soundbyte
environment/lib/python3.3/site-packages/scipy/stats/morestats.py
3
52106
# Author: Travis Oliphant, 2002 # # Further updates and enhancements by many SciPy developers. # from __future__ import division, print_function, absolute_import import math import warnings from . import statlib from . import stats from .stats import find_repeats from . import distributions from numpy import isscala...
gpl-3.0
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/IPython/core/completer.py
3
45462
# encoding: utf-8 """Word completion for IPython. This module is a fork of the rlcompleter module in the Python standard library. The original enhancements made to rlcompleter have been sent upstream and were accepted as of Python 2.3, but we need a lot more functionality specific to IPython, so this module will cont...
artistic-2.0
ddebrunner/streamsx.topology
com.ibm.streamsx.topology/opt/python/packages/streamsx/topology/topology.py
1
116592
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2015,2019 """ Streaming application definition. ******** Overview ******** IBM Streams is an advanced analytic platform that allows user-developed applications to quickly ingest, analyze and correlate information as it arrives from thousands...
apache-2.0
pratapvardhan/pandas
pandas/tests/reshape/merge/test_merge.py
3
76699
# pylint: disable=E1103 import random import re from collections import OrderedDict from datetime import date, datetime import numpy as np import pytest from numpy import nan from numpy.random import randn import pandas as pd import pandas.util.testing as tm from pandas import (Categorical, CategoricalIndex, DataFra...
bsd-3-clause
rohit21122012/DCASE2013
Other/task3_sound_event_detection_in_real_life_audio.py
1
47241
#!/usr/bin/env python # -*- coding: utf-8 -*- # # DCASE 2016::Sound Event Detection in Real-life Audio / Baseline System from src.ui import * from src.general import * from src.files import * from src.features import * from src.sound_event_detection import * from src.dataset import * from src.evaluation import * imp...
mit
Edu-Glez/Bank_sentiment_analysis
env/lib/python3.6/site-packages/pandas/core/reshape.py
7
40736
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from pandas.compat import range, zip from pandas import compat import itertools import numpy as np from pandas.types.common import _ensure_platform_int, is_list_like from pandas.types.cast import _maybe_promote from pandas.types.missing import no...
apache-2.0
mortada/scipy
scipy/signal/filter_design.py
21
127810
"""Filter design. """ from __future__ import division, print_function, absolute_import 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, sin, exp, cosh,...
bsd-3-clause
kou/arrow
python/pyarrow/tests/test_types.py
4
30391
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
florentchandelier/zipline
tests/pipeline/test_quarters_estimates.py
5
109783
from __future__ import division from datetime import timedelta from functools import partial import blaze as bz import itertools from nose.tools import assert_true from nose_parameterized import parameterized import numpy as np from numpy.testing import assert_array_equal, assert_almost_equal import pandas as pd from...
apache-2.0
mstrader/MkidDigitalReadout
DataReadout/Setup/DARKNESS-Beammapping/DARKNESSBeamMap.py
1
41421
import os, sys, time, struct, traceback import numpy as np from tables import * import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import scipy.signal as signal from scipy import optimize import scipy.stats as stats from readDict import readDict from PyQt4.QtGui import * from...
gpl-2.0
SBRG/ssbio
ssbio/protein/sequence/seqprop.py
1
36093
""" SeqProp ======= """ import os.path as op import pandas as pd import tempfile import requests import logging from copy import copy, deepcopy from slugify import Slugify import os import subprocess from Bio import SeqIO from BCBio import GFF from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqFea...
mit
henchc/CLFL_2016
CLFL_mdf_classification.py
2
61505
"""Modified sklearn classfication for 2016 CLFL Paper Metrics to assess performance on classification task given classe prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the bette...
mit
longjon/numpy
numpy/lib/npyio.py
2
65669
from __future__ import division, absolute_import, print_function import sys import os import re import itertools import warnings import weakref from operator import itemgetter import numpy as np from . import format from ._datasource import DataSource from ._compiled_base import packbits, unpackbits from ._iotools im...
bsd-3-clause
Splo0sh/3DCT
TDCT_main.py
2
31226
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 3D Correlation Toolbox - 3DCT Copyright (C) 2016 Jan Arnold 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 ...
gpl-3.0
jaredwo/topowx
twx/db/create_db_all_stations.py
1
60857
''' Functions and classes for inserting station observation data from multiple sources into a single database format. Copyright 2014,2015, Jared Oyler. This file is part of TopoWx. TopoWx is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the ...
gpl-3.0
18padx08/PPTex
PPTexEnv_x86_64/lib/python2.7/site-packages/scipy/optimize/nonlin.py
12
46461
r""" .. module:: scipy.optimize.nonlin ================= Nonlinear solvers ================= .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines ======== Large-...
mit
dlatk/dlatk
dlatk/featureGetter.py
1
45193
from configparser import SafeConfigParser try: import MySQLdb except: pass import pandas as pd import csv #math / stats: from numpy import zeros, sqrt, array, std, mean from scipy.stats import t as spt import numpy as np #infrastructure from . import dlaConstants as dlac from .dlaWorker import DLAWorker from ...
gpl-3.0
massmutual/scikit-learn
sklearn/cross_validation.py
1
68870
""" 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
vidartf/hyperspy
hyperspy/external/tifffile.py
1
221197
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2016, Christoph Gohlke # Copyright (c) 2008-2016, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or wit...
gpl-3.0
DyogenIBENS/PhylDiag
src/benchmark/comparePhylDiagAndADHORESbsToSimulatedSbs.py
1
31601
#! /usr/bin/python # -*- coding: utf-8 -*- import os import sys import numpy import enum import pickle import getpass # https://stackoverflow.com/questions/842059/is-there-a-portable-way-to-get-the-current-username-in-python import itertools import collections from utils import myDiags from utils import myTools fro...
gpl-3.0
itaiin/arrow
python/pyarrow/tests/test_parquet.py
1
80692
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
rs2/pandas
pandas/core/internals/managers.py
1
60465
from collections import defaultdict import itertools from typing import ( Any, DefaultDict, Dict, List, Optional, Sequence, Tuple, TypeVar, Union, ) import warnings import numpy as np from pandas._libs import internals as libinternals, lib from pandas._typing import ArrayLike, Dtyp...
bsd-3-clause
bhargav/scikit-learn
sklearn/linear_model/ridge.py
7
49612
""" 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
adamrp/qiita
qiita_db/metadata_template/test/test_prep_template.py
1
66190
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
varepsilon/cas-eval
logs_processing/click_model.py
1
32467
#!/usr/bin/env python # # Copyright 2016 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 ...
apache-2.0
cmtm/networkx
networkx/convert_matrix.py
2
33743
"""Functions to convert NetworkX graphs to and from numpy/scipy matrices. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the to_networkx_graph() function which attempts to guess the input type and convert it automatically. Examples -------- Create a 10...
bsd-3-clause
shahankhatch/scikit-learn
sklearn/ensemble/gradient_boosting.py
6
67631
"""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
sjl767/woo
py/utils.py
1
44296
# encoding: utf-8 # # utility functions for woo # # 2008-2009 © Václav Šmilauer <eudoxos@arcig.cz> """Heap of functions that don't (yet) fit anywhere else. """ import math,random,doctest import woo, woo.dem, woo.core import sys,os,warnings from minieigen import * from woo.dem import * from woo.fem import * from woo....
gpl-2.0
Scapogo/zipline
zipline/pipeline/loaders/earnings_estimates.py
4
63317
from abc import abstractmethod, abstractproperty import numpy as np import pandas as pd from six import viewvalues from toolz import groupby from zipline.lib.adjusted_array import AdjustedArray from zipline.lib.adjustment import ( Datetime641DArrayOverwrite, Datetime64Overwrite, Float641DArrayOverwrite, ...
apache-2.0
hposborn/Namaste
namaste/planetlib.py
1
83024
import numpy as np import glob import os from os import path import matplotlib #matplotlib.use('Agg') import pylab as plt import logging import astropy.io.fits as fits import astropy.units as u import astropy.coordinates as co import pandas as pd ''' Assorted scripts used by Namaste ''' Namwd = path.dirname(path.realp...
mit
stefanv/viscm
viscm/gui.py
1
30987
# This file is part of viscm # Copyright (C) 2015 Nathaniel Smith <njs@pobox.com> # Copyright (C) 2015 Stefan van der Walt <stefanv@berkeley.edu> # See file LICENSE.txt for license information. # Simple script using CIECAM02 and CAM02-UCS to visualize properties of a # matplotlib colormap import sys import os.path i...
mit
cython-testbed/pandas
pandas/io/sql.py
1
57410
# -*- coding: utf-8 -*- """ Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from __future__ import print_function, division from datetime import datetime, date, time import warnings import re import numpy as np import pandas._libs.lib as ...
bsd-3-clause
QuantumQuadrate/CsPyController
python/analysis.py
1
44274
from __future__ import division __author__ = 'Martin Lichtman' import logging logger = logging.getLogger(__name__) from cs_errors import PauseError import numpy as np import threading, traceback, time import matplotlib as mpl mpl.use('PDF') from matplotlib.figure import Figure from matplotlib.path import Path impo...
lgpl-3.0
wdbm/deep_throat
deep_throat.py
1
185904
#!/usr/bin/python # -*- coding: utf-8 -*- """ ################################################################################ # # # deep throat # # ...
gpl-3.0
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py
10
97630
# axes3d.py, original mplot3d version by John Porter # Created: 23 Sep 2005 # Parts fixed by Reinier Heeres <reinier@heeres.eu> # Minor additions by Ben Axelrod <baxelrod@coroware.com> # Significant updates and revisions by Ben Root <ben.v.root@gmail.com> """ Module containing Axes3D, an object which can plot 3D objec...
gpl-3.0
bpeng2000/SOS
test/test_execute.py
1
68135
#!/usr/bin/env python3 # # Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center # Distributed under the terms of the 3-clause BSD License. import glob import os import sys import shutil import subprocess import unittest from sos._version import __version__ from sos.parser import SoS_Script from...
gpl-3.0
wright-group/WrightData
unpublished Kohler - Lineshape Simulation/figures.py
1
103505
### import #################################################################### import os import itertools import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as grd import matplotlib.colors as colors import matplotlib.cm as cmx from mpl_toolkits.mplot3d.art3d import Poly3DCollection import ...
cc0-1.0
python-visualization/folium
folium/features.py
1
62581
# -*- coding: utf-8 -*- """ Leaflet GeoJson and miscellaneous features. """ import json import warnings import functools import operator from branca.colormap import LinearColormap, StepColormap from branca.element import (Element, Figure, JavascriptLink, MacroElement) from branca.utilities import color_brewer from...
mit
datapythonista/pandas
pandas/tests/reshape/merge/test_multi.py
3
30687
import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, Timestamp, ) import pandas._testing as tm from pandas.core.reshape.concat import concat from pandas.core.reshape.merge import merge @pytest.fixture def left(): """left dataframe (no...
bsd-3-clause
Tagar/incubator-airflow
airflow/hooks/hive_hooks.py
2
32908
# -*- 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
GoogleCloudPlatform/appengine-config-transformer
yaml_conversion/lib/google/appengine/api/appinfo.py
1
88031
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/pandas/tests/test_strings.py
2
58244
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta, date import os import operator import re import warnings import nose from numpy import nan as NA import numpy as np from numpy.testing import assert_array_equal from numpy.random import randint from pandas.compat imp...
gpl-2.0
madjelan/scikit-learn
sklearn/feature_extraction/text.py
24
50103
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck <L.J.Buitinck@uva.nl> # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gma...
bsd-3-clause
ycaihua/scikit-learn
sklearn/metrics/classification.py
1
55852
"""Metrics to assess performance on classification task given classe prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gram...
bsd-3-clause
fspaolo/scikit-learn
sklearn/preprocessing/data.py
5
34765
# 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> # License: BSD 3 clause import numbers import warnings import numpy as np from scipy import sparse fr...
bsd-3-clause
zfrenchee/pandas
pandas/core/indexing.py
1
76998
# pylint: disable=W0223 import textwrap import warnings import numpy as np from pandas.compat import range, zip import pandas.compat as compat from pandas.core.dtypes.generic import ABCDataFrame, ABCPanel, ABCSeries from pandas.core.dtypes.common import ( is_integer_dtype, is_integer, is_float, is_list_like...
bsd-3-clause
rgommers/numpy
numpy/lib/recfunctions.py
10
56525
""" Collection of utilities to manipulate structured arrays. Most of these functions were initially implemented by John Hunter for matplotlib. They have been rewritten and extended for convenience. """ import itertools import numpy as np import numpy.ma as ma from numpy import ndarray, recarray from numpy.ma import ...
bsd-3-clause
kiyoto/statsmodels
statsmodels/tsa/statespace/tools.py
6
48837
""" Statespace Tools Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np from statsmodels.tools.data import _is_using_pandas from . import _statespace has_find_best_blas_type = True try: from scipy.linalg.blas import find_best_blas_t...
bsd-3-clause
pianomania/scikit-learn
sklearn/preprocessing/data.py
15
68211
# 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
parrt/lolviz
lolviz.py
1
41950
""" A small set of functions that display simple data structures and arbitrary object graphs in a reasonable manner using graphviz. Even the call stack can be displayed well. This is inspired by the object connectivity graphs in Pythontutor.com. I love Pythontutor.com for interactive demos with the students, but for e...
bsd-3-clause
chrsrds/scikit-learn
sklearn/preprocessing/label.py
2
33188
# 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> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
bsd-3-clause
vlopezferrando/pymut
test/tests.py
1
46972
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys; sys.path.insert(1, '..') import os; TEST_DIR = os.path.dirname(os.path.abspath(__file__)) import os; os.environ['PMUT_DATA_DIR'] = os.path.join(TEST_DIR, '../test/data') import matplotlib; matplotlib.use('Agg') import io import itertools import logging import ...
mit
materialsproject/pymatgen
pymatgen/analysis/graphs.py
1
112497
# 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
joshbohde/scikit-learn
sklearn/hmm.py
2
42719
# Hidden Markov Models # # Author: Ron Weiss <ronweiss@gmail.com> import string import numpy as np from .utils import check_random_state from .utils.extmath import logsum from .base import BaseEstimator from .mixture import (GMM, lmvnpdf, normalize, sample_gaussian, _distribute_covar_matrix_to_match...
bsd-3-clause
jmetzen/scikit-learn
sklearn/tree/tests/test_tree.py
5
52370
""" Testing for the tree module (sklearn.tree). """ import pickle from functools import partial from itertools import product import platform import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_projection import sparse_rand...
bsd-3-clause
pgandhi999/spark
python/pyspark/sql/tests/test_pandas_udf_scalar.py
5
52294
# # 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
xuewei4d/scikit-learn
sklearn/metrics/tests/test_pairwise.py
7
53724
from types import GeneratorType import numpy as np from numpy import linalg from scipy.sparse import dok_matrix, csr_matrix, issparse from scipy.spatial.distance import cosine, cityblock, minkowski from scipy.spatial.distance import cdist, pdist, squareform try: from scipy.spatial.distance import wminkowski excep...
bsd-3-clause
d00d/quantNotebooks
Notebooks/factor-lib/Z99-AlphasLibIndex.py
1
48624
""" The below is a list of many factors. Taken from several sources, these factors have been forecast to generate alpha signals either alone or in combination with eachother. These can form the basis of factors trading algoithms. NB: Morningstar cash_flow_statement, income_statement, earnings_report are quarterly NB: M...
unlicense
nist-ionstorage/electrode
electrode/system.py
1
34891
# -*- coding: utf8 -*- # # electrode: numeric tools for Paul traps # # Copyright (C) 2011-2012 Robert Jordens <jordens@phys.ethz.ch> # # 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, e...
gpl-3.0
jahuth/convis
convis/streams.py
1
59995
""" The streams module contains `Stream` classes that can load different kinds of data. Streams that are usable currently are: :class:`RandomStream`, :class:`SequenceStream` and :class:`ImageSequence`. All others are experimental. If you plan on using any of them, you can open a `enhancement <https://github.com/jahut...
gpl-3.0
data-8/datascience
tests/test_tables.py
1
53623
import doctest import re import pytest import warnings import numpy as np from numpy.testing import assert_array_equal from datascience import * import pandas as pd ######### # Utils # ######### @pytest.fixture(scope='function') def table(): """Setup Scrabble table""" return Table().with_columns([ '...
bsd-3-clause
sonnyhu/scikit-learn
sklearn/model_selection/tests/test_validation.py
8
30626
"""Test the validation module""" from __future__ import division import sys import warnings import tempfile import os from time import sleep import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.uti...
bsd-3-clause