repo_name
string
path
string
copies
string
size
string
content
string
license
string
jungmannlab/picasso
picasso/gui/nanotron.py
1
49093
""" gui/nanotron ~~~~~~~~~~~~~~~~~~~~ Graphical user interface for classification using deep learning :author: Alexander Auer, Maximilian Strauss 2020 :copyright: Copyright (c) 2020 Jungmann Lab, MPI of Biochemistry """ import os.path as _ospath import os import sys import traceback from tqdm imp...
mit
openego/eDisGo
edisgo/tools/pypsa_io_lopf.py
1
38036
""" This modules provides tools to convert graph based representation of the grid topology to PyPSA data model. Call :func:`to_pypsa` to retrieve the PyPSA grid container. """ from edisgo.grid.components import Transformer, Line, LVStation import numpy as np import pandas as pd import itertools from math import pi, s...
agpl-3.0
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/backends/backend_ps.py
1
60941
""" A PostScript backend, which can produce both PostScript .ps and .eps """ # PY3KTODO: Get rid of "print >>fh" syntax 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 io try: from hashlib import md5 except ImportEr...
gpl-3.0
cython-testbed/pandas
pandas/tests/indexes/test_base.py
1
97648
# -*- coding: utf-8 -*- import pytest from datetime import datetime, timedelta from decimal import Decimal from collections import defaultdict import pandas.util.testing as tm from pandas.core.dtypes.generic import ABCIndex from pandas.core.dtypes.common import is_unsigned_integer_dtype from pandas.core.indexes.api ...
bsd-3-clause
Star2Billing/cdr-stats
cdr_stats/cdr/views.py
1
37698
# # CDR-Stats License # http://www.cdr-stats.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The Initial Develope...
mpl-2.0
Ensembles/ert
python/python/ert/ecl/ecl_sum.py
1
44919
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'ecl_sum.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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...
gpl-3.0
stefangri/s_s_productions
PHY641/V70_Vakuumphysik/Messdaten/auswertung.py
1
30625
import numpy as np import uncertainties.unumpy as unp from uncertainties import ufloat from uncertainties.unumpy import nominal_values as noms from uncertainties.unumpy import std_devs as stds from uncertainties import correlated_values import math from scipy.optimize import curve_fit import matplotlib.pyplot as plt fr...
mit
PalNilsson/pilot2
pilot/user/atlas/container.py
1
41706
#!/usr/bin/env python # 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 # # Authors: # - Paul Nilsson, paul.nilsson@cern.ch, 2017-2020 # - Alexander B...
apache-2.0
losonczylab/sima
examples/ConnectToEC2.py
3
41274
#!/usr/bin/env python """ Written by Vijay MK Namboodiri and Randall L Ung of the Stuber lab at UNC-CH Disclaimer: Some of the structure of this code is borrowed from a similar script included in Thunder (http://thunder-project.org/) for the set up of a cluster on AWS. There is no actual or implied warranty for the ...
gpl-2.0
par2/lamana
lamana/tests/test_utils.py
1
42070
#------------------------------------------------------------------------------ '''Test for consistency of utils.''' # CAUTION: This module writes and removes temporary files in the "export" dir import os import sys import abc import logging import tempfile import difflib ##import collections as ct import nose.tools...
bsd-3-clause
zhouyao1994/incubator-superset
superset/db_engine_specs/base.py
1
31673
# 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
RPGOne/Skynet
gen_rst.py
2
40257
""" 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
DGrady/pandas
pandas/io/formats/format.py
2
86986
# -*- coding: utf-8 -*- """ Internal module for formatting output data in csv, html, and latex files. This module also applies to display formatting. """ from __future__ import print_function from distutils.version import LooseVersion # pylint: disable=W0141 from textwrap import dedent from pandas.core.dtypes.missin...
bsd-3-clause
biocore/qiime2
qiime2/metadata/tests/test_metadata.py
1
59565
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
SiccarPoint/numpy
numpy/lib/function_base.py
1
154129
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
ArijanaBrlek/superset
superset/views/core.py
1
82091
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict from datetime import datetime, timedelta import json import logging import pandas as pd import pickle import re import time import tra...
apache-2.0
perryjohnson/biplaneblade
biplane_blade_lib/prep_stn22_mesh.py
1
31043
"""Write initial TrueGrid files for one biplane blade station. Usage ----- start an IPython (qt)console with the pylab flag: $ ipython qtconsole --pylab or $ ipython --pylab Then, from the prompt, run this script: |> %run biplane_blade_lib/prep_stnXX_mesh.py or |> import biplane_blade_lib/prep_stnXX_mesh ...
gpl-3.0
arranger1044/iterated-pysoner-dilemma
pd.py
1
32742
import numpy import pandas from matplotlib import pyplot as plt import seaborn as sns class IPDGame(object): """ Representing a two players Iterated Prisoner's Dilemma game (IPD) """ def __init__(self, players, payoffs, obs_noise=0.0): """ ...
gpl-3.0
peraktong/Cannon-Experiment
0228_plot_simultaneously_labels.py
1
52106
import numpy as np from astropy.table import Table from astropy.io import fits import matplotlib.pyplot as plt import matplotlib import pickle from TheCannon_2 import dataset,apogee from TheCannon_2 import model pkl_file = open('wl.pkl', 'rb') wl = pickle.load(pkl_file) pkl_file.close() # load path pkl_file = op...
mit
jgliss/geonum
geonum/mapping.py
1
37381
# -*- coding: utf-8 -*- # # Geonum is a Python library for geographical calculations in 3D # Copyright (C) 2017 Jonas Gliss (jonasgliss@gmail.com) # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License a # published by the Free Software Foundation...
gpl-3.0
detrout/debian-statsmodels
statsmodels/base/model.py
1
70648
from __future__ import print_function from statsmodels.compat.python import iterkeys, lzip, range, reduce import numpy as np from scipy import stats from statsmodels.base.data import handle_data from statsmodels.tools.tools import recipr, nan_dot from statsmodels.stats.contrast import ContrastResults from statsmodels.t...
bsd-3-clause
jdanbrown/pydatalab
solutionbox/structured_data/mltoolbox/_structured_data/_package.py
1
30290
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
wbsljh/caravel
caravel/forms.py
1
45943
"""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
sjpet/epysteme
tests/test_sets_sql.py
1
39312
# -*- coding: utf-8 -*- """Unit tests for epysteme/sets/sql.py. Author: Stefan Peterson """ import os import pytest import pandas as pd from .context import epysteme as epy data_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data") test_dates = ["2017-07-20", "2017-07-21", ...
mit
zohannn/motion_manager
scripts/old/task_3_picking/var_0/predicting_task_3_var_0_10k.py
1
280113
#!/usr/bin/env python3 import sys import pandas as pd from sklearn import decomposition from sklearn import metrics from sklearn.externals import joblib import matplotlib.pyplot as plt import tensorflow as tf import numpy as np import math from random import randint # HUPL from HUPL.learner import preprocess_featur...
mit
laijingtao/landlab
landlab/grid/hex.py
1
42705
#! /usr/env/python """ Python implementation of ModelGrid, a base class used to create and manage grids for 2D numerical models. Getting Information about a Grid -------------------------------- The following attributes, properties, and methods provide data about the grid, its geometry, and the connectivity among the ...
mit
jbwhit/fine-structure-inference
finestructure/finestructure.py
1
35752
xlabel_wavelength = r"Wavelength $\left[\AA\right]$" import warnings warnings.filterwarnings('ignore') import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib.patches import Rectangle from matplotlib.pyplot import GridSpec from itertools import combinations, islice, takewhile import seaborn as ...
mit
abigailStev/stingray
stingray/crossspectrum.py
1
34738
from __future__ import division, absolute_import, print_function import numpy as np import scipy import scipy.stats import scipy.fftpack import scipy.optimize from stingray.lightcurve import Lightcurve from stingray.utils import rebin_data, simon, rebin_data_log from stingray.exceptions import StingrayError from stin...
mit
Erotemic/ibeis
ibeis/scripts/specialdraw.py
1
73472
from __future__ import absolute_import, division, print_function import utool as ut import numpy as np (print, rrr, profile) = ut.inject2(__name__) def nx_makenode(graph, name, **attrkw): if 'size' in attrkw: attrkw['width'], attrkw['height'] = attrkw.pop('size') graph.add_node(name, **attrkw) ret...
apache-2.0
pradyu1993/scikit-learn
sklearn/hmm.py
1
44770
# Hidden Markov Models # # Author: Ron Weiss <ronweiss@gmail.com> # and Shiqiao Du <lucidfrontier.45@gmail.com> # API changes: Jaques Grobler <jaquesgrobler@gmail.com> """ The :mod:`sklearn.hmm` module implements hidden Markov models. **Warning:** :mod:`sklearn.hmm` is orphaned, undocumented and has known numerical s...
bsd-3-clause
dilawar/moose-core
python/rdesigneur/rdesigneur.py
1
73863
# -*- coding: utf-8 -*- ######################################################################### ## rdesigneur0_5.py --- ## This program is part of 'MOOSE', the ## Messaging Object Oriented Simulation Environment. ## Copyright (C) 2014 Upinder S. Bhalla. and NCBS ## It is made available under the terms of th...
gpl-3.0
cadowd/proppy
main.py
1
57116
# -*- coding: utf-8 -*- """ Interface for codes to calculate propeller and motor performance. Copyright 2016 Cameron Dowd This file is part of PropPy. PropPy 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 Founda...
gpl-3.0
nixingyang/Kaggle-Competitions
Bengali.AI Handwritten Grapheme Classification/solution.py
1
36312
import os import pickle import shutil import sys from collections import OrderedDict from datetime import datetime import cv2 import larq as lq import matplotlib import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from sklearn.model_selection import StratifiedKFold from tensorflow.python.keras i...
mit
datapythonista/pandas
pandas/core/groupby/groupby.py
1
106961
""" Provide the groupby split-apply-combine paradigm. Define the GroupBy class providing the base-class of operations. The SeriesGroupBy and DataFrameGroupBy sub-class (defined in pandas.core.groupby.generic) expose these user-facing objects to provide specific functionality. """ from __future__ import annotations fr...
bsd-3-clause
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/tests/dtypes/test_inference.py
1
48795
""" These the test the public routines exposed in types/common.py related to inference and not otherwise tested in types/test_common.py """ import collections from datetime import date, datetime, time, timedelta from decimal import Decimal from fractions import Fraction from io import StringIO from numbers import Numb...
apache-2.0
ranaroussi/ezibpy
ezibpy/ezibpy.py
1
87918
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # ezIBpy: a Pythonic Client for Interactive Brokers API # https://github.com/ranaroussi/ezibpy # # Copyright 2015-2019 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
apache-2.0
neuropoly/spinalcordtoolbox
spinalcordtoolbox/straightening.py
1
34333
#!/usr/bin/env python # -*- coding: utf-8 # Functions dealing with spinal cord straightening # TODO: move _get_centerline inside Class # TODO: only input Image instead of file names import os import time import logging import inspect import bisect import numpy as np from nibabel import Nifti1Image, save from spinal...
mit
SGenheden/Scripts
Membrane/wham.py
1
34313
# Author: Samuel Genheden samuel.genheden@gmail.com """ Routines and classes to read in output files from umbrella sampling, execute weighted histogram analysis method (WHAM) and calculate the PMF along a 1D reaction coordinate """ import os import tempfile import shutil import subprocess import numpy as np import n...
mit
Autoplectic/dit
dit/algorithms/pid_broja.py
1
36533
# -*- coding: utf-8 -*- """ Partial information decompositions and Maxent decompositions of I[sources : target] """ from __future__ import division, print_function from debtcollector import removals import logging from collections import defaultdict import itertools import numpy as np import dit from ..utils ...
bsd-3-clause
cbertinato/pandas
pandas/tests/computation/test_eval.py
1
70193
from distutils.version import LooseVersion from functools import reduce from itertools import product import operator import warnings import numpy as np from numpy.random import rand, randint, randn import pytest from pandas.errors import PerformanceWarning import pandas.util._test_decorators as td from pandas.core....
bsd-3-clause
sileht/gnocchi
gnocchi/carbonara.py
1
34814
# -*- encoding: utf-8 -*- # # Copyright © 2016-2018 Red Hat, Inc. # Copyright © 2014-2015 eNovance # # 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/LICE...
apache-2.0
dssg/wikienergy
disaggregator/build/pandas/pandas/io/parsers.py
1
83207
""" Module contains tools for processing files into DataFrames or other objects """ from __future__ import print_function from pandas.compat import range, lrange, StringIO, lzip, zip, string_types, map from pandas import compat import re import csv import warnings import numpy as np from pandas.core.index import Inde...
mit
whitead/plumed_grids
plumed_grids.py
1
31073
# # plumed_grids.py # # Written by Andrew White # See LICENSE and README file included in repo # from __future__ import absolute_import, division, print_function from math import ceil, floor, log, exp, pi, copysign import numpy as np from scipy.integrate import simps import copy NDITER = True try: np.nditer exce...
gpl-2.0
google/timesketch
api_client/python/timesketch_api_client/search.py
1
35521
# Copyright 2020 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
puruckertom/ubertool
ubertool/beerex/beerex_exe.py
1
37973
from __future__ import division #brings in Python 3.0 mixed type calculations import numpy as np import os import pandas as pd import sys #find parent directory and import model parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) from base.uber_model impo...
unlicense
gracecox/MagPySV
magpysv/gvo_tools.py
1
50222
# -*- coding: utf-8 -*- # Copyright (C) 2020 Grace Cox and Will Brown (British Geological Survey) # # Released under the MIT license, a copy of which is located at the root of # this project. """Module containing functions to apply the Principal Component Analysis (PCA) denoising method to Geomagnetic Virtual...
mit
sostenibilidad-unam/abm2
empirical_py/model.py
1
30005
# coding: utf-8 from sqlalchemy import Column, Integer, ForeignKey, Float, Boolean, String from sqlalchemy.orm import mapper, relationship from sqlalchemy.ext.declarative import declarative_base import random import pandas as pd Base = declarative_base() wf = [0.0625, 0.125, 0.25, 0.5, 1] wfi = [1, 0.5, 0.25, 0.125...
gpl-3.0
schwarty/nignore
openfmri.py
1
32457
import os import re import glob import csv import copy import shutil import warnings import nibabel as nb import numpy as np from sklearn.pipeline import Pipeline from nilearn.input_data import MultiNiftiMasker from nilearn.input_data import NiftiMasker from nilearn.image.resampling import resample_img # from nignore...
bsd-3-clause
kiliakis/BLonD
impedances/impedance.py
1
38779
# Copyright 2015 CERN. This software is distributed under the # terms of the GNU General Public Licence version 3 (GPL Version 3), # copied verbatim in the file LICENCE.md. # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Or...
gpl-3.0
sniemi/SamPy
sandbox/src/COSFUVSensitivityAndSAAMapping.py
1
34574
''' Adapted from Merle Reinhard's HST script. http://stevendkay.wordpress.com/2009/10/12/scatter-plots-with-basemap-and-matplotlib/ ''' from mpl_toolkits.basemap import Basemap from pylab import * from matplotlib.font_manager import FontProperties from matplotlib.collections import LineCollection from matplotlib impor...
bsd-2-clause
gfyoung/pandas
pandas/core/groupby/generic.py
1
64967
""" Define the SeriesGroupBy and DataFrameGroupBy classes that hold the groupby interfaces (and some implementations). These are user facing as the result of the ``df.groupby(...)`` operations, which here returns a DataFrameGroupBy object. """ from __future__ import annotations from collections import abc, namedtuple...
bsd-3-clause
kambysese/mne-python
tutorials/discussions/plot_background_filtering.py
4
48036
# -*- coding: utf-8 -*- r""" .. _disc-filtering: =================================== Background information on filtering =================================== Here we give some background information on filtering in general, and how it is done in MNE-Python in particular. Recommended reading for practical applications ...
bsd-3-clause
Djabbz/scikit-learn
sklearn/utils/estimator_checks.py
1
54997
from __future__ import print_function import types import warnings import sys import traceback import pickle from copy import deepcopy import numpy as np from scipy import sparse import struct from sklearn.externals.six.moves import zip from sklearn.externals.joblib import hash, Memory from sklearn.utils.testing imp...
bsd-3-clause
jreback/pandas
pandas/tests/groupby/test_function.py
1
35775
import builtins from io import StringIO import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, date_range, isna import pandas._testing as tm import pandas.core.nanops as nanops from pandas.util import ...
bsd-3-clause
evandromr/stingray
stingray/modeling/parameterestimation.py
1
70252
from __future__ import print_function, division __all__ = ["OptimizationResults", "ParameterEstimation", "PSDParEst", "SamplingResults"] # check whether matplotlib is installed for easy plotting try: import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator can_plot = True exce...
mit
dannyjacobs/PRISim
main/MWA_beamformer_errors_figures_producer.py
1
84130
import numpy as NP import copy from astropy.io import fits from astropy.io import ascii from astropy import coordinates as coord from astropy.coordinates import Galactic, FK5 from astropy import units import astropy.cosmology as CP import scipy.constants as FCNST from scipy import interpolate import matplotlib.mlab as ...
mit
mattwthompson/mdtraj
mdtraj/core/trajectory.py
1
79311
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: Kyle A. Beauchamp, TJ Lane, Jo...
lgpl-2.1
3324fr/spinalcordtoolbox
scripts/msct_smooth.py
1
32233
#!/usr/bin/env python ######################################################################################### # # Module containing fitting functions # # --------------------------------------------------------------------------------------- # Copyright (c) 2014 Polytechnique Montreal <www.neuro.polymtl.ca> # Author...
mit
mdobrychlop/pyry3d_chimera_extension
Calculate.py
1
37311
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # www.genesilico.pl # from numpy import array from random import uniform import shutil from shutil import rmtree import os from copy import deepcopy from Modules.Input...
gpl-3.0
mistercrunch/panoramix
superset/config.py
1
48856
# 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
JGCRI/gcam-driver
cassandra/components.py
1
48620
"""Definitions for the components for models participating in the framework. A "component" is a functional unit that performs a specific step in the coupled model processing pipeline. Generally, a component will correspond to one of the models being coupled, but components can also implement utility processes, such a...
apache-2.0
pmacosta/pplot
pplot/figure.py
1
45520
""" Generate presentation-quality plots. [[[cog import os, sys if sys.hexversion < 0x03000000: import __builtin__ else: import builtins as __builtin__ sys.path.append(os.environ['TRACER_DIR']) import trace_ex_plot_figure exobj_plot = trace_ex_plot_figure.trace_module(no_print=True) ]]] [[[end]]] """ # figure.p...
mit
anntzer/scikit-learn
sklearn/ensemble/_gb.py
2
72848
"""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. Regressi...
bsd-3-clause
GuessWhoSamFoo/pandas
pandas/core/groupby/groupby.py
1
68506
""" Provide the groupby split-apply-combine paradigm. Define the GroupBy class providing the base-class of operations. The SeriesGroupBy and DataFrameGroupBy sub-class (defined in pandas.core.groupby.generic) expose these user-facing objects to provide specific functionailty. """ import collections from contextlib im...
bsd-3-clause
tuqc/lyman
lyman/workflows/preproc.py
1
42536
"""Preprocessing workflow definition.""" import os import os.path as op import numpy as np import pandas as pd import nibabel as nib import matplotlib as mpl import matplotlib.pyplot as plt from sklearn import decomposition as decomp from moss.mosaic import Mosaic import seaborn as sns from nipype.interfaces import ...
bsd-3-clause
fruce-ki/utility_scripts
archive/catch/fileutilities.py
1
69273
#!/usr/bin/env python3 """fileutilities.py Author: Kimon Froussios Last reviewed: 20/02/2020 This module is a solution for Frequently Performed Generic Tasks that involve multiple files: * repeating a command for a range of files (not currently parallelized), * accessing and restructuring (multiple) delimited files....
mit
pizzathief/scipy
scipy/stats/tests/test_morestats.py
2
81056
# Author: Travis Oliphant, 2002 # # Further enhancements and tests added by numerous SciPy developers. # import warnings import numpy as np from numpy.random import RandomState from numpy.testing import (assert_array_equal, assert_almost_equal, assert_array_less, assert_array_almost_equal, assert_, assert_all...
bsd-3-clause
geophysics/mtpy
mtpy/imaging/pek1dplotting.py
1
40985
# -*- coding: utf-8 -*- """ Created on Thu Jun 05 14:59:04 2014 @author: a1655681 """ import os import os.path as op import numpy as np import matplotlib.pyplot as plt import scipy.interpolate as si import mtpy.modeling.pek1dclasses as pek1dc import mtpy.core.edi as mtedi import mtpy.utils.elevation_data as ed from m...
gpl-3.0
bmazin/ARCONS-pipeline
photonlist/photlist.py
1
31331
''' Author: Julian van Eyken Date: May 7 2013 For handling calibrated output photon lists. ''' import time import numpy as np import os.path import warnings import tables from astropy import constants, units import matplotlib.pylab as mpl from headers import pipelineFlags, ArconsHeaders from util import...
gpl-2.0
yavalvas/yav_com
build/matplotlib/lib/mpl_toolkits/axes_grid1/axes_grid.py
1
31842
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
p-lauer/spotpy
spotpy/signatures.py
1
45650
# -*- coding: utf-8 -*- ''' Copyright (c) 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Benjamin Manns This tool holds functions for caclulation of hyrological signatures. It takes Python-lists of simulation and observation data returns the hydrological signature...
mit
evanl/vesa_tough_comparison
tough/t2/t2_input_funcs.py
1
68764
#Author - Evan Leister import numpy as np import matplotlib.pyplot as plt import matplotlib from mpl_toolkits.mplot3d import Axes3D import read_eclipse as re import eclipse_cells as ec from time import clock import string from subprocess import call class T2Input(object): def __init__(self, sim_title, cp_vals, two...
mit
AlexanderWard1/VC3D
Integral Methods/addViscous_Bowcutt.py
1
61090
#%% addViscous.py """ Viscous correction code to augment Cart3D solutions. Alexander Ward April 2017 """ #http://www.dtic.mil/dtic/tr/fulltext/u2/a045367.pdf from math import exp, log, asin, sin import numpy as np import matplotlib.pyplot as plt import pandas as pd from scipy.optimize import brentq...
mit
JudoWill/glue
glue/core/data.py
1
36278
from __future__ import absolute_import, division, print_function import operator import logging import numpy as np import pandas as pd from .contracts import contract from .coordinates import Coordinates from .visual import VisualAttributes from .visual import COLORS from .exceptions import IncompatibleAttribute fro...
bsd-3-clause
danakj/chromium
tools/android/appstats.py
6
37098
#!/usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # 'top'-like memory/network polling for Android apps. import argparse import curses import os import re import sys import time from opera...
bsd-3-clause
msyriac/orphics
orphics/stats.py
1
31385
from __future__ import print_function import numpy as np import time, warnings import itertools import scipy from scipy.stats import binned_statistic as binnedstat,chi2 from scipy.optimize import curve_fit import itertools from pyfisher import FisherMatrix class InverseTransformSampling(object): # Sample from an ...
bsd-2-clause
chrisbarber/dask
dask/array/core.py
1
124512
from __future__ import absolute_import, division, print_function from bisect import bisect from collections import Iterable, MutableMapping from collections import Iterator from functools import partial, wraps import inspect from itertools import product from numbers import Number import operator from operator import ...
bsd-3-clause
gfyoung/scipy
scipy/signal/windows/windows.py
1
73520
"""The suite of window functions.""" from __future__ import division, print_function, absolute_import import operator import warnings import numpy as np from scipy import fftpack, linalg, special from scipy._lib.six import string_types __all__ = ['boxcar', 'triang', 'parzen', 'bohman', 'blackman', 'nuttall', ...
bsd-3-clause
zachmath/HFODD_scripts
cmaps_discretize.py
1
50769
# First portion cannibalized from this StackOverflow answer: # https://stackoverflow.com/a/3380754/11232577 # # Run them in a Python interpreter as follows: # execfile("/home/zachary/Desktop/cmaps_discretize.py"); list_colors(viridis,5) def clamp(x): return max(0, min(x, 255)) def rgb2hex(cmap,ind): r,g,...
gpl-3.0
APMonitor/arduino
2_Regression/Higher_order_MIMO/APM_Python/apm.py
2
36404
# Import import csv import math import os import random import string import time import webbrowser from contextlib import closing import sys # Get Python version ver = sys.version_info[0] #print('Version: '+str(ver)) if ver==2: # Python 2 import urllib else: # Python 3+ import urll...
apache-2.0
louisLouL/pair_trading
capstone_env/lib/python3.6/site-packages/matplotlib/font_manager.py
2
47838
""" 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...
mit
jseabold/statsmodels
statsmodels/stats/diagnostic.py
4
67688
# -*- coding: utf-8 -*- """ Various Statistical Tests Author: josef-pktd License: BSD-3 Notes ----- Almost fully verified against R or Gretl, not all options are the same. In many cases of Lagrange multiplier tests both the LM test and the F test is returned. In some but not all cases, R has the option to choose the ...
bsd-3-clause
sics-sse/moped
position/Optipos/OptiposTools.py
1
33999
''' Created on 26 nov. 2015 @author: Jakob Axelsson ''' from OptiposLib import * import datetime import sys import matplotlib.pyplot as plt def rotateInt(pos, angle, delta): # Calculates the position of pos in a coordinate system which is a translation by delta and a rotation of angle (in degre...
gpl-2.0
pydata/pandas-gbq
pandas_gbq/gbq.py
1
43172
import logging import time import warnings from datetime import datetime import numpy as np # Required dependencies, but treat as optional so that _test_google_api_imports # can provide a better error message. try: from google.api_core import exceptions as google_exceptions from google.cloud import bigquery e...
bsd-3-clause
cuemacro/findatapy
findatapy/market/ioengine.py
1
44510
__author__ = 'saeedamen' # Saeed Amen # # Copyright 2016 Cuemacro # # 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 ...
apache-2.0
nicproulx/mne-python
mne/decoding/csp.py
2
30012
# -*- coding: utf-8 -*- # Authors: Romain Trachel <trachelr@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Alexandre Barachant <alexandre.barachant@gmail.com> # Clemens Brunner <clemens.brunner@gmail.com> # Jean-Remi King <jeanremi.king@gmail.com> # # Lic...
bsd-3-clause
kalepeterson/ghdata
ghdata/ghdata.py
1
32687
#SPDX-License-Identifier: MIT import sqlalchemy as s import pandas as pd import requests import sys if (sys.version_info > (3, 0)): import urllib.parse as url else: import urllib as url import json import re class GHData(object): """Uses GHTorrent and other GitHub data sources and returns dataframes with...
mit
jfinkels/networkx
networkx/drawing/nx_pylab.py
3
33252
# Copyright (C) 2004-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # # Author: Aric Hagberg (hagberg@lanl.gov) """ ********** Matplotlib ********** Draw networks with matplotlib. See Also -------- m...
bsd-3-clause
nguy/AWOT
awot/graph/radar_vertical.py
1
30560
""" awot.graph.radar_vertical ========================= A group of scripts to create vertical radar plots. """ # FUNCTIONS:: # polar_sweep - Plot polar coordinate data on polar coordinate axis # polar_sweep_grid - Plotting transformed data to Cartesian output # sweep_to_Cart - Polar coordinates transformed to Cartesia...
gpl-2.0
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/tests/test_axes.py
1
52178
from nose.tools import assert_equal from nose.tools import assert_raises import numpy as np from numpy import ma import matplotlib from matplotlib.testing.decorators import image_comparison, cleanup import matplotlib.pyplot as plt @image_comparison(baseline_images=['formatter_ticker_001', ...
gpl-3.0
cjayb/mne-python
mne/viz/raw.py
1
47547
"""Functions to plot raw M/EEG data.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # Jaakko Leppakangas <jaeilepp@student.jyu.fi> # Daniel McCloy <dan.mccloy@gmail.com> # # License: Simplified BSD import copy from functools import partial import numpy as np from ..annotations import _annotat...
bsd-3-clause
adamrp/qiita
qiita_db/metadata_template/test/test_sample_template.py
1
94081
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
linan7788626/hackday_03112016
sunpy/sunpy__synthetic_image.py
1
40160
#!/usr/bin/env python """ Defines the synthetic_image class to add image realism to the idealized sunrise images. The synthetic_image class defines a number of routines to take the original image and convolve it with some psf function, add sky noise, rebin to an appropate pixel scale (based on telescope), scale to an ...
mit
goldmedal/spark
python/pyspark/sql/functions.py
1
131992
# # 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
MTgeophysics/mtpy
mtpy/imaging/mtplottools.py
1
75755
# -*- coding: utf-8 -*- """ =========== mtplottools =========== Contains helper functions and classes for plotting @author: jpeacock-pr """ # ============================================================================== import numpy as np # import mtpy.core.mt from mtpy.core import mt import mtpy.core.z as mtz im...
gpl-3.0
chrsrds/scikit-learn
sklearn/tree/tests/test_tree.py
1
68270
""" Testing for the tree module (sklearn.tree). """ import copy import pickle from functools import partial from itertools import product import struct import pytest import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_proje...
bsd-3-clause
anntzer/scikit-learn
sklearn/datasets/_samples_generator.py
7
61271
""" 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 from collections.abc import Iterable import numpy as np from scipy import linalg import scipy.sparse as sp fro...
bsd-3-clause
kubeflow/kfserving
python/kfserving/test/test_v1beta1_inference_service_list.py
1
38731
# Copyright 2020 kubeflow.org. # # 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
hobson/pug-invest
pug/invest/sandbox/sim.py
1
38287
#!/usr/bin/env python from __future__ import division, unicode_literals """Simulate a sequence of trades and portfolio performance over time Examples: $ python sim.py trade 50000 orders.csv values.csv # input file $ cat orders.csv: 2008, 12, 3, AAPL, BUY, 130 2008, 12, 8, AAPL, SELL, 130 2008, 12, 5, IBM,...
mit
kevin-intel/scikit-learn
sklearn/mixture/_bayesian_mixture.py
3
33417
"""Bayesian Gaussian Mixture Model.""" # Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause import math import numpy as np from scipy.special import betaln, digamma, gammaln from ._base import BaseMixture, _check_shape from ._gaussian_mixture im...
bsd-3-clause