repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
victor-prado/broker-manager | environment/lib/python3.5/site-packages/pandas/tools/plotting.py | 7 | 134565 | # being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
import re
from math import ceil
from collections import namedtuple
from contextlib import contextmanager
from distutils.version import LooseVersion
import numpy as np
from pandas.types.common import (is_list_like,
... | mit |
RPGOne/Skynet | scikit-learn-0.18.1/sklearn/metrics/classification.py | 11 | 71893 | """Metrics to assess performance on classification task given class 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.gramf... | bsd-3-clause |
wkerzendorf/chiantipy | chiantipy/chianti/core/Ion.py | 1 | 225538 | import os
import types
import numpy as np
from scipy import interpolate
import time
#
import chianti.data as chdata
import chianti.sources as sources
#chInteractive = chdata.chInteractive
import pylab as pl
#if chInteractive:
# import pylab as pl
#else:
## import matplotlib
## matplotlib.use('Agg')
# import... | gpl-3.0 |
ammarkhann/FinalSeniorCode | lib/python2.7/site-packages/pandas/core/series.py | 6 | 99587 | """
Data structure for 1-dimensional cross-sectional and time series data
"""
from __future__ import division
# pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
import types
import warnings
from textwrap import dedent
from numpy import nan, ndarray
import numpy as np
import numpy.ma as ma
from ... | mit |
wackymaster/QTClock | Libraries/matplotlib/mathtext.py | 3 | 116498 | r"""
:mod:`~matplotlib.mathtext` is a module for parsing a subset of the
TeX math syntax and drawing them to a matplotlib backend.
For a tutorial of its usage see :ref:`mathtext-tutorial`. This
document is primarily concerned with implementation details.
The module uses pyparsing_ to parse the TeX expression.
.. _p... | mit |
neerajvashistha/pa-dude | lib/python2.7/site-packages/nltk/parse/dependencygraph.py | 3 | 31002 | # Natural Language Toolkit: Dependency Grammars
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Jason Narad <jason.narad@gmail.com>
# Steven Bird <stevenbird1@gmail.com> (modifications)
#
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
#
"""
Tools for reading and writing dependency tree... | mit |
maropu/spark | python/pyspark/pandas/base.py | 1 | 55640 | #
# 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 |
mbayon/TFG-MachineLearning | vbig/lib/python2.7/site-packages/sklearn/gaussian_process/gpc.py | 18 | 31958 | """Gaussian processes classification."""
# Authors: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
from operator import itemgetter
import numpy as np
from scipy.linalg import cholesky, cho_solve, solve
from scipy.optimize import fmin_l_bfgs_b
from scipy.special import erf... | mit |
MechCoder/scikit-learn | sklearn/ensemble/weight_boosting.py | 29 | 41090 | """Weight Boosting
This module contains weight boosting estimators for both classification and
regression.
The module structure is the following:
- The ``BaseWeightBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regression and classification
only differ from each ot... | bsd-3-clause |
moutai/scikit-learn | sklearn/linear_model/logistic.py | 7 | 67572 |
"""
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 |
giacomov/3ML | threeML/utils/OGIP/response.py | 1 | 40337 | from __future__ import division
from builtins import map
from builtins import str
from builtins import range
from past.utils import old_div
from builtins import object
import astropy.io.fits as pyfits
import numpy as np
import warnings
import matplotlib.cm as cm
from matplotlib.colors import SymLogNorm
import matplotli... | bsd-3-clause |
ankurankan/scikit-learn | doc/sphinxext/gen_rst.py | 16 | 39657 | """
Example generation for the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from __future__ import division, print_function
from time import time
import ast
import os
import re
import shutil
import traceback
i... | bsd-3-clause |
jshiv/turntable | test/lib/python2.7/site-packages/scipy/signal/signaltools.py | 7 | 66141 | # Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
from . import sigtools
from scipy.lib.six import callable
from scipy.lib._version import NumpyVersion
from scipy import linalg
from scipy.fftpack import (fft, ifft, ifftshift, ff... | mit |
MatthieuBizien/scikit-learn | sklearn/preprocessing/tests/test_data.py | 10 | 59957 |
# Authors:
#
# Giorgio Patrini
#
# License: BSD 3 clause
import warnings
import numpy as np
import numpy.linalg as la
from scipy import sparse
from distutils.version import LooseVersion
from sklearn.externals.six import u
from sklearn.utils import gen_batches
from sklearn.utils.testing import assert_almost... | bsd-3-clause |
jseabold/scipy | scipy/stats/tests/test_morestats.py | 10 | 46317 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (TestCase, run_module_suite, assert_array_equal,
... | bsd-3-clause |
bgris/ODL_bgris | lib/python3.5/site-packages/matplotlib/legend.py | 10 | 39062 | """
The legend module defines the Legend class, which is responsible for
drawing legends associated with axes and/or figures.
.. important::
It is unlikely that you would ever create a Legend instance manually.
Most users would normally create a legend via the
:meth:`~matplotlib.axes.Axes.legend` function... | gpl-3.0 |
AlexanderFabisch/scikit-learn | sklearn/model_selection/_validation.py | 14 | 35648 | """
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 __... | bsd-3-clause |
louispotok/pandas | pandas/tests/scalar/period/test_asfreq.py | 1 | 36818 | import pytest
from pandas.errors import OutOfBoundsDatetime
import pandas as pd
from pandas import Period, offsets
from pandas.util import testing as tm
from pandas._libs.tslibs.frequencies import _period_code_map
class TestFreqConversion(object):
"""Test frequency conversion of date objects"""
@pytest.mark... | bsd-3-clause |
victor-prado/broker-manager | environment/lib/python3.5/site-packages/pandas/tests/series/test_missing.py | 7 | 35885 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytz
from datetime import timedelta, datetime
from numpy import nan
import numpy as np
import pandas as pd
from pandas import (Series, isnull, date_range,
MultiIndex, Index)
from pandas.tseries.index import Timestamp
from pandas.compat impor... | mit |
wilmarcardonac/H0CF3 | scripts/plot_results_jackknife_analysis_nside.py | 1 | 41350 | import matplotlib as mpl
mpl.use('Agg')
import numpy as np
import matplotlib.pyplot as py
marker = ['o','s','*','o','r^','g<','b>','rD','g+','bx','r*','bo']
# NSIDE = 1
z_mean, A, A_mean, AL68, AR68, AL95, AR95, LA, LA_mean, LAL68, LAR68, LAL95, LAR95, LO, LO_mean, LOL68, LOR68, LOL95, LOR95, A_noise, LA_noise, LO_... | gpl-3.0 |
huzq/scikit-learn | sklearn/inspection/_plot/partial_dependence.py | 2 | 31973 | import numbers
from itertools import chain
from itertools import count
from math import ceil
import numpy as np
from scipy import sparse
from scipy.stats.mstats import mquantiles
from joblib import Parallel, delayed
from .. import partial_dependence
from ...base import is_regressor
from ...utils import check_array
fr... | bsd-3-clause |
Intel-Corporation/tensorflow | tensorflow/tools/compatibility/tf_upgrade_v2_test.py | 1 | 77193 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
paninski-lab/yass | src/yass/deconvolve/run_original.py | 1 | 105663 | import os
import logging
import numpy as np
import parmap
from sklearn import mixture
import scipy
from scipy.interpolate import interp1d
import datetime as dt
from tqdm import tqdm
import torch
import torch.multiprocessing as mp
from yass import read_config
from yass.reader import READER
from yass.deconvolve.match_p... | apache-2.0 |
dominicelse/scipy | scipy/signal/ltisys.py | 13 | 123258 | """
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.
# Apr 2011: Jeffrey Armstrong <jeff@approximatrix.co... | bsd-3-clause |
haudren/scipy | scipy/stats/_distn_infrastructure.py | 17 | 118793 | #
# 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_
from scipy._lib._util import getargspec_no_self as _getargspec
import sys
import keyword
import re
imp... | bsd-3-clause |
tknapen/hedfpy | hedfpy/EyeSignalOperator.py | 1 | 46857 | #!/usr/bin/env python
# encoding: utf-8
"""@package Operators
This module offers various methods to process eye movement data
Created by Tomas Knapen on 2010-12-19.
Copyright (c) 2010 __MyCompanyName__. All rights reserved.
More details.
"""
import os, sys, subprocess, re
import pickle
import scipy as sp
import nu... | mit |
toobaz/pandas | pandas/tests/io/formats/test_format.py | 1 | 111518 | """
Test output formatting for Series/DataFrame, including to_string & reprs
"""
from datetime import datetime
from io import StringIO
import itertools
from operator import methodcaller
import os
import re
from shutil import get_terminal_size
import sys
import textwrap
import dateutil
import numpy as np
import pytest... | bsd-3-clause |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/matplotlib/backends/backend_qt4.py | 1 | 31660 |
import math
import os
import re
import signal
import sys
import matplotlib
from matplotlib import verbose
from matplotlib.cbook import is_string_like, onetrue
from matplotlib.backend_bases import RendererBase, GraphicsContextBase, \
FigureManagerBase, FigureCanvasBase, NavigationToolbar2, IdleEvent, \
curso... | gpl-3.0 |
joergdietrich/astropy | astropy/time/formats.py | 2 | 42561 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import fnmatch
import time
import re
import datetime
from collections import OrderedDict
import numpy as np
from .. impo... | bsd-3-clause |
astocko/statsmodels | statsmodels/tsa/stattools.py | 26 | 37127 | """
Statistical tools for time series analysis
"""
from statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip,
zip, map)
import numpy as np
from numpy.linalg import LinAlgError
from scipy import stats
from statsmodels.regression.linear_model import OLS, yule_walk... | bsd-3-clause |
chugunovyar/factoryForBuild | env/lib/python2.7/site-packages/matplotlib/pyplot.py | 6 | 134878 | # Note: The first part of this file can be modified in place, but the latter
# part is autogenerated by the boilerplate.py script.
"""
Provides a MATLAB-like plotting framework.
:mod:`~matplotlib.pylab` combines pyplot with numpy into a single namespace.
This is convenient for interactive work, but for programming it
... | gpl-3.0 |
jrversteegh/softsailor | deps/scipy-0.10.0b2/scipy/stats/morestats.py | 5 | 46011 | # Author: Travis Oliphant, 2002
#
# Further updates and enhancements by many SciPy developers.
#
import math
import statlib
import stats
from stats import find_repeats
import distributions
from numpy import isscalar, r_, log, sum, around, unique, asarray
from numpy import zeros, arange, sort, amin, amax, any, where, ... | gpl-3.0 |
dssg/wikienergy | disaggregator/build/pandas/pandas/core/frame.py | 1 | 185665 | """
DataFrame
---------
An efficient 2D container for potentially mixed-type time series or other
labeled data series.
Similar to its R counterpart, data.frame, except providing automatic data
alignment and a host of useful data manipulation methods having to do with the
labeling information
"""
from __future__ import... | mit |
linebp/pandas | pandas/tests/frame/test_indexing.py | 7 | 104529 | # -*- coding: utf-8 -*-
from __future__ import print_function
from warnings import catch_warnings
from datetime import datetime, date, timedelta, time
from pandas.compat import map, zip, range, lrange, lzip, long
from pandas import compat
from numpy import nan
from numpy.random import randn
import pytest
import nu... | bsd-3-clause |
sergej-C/dl_utils | extract_predictions.py | 1 | 72174 | path_tars = '/home/sergio/Scrivania/all_pkl/'
import tarfile
import cPickle
from glob import glob
import data_utils as mu
from io_utils import *
import matplotlib.pyplot as plt
import matplotlib
#matplotlib.use('Agg')
from xml_utils import *
from faster_rcnn_utils import *
from data_struct_utils import *
import cv2
i... | mit |
bramkaarga/transcrit | transport_network_modeling/bangladesh_network old 22 march/run ema.py | 1 | 34085 | from matplotlib import pyplot as plt
import matplotlib.colors as colors
from matplotlib.pylab import *
import networkx as nx
import pandas as pd
import geopandas as gp
import copy
from rasterstats import zonal_stats
from __future__ import division
import os
import sys
module_path = os.path.abspath(os.path.... | bsd-3-clause |
blaze/dask | dask/array/tests/test_array_core.py | 1 | 131282 | import copy
import pytest
np = pytest.importorskip("numpy")
import os
import time
from io import StringIO
from distutils.version import LooseVersion
import operator
from operator import add, sub, getitem
from threading import Lock
import warnings
from tlz import merge, countby, concat
from tlz.curried import identi... | bsd-3-clause |
mogeiwang/nest | extras/ConnPlotter/ConnPlotter.py | 13 | 80830 | # -*- 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 |
huikyole/climate | ocw/dataset_processor.py | 2 | 60218 | #
# 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 n... | apache-2.0 |
UMN-Hydro/GSFLOW_pre-processor | python_scripts/GSFLOW_print_PRMSparamfile_Shullcas_test.py | 1 | 43726 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 12 22:21:56 2017
Based on: GSFLOW_print_PRMSparamfile4.m
@author: gcng
"""
import numpy as np # matlab core
import os # os functions
import pandas as pd # for data structures and reading in data from text file
#from ConfigParser import SafeConfigParser
import settings_t... | gpl-3.0 |
teonlamont/mne-python | mne/inverse_sparse/mxne_optim.py | 3 | 46824 | from __future__ import print_function
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Daniel Strohmeier <daniel.strohmeier@gmail.com>
#
# License: Simplified BSD
from math import sqrt
import numpy as np
from scipy import linalg
from .mxne_debiasing import compute_bias
from ..utils im... | bsd-3-clause |
mailhexu/pyDFTutils | build/lib/pyDFTutils/vasp/vasp_dos.py | 1 | 32228 | #!/usr/bin/env python
from ase.io import read
from ase.calculators.vasp import VaspDos
import numpy as np
import matplotlib.pyplot as plt
from os.path import join
import os
from shutil import copyfile
from scipy import trapz,integrate
from pyDFTutils.ase_utils.symbol import symnum_to_sym
from .vasp_utils import get_sym... | lgpl-3.0 |
tabhitmy/MLTF | WORKFLOW/code/python_code/NFDALauncher.py | 1 | 42572 | # -*- coding:utf-8 -*-
import sys
import os
import numpy as np
import glob
import math
import matplotlib as mpl
from matplotlib.font_manager import FontProperties
# zhfont = FontProperties(fname="/usr/share/fonts/cjkuni-ukai/ukai.ttc") # 图片显示中文字体
mpl.use('Agg')
import matplotlib.pyplot as plt
import copy
i... | mit |
anderspitman/scikit-bio | skbio/stats/gradient.py | 2 | 32196 | r"""
Gradient analyses (:mod:`skbio.stats.gradient`)
===============================================
.. currentmodule:: skbio.stats.gradient
This module provides functionality for performing gradient analyses.
The algorithms included in this module mainly allows performing analysis of
volatility on time series data, ... | bsd-3-clause |
jepegit/cellpy | cellpy/utils/batch.py | 1 | 37215 | """Routines for batch processing of cells (v2)."""
import logging
import pathlib
import shutil
import warnings
import os
import sys
import pandas as pd
from tqdm.auto import tqdm
from cellpy import prms
from cellpy import log
import cellpy.exceptions
from cellpy.parameters.internal_settings import (
get_headers_... | mit |
giaosudau/caravel | caravel/forms.py | 1 | 43664 | """Contains the logic to create cohesive forms on the explore view"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import OrderedDict
from copy import copy
import json
import math
from flask_babel ... | apache-2.0 |
alanmitchell/fnsb-benchmark | benchmark.py | 1 | 65642 | """ -------------------- MAIN BENCHMARKING SCRIPT -----------------------
Run this script by executing the following from a command prompt:
python3 benchmark.py
Or, use just "python benchmark.py" if that is how you normally access Python 3.
One some operating systems (Linux, Mac OSX), you may be able to ... | mit |
jaeilepp/mne-python | mne/tests/test_label.py | 1 | 34015 | import os
import os.path as op
import shutil
import glob
import warnings
import numpy as np
from scipy import sparse
from numpy.testing import assert_array_equal, assert_array_almost_equal
from nose.tools import assert_equal, assert_true, assert_false, assert_raises
from mne.datasets import testing
from mne import (... | bsd-3-clause |
godfreyhe/flink | flink-python/pyflink/table/udf.py | 9 | 30509 | ################################################################################
# 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... | apache-2.0 |
schlegelp/pymaid | pymaid/core.py | 1 | 42360 | # Copyright (C) 2017 Philipp Schlegel
# 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... | gpl-3.0 |
marionleborgne/nupic | external/linux32/lib/python2.6/site-packages/matplotlib/axis.py | 69 | 54453 | """
Classes for the ticks and x and y axis
"""
from __future__ import division
from matplotlib import rcParams
import matplotlib.artist as artist
import matplotlib.cbook as cbook
import matplotlib.font_manager as font_manager
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
import matplotlib.sc... | agpl-3.0 |
uglyboxer/linear_neuron | net-p3/lib/python3.5/site-packages/scipy/special/add_newdocs.py | 7 | 70156 | # 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... | mit |
bbcdli/xuexi | fenlei_tf/script_2019Nov/src/version1/tensor_trainOLDerror.py | 2 | 103140 | #originally by Hamed, 25Apr.2016
#hy:Changes by Haiyan, 21Dec.2016 v0.45
#sudo apt-get install python-h5py
# Added evaluation function for multiple models, their result file names contain calculated mAP.
# Added functionality to set different dropout rate for each layer for 3conv net
# Moved auxiliary functions to a ne... | apache-2.0 |
cdegroc/scikit-learn | sklearn/cross_validation.py | 1 | 36712 | """
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 Style.
from i... | bsd-3-clause |
jstoxrocky/statsmodels | statsmodels/tsa/tests/test_arima.py | 5 | 78857 | from statsmodels.compat.python import lrange, BytesIO
import numpy as np
from nose.tools import nottest
from numpy.testing import (assert_almost_equal, assert_,
assert_raises, dec, TestCase)
from statsmodels.tools.testing import assert_equal
import statsmodels.sandbox.tsa.fftarma as fa
from s... | bsd-3-clause |
WillieMaddox/scipy | scipy/cluster/tests/test_hierarchy.py | 5 | 36338 | #! /usr/bin/env python
#
# Author: Damian Eads
# Date: April 17, 2008
#
# Copyright (C) 2008 Damian Eads
#
# 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 copy... | bsd-3-clause |
aimacode/aima-python | notebook.py | 2 | 43285 | import time
from collections import defaultdict
from inspect import getsource
import ipywidgets as widgets
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
from IPython.display import HTML
from IPython.display import display
from PIL import Image
from matplotlib import lines
from games import ... | mit |
leifdenby/numpy | numpy/lib/function_base.py | 5 | 143332 | from __future__ import division, absolute_import, print_function
import warnings
import sys
import collections
import operator
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d
from numpy.core.numeric import (
ones, zeros, arange, concatenate, array, asarr... | bsd-3-clause |
laosiaudi/tensorflow | tensorflow/contrib/labeled_tensor/python/ops/ops.py | 3 | 44167 | # 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 |
evandromr/stingray | stingray/tests/test_bispectrum.py | 3 | 30535 | import numpy as np
from astropy.tests.helper import pytest
import warnings
import os
from stingray import Lightcurve
from stingray.bispectrum import Bispectrum
from stingray.exceptions import StingrayError
try:
import matplotlib.pyplot as plt
HAS_MPL = True
except ImportError:
HAS_MPL = False
class Tes... | mit |
classner/barrista | barrista/monitoring.py | 1 | 84399 | # -*- coding: utf-8 -*-
"""Defines several tools for monitoring net activity."""
# pylint: disable=F0401, E1101, too-many-lines, wrong-import-order
import logging as _logging
import os as _os
import subprocess as _subprocess
import collections as _collections
import numpy as _np
# pylint: disable=no-name-in-module
from... | mit |
apache/spark | python/pyspark/pandas/base.py | 6 | 56113 | #
# 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 |
jromang/retina-old | distinclude/spyderlib/spyder.py | 1 | 88724 | # -*- coding: utf-8 -*-
#
# Copyright © 2009-2011 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""
Spyder, the Scientific PYthon Development EnviRonment
=====================================================
Developped and maintained by Pierre Raybaut... | gpl-3.0 |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/numpy/lib/npyio.py | 15 | 75585 | from __future__ import division, absolute_import, print_function
import sys
import os
import re
import itertools
import warnings
import weakref
from operator import itemgetter, index as opindex
import numpy as np
from . import format
from ._datasource import DataSource
from numpy.core.multiarray import packbits, unpa... | mit |
gwpy/gwpy | gwpy/timeseries/timeseries.py | 2 | 85362 | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2014-2020)
#
# This file is part of GWpy.
#
# GWpy 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)... | gpl-3.0 |
gkdb/gkdb | gkdb/core/model.py | 1 | 31604 | import sys
from collections import OrderedDict
from warnings import warn
from IPython import embed
if sys.version_info < (3, 0):
print('Python 2')
input = raw_input
from peewee import *
from peewee import FloatField, FloatField, ProgrammingError
from peewee import JOIN
import peewee
import numpy as np
import in... | mit |
ArduPilot/MAVProxy | MAVProxy/tools/MAVExplorer.py | 1 | 34510 | #!/usr/bin/env python
from __future__ import print_function
'''
log analysis program
Andrew Tridgell December 2014
'''
import copy
import sys
import time
import os
import fnmatch
import threading
import shlex
from math import *
from MAVProxy.modules.lib import multiproc
from MAVProxy.modules.lib import rline
from MA... | gpl-3.0 |
Chuban/moose | scripts/memory_logger.py | 8 | 54437 | #!/usr/bin/env python
from tempfile import TemporaryFile, SpooledTemporaryFile
import os, sys, re, socket, time, pickle, csv, uuid, subprocess, argparse, decimal, select, platform, signal
class Debugger:
"""
The Debugger class is the entry point to our stack tracing capabilities.
It determins which debugger t... | lgpl-2.1 |
atztogo/phonopy | phonopy/api_phonopy.py | 1 | 119733 | # Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#
# This file is part of phonopy.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notic... | bsd-3-clause |
tsherwen/AC_tools | AC_tools/SMVGEAR.py | 1 | 34139 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Functions for SMVGEAR input/output file Processing
Notes
-------
- These functions are specifically for GEOS-Chem versions prior to v11-01.
- They are no longer maintained, as KPP is default ODE solve for GEOS-Chem now
"""
import os
import sys
import glob
import pandas ... | mit |
CompPhysics/MachineLearning | doc/LectureNotes/_build/jupyter_execute/chapter7.py | 1 | 37338 | # Ensemble Methods: From a Single Tree to Many Trees and Extreme Boosting, Meet the Jungle of Methods
As stated previously and seen in many of the examples discussed in the previous chapter about
a single decision tree, we often end up overfitting our training
data. This normally means that we have a high variance. Ca... | cc0-1.0 |
calispac/digicampipe | digicampipe/image/lidccd/cones_image.py | 1 | 45764 | import decimal
from decimal import Decimal, ROUND_HALF_EVEN
import matplotlib.pyplot as plt
import numpy as np
from astropy import units as u
from astropy.io import fits
from cts_core.camera import Camera
from pkg_resources import resource_filename
from scipy import signal, optimize
from digicampipe.image.lidccd.kern... | gpl-3.0 |
pwcazenave/PyFVCOM | PyFVCOM/grid/_grid.py | 1 | 218187 | """
Tools for manipulating and converting unstructured grids in a range of formats.
"""
# TODO: This is a massive sprawling collection of functions. We should split it up into more sensible subdivisions
# within PyFVCOM.grid to make it more manageable and generally more useable.
from __future__ import print_functio... | mit |
tedmeeds/tcga_encoder | tcga_encoder/models/svd/batcher_dna_out.py | 1 | 91200 | import tensorflow as tf
#from tensorflow import *
import pdb
from tcga_encoder.models.layers import *
from tcga_encoder.models.regularizers import *
from tcga_encoder.algorithms import *
#from models.vae.tcga_models import *
from tcga_encoder.utils.helpers import *
#from tcga_encoder.data import load_sources
#from ut... | mit |
drongh/vnpy | vn.datayes/api.py | 19 | 45371 | #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 im... | mit |
mattilyra/scikit-learn | sklearn/cross_decomposition/pls_.py | 35 | 30767 | """
The :mod:`sklearn.pls` module implements Partial Least Squares (PLS).
"""
# Author: Edouard Duchesnay <edouard.duchesnay@cea.fr>
# License: BSD 3 clause
from distutils.version import LooseVersion
from sklearn.utils.extmath import svd_flip
from ..base import BaseEstimator, RegressorMixin, TransformerMixin
from ..u... | bsd-3-clause |
abhishekkrthakur/scikit-learn | sklearn/neighbors/tests/test_neighbors.py | 4 | 38888 | 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 |
wazeerzulfikar/scikit-learn | sklearn/linear_model/tests/test_logistic.py | 1 | 49335 | import numpy as np
import scipy.sparse as sp
from scipy import linalg, optimize, sparse
from sklearn.datasets import load_iris, make_classification
from sklearn.metrics import log_loss
from sklearn.model_selection import StratifiedKFold
from sklearn.preprocessing import LabelEncoder
from sklearn.utils import compute_cl... | bsd-3-clause |
yanboliang/spark | python/pyspark/sql/tests/test_dataframe.py | 7 | 32963 | #
# 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 |
zuku1985/scikit-learn | sklearn/datasets/samples_generator.py | 16 | 56558 | """
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 |
jonycgn/scipy | scipy/special/basic.py | 9 | 62504 | #
# Author: Travis Oliphant, 2002
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from scipy._lib.six import xrange
from numpy import (pi, asarray, floor, isscalar, iscomplex, real, imag, sqrt,
where, mgrid, sin, place, issubdtype, extract,
... | bsd-3-clause |
drammock/mne-python | mne/viz/topo.py | 4 | 39781 | """Functions to plot M/EEG data on topo (one axes per channel)."""
# 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>
#
# License: Simplified BSD
from c... | bsd-3-clause |
gdooper/scipy | scipy/stats/_multivariate.py | 4 | 99077 | #
# Author: Joris Vankerschaver 2013
#
from __future__ import division, print_function, absolute_import
import math
import numpy as np
import scipy.linalg
from scipy.misc import doccer
from scipy.special import gammaln, psi, multigammaln
from scipy._lib._util import check_random_state
from scipy.linalg.blas import dro... | bsd-3-clause |
cactusbin/nyt | matplotlib/lib/matplotlib/colors.py | 1 | 53145 | """
A module for converting numbers or color arguments to *RGB* or *RGBA*
*RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the
range 0-1.
This module includes functions and classes for color specification
conversions, and for mapping numbers to colors in a 1-D array of colors called
a colormap. Color... | unlicense |
bnaul/scikit-learn | sklearn/ensemble/_forest.py | 2 | 95540 | """
Forest of trees-based ensemble methods.
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls th... | bsd-3-clause |
jmbeuken/abinit | scripts/post_processing/plot_bandstructure.py | 3 | 47920 | #!/usr/bin/python
#=================================================================#
# Script to plot the bandstructure from an abinit bandstructure #
# _EIG.nc netcdf file or from a wannier bandstructure, or from #
# an _EIG.nc file+GW file+ bandstructure _EIG.nc file #
#=============================... | gpl-3.0 |
francescobaldi86/Ecos2015PaperExtension | Python files/preprocessing_old.py | 1 | 31825 | # This module includes the functions that perform the "pre-processing": In short, they prepare the data structure
# that is then processed by the "Energy analysis" and "Exergy analysis" functions, all in one go.
#
# The module is made of :
# - One function that simply reads in the data that is already available from th... | mit |
futurulus/scipy | scipy/stats/morestats.py | 20 | 92783 | # 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 collections import namedtuple
import numpy as np
from numpy import (isscalar, r_, log, around, unique, asarray,
... | bsd-3-clause |
desihub/desitarget | py/desitarget/lyazcat.py | 1 | 30373 | """
desitarget.lyazcat
==================
Post-redrock ML processing for LyA Quasar object identification.
"""
import os
import numpy as np
import time
import fitsio
from desitarget.geomask import match, match_to
from desitarget.internal import sharedmem
from desitarget.io import write_with_units
from desispec.io im... | bsd-3-clause |
pylayers/pylayers | pylayers/gui/editor.py | 1 | 51315 | # -*- coding: utf-8 -*-
""" Qt Standalone Layout editor
.. automodule::
:members:
"""
import sys, os, random
if 'QT_API' in os.environ:
if os.environ['QT_API'] != 'pyqt':
saveQTAPI = os.environ['QT_API']
os.environ['QT_API'] = 'pyqt'
else:
saveQTAPI = ''
os.environ['QT_API'] = 'pyqt'... | mit |
kernc/scikit-learn | sklearn/model_selection/tests/test_split.py | 26 | 39193 | """Test the split module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy import stats
from scipy.misc import comb
from itertools import combinations
from sklearn.utils.fixes import combinations_with_replacement
from sklearn.utils.testing import asse... | bsd-3-clause |
giruenf/GRIPy | app/menu_functions.py | 1 | 188506 | import os
from collections import OrderedDict
import numpy as np
from scipy.signal import chirp
import wx
from app import app_utils
from fileio import las
from fileio import odt
from fileio import segy
from algo.spectral.Spectral import WaveletTransform, MorletWavelet, \
PaulWavelet, DOGWavelet, RickerWavelet
fr... | apache-2.0 |
newemailjdm/scipy | scipy/stats/tests/test_morestats.py | 19 | 50547 | # Author: Travis Oliphant, 2002
#
# Further enhancements and tests added by numerous SciPy developers.
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
from numpy.random import RandomState
from numpy.testing import (TestCase, run_module_suite, assert_array_equal,
... | bsd-3-clause |
Morisset/pySSN | pyssn/qt5/pyssn_qt5.py | 1 | 220702 | """
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 |
jaeilepp/eggie | mne/stats/cluster_level.py | 1 | 63712 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Authors: Thorsten Kranz <thorstenkranz@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larson.eric.d@gmail.com>
# Denis Engemann <denis.engemann@gma... | bsd-2-clause |
jenfly/monsoon-onset | scripts/pub-figs-grl.py | 1 | 36856 | import sys
sys.path.append('/home/jwalker/dynamics/python/atmos-tools')
sys.path.append('/home/jwalker/dynamics/python/atmos-read')
import xarray as xray
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import collections
import pandas as pd
import atmos as atm
import indices
import utils
... | mit |
devopsgroup-io/moai | moai.py | 1 | 41444 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DEVELOPMENT NOTES
-----------------
* Ideally use pyenv to ensure to not break your Python installion https://github.com/pyenv/pyenv#homebrew-on-mac-os-x
* Python v2 is supported - v3 not yet
* Install the missing libraries as defined in provision.sh
"""
import base64... | mpl-2.0 |
chrissly31415/amimanera | competition_scripts/ensemble_otto.py | 1 | 77522 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Ensemble helper tools
Chrissly31415
October,September 2014
"""
from FullModel import *
import itertools
from scipy.optimize import fmin,fmin_cobyla
from random import randint
import sys
from sklearn.externals.joblib import Parallel, delayed, logger
from sklearn.ba... | lgpl-3.0 |
phoebe-project/phoebe2 | phoebe/__init__.py | 1 | 38334 | """
>>> import phoebe
Available environment variables:
* PHOEBE_ENABLE_PLOTTING=TRUE/FALSE (whether to import plotting libraries with phoebe: defaults to True)
* PHOEBE_ENABLE_SYMPY=TRUE/FALSE (whether to attempt to import sympy for constraint algebra: defaults to True if sympy installed, otherwise False)
* PHOEBE_ENA... | gpl-3.0 |
uglyboxer/linear_neuron | net-p3/lib/python3.5/site-packages/matplotlib/contour.py | 10 | 67142 | """
These are classes to support contour plotting and
labelling for the axes class
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import xrange
import warnings
import matplotlib as mpl
import numpy as np
from numpy import ma
... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.