repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
jblackburne/scikit-learn | sklearn/datasets/samples_generator.py | 26 | 56554 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe, J. Nothman
# License: BSD 3 clause
import numbers
import array
import numpy as np
from scipy import linalg
import scipy.sparse as sp
from ..preprocessing import MultiLabelBin... | bsd-3-clause |
xuewei4d/scikit-learn | sklearn/manifold/tests/test_t_sne.py | 4 | 37254 | import sys
from io import StringIO
import numpy as np
from numpy.testing import assert_allclose
import scipy.sparse as sp
import pytest
from sklearn.neighbors import NearestNeighbors
from sklearn.neighbors import kneighbors_graph
from sklearn.exceptions import EfficiencyWarning
from sklearn.utils._testing import ignor... | bsd-3-clause |
quheng/scikit-learn | sklearn/metrics/tests/test_ranking.py | 127 | 40813 | from __future__ import division, print_function
import numpy as np
from itertools import product
import warnings
from scipy.sparse import csr_matrix
from sklearn import datasets
from sklearn import svm
from sklearn import ensemble
from sklearn.datasets import make_multilabel_classification
from sklearn.random_projec... | bsd-3-clause |
mvfcopetti/pySSN | pyssn/qt/pyssn_qt.py | 1 | 219113 | """
This is the window manager part of pySSN
pySSN is available under the GNU licence providing you cite the developpers names:
Ch. Morisset (Instituto de Astronomia, Universidad Nacional Autonoma de Mexico)
D. Pequignot (Meudon Observatory, France)
Inspired by a demo code by:
Eli Bendersky (eliben@gmail.c... | gpl-3.0 |
basnijholt/holoviews | holoviews/plotting/mpl/chart.py | 2 | 51054 | from __future__ import absolute_import, division, unicode_literals
from itertools import product
import param
import numpy as np
import matplotlib as mpl
from matplotlib import cm
from matplotlib.collections import LineCollection
from matplotlib.dates import DateFormatter, date2num
from ...core.dimension import Dim... | bsd-3-clause |
shyamalschandra/scikit-learn | sklearn/linear_model/coordinate_descent.py | 8 | 76416 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD 3 clause
import sys
import warnings
from abc import ABCMeta, abstractmethod
import n... | bsd-3-clause |
Mogeng/IOHMM | tests/test_OLS.py | 2 | 33960 | from __future__ import print_function
from __future__ import division
# import json
from past.utils import old_div
import unittest
import numpy as np
import statsmodels.api as sm
from IOHMM import OLS
# //TODO sample weight all zero
# Corner cases
# General
# 1. sample_weight is all zero
# 2. sample_weight is all... | bsd-3-clause |
mdhaber/scipy | scipy/ndimage/interpolation.py | 12 | 35344 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | bsd-3-clause |
rvraghav93/scikit-learn | sklearn/model_selection/tests/test_validation.py | 3 | 43270 | """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 |
ud3sh/coursework | deeplearning.ai/coursera-improving-neural-networks/week2/Optimization_methods_v1b.py | 1 | 41625 |
# coding: utf-8
# # Optimization Methods
#
# Until now, you've always used Gradient Descent to update the parameters and minimize the cost. In this notebook, you will learn more advanced optimization methods that can speed up learning and perhaps even get you to a better final value for the cost function. Having a g... | unlicense |
chatcannon/numpy | numpy/core/code_generators/ufunc_docstrings.py | 2 | 93777 | """
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 |
mfjb/scikit-learn | sklearn/neighbors/tests/test_neighbors.py | 22 | 45265 | from itertools import product
import pickle
import numpy as np
from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix,
dok_matrix, lil_matrix)
from sklearn import metrics
from sklearn.cross_validation import train_test_split, cross_val_score
from sklearn.utils.testing impor... | bsd-3-clause |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/sklearn/datasets/samples_generator.py | 2 | 40584 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe
# License: BSD 3 clause
from itertools import product
import numpy as np
from scipy import linalg
from ..utils import array2d, check_random_state
from ..utils import shuffle a... | agpl-3.0 |
adamgreenhall/scikit-learn | sklearn/grid_search.py | 32 | 36586 | """
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 |
erjerison/adaptability | github_submission/qtl_detection_one_trait.py | 1 | 31004 | import qtl_detection_adaptability
import numpy
import matplotlib.pylab as pt
import regression
##Updated 11-2-2016 to include a second epistasis model, 'detect_qtls_with_epistasis2'
##Updated 12-21-2016 to calculate confidence intervals based on LOD drop-off during QTL detection
##Updated 1-18-2016 to include a... | mit |
kashif/scikit-learn | sklearn/ensemble/tests/test_gradient_boosting.py | 43 | 39945 | """
Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting).
"""
import warnings
import numpy as np
from itertools import product
from scipy.sparse import csr_matrix
from scipy.sparse import csc_matrix
from scipy.sparse import coo_matrix
from sklearn import datasets
from sklearn.base import clo... | bsd-3-clause |
rahuldhote/scikit-learn | sklearn/neighbors/tests/test_neighbors.py | 103 | 41083 | from itertools import product
import numpy as np
from scipy.sparse import (bsr_matrix, coo_matrix, csc_matrix, csr_matrix,
dok_matrix, lil_matrix)
from sklearn.cross_validation import train_test_split
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing impo... | bsd-3-clause |
DiCarloLab-Delft/PycQED_py3 | pycqed/instrument_drivers/meta_instrument/LutMans/flux_lutman_vcz.py | 1 | 44225 | from .base_lutman import Base_LutMan, get_wf_idx_from_name
import numpy as np
from copy import copy
from qcodes.instrument.parameter import ManualParameter, InstrumentRefParameter
from qcodes.utils import validators as vals
from pycqed.measurement.waveform_control_CC import waveform as wf
from pycqed.measurement.wavefo... | mit |
tpltnt/SimpleCV | SimpleCV/LineScan.py | 1 | 36021 | from __future__ import print_function
from SimpleCV.base import *
import scipy.signal as sps
import scipy.optimize as spo
import numpy as np
import copy, operator
class LineScan(list):
"""
**SUMMARY**
A line scan is a one dimensional signal pulled from the intensity
of a series of a pixels in an ima... | bsd-3-clause |
rustychris/stompy | stompy/grid/exact_delaunay.py | 1 | 84123 | # A pure-python, exact delaunay triangulation.
# uses robust_predicates for in-circle tests, follows
# the algorithm of CGAL to the extent possible.
import logging
import pdb
logger = logging.getLogger()
import six
import numpy as np
import matplotlib.pyplot as plt
# do these work in py2?
from ..spatial import robust... | mit |
kylerbrown/scikit-learn | sklearn/ensemble/gradient_boosting.py | 126 | 65552 | """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 |
uglyboxer/linear_neuron | net-p3/lib/python3.5/site-packages/mpl_toolkits/axes_grid1/axes_grid.py | 7 | 31905 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import matplotlib.cbook as cbook
import matplotlib.pyplot as plt
import matplotlib.axes as maxes
#import matplotlib.colorbar as mcolorbar
from . import colorbar as mcolorbar
import matplotlib as mp... | mit |
Delosari/dazer | bin/lib/Astro_Libraries/spectrum_fitting/import_functions.py | 1 | 34109 | import os
import sys
import numpy as np
import ConfigParser
from errno import ENOENT
from numpy import loadtxt
from pandas import read_excel, read_csv
from collections import OrderedDict
from scipy.interpolate import interp1d
from distutils.util import strtobool
from astropy.io import fits as astropyfits
# Function t... | mit |
yochow/autotest | new_tko/tko/graphing_utils.py | 1 | 32535 | import base64, os, tempfile, operator, pickle, datetime, django.db
import os.path, getpass
from math import sqrt
# When you import matplotlib, it tries to write some temp files for better
# performance, and it does that to the directory in MPLCONFIGDIR, or, if that
# doesn't exist, the home directory. Problem is, the ... | gpl-2.0 |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/io/formats/format.py | 1 | 56873 | """
Internal module for formatting output data in csv, html,
and latex files. This module also applies to display formatting.
"""
from functools import partial
from io import StringIO
import re
from shutil import get_terminal_size
from unicodedata import east_asian_width
import numpy as np
from pandas._config.config... | apache-2.0 |
jorge2703/scikit-learn | sklearn/tests/test_cross_validation.py | 19 | 44125 | """Test the cross_validation module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy.sparse import csr_matrix
from scipy import stats
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.test... | bsd-3-clause |
cpcloud/dask | dask/dataframe/tests/test_dataframe.py | 1 | 95806 | import sys
from copy import copy
from operator import getitem, add
from itertools import product
import pandas as pd
import pandas.util.testing as tm
import numpy as np
import pytest
import dask
from dask.async import get_sync
from dask import delayed
from dask.utils import ignoring, put_lines
import dask.dataframe a... | bsd-3-clause |
anirudhnair/KernelBasedCharcterization | TAUTraceAnalysis/EBSTraceStat/EBSTraceStat.py | 1 | 35614 | '''
Created on Feb 11, 2014
@author: anirudhj
'''
import os,shutil
from sax import saxpy as SaX
import fileinput, shlex
from Settings import Common
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
class EBSTraceStat(object):
'''
get stats from EBS trace
'''
def ... | apache-2.0 |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py | 1 | 73457 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "parcoords.line"
_path_str = "parcoords.line.colorbar"
_valid_props = {
"bgcolor",
... | mit |
jonasjberg/autonameow | autonameow/vendor/dateutil/parser/_parser.py | 8 | 57607 | # -*- 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-2.0 |
stevetjoa/musicsearch | mirgui.py | 1 | 40317 |
import os
import pprint
import random
import wx
import numpy
# The recommended way to use wx with mpl is with the WXAgg
# backend.
#
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import \
FigureCanvasWxAgg as FigCanvas, \
NavigationToolb... | mit |
acshu/transit-gui | lib/Layout.py | 1 | 51186 | # -*- coding: utf-8 -*-
from ConfigParser import ConfigParser
from ast import literal_eval
from copy import copy
from genericpath import exists
from math import atan, degrees, sin, sqrt, log10
import operator
import os
import sys
import csv
from PyQt4.QtCore import Qt, pyqtSignal, QString, QAbstractTableModel, QVariant... | mit |
Ginfung/sway | Benchmarks/XOMO_Base/xomo.py | 1 | 41536 | import sys
sys.dont_write_bytecode=True
def demo(f=None,demos=[]):
if f: demos.append(f); return f
for d in demos:
print '\n--|',d.func_name,'|','-'*40,'\n',d.__doc__,'\n'
d()
def test(f=None,tests=[]):
if f: tests.append(f); return f
ok=no=0
for t in tests:
print "# ",t.func_name + ': ',t._... | mit |
james4424/nest-simulator | extras/ConnPlotter/ConnPlotter.py | 19 | 83508 | # -*- coding: utf-8 -*-
#
# ConnPlotter.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... | gpl-2.0 |
marscher/mdtraj | MDTraj/core/topology.py | 1 | 30937 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2013 Stanford University and the Authors
#
# Authors: Peter Eastman, Robert McGibbon
# Contributors: Kyle A. Beaucha... | lgpl-2.1 |
idlead/scikit-learn | sklearn/datasets/samples_generator.py | 20 | 56502 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe, J. Nothman
# License: BSD 3 clause
import numbers
import array
import numpy as np
from scipy import linalg
import scipy.sparse as sp
from ..preprocessing import MultiLabelBin... | bsd-3-clause |
sburns/PyCap | redcap/project.py | 2 | 36294 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""User facing class for interacting with a REDCap Project"""
import json
import warnings
import semantic_version
from .request import RCRequest, RedcapError, RequestException
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
__autho... | mit |
droythorne/folium | folium/folium.py | 4 | 50182 | # -*- coding: utf-8 -*-
"""
Folium
-------
Make beautiful, interactive maps with Python and Leaflet.js
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import codecs
import functools
import json
from uuid import uuid4
from jinja2 import Environment, P... | mit |
lthurlow/Network-Grapher | proj/external/matplotlib-1.2.1/lib/matplotlib/backends/backend_ps.py | 2 | 60197 | """
A PostScript backend, which can produce both PostScript .ps and .eps
"""
# PY3KTODO: Get rid of "print >>fh" syntax
from __future__ import division, print_function
import glob, math, os, shutil, sys, time
def _fn_name(): return sys._getframe(1).f_code.co_name
import io
if sys.version_info[0] < 3:
import cStri... | mit |
mayblue9/scikit-learn | sklearn/svm/tests/test_svm.py | 70 | 31674 | """
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 |
ch3ll0v3k/scikit-learn | sklearn/metrics/tests/test_classification.py | 28 | 53546 | 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 |
nelango/ViralityAnalysis | model/lib/pandas/io/pytables.py | 9 | 156275 | """
High level interface to PyTables for reading and writing pandas data structures
to disk
"""
# pylint: disable-msg=E1101,W0613,W0603
from datetime import datetime, date
import time
import re
import copy
import itertools
import warnings
import os
import numpy as np
import pandas as pd
from pandas import (Series, Da... | mit |
leonardbinet/Transilien-Api-ETL | api_etl/builder_feature_matrix.py | 2 | 35646 | """Module containing class to build feature matrices for prediction.
There are two kinds of features:
- either features for direct prediction model
- either features for recursive prediction model
Only the first one is used for now.
"""
from os import path, makedirs
import logging
from datetime import datetime, tim... | mit |
scikit-hep/uproot | uproot3/tree.py | 1 | 103142 | #!/usr/bin/env python
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot3/blob/master/LICENSE
from __future__ import absolute_import
import base64
import codecs
import glob
import importlib
import inspect
import itertools
import math
import numbers
import os
import re
import struct
import sys
import th... | bsd-3-clause |
AmurG/tardis | tardis/io/config_reader.py | 3 | 39949 | # Module to read the rather complex config data
import logging
import os
import pprint
from astropy import constants, units as u
import numpy as np
import pandas as pd
import yaml
import tardis
from tardis.io.model_reader import read_density_file, \
calculate_density_after_time, read_abundances_file
from tardis.... | bsd-3-clause |
cmoutard/mne-python | mne/coreg.py | 5 | 38814 | """Coregistration between different coordinate frames"""
# Authors: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# License: BSD (3-clause)
from .externals.six.moves import configparser
import fnmatch
from glob import glob, iglob
import os
import stat
import sys
import re
import shutil
from warnings import warn
fr... | bsd-3-clause |
alfonsokim/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/pyplot.py | 69 | 77521 | import sys
import matplotlib
from matplotlib import _pylab_helpers, interactive
from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike
from matplotlib.figure import Figure, figaspect
from matplotlib.backend_bases import FigureCanvasBase
from matplotlib.image import imread as _imread
from matplotl... | agpl-3.0 |
kklmn/xrt | xrt/plotter.py | 1 | 82259 | # -*- coding: utf-8 -*-
u"""
Module :mod:`plotter` provides classes describing axes and plots, as well as
containers for the accumulated arrays (histograms) for subsequent
pickling/unpickling or for global flux normalization. The module defines
several constants for default plot positions and sizes. The user may want ... | mit |
hlin117/scikit-learn | sklearn/linear_model/omp.py | 7 | 31863 | """Orthogonal matching pursuit algorithms
"""
# Author: Vlad Niculae
#
# License: BSD 3 clause
import warnings
from distutils.version import LooseVersion
import numpy as np
from scipy import linalg
from scipy.linalg.lapack import get_lapack_funcs
from .base import LinearModel, _pre_fit
from ..base import RegressorM... | bsd-3-clause |
arokem/seaborn | seaborn/relational.py | 2 | 37384 | import warnings
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from ._core import (
VectorPlotter,
)
from .utils import (
locator_to_legend_entries,
adjust_legend_subtitles,
_default_color,
_deprecate_ci,
)
from ._statistics import EstimateAggregator
from .axisgrid imp... | bsd-3-clause |
great-expectations/great_expectations | great_expectations/dataset/pandas_dataset.py | 1 | 67915 | import inspect
import json
import logging
import warnings
from datetime import datetime
from functools import wraps
from operator import ge, gt, le, lt
from typing import List
import jsonschema
import numpy as np
import pandas as pd
from dateutil.parser import parse
from scipy import stats
from great_expectations.cor... | apache-2.0 |
interrogator/corpkit-app | gui.py | 1 | 316378 | #!/usr/bin/env python
"""
# corpkit GUI
# Daniel McDonald
# This file conains the frontend side of the corpkit gui.
# You can use py2app or pyinstaller on it to make a .app,
# or just run it as a script.
# Below is a string that is used to determine when minor
# updates are available on github for automatic download... | mit |
AnasGhrab/scikit-learn | sklearn/datasets/samples_generator.py | 35 | 56035 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe, J. Nothman
# License: BSD 3 clause
import numbers
import array
import numpy as np
from scipy import linalg
import scipy.sparse as sp
from ..preprocessing import MultiLabelBin... | bsd-3-clause |
meteoswiss-mdr/precipattractor | pyscripts/radar_statistics.py | 1 | 61766 | #!/usr/bin/env python
from __future__ import division
from __future__ import print_function
import os
import sys
import argparse
from PIL import Image
import matplotlib as mpl
#mpl.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from mpl_toolkits.axes_grid1 import make_axes_locatable
imp... | gpl-3.0 |
ContinuumIO/numpy | numpy/lib/recfunctions.py | 148 | 35012 | """
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.
"""
from __future__ import division, absolute_import, print_function
import sys
import itertools
import numpy as np
im... | bsd-3-clause |
manashmndl/scikit-learn | sklearn/svm/classes.py | 37 | 39951 | 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 |
joernhees/scikit-learn | sklearn/model_selection/tests/test_search.py | 6 | 51806 | """Test the search module"""
from collections import Iterable, Sized
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.externals.six.moves import xrange
from sklearn.externals.joblib._compat import PY3_OR_LATER
from itertools import chain, product
import pickle
import sys
import numpy as np
i... | bsd-3-clause |
google/dl_bounds | dl_bounds/src/results.py | 1 | 30995 | # coding=utf-8
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 |
amdouglas/OpenPNM | OpenPNM/Network/__GenericNetwork__.py | 1 | 40997 | # -*- coding: utf-8 -*-
"""
===============================================================================
GenericNetwork: Abstract class to construct pore networks
===============================================================================
"""
import scipy as sp
import scipy.sparse as sprs
import scipy.spatial a... | mit |
julienr/vispy | vispy/color/colormap.py | 13 | 38233 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import inspect
import numpy as np
from .color_array import ColorArray
from ..ext.six import string_types
from ..ext.cub... | bsd-3-clause |
danking/hail | hail/python/hail/methods/statgen.py | 1 | 151412 | import itertools
import math
import numpy as np
from typing import Dict, Callable
import builtins
import hail
import hail as hl
import hail.expr.aggregators as agg
from hail.expr import (Expression, ExpressionException, expr_float64, expr_call,
expr_any, expr_numeric, expr_locus, analyze, check_... | mit |
haraldschilly/smc | src/smc_sagews/smc_sagews/sage_server.py | 3 | 69396 | #!/usr/bin/env python
"""
sage_server.py -- unencrypted forking TCP server.
Note: I wrote functionality so this can run as root, create accounts on the fly,
and serve sage as those accounts. Doing this is horrendous from a security point of
view, and I'm definitely not doing this. None of that functionality is actua... | gpl-3.0 |
louisLouL/pair_trading | capstone_env/lib/python3.6/site-packages/matplotlib/artist.py | 2 | 45464 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from collections import OrderedDict, namedtuple
from functools import wraps
import inspect
import re
import warnings
import numpy as np
import matplotlib
from . import cbook, docstring, rcParams
f... | mit |
jakobworldpeace/scikit-learn | sklearn/linear_model/coordinate_descent.py | 1 | 80266 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD 3 clause
import sys
import warnings
from abc import ABCMeta, abstractmethod
import n... | bsd-3-clause |
Barmaley-exe/scikit-learn | sklearn/linear_model/logistic.py | 3 | 55888 | """
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>
imp... | bsd-3-clause |
q1ang/scikit-learn | sklearn/gaussian_process/gaussian_process.py | 78 | 34552 | # -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: 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 |
ycaihua/scikit-learn | sklearn/ensemble/gradient_boosting.py | 2 | 60872 | """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 |
arhik/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/font_manager.py | 69 | 42655 | """
A module for finding, managing, and using fonts across platforms.
This module provides a single :class:`FontManager` instance that can
be shared across backends and platforms. The :func:`findfont`
function returns the best TrueType (TTF) font file in the local or
system font path that matches the specified :class... | agpl-3.0 |
ilo10/scikit-learn | sklearn/tree/tree.py | 113 | 34767 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause |
waynenilsen/statsmodels | statsmodels/genmod/cov_struct.py | 19 | 46892 | from statsmodels.compat.python import iterkeys, itervalues, zip, range
from statsmodels.stats.correlation_tools import cov_nearest
import numpy as np
import pandas as pd
from scipy import linalg as spl
from collections import defaultdict
from statsmodels.tools.sm_exceptions import (ConvergenceWarning,
... | bsd-3-clause |
zrhans/pythonanywhere | .virtualenvs/django19/lib/python3.4/site-packages/matplotlib/backends/backend_gtk3.py | 8 | 39097 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from matplotlib.externals import six
import os, sys
def fn_name(): return sys._getframe(1).f_code.co_name
try:
import gi
except ImportError:
raise ImportError("Gtk3 backend requires pygobject to be in... | apache-2.0 |
dssg/wikienergy | disaggregator/build/pandas/pandas/stats/tests/test_moments.py | 3 | 89255 | import nose
import sys
import functools
import warnings
from datetime import datetime
from numpy.random import randn
from numpy.testing.decorators import slow
import numpy as np
from distutils.version import LooseVersion
from pandas import Series, DataFrame, Panel, bdate_range, isnull, notnull, concat
from pandas.uti... | mit |
Silmathoron/nest-simulator | pynest/examples/spatial/hill_tononi_Vp.py | 6 | 38623 | # -*- coding: utf-8 -*-
#
# hill_tononi_Vp.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,... | gpl-2.0 |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/scipy/stats/tests/test_morestats.py | 17 | 54641 | # 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,
... | mit |
scienceopen/gaussfitter | ah_bootstrap.py | 31 | 36162 | """
This bootstrap module contains code for ensuring that the astropy_helpers
package will be importable by the time the setup.py script runs. It also
includes some workarounds to ensure that a recent-enough version of setuptools
is being used for the installation.
This module should be the first thing imported in th... | bsd-3-clause |
erikrose/more-itertools | more_itertools/more.py | 1 | 96023 | import warnings
from collections import Counter, defaultdict, deque, abc
from collections.abc import Sequence
from functools import partial, wraps
from heapq import merge, heapify, heapreplace, heappop
from itertools import (
chain,
compress,
count,
cycle,
dropwhile,
groupby,
islice,
rep... | mit |
DavidBreuer/CytoSeg | CytoSeg/utils.py | 1 | 74513 | # -*- coding: utf-8 -*-
################################################################################
# Module: utils.py
# Description: Test imports and network extraction
# License: GPL3, see full license in LICENSE.txt
# Web: https://github.com/DavidBreuer/CytoSeg
#################################################... | gpl-3.0 |
cl4rke/scikit-learn | sklearn/externals/joblib/parallel.py | 36 | 34375 | """
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
import gc
import warnings
from math import sqrt
import functools
import time
import thr... | bsd-3-clause |
sureshthalamati/spark | python/pyspark/sql/session.py | 2 | 34711 | #
# 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 |
intel-analytics/analytics-zoo | pyzoo/zoo/chronos/model/tcmf/DeepGLO.py | 1 | 32279 | # Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 |
admcrae/tensorflow | tensorflow/contrib/keras/python/keras/callbacks.py | 25 | 33691 | # 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 |
jmmease/pandas | pandas/tests/io/json/test_pandas.py | 1 | 42616 | # -*- 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)
fro... | bsd-3-clause |
joshfuchs/ZZCeti_pipeline | spectools.py | 1 | 35547 | """
This program contains various definitions and commonly done things
for spectra for the ZZ CETI pipeline.
Written primarily by JT Fuchs
Based on pySALT
"""
#import pyfits as fits
import astropy.io.fits as fits
import ReduceSpec_tools as rt
import numpy as np
import scipy
from scipy.interpolate import Interpolated... | mit |
evanl/perc | perc_objects.py | 1 | 34291 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from mpl_toolkits.mplot3d import Axes3D
import random
import sys
import bisect
import read_eclipse as re
import eclipse_cells as ec
from time import time, clock
import csv
class Perc(object):
def __init__(self, nx, ny, nz, r_max = 10, volume_frac... | mit |
Eric89GXL/mne-python | mne/viz/_brain/tests/test_brain.py | 2 | 33467 | # -*- coding: utf-8 -*-
#
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Joan Massich <mailsik@gmail.com>
# Guillaume Favelier <guillaume.favelier@gmail.com>
# Oleh Kozynets <ok7mailbox@gmail.com>
#
# License: Simplified BSD
imp... | bsd-3-clause |
webmasterraj/FogOrNot | flask/lib/python2.7/site-packages/pandas/tools/merge.py | 4 | 41529 | """
SQL-style merge routines
"""
import types
import numpy as np
from pandas.compat import range, long, lrange, lzip, zip, map, filter
import pandas.compat as compat
from pandas.core.categorical import Categorical
from pandas.core.frame import DataFrame, _merge_doc
from pandas.core.generic import NDFrame
from pandas.c... | gpl-2.0 |
Erotemic/utool | utool/util_graph.py | 1 | 85803 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
try:
import numpy as np
except ImportError:
pass
try:
import networkx as nx
except ImportError:
pass
import collections
import functools
from utool import util_inject
from utool import util_const
f... | apache-2.0 |
bdrillard/spark | python/pyspark/sql/functions.py | 1 | 143697 | #
# 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 |
aflaxman/scikit-learn | sklearn/svm/classes.py | 9 | 44254 | 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 |
PatrickOReilly/scikit-learn | sklearn/tree/tree.py | 1 | 44306 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause |
srowen/spark | python/pyspark/pandas/tests/test_series.py | 9 | 118972 | #
# 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 |
pratapvardhan/pandas | pandas/tests/frame/test_operators.py | 2 | 43613 | # -*- coding: utf-8 -*-
from __future__ import print_function
from collections import deque
from datetime import datetime
from decimal import Decimal
import operator
import pytest
from numpy import nan, random
import numpy as np
from pandas.compat import range
from pandas import compat
from pandas import (DataFrame... | bsd-3-clause |
BoltzmannBrain/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/cbook.py | 69 | 42525 | """
A collection of utility functions and classes. Many (but not all)
from the Python Cookbook -- hence the name cbook
"""
from __future__ import generators
import re, os, errno, sys, StringIO, traceback, locale, threading, types
import time, datetime
import warnings
import numpy as np
import numpy.ma as ma
from weakr... | agpl-3.0 |
glemaitre/UnbalancedDataset | imblearn/tests/test_pipeline.py | 2 | 34905 | """
Test the pipeline module.
"""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# Christos Aridas
# License: MIT
from tempfile import mkdtemp
import shutil
import time
import numpy as np
from pytest import raises
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing impor... | mit |
webmasterraj/FogOrNot | flask/lib/python2.7/site-packages/pandas/io/tests/test_stata.py | 2 | 44490 | # pylint: disable=E1101
from datetime import datetime
import datetime as dt
import os
import warnings
import nose
import struct
import sys
from distutils.version import LooseVersion
import numpy as np
import pandas as pd
from pandas.compat import iterkeys
from pandas.core.frame import DataFrame, Series
from pandas.c... | gpl-2.0 |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/pandas/tools/tests/test_merge.py | 1 | 74672 | # pylint: disable=E1103
import nose
from datetime import datetime
from numpy.random import randn
from numpy import nan
import numpy as np
import random
from pandas.compat import range, lrange, lzip, zip
from pandas import compat, _np_version_under1p7
from pandas.tseries.index import DatetimeIndex
from pandas.tools.m... | gpl-3.0 |
ML-KULeuven/socceraction | socceraction/spadl/opta.py | 1 | 60410 | # -*- coding: utf-8 -*-
"""Opta event stream data to SPADL converter."""
import copy
import glob
import json # type: ignore
import os
import re
import warnings
from abc import ABC
from datetime import datetime, timedelta
from typing import Any, Dict, List, Mapping, Optional, Tuple, Type
import pandas as pd # type: i... | mit |
rabipanda/tensorflow | tensorflow/contrib/metrics/python/ops/metric_ops_test.py | 4 | 262821 | # 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 |
strongh/GPy | GPy/util/datasets.py | 4 | 64376 | import csv
import os
import copy
import numpy as np
import GPy
import scipy.io
import cPickle as pickle
import zipfile
import tarfile
import datetime
import json
import re
from config import *
ipython_available=True
try:
import IPython
except ImportError:
ipython_available=False
import sys, urllib2
def rep... | bsd-3-clause |
JungeAlexander/cocoscore | tests/tagger/test_co_occurrence_score.py | 1 | 54674 | import numpy
import pandas
from pandas.util.testing import assert_frame_equal
from pytest import approx
from pytest import raises
import cocoscore.tagger.co_occurrence_score as co_occurrence_score
import cocoscore.tools.data_tools as dt
from cocoscore.ml.distance_scores import polynomial_decay_distance
from cocoscore.... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.