repo_name
string
path
string
copies
string
size
string
content
string
license
string
jszymon/pacal
pacal/depvars/copulas.py
1
34667
"""Set of copulas different types""" from __future__ import print_function from pacal.integration import * from pacal.interpolation import * from matplotlib.collections import PolyCollection import pacal.distr #from pacal import * from pacal.segments import PiecewiseDistribution, MInfSegment, PInfSegment, Segment, _...
gpl-3.0
Newman101/scipy
scipy/stats/morestats.py
1
95422
# 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
jmatta1/MIMiC_MDA
mda.py
1
91141
#!/usr/bin/python """This program performs a multipole decomposition analysis of the data and options given in the configuration file. First it finds starting points using the BFGS algorithm from a variety of starting positions given in the config file. Then it takes those starting points, refines them and finds parame...
gpl-3.0
TomAugspurger/pandas
pandas/tests/reductions/test_reductions.py
1
44516
from datetime import datetime, timedelta import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DataFrame, DatetimeIndex, Index, NaT, Period, PeriodIndex, RangeIndex, Series, Timedelta, TimedeltaIndex, Timestamp, isna, timedelta_r...
bsd-3-clause
daniJb/glyco-analysis
source/Glycogen_analysis_v2_bl274.py
1
81108
# Glycogen_analysis.py (C) 2015, Heikki Lehvaeslaiho, Corrado Cali, Jumana Baghabra, Daniya Boges # # 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, o...
gpl-3.0
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/tseries/tdi.py
1
31346
""" implement the TimedeltaIndex """ import operator import datetime from datetime import timedelta import numpy as np from pandas.core.common import (ABCSeries, _TD_DTYPE, _INT64_DTYPE, is_timedelta64_dtype, _maybe_box, _values_from_object, isnull, is_i...
mit
kgullikson88/Telluric-Fitter
src/TelluricFitter.py
1
65202
""" Telluric Fitter "TelFit" ===================================================== This module provides the 'TelluricFitter' class, used to fit the telluric lines in data. Usage: - Initialize fitter: fitter = TelluricFitter() - Define variables to fit: must provide a dictionary where the key is the name of t...
mit
gautam1858/tensorflow
tensorflow/tools/compatibility/tf_upgrade_v2_test.py
1
41905
# 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
MJuddBooth/pandas
scripts/tests/test_validate_docstrings.py
1
34703
import io import random import string import textwrap import pytest import numpy as np import pandas as pd import validate_docstrings validate_one = validate_docstrings.validate_one class GoodDocStrings(object): """ Collection of good doc strings. This class contains a lot of docstrings that should pass...
bsd-3-clause
googleinterns/cabby
cabby/geo/walk.py
1
32147
# coding=utf-8 # Copyright 2020 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 to ...
apache-2.0
mariusvniekerk/ibis
ibis/sql/tests/test_compiler.py
1
63094
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
dimonaks/siman
siman/analysis.py
1
48284
# -*- coding: utf-8 -*- #Copyright Aksyonov D.A from __future__ import division, unicode_literals, absolute_import import os, copy, shutil, sys import numpy as np try: import scipy from scipy import interpolate # from scipy.interpolate import spline # print (scipy.__version__) # print (dir(inter...
gpl-2.0
ganong123/HARK
gn/old/cons_model.py
1
74777
# -*- coding: utf-8 -*- """ Created on Mon Jun 20 15:55:59 2016 @author: ganong """ import os os.environ["R_HOME"] = "/Library/Frameworks/R.framework/Resources" os.chdir("/Users/ganong/repo/HARK-comments-and-cleanup/gn") out_path = "~/dropbox/hampra/out/" import settings import sys sys.path.insert(0,'../') sys.path.i...
apache-2.0
mattip/numpy
numpy/linalg/linalg.py
1
89483
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
bsd-3-clause
majetideepak/arrow
python/pyarrow/tests/test_pandas.py
1
108412
# -*- 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
datapythonista/pandas
pandas/tests/reductions/test_reductions.py
1
49340
from datetime import ( datetime, timedelta, ) import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DataFrame, DatetimeIndex, Index, NaT, Period, PeriodIndex, RangeIndex, Series, Timedelta, TimedeltaIndex, Timestamp, date_ran...
bsd-3-clause
bccp/nbodykit
nbodykit/extern/docrep.py
1
34235
import types import six import inspect import re from warnings import warn def dedents(s): warn("The dedent function has been depreceated and will be removed soon. " "Use inspect.cleandoc instead", DeprecationWarning, stacklevel=2) return inspect.cleandoc(s) __version__ = '0.2.7' __author__ = 'Phi...
gpl-3.0
puruckertom/ubertool
ubertool/ted/ted_functions.py
1
158720
from __future__ import division # brings in Python 3.0 mixed type calculation rules import logging import numpy as np from numpy import math import pandas as pd import math class TedFunctions(object): """ Function class for TED model. """ def __init__(self): """Class representing the functio...
unlicense
hagne/atm-py
atmPy/aerosols/size_distribution/sizedistribution.py
1
146186
from copy import deepcopy import numpy as _np import matplotlib.pylab as _plt from matplotlib.colors import LogNorm from matplotlib.ticker import MaxNLocator as _MaxNLocator from atmPy.tools import plt_tools, math_functions, array_tools from atmPy.tools import pandas_tools as _panda_tools from atmPy.general import ti...
mit
mrkm4ntr/incubator-airflow
tests/providers/google/cloud/hooks/test_bigquery.py
1
73943
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
GuessWhoSamFoo/pandas
pandas/tests/frame/test_dtypes.py
1
41479
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import timedelta import numpy as np import pytest from pandas.compat import u from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype import pandas as pd from pandas import ( Categorical, DataFrame, Series, Timedelta, ...
bsd-3-clause
henry0312/LightGBM
python-package/lightgbm/dask.py
1
40941
# coding: utf-8 """Distributed training with LightGBM and dask.distributed. This module enables you to perform distributed training with LightGBM on dask.Array and dask.DataFrame collections. It is based on dask-lightgbm, which was based on dask-xgboost. """ import socket from collections import defaultdict from copy...
mit
arokem/scipy
scipy/special/add_newdocs.py
1
236527
# 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_pyx.py to generate the docstrings for the ufuncs in # scipy.special at the C level...
bsd-3-clause
webmasterraj/FogOrNot
flask/lib/python2.7/site-packages/pandas/tseries/tdi.py
2
31360
""" implement the TimedeltaIndex """ import operator import datetime from datetime import timedelta import numpy as np from pandas.core.common import (ABCSeries, _TD_DTYPE, _INT64_DTYPE, is_timedelta64_dtype, _maybe_box, _values_from_object, isnull, is_i...
gpl-2.0
hposborn/Namaste
namaste/run.py
1
66119
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' :py:mod:`Namaste.py` - Single transit fitting code ------------------------------------- ''' import numpy as np import pylab as plt import scipy.optimize as optimize from os import sys, path import datetime import logging import pandas as pd import click import emcee...
mit
rseubert/scikit-learn
sklearn/tree/tree.py
3
32977
""" 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
hchauvet/beampy
beampy/modules/core.py
1
58005
# -*- coding: utf-8 -*- """ Created on Sun Oct 25 20:33:18 2015 @author: hugo """ from beampy import document from beampy.functions import (gcs, create_element_id, check_function_args, get_command_line, convert_unit, pre_cache_svg_image, ...
gpl-3.0
jmargeta/scikit-learn
sklearn/linear_model/stochastic_gradient.py
2
40489
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD Style. """Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod import w...
bsd-3-clause
MKLab-ITI/reveal-user-classification
reveal_user_classification/reveal/utility.py
1
31544
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import time import json import itertools import datetime import numpy as np import scipy.sparse as spsp from sklearn.preprocessing import normalize import networkx as nx from networkx.algorithms.link_analysis import pagerank_scipy from collections import OrderedDict, ...
apache-2.0
depet/scikit-learn
sklearn/cross_validation.py
1
49981
""" 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
brightchen/h2o-3
h2o-py/h2o/h2o.py
1
78121
import warnings warnings.simplefilter('always', DeprecationWarning) import os import itertools import functools import os.path import re import urllib import urllib2 import imp import tabulate from connection import H2OConnection from job import H2OJob from expr import ExprNode from frame import H2OFrame, _py_tmp_key, ...
apache-2.0
sphinx-gallery/sphinx-gallery
sphinx_gallery/gen_rst.py
1
40601
# -*- coding: utf-8 -*- # Author: Óscar Nájera # License: 3-clause BSD """ RST file generator ================== Generate the rst files for the examples by iterating over the python example files. Files that generate images should start with 'plot'. """ from __future__ import division, print_function, absolute_impor...
bsd-3-clause
ADicksonLab/wepy
src/wepy/analysis/network.py
1
52176
"""Module that allows for imposing a kinetically connected network structure of weighted ensemble simulation data. """ from collections import defaultdict from copy import deepcopy import gc import numpy as np import networkx as nx from wepy.analysis.transitions import ( transition_counts, counts_d_to_matrix...
mit
Karel-van-de-Plassche/QLKNN-develop
qlknn/NNDB/model.py
1
67000
import inspect import os import sys import json import subprocess import socket import re import traceback import operator from warnings import warn from functools import reduce from itertools import chain from collections import OrderedDict import itertools import copy import numpy as np import pandas as pd from peew...
mit
AndKe/MAVProxy
MAVProxy/tools/MAVExplorer.py
1
34188
#!/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
antmd/graph-tool
src/graph_tool/centrality/__init__.py
2
42040
#! /usr/bin/env python # -*- coding: utf-8 -*- # # graph_tool -- a general graph manipulation python module # # Copyright (C) 2006-2015 Tiago de Paula Peixoto <tiago@skewed.de> # # 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...
gpl-3.0
xuwei0455/hedge
bin/ctaBackTesting.py
1
32917
# -*- coding: utf-8 -*- """ 本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 """ from __future__ import division from collections import OrderedDict from datetime import datetime, timedelta from itertools import product import pymongo from vnpy.engine.cta.ctaBase import CtaTickData, StopOrder from vnpy.engine...
mit
manterd/myPhyloDB
functions/analysis/wgcna_graphs.py
1
53496
import datetime from django.http import HttpResponse import logging import numpy as np from natsort import natsorted import pandas as pd from pyper import * from PyPDF2 import PdfFileReader, PdfFileMerger import json import sys import functions reload(sys) sys.setdefaultencoding('utf8') LOG_FILENAME = 'error_log.tx...
gpl-3.0
alashkov83/md_utils
multigraph_tk.py
1
31965
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Created on Tue Oct 18 14:38:07 2016. @author: lashkov """ import os.path import random import re import sys import tkinter as tk from math import factorial from tkinter.filedialog import askopenfilename from tkinter.filedialog import asksaveasfilename from tkinter.me...
gpl-3.0
adwaitjog/mafia
aerialvision/guiclasses.py
2
120821
#!/usr/bin/env python # Copyright (C) 2009 by Aaron Ariel, Wilson W. L. Fung, Tor M. Aamodt, Andrew # Turner and the University of British Columbia, Vancouver, # BC V6T 1Z4, All Rights Reserved. # # THIS IS A LEGAL DOCUMENT BY DOWNLOADING GPGPU-SIM, YOU ARE AGREEING TO THESE # TERMS AND CONDITIONS. # # THIS SOFTWA...
gpl-3.0
agiovann/CalBlitz
calblitz/granule_cells/utils_granule.py
1
44647
# -*- coding: utf-8 -*- """ Created on Tue Feb 16 17:56:14 2016 @author: agiovann """ import os import cv2 import h5py import numpy as np import pylab as pl from glob import glob # import ca_source_extraction as cse import calblitz as cb from scipy import signal import scipy import sys from ipyparallel import Client f...
gpl-3.0
vortex-ape/scikit-learn
sklearn/tests/test_pipeline.py
5
35854
""" Test the pipeline module. """ from distutils.version import LooseVersion from tempfile import mkdtemp import shutil import time import pytest import numpy as np from scipy import sparse from sklearn.externals.six.moves import zip from sklearn.utils.testing import assert_raises from sklearn.utils.testing import as...
bsd-3-clause
hhbyyh/spark
python/pyspark/sql/tests/test_pandas_udf_scalar.py
4
34264
# # 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
danielvdende/incubator-airflow
airflow/www/views.py
1
111409
# -*- 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
pjryan126/solid-start-careers
store/api/zillow/venv/lib/python2.7/site-packages/pandas/tseries/tdi.py
1
32271
""" implement the TimedeltaIndex """ from datetime import timedelta import numpy as np from pandas.core.common import (ABCSeries, _TD_DTYPE, _INT64_DTYPE, _maybe_box, _values_from_object, isnull, is_integer, is_float) from ...
gpl-2.0
jimsrc/seatos
shared_lib/shared_funcs_test.py
1
37449
from numpy import * from pylab import * from datetime import datetime, time, timedelta import numpy as np import console_colors as ccl from scipy.io.netcdf import netcdf_file from ShiftTimes import * import os import matplotlib.patches as patches import matplotlib.transforms as transforms #from read_NewTable import ts...
mit
RJT1990/pyflux
pyflux/garch/segarchm.py
1
36692
import sys if sys.version_info < (3,): range = xrange import numpy as np import pandas as pd import scipy.stats as ss import scipy.special as sp from .. import families as fam from .. import output as op from .. import tests as tst from .. import tsm as tsm from .. import gas as gas from .. import data_check as d...
bsd-3-clause
Chiroptera/QCThesis
MyML/EAC/eac.py
3
32661
# -*- coding: utf-8 -*- """ Created on 10-04-2015 @author: Diogo Silva Evidence accumulation clustering. This module aims to include all features of the Matlab toolbox plus addressing NxK co-association matrices. TODO: - clustering of non-square co-association matrix - link everything - add sanity checks on number o...
mit
jld23/saspy
saspy/sasdata.py
1
47921
# # Copyright SAS Institute # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
DSSG-paratransit/main_repo
Access_Analysis_Project/Scripts/4moDeadheadResultsToCsvParalleled.py
1
961533
import multiprocessing as mp import numpy as np import pandas as pd import os def findZeroes(row, numRows): os.system(['clear', 'cls'][os.name == 'nt']) print row print str(float(row.name) / numRows * 100) + '%' + ' done' busRun = data[(data['ServiceDate'] == row[0]) & (data['Run'] == row[1])] if ...
agpl-3.0
epierson9/multiphenotype_methods
general_autoencoder.py
1
32775
import numpy as np from multiphenotype_utils import (get_continuous_features_as_matrix, add_id, remove_id_and_get_mat, partition_dataframe_into_binary_and_continuous, divide_idxs_into_batches) import pandas as pd import tensorflow as tf from dimreducer import DimReducer import time from scipy.stats import pearsonr...
mit
drammock/mne-python
mne/tests/test_evoked.py
4
32784
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Andrew Dykstra <andrew.r.dykstra@gmail.com> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) from copy import deepcopy import os.path as op import pickle import numpy as np fr...
bsd-3-clause
lnls-fac/apsuite
apsuite/lattice_errors.py
1
37194
import numpy as _np import matplotlib.pyplot as _plt import scipy.stats as _scystat import pyaccel as _pyaccel import lnls as _lnls ERRORTYPES = ('x','y','roll','excit','k_dip') def generate_errors(acc, mags=None, girder=None, fam_data=None, nr_mach=20, cutoff=1, rndtype='gauss', seed=42424242): """Gene...
mit
gengliangwang/spark
python/pyspark/pandas/strings.py
1
71365
# # 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
RJT1990/pyflux
pyflux/arma/arma.py
1
41322
import sys if sys.version_info < (3,): range = xrange import numpy as np import pandas as pd import scipy.stats as ss import scipy.special as sp from .. import families as fam from .. import output as op from .. import tests as tst from .. import tsm as tsm from .. import data_check as dc from .arma_recursions i...
bsd-3-clause
lukeiwanski/tensorflow-opencl
tensorflow/contrib/learn/python/learn/estimators/dnn_test.py
2
55713
# 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
marcocaccin/scikit-learn
sklearn/metrics/pairwise.py
1
45783
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais <philippe.gervais@inria.fr> # Lars Buitinck ...
bsd-3-clause
flightgong/scikit-learn
sklearn/decomposition/dict_learning.py
2
43124
""" 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
chrhartm/pg_tools
pg_tools.py
1
31558
import sqlalchemy import collections import os import sys import time import subprocess import luigi import luigi.target from luigi import configuration import logging import pandas.io.sql class PgSQLDatabase(pandas.io.sql.SQLDatabase): """ This class is modified from util.py in https://github.com/dssg/drain/...
mit
antoinecarme/pyaf
pyaf/CodeGen/TS_CodeGen_Objects.py
1
47821
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys import string import random from sqlalchemy.engine import reflection import sqla...
bsd-3-clause
Erotemic/plottool
plottool_ibeis/nx_helpers.py
1
65069
# -*- coding: utf-8 -*- """ Helpers for graph plotting References: http://www.graphviz.org/content/attrs http://www.graphviz.org/doc/info/attrs.html Ignore: http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi pip uninstall pydot pip uninstall pyparsing pip install -Iv https:/...
apache-2.0
SmokinCaterpillar/pypet
pypet/tests/unittests/storage_test.py
1
36547
__author__ = 'Robert Meyer' import os import numpy as np import pandas as pd from scipy import sparse as spsp import tables as pt from pypet import Trajectory, Parameter, load_trajectory, ArrayParameter, SparseParameter, \ SparseResult, Result, NNGroupNode, ResultGroup, ConfigGroup, DerivedParameterGroup, \ ...
bsd-3-clause
hande-qmc/hande
tools/pyhande/tests/test_dmqmc.py
1
37159
"""Tests for dmqmc.py.""" import unittest import copy import pandas as pd import numpy as np import pyhande.dmqmc as dmqmc import tests.create_mock_df as create_mock_df class TestAnalyseObservables(unittest.TestCase): """Test dmqmc.analyse_observables.""" def setUp(self): # Create mock pandas datafra...
lgpl-2.1
AutonomyLab/deep_intent
code/autoencoder_model/scripts/sigmoid_classifier.py
1
35476
from __future__ import absolute_import from __future__ import division from __future__ import print_function from matplotlib.pyplot import axes import hickle as hkl import numpy as np np.random.seed(2 ** 10) import tensorflow as tf from keras import backend as K K.set_image_dim_ordering('tf') from keras import regul...
bsd-3-clause
pydata/xarray
xarray/tests/test_computation.py
1
62865
import functools import operator import pickle from distutils.version import LooseVersion import numpy as np import pandas as pd import pytest from numpy.testing import assert_allclose, assert_array_equal import xarray as xr from xarray.core.alignment import broadcast from xarray.core.computation import ( _UFuncS...
apache-2.0
maheshakya/scikit-learn
sklearn/svm/classes.py
2
35065
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_array, check_X_y ...
bsd-3-clause
airbnb/caravel
superset/models/core.py
1
45677
# 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
cjayb/mne-python
mne/preprocessing/ica.py
1
113755
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD (3-clause) from inspect import isfunction from collections import namedtuple from copy import deepcopy from...
bsd-3-clause
chrisburr/scikit-learn
sklearn/linear_model/coordinate_descent.py
1
76410
# 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
buguen/pylayers
pylayers/util/geomutil.py
1
154830
# -*- coding:Utf-8 -*- """ .. currentmodule:: pylayers.util.geomutil ================================================= Geometry Module (:mod:`pylayers.util.geomutil`) ================================================ Geomview Class ============== .. autosummary:: :toctree: generated/ Geomview.__init__ Geomview.s...
lgpl-3.0
shoyer/xray
xarray/core/common.py
1
42259
from collections import OrderedDict from contextlib import suppress from textwrap import dedent from typing import ( Any, Callable, Hashable, Iterable, Iterator, List, Mapping, MutableMapping, Optional, Tuple, TypeVar, Union) import numpy as np import pandas as pd from . import dtypes, duck_array_ops, formatt...
apache-2.0
fhorinek/MotionLog
psychosonda_bt_ng192/utils/measConvertAndPlot.py
1
34436
#!/usr/bin/python import sys import os import ntpath import struct import argparse import ConfigParser import Tkinter import FileDialog import matplotlib import matplotlib.image as mplimage from bdfExport import BDFexport import Tkinter, tkFileDialog from pylab import * csvDirectoryName = "" path = "" defaultPatientI...
gpl-2.0
idies/pyJHTDB
pyJHTDB/test.py
1
37165
######################################################################## # # Copyright 2014 Johns Hopkins University # # 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...
apache-2.0
jaeilepp/mne-python
mne/viz/epochs.py
1
69901
"""Functions to plot epochs data.""" # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.f...
bsd-3-clause
arokem/scipy
scipy/signal/ltisys.py
1
124380
""" 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
ligovirgo/seismon
seismon/utils.py
1
52057
#!/usr/bin/python import os, sys, code, glob, optparse, shutil, warnings, matplotlib, pickle, math, copy, pickle, time import numpy as np import scipy.signal, scipy.stats, scipy.fftpack from collections import namedtuple from datetime import datetime, timedelta from lxml import etree import astropy.time from astropy ...
gpl-3.0
rabrahm/ceres
pucheros/pucherospipe.py
1
41255
import sys import matplotlib matplotlib.use("Agg") from pylab import * base = '../' sys.path.append(base+"utils/Correlation") sys.path.append(base+"utils/OptExtract/") sys.path.append(base+"utils/GLOBALutils") baryc_dir= base+'utils/SSEphem/' sys.path.append(baryc_dir) ephemeris='DEc403' import matplotlib.pyplot a...
mit
toobaz/pandas
pandas/plotting/_matplotlib/converter.py
1
37142
import datetime as pydt from datetime import datetime, timedelta import warnings from dateutil.relativedelta import relativedelta import matplotlib.dates as dates from matplotlib.ticker import AutoLocator, Formatter, Locator from matplotlib.transforms import nonsingular import matplotlib.units as units import numpy as...
bsd-3-clause
ozak/folium
folium/folium.py
1
42635
# -*- 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
css-lucas/GAT
gat/core/sna/sna.py
1
39605
import tempfile import matplotlib.pyplot as plt import networkx as nx import numpy as np import xlrd from networkx.algorithms import bipartite as bi from networkx.algorithms import centrality from itertools import product from collections import defaultdict from flask import jsonify import pandas as pd import datetime ...
mit
dsm054/pandas
pandas/tests/io/formats/test_to_html.py
1
49394
# -*- coding: utf-8 -*- import re from textwrap import dedent from datetime import datetime from distutils.version import LooseVersion import pytest import numpy as np import pandas as pd from pandas import compat, DataFrame, MultiIndex, option_context, Index from pandas.compat import u, lrange, StringIO from pandas....
bsd-3-clause
magne-max/zipline-ja
zipline/testing/fixtures.py
1
47790
import sqlite3 from unittest import TestCase from contextlib2 import ExitStack from logbook import NullHandler, Logger from six import with_metaclass, iteritems from toolz import flip import pandas as pd import responses from .core import ( create_daily_bar_data, create_minute_bar_data, tmp_dir, ) from .....
apache-2.0
humdings/zipline
tests/pipeline/test_filter.py
2
34156
""" Tests for filter terms. """ from functools import partial from itertools import product from operator import and_ from toolz import compose from numpy import ( arange, argsort, array, eye, float64, full, inf, isfinite, nan, nanpercentile, ones, ones_like, putmask...
apache-2.0
tbarbette/clickwatcher
npf/grapher.py
1
84538
import io import math import re import natsort from orderedset._orderedset import OrderedSet import copy import traceback from collections import OrderedDict from typing import List import numpy as np from pygtrie import Trie from npf.types import dataset from npf.types.dataset import Run, XYEB, group_val from npf.va...
gpl-3.0
jhseu/tensorflow
tensorflow/tools/compatibility/tf_upgrade_v2_test.py
1
100321
# Lint as: python2, python3 # 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 # ...
apache-2.0
TissueMAPS/TmLibrary
tmlib/workflow/jterator/api.py
1
34660
# TmLibrary - TissueMAPS library for distibuted image analysis routines. # Copyright (C) 2016, 2018 University of Zurich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version ...
agpl-3.0
CGATOxford/CGATPipelines
obsolete/pipeline_annotations.py
1
90231
"""=================== Annotation pipeline =================== The annotation pipeline imports various third party annotations or creates them for use in other pipelines. The purpose of this pipeline is to automate and standardize the way we retrieve and build genomic annotations but also to allow sharing of annotati...
mit
mcopik/Elemental
python/lapack_like/spectral.py
1
57961
# # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # from ..core import * from ..blas_like import Copy, Entry...
bsd-3-clause
clarkfitzg/xray
xray/conventions.py
1
34675
from datetime import datetime import re import traceback import warnings import numpy as np import pandas as pd from collections import defaultdict from pandas.tslib import OutOfBoundsDatetime from .core import indexing, ops, utils from .core.formatting import format_timestamp, first_n_items from .core.variable impor...
apache-2.0
ritviksahajpal/pygeoutil
pygeoutil/util.py
1
53783
import math import os import errno import pdb import datetime import sys import calendar import subprocess import netCDF4 import rasterio import xarray as xr import numpy as np import pandas as pd from skimage.measure import block_reduce from tqdm import tqdm from . import rgeo # Ignore divide by 0 errors. np.seterr...
mit
MSeifert04/astropy
astropy/stats/funcs.py
1
60158
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains simple statistical algorithms that are straightforwardly implemented as a single python function (or family of functions). This module should generally not be used directly. Everything in `__all__` is imported into `astropy.stats...
bsd-3-clause
vdrhtc/Measurement-automation
lib3/core/drivers/spectrum_m4x.py
1
48676
""" We are using Spectrum m4x2212-x4 https://spectrum-instrumentation.com/en/m4x2212-x4 manual: https://spectrum-instrumentation.com/sites/default/files/download/m4i_m4x_22xx_manual_english.pdf datasheet: https://spectrum-instrumentation.com/sites/default/files/download/m4x22_datasheet_english.pdf """ # Standard lib...
gpl-3.0
ebrahimraeyat/civilTools
applications/section/pre/sections.py
1
76816
import numpy as np import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt from pre import pre # from post import post # TODO: ensure dimensions are floats class Geometry: """Parent class for a cross-section geometry input. Provides an interface for the user to specify the geometry defini...
gpl-3.0
JamesPHoughton/pysd
pysd/py_backend/external.py
1
34879
""" These classes are a collection of the needed tools to read external data. The External type objects created by these classes are initialized before the Stateful objects by functions.Model.initialize. """ import re import os import warnings import pandas as pd # TODO move to openpyxl import numpy as np import xarr...
mit
mdaal/KIDs-DAQ-75uW
Measurement_Managers.py
1
59697
import Instruments import Fridge_Interfaces import os, io, datetime, time import logging import numpy as np # developed with version 1.10.4 import scipy as sp #developed with version 0.17.0 from scipy import signal import tables import matplotlib as mpl import matplotlib.pyplot as plt import contextlib import KAM da...
gpl-3.0
GuessWhoSamFoo/pandas
pandas/io/formats/style.py
1
46520
""" Module for applying conditional formatting to DataFrames and Series. """ from collections import defaultdict from contextlib import contextmanager import copy from functools import partial from itertools import product from uuid import uuid1 import numpy as np from pandas.compat import range from pandas.util._de...
bsd-3-clause
cython-testbed/pandas
pandas/tests/indexing/test_multiindex.py
2
51189
from warnings import catch_warnings import pytest import numpy as np import pandas as pd from pandas import (Panel, Series, MultiIndex, DataFrame, Timestamp, Index, date_range) from pandas.util import testing as tm from pandas.errors import PerformanceWarning, UnsortedIndexError from pandas.tests.in...
bsd-3-clause
aeklant/scipy
scipy/signal/signaltools.py
1
145636
# Author: Travis Oliphant # 1999 -- 2002 import operator import math import sys import timeit from scipy.spatial import cKDTree from . import sigtools, dlti from ._upfirdn import upfirdn, _output_len, _upfirdn_modes from scipy import linalg, fft as sp_fft from scipy.fft._helper import _init_nd_shape_and_axes import nu...
bsd-3-clause
petewarden/tensorflow
tensorflow/tools/compatibility/renames_v2.py
1
61218
# 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
pywr/pywr
tests/test_parameters.py
1
69326
""" Test for individual Parameter classes """ from pyparsing import col from pywr.core import Model, Timestep, Scenario, ScenarioIndex, Storage, Link, Input, Output, Catchment from pywr.parameters import (Parameter, ArrayIndexedParameter, ConstantScenarioParameter, ArrayIndexedScenarioMonthlyFactorsParameter, Mont...
gpl-3.0