repo_name
string
path
string
copies
string
size
string
content
string
license
string
pmeier82/BOTMpy
botmpy/nodes/spike_sorting.py
1
55265
# -*- coding: utf-8 -*- #_____________________________________________________________________________ # # Copyright (c) 2012 Berlin Institute of Technology # All rights reserved. # # Developed by: Philipp Meier <pmeier82@gmail.com> # Neural Information Processing Group (NI) # School for Ele...
mit
mehdidc/scikit-learn
sklearn/ensemble/forest.py
1
59215
"""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 the ...
bsd-3-clause
robwarm/gpaw-symm
gpaw/test/parallel/ut_hsops.py
1
31121
import gc import sys import time import numpy as np try: # Matplotlib is not a dependency import matplotlib as mpl mpl.use('Agg') # force the antigrain backend except (ImportError, RuntimeError): mpl = None from ase.units import Bohr from gpaw.mpi import world, distribute_cpus from gpaw.utilities.to...
gpl-3.0
meteoswiss-mdr/precipattractor
pyscripts/growthdecay/nowcast.py
1
34351
#!/usr/bin/env python from __future__ import division from __future__ import print_function import os import sys import matplotlib as mpl mpl.use('Agg') import numpy as np import matplotlib.pyplot as plt from datetime import datetime, timedelta from scipy import fftpack from scipy.linalg impo...
gpl-3.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py
1
73319
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "bar.marker" _path_str = "bar.marker.colorbar" _valid_props = { "bgcolor", ...
mit
ryfeus/lambda-packs
Tensorflow_Pandas_Numpy/source3.6/pandas/core/indexes/datetimelike.py
1
38281
# -*- coding: utf-8 -*- """ Base and utility classes for tseries type pandas objects. """ import warnings import operator from datetime import datetime, timedelta from pandas import compat from pandas.compat.numpy import function as nv from pandas.core.tools.timedeltas import to_timedelta import numpy as np from pan...
mit
ericpre/hyperspy
hyperspy/_signals/signal1d.py
1
61641
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
Dih5/duat
duat/plot.py
1
43200
# -*- coding: UTF-8 -*- """Plot OSIRIS-generated data.""" from __future__ import print_function from __future__ import division from glob import glob import os import re from math import floor import h5py import numpy as np import matplotlib.pyplot as plt from matplotlib import ticker import matplotlib.colors as col...
mit
bgruening/docker-jupyter-notebook
jupyter_notebook_config.py
1
49284
import os CORS_ORIGIN = '' CORS_ORIGIN_HOSTNAME = '' if os.environ['CORS_ORIGIN'] != 'none': CORS_ORIGIN = os.environ.get('CORS_ORIGIN', '') CORS_ORIGIN_HOSTNAME = CORS_ORIGIN.split('://')[1] headers = { 'X-Frame-Options': 'ALLOWALL', 'Content-Security-Policy': """ default-src 'self' ...
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/tseries/tests/test_timeseries.py
1
165485
# pylint: disable-msg=E1101,W0612 import calendar from datetime import datetime, time, timedelta import sys import operator import nose import numpy as np randn = np.random.randn from pandas import (Index, Series, TimeSeries, DataFrame, isnull, date_range, Timestamp, Period, DatetimeIndex, ...
mit
mikemoorester/ESM
nadirSiteModel.py
1
42504
#!/usr/bin/env python from __future__ import division, print_function, absolute_import #import matplotlib #matplotlib.use('Agg') import numpy as np #import re import calendar import os #, sys import datetime as dt #import pickle import multiprocessing import antenna as ant import residuals as res import gpsTime as ...
mit
owlabs/incubator-airflow
airflow/contrib/hooks/bigquery_hook.py
1
97702
# -*- coding: utf-8 -*- # pylint: disable=too-many-lines # # 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 A...
apache-2.0
dereneaton/ipyrad
ipyrad/analysis/window_extracter.py
1
32164
#!/usr/bin/env python """ Extract, filter and format a locus from a scaffold, start, and end tuple. Intended for extracting concatenated sequence windows. """ # py2/3 compat from __future__ import print_function # standard lib import os import h5py import itertools import numpy as np import pandas as pd from copy i...
gpl-3.0
PySCeS/PyscesToolbox
psctb/analyse/_ratechar.py
1
41608
from __future__ import division, print_function from __future__ import absolute_import from __future__ import unicode_literals from os import path from colorsys import hsv_to_rgb, rgb_to_hsv from collections import OrderedDict from random import shuffle import numpy from pysces.PyscesModelMap import ModelMap from pys...
bsd-3-clause
apdavison/elephant
elephant/cell_assembly_detection.py
1
48564
""" CAD [1] is a method aimed to capture structures of higher-order correlation in massively parallel spike trains. In particular, it is able to extract patterns of spikes with arbitrary configuration of time lags (time interval between spikes in a pattern), and at multiple time scales, e.g. from synchronous patterns t...
bsd-3-clause
reflectometry/osrefl
osrefl/viewers/plot_slicer.py
1
35474
# Copyright (C) 2008 University of Maryland # All rights reserved. # See LICENSE.txt for details. # Author: Christopher Metting #Starting Date:8/23/2010 from numpy import size, shape, array, log, zeros, ones, argwhere, asarray, ma from numpy import isneginf,log10,inf,nonzero from numpy import amin, amax, sum, ceil,a...
bsd-3-clause
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/pandas/tests/indexes/test_range.py
3
33238
# -*- coding: utf-8 -*- import pytest from datetime import datetime from itertools import combinations import operator from pandas.compat import range, u, PY3 import numpy as np from pandas import (notnull, Series, Index, Float64Index, Int64Index, RangeIndex) import pandas.util.testing as tm ...
mit
csvelasq/TepUnderScenarios
tepmodel/TepScenariosModels.py
1
37980
from tepmodel import OptModels as opt from tepmodel import OpfModels as opf import pyomo.environ as pyo import powersys.PowerSystemPlanning as pwsp import Utils import plotly from plotly.graph_objs import Scatter, Layout import pandas as pd import xlsxwriter import collections import logging import time from datetime i...
mit
miaecle/deepchem
deepchem/metrics/__init__.py
1
31505
"""Evaluation metrics.""" import numpy as np import warnings import sklearn.metrics import logging from sklearn.metrics import matthews_corrcoef from sklearn.metrics import recall_score from sklearn.metrics import cohen_kappa_score from sklearn.metrics import r2_score from sklearn.metrics import mean_squared_error fro...
mit
muthu1993/InteliEQ
audioSegmentation.py
1
46767
import numpy import sklearn.cluster import time import scipy import os import audioFeatureExtraction as aF import audioTrainTest as aT import audioBasicIO import matplotlib.pyplot as plt from scipy.spatial import distance import matplotlib.pyplot as plt import matplotlib.cm as cm import sklearn.discriminant_analysis im...
apache-2.0
interrogator/corpkit
corpkit/conll.py
1
52013
""" corpkit: process CONLL formatted data """ def parse_conll(f, first_time=False, just_meta=False, usecols=None): """ Make a pandas.DataFrame with metadata from a CONLL-U file Args: f (str): Filepath first_time (bool, optional): If True,...
mit
MJuddBooth/pandas
pandas/tests/generic/test_generic.py
1
32817
# -*- coding: utf-8 -*- # pylint: disable-msg=E1101,W0612 from copy import copy, deepcopy from warnings import catch_warnings, simplefilter import numpy as np import pytest from pandas.compat import PY3, range, zip from pandas.core.dtypes.common import is_scalar import pandas as pd from pandas import DataFrame, Mu...
bsd-3-clause
aburgasser/splat
splat/core.py
1
321399
# -*- coding: utf-8 -*- from __future__ import print_function # imports - internal import copy import bz2 import glob import gzip import os import shutil import sys import warnings # imports - external import matplotlib #try: matplotlib.use('agg') #except: pass import matplotlib.pyplot as plt import numpy import pand...
mit
broadinstitute/cms
old/Operations/MiscUtil.py
1
106244
"""Miscellaneous general-purpose utilities, that are not specific to our particular datasets. For general utilities related to our datasets, see Operations.Ilya_Operations.DataUtil.py . """ from __future__ import with_statement, division import platform assert platform.python_version_tuple() >= ( 2, 6 ) import sys, ...
bsd-2-clause
SasView/sasmodels
sasmodels/sasview_model.py
1
36967
""" Sasview model constructor. Given a module defining an OpenCL kernel such as sasmodels.models.cylinder, create a sasview model class to run that kernel as follows:: from sasmodels.sasview_model import load_custom_model CylinderModel = load_custom_model('sasmodels/models/cylinder.py') """ from __future__ im...
bsd-3-clause
m4sth0/sauventory
sauventory/spatialinventory.py
1
33062
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 # Author(s): # Thomas Leppelt <thomas.leppelt@dwd.de> # This file is part of sauventory. # Spatial Autocorrelated Uncertainty of Inventories # sauventory is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
gpl-3.0
timothydmorton/exosyspop
exosyspop/populations.py
1
60291
from __future__ import print_function, division import numpy as np import pandas as pd import os, os.path, shutil import logging # This disables expensive garbage collection calls # within pandas. Took forever to figure this out. pd.set_option('mode.chained_assignment', None) import matplotlib.pyplot as plt from s...
mit
CompPhysics/ComputationalPhysics2
doc/LectureNotes/_build/jupyter_execute/vmcdmc.py
1
124254
# Variational Monte Carlo methods ## Quantum Monte Carlo Motivation We start with the variational principle. Given a hamiltonian $H$ and a trial wave function $\Psi_T$, the variational principle states that the expectation value of $\langle H \rangle$, defined through $$ E[H]= \langle H \rangle = \frac{\int d\bol...
cc0-1.0
joellevine/dwv_parushev_corp_map02
example_Parushev01_2dim_p/rectangle_driver007inprocess.py
1
115626
## Copyright (C) 2012 Joel H. Levine ## ## Permission is hereby granted, free of charge, to any person obtaining ## a copy of this software and associated documentation files (the "Software"), ## to deal in the Software without restriction,including without limitation ## the rights to use, copy, modify, merge, publish,...
mit
oknuutti/visnav-py
visnav/algo/tools.py
1
49191
import math import time import numpy as np import numba as nb import quaternion # adds to numpy # noqa # pylint: disable=unused-import import sys import scipy from astropy.coordinates import SkyCoord from scipy.interpolate import RectBivariateSpline from scipy.interpolate import NearestNDInterpolator # from scipy.s...
mit
maartenbreddels/vaex
packages/vaex-ui/vaex/ui/layers.py
1
133057
import collections import operator import vaex.vaexfast import threading import matplotlib import numpy as np import scipy.ndimage import matplotlib.colors import traceback import vaex import vaex.delayed import vaex.ui.storage import vaex.ui.undo import vaex.ui.colormaps import vaex.grids from vaex.ui.icons import ic...
mit
magic2du/contact_matrix
Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_New_Server_0629_2015.py
1
47437
# change the momentum to 0. import sys, os sys.path.append('../../../libs/') sys.path.append('../libs/') sys.path.append('../../libs/') import os.path import IO_class from IO_class import FileOperator from sklearn import cross_validation import sklearn import csv from dateutil import parser from datetime import timede...
gpl-2.0
CompPhysics/MachineLearning
doc/src/LectureNotes/_build/jupyter_execute/chapter2.py
1
60720
# Elements of Probability Theory and Statistical Data Analysis * add math about MVN and define MLE and other quantities * rewrite about covariance matrix * add KL theorem ## Domains and probabilities Consider the following simple example, namely the tossing of two dice, resulting in the following possible values...
cc0-1.0
rstoneback/pysat
pysat/_orbits.py
2
37455
from __future__ import print_function from __future__ import absolute_import import functools import numpy as np import pandas as pds from pysat import Series class Orbits(object): """Determines orbits on the fly and provides orbital data in .data. Determines the locations of orbit breaks in the loaded dat...
bsd-3-clause
nbeaver/numpy
numpy/core/tests/test_multiarray.py
1
238490
from __future__ import division, absolute_import, print_function import collections import tempfile import sys import shutil import warnings import operator import io import itertools import ctypes import os if sys.version_info[0] >= 3: import builtins else: import __builtin__ as builtins from decimal import D...
bsd-3-clause
lcpt/xc
python_modules/rough_calculations/ng_retaining_wall.py
1
32976
# -*- coding: utf-8 -*- from __future__ import division '''Routines for cantilever retaining walls design.''' __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2016, LCPT" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" import sys from postprocess.reports import common_format...
gpl-3.0
university-gender-evolution/py-university-gender-dynamics-pkg
pyugend/Models.py
1
31092
""" Base Model Module ----------------- This is the base class for all model modules. This class does not contain an particular model but it does include all of the functions to run a model, capture model statistics, and visualize model data. """ __author__ = 'krishnab' __version__ = '0.1.0' import numpy as np impo...
mit
nielsbuwen/ilastik
ilastik/applets/pixelClassification/pixelClassificationGui.py
3
36553
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
dksr/REMIND
python/base/vis/generate_cartoon_events/sp_rels_gui.py
1
112676
""" sp_rels_gui Based on pySketch from wx demos. Known Bugs: * Scrolling the window causes the drawing panel to be mucked up until you refresh it. I've got no idea why. * I suspect that the reference counting for some wxPoint objects is getting mucked up; when the user quits...
mit
dbtsai/spark
python/pyspark/ml/clustering.py
1
61333
# # 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
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/io/pytables.py
1
154962
""" High level interface to PyTables for reading and writing pandas data structures to disk """ # pylint: disable-msg=E1101,W0613,W0603 from datetime import datetime, date import time import re import copy import itertools import warnings import os import numpy as np from pandas import (Series, TimeSeries, DataFrame,...
mit
to266/hyperspy
hyperspy/_signals/eds.py
1
43663
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
rodluger/everest
everest/detrender.py
1
68576
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' :py:mod:`detrender.py` - De-trending models ------------------------------------------- This module contains the generic models used to de-trend light curves for the various supported missions. Most of the functionality is implemented in :py:class:`Detrender`, and spec...
mit
haidawyl/MLinAction
支持向量机SVM/svmMLiA.py
1
36234
#!/usr/bin/python # -*- coding:utf-8 -*- import math import random import numpy as np from time import time import matplotlib as mpl import matplotlib.pyplot as plt def loadDataSet(filename): ''' 读文件生成数据矩阵和类标签矩阵 :param filename: 文件路径 :return: 数据矩阵和类标签矩阵 ''' dataMat = [] # 数据矩阵 labelMat = ...
apache-2.0
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/tools/tests/test_merge.py
1
99055
# pylint: disable=E1103 import nose from datetime import datetime from numpy.random import randn from numpy import nan import numpy as np import random import pandas as pd from pandas.compat import range, lrange, lzip, zip, StringIO from pandas import compat from pandas.tseries.index import DatetimeIndex from pandas...
mit
shoyer/numpy
numpy/core/tests/test_multiarray.py
1
306152
from __future__ import division, absolute_import, print_function try: # Accessing collections abstract classes from collections # has been deprecated since Python 3.3 import collections.abc as collections_abc except ImportError: import collections as collections_abc import tempfile import sys import sh...
bsd-3-clause
wesm/ibis
ibis/impala/tests/test_ddl.py
1
37275
# 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
rustychris/stompy
stompy/xr_transect.py
1
44596
""" Methods for representing and manipulating transects in xarray datasets. Transects being a dataset with the form x(s), y(s), z(s,k) or z(k) u(s,k), v(s,k), etc. where x(s),y(s) describes a polyline. names are somewhat standardized, but can generally be provided U: vector valued velocity in geographic coordinate ...
mit
natl/fractaldna
simpledna/dnachain.py
1
48270
""" Class description of a DNA chain built of base pairs """ from __future__ import division, unicode_literals, print_function import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # NOQA from copy import deepcopy from scipy.interpolate import interp1d try: from mayavi import...
gpl-3.0
rozzac90/nba
nba/endpoints/team.py
1
129387
import requests import pandas as pd from nba import enums from nba.utils import clean_locals from nba.endpoints.baseendpoint import BaseEndpoint class Team(BaseEndpoint): def team_details(self, team_id, idx_data): params = clean_locals(locals()) endpoint = "teamdetails" r = self.request(e...
mit
axbaretto/beam
sdks/python/apache_beam/dataframe/frames.py
1
126538
# # 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
tedunderwood/fiction
variation/main_experiment.py
1
114761
#!/usr/bin/env python3 # main_experiment.py # USAGE syntax: # python3 main_experiment.py *command* # Where *command* is one of the following codes. # I have tried to start with functions that are # relatively important to the argument of the article. # sf_periods # Runs sf_periods(), which simply assesses the ease...
mit
amirkdv/biseqt
experiments/multiple_sequence.py
1
30709
#!/usr/bin/env python import numpy as np import sys import logging from itertools import product import matplotlib from matplotlib import pyplot as plt from matplotlib import gridspec from mpl_toolkits.mplot3d import Axes3D from Bio import AlignIO from time import time from biseqt.sequence import Alphabet from biseqt....
bsd-3-clause
duane-edgington/stoqs
stoqs/utils/STOQSQManager.py
1
136384
__author__ = 'Mike McCann' __copyright__ = '2012' __license__ = 'GPL v3' __contact__ = 'mccann at mbari.org' __doc__ = ''' STOQS Query manager for building ajax responses to selections made for QueryUI @undocumented: __doc__ parser @status: production @license: GPL ''' from collections import defaultdict, Ma...
gpl-3.0
aeklant/scipy
scipy/integrate/quadrature.py
2
31375
import functools import numpy as np import math import types import warnings # trapz is a public function for scipy.integrate, # even though it's actually a NumPy function. from numpy import trapz from scipy.special import roots_legendre from scipy.special import gammaln __all__ = ['fixed_quad', 'quadrature', 'romber...
bsd-3-clause
drgmk/sdf
sdf/plotting.py
1
49624
import io from datetime import datetime from os import path,remove import pickle import requests import ast import numpy as np import matplotlib.pyplot as plt import mysql.connector import astropy.units as u import jinja2 import bokeh.resources from bokeh.plotting import figure,ColumnDataSource from bokeh.models.widg...
mit
actility/ong
drivers/iec61131/beremiz.addons/IDEFrame.py
1
125229
import os, sys import cPickle from types import TupleType import wx, wx.grid import wx.aui try: import matplotlib matplotlib.use('WX') USE_MPL = True except: USE_MPL = False from editors.EditorPanel import EditorPanel from editors.SFCViewer import SFC_Viewer from editors.LDViewer import LD_Viewer fr...
gpl-2.0
joshfuchs/ZZCeti_fitting
intspec.py
1
52140
# -*- coding: utf-8 -*- """ Created on Sun Jan 18 20:16:17 2015 @author: joshfuchs, based on some initial work by BH Dunlap This program is run from fitspec.py. It interpolates and convolves the models, fits them with pseudogaussians, and normalizes. It compared the model lines to the observed line profiles and calcu...
mit
s-t-e-a-l-t-h/Eclipsing-binaries-library
objects/Geometry.py
1
116086
#!/usr/bin/python """ Geometry trieda ------------------- Obsahuje "geometricke" funkcie Inicializacne parametre: ------------------------ Staticka trieda, ziadne inicializacne parametre Metody a strucny popis (blizsi popis funkcnosti v komentaroch k jednotlivym riadkom kodu v funkciach): -----------------------...
gpl-3.0
voytekresearch/misshapen
shape.py
1
32116
""" This library contains metrics to quantify the shape of a waveform 1. threshold_amplitude - only look at a metric while oscillatory amplitude is above a set percentile threshold 2. rdratio - Ratio of rise time and decay time 3. pt_duration - Peak and trough durations and their ratio 3. symPT - symmetry between peak ...
mit
pdebuyl/numpy
numpy/core/tests/test_multiarray.py
1
315131
import collections.abc import tempfile import sys import shutil import warnings import operator import io import itertools import functools import ctypes import os import gc import weakref import pytest from contextlib import contextmanager from numpy.compat import pickle import pathlib import builtins from decimal i...
bsd-3-clause
bigdig/vnpy
vnpy/app/cta_strategy/backtesting.py
1
41210
from collections import defaultdict from datetime import date, datetime, timedelta from typing import Callable from itertools import product from functools import lru_cache from time import time import multiprocessing import random import traceback import numpy as np from pandas import DataFrame import plotly.graph_ob...
mit
jtwhite79/pyemu
pyemu/pst/pst_utils.py
1
64723
"""Various PEST(++) control file peripheral operations""" from __future__ import print_function, division import os import warnings import multiprocessing as mp import re import numpy as np import pandas as pd pd.options.display.max_colwidth = 100 import pyemu from ..pyemu_warnings import PyemuWarning # formatters #...
bsd-3-clause
keflavich/plfit
plfit/plfit.py
1
41344
# -*- coding: latin-1 -*- # # intended to implement a power-law fitting routine as specified in..... # http://www.santafe.edu/~aaronc/powerlaws/ # # The MLE for the power-law alpha is very easy to derive given knowledge # of the lowest value at which a power law holds, but that point is # difficult to derive and must b...
mit
hschovanec-usgs/magpy
magpy/gui/magpy_gui.py
1
186304
#!/usr/bin/env python from __future__ import print_function import wx from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure try: # Necessary for wx2.8.11.0 from wx.lib.pubsub import setu...
gpl-3.0
nborggren/zipline
tests/pipeline/test_blaze.py
1
38186
""" Tests for the blaze interface to the pipeline api. """ from __future__ import division from collections import OrderedDict from datetime import timedelta, time from unittest import TestCase import warnings import blaze as bz from datashape import dshape, var, Record from nose_parameterized import parameterized im...
apache-2.0
amloewi/css-blockmodels
blockmodels.py
1
34364
import os import sys import csv import copy import math import collections import pdb import numpy as np rand = np.random.random import networkx as nx import pygraphviz as gv import colour # This is for the kmeans stuff -- which I kinda think # should be in HERE. Also, I don't WANT to have # em import bm and bm imp...
mit
louispotok/pandas
pandas/tests/frame/test_reshape.py
1
36625
# -*- coding: utf-8 -*- from __future__ import print_function from warnings import catch_warnings from datetime import datetime import itertools import pytest from numpy.random import randn from numpy import nan import numpy as np from pandas.compat import u from pandas import (DataFrame, Index, Series, MultiIndex...
bsd-3-clause
humdings/zipline
tests/test_assets.py
2
57136
# # Copyright 2015 Quantopian, 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 wr...
apache-2.0
aricooperman/Jzipline
zipline/testing/core.py
2
39840
from abc import ABCMeta, abstractmethod, abstractproperty from contextlib import contextmanager from functools import wraps import gzip from inspect import getargspec from itertools import ( combinations, count, product, ) import operator import os from os.path import abspath, dirname, join, realpath import...
apache-2.0
xuewei4d/scikit-learn
sklearn/cross_decomposition/_pls.py
3
36015
""" The :mod:`sklearn.pls` module implements Partial Least Squares (PLS). """ # Author: Edouard Duchesnay <edouard.duchesnay@cea.fr> # License: BSD 3 clause import warnings from abc import ABCMeta, abstractmethod import numpy as np from scipy.linalg import pinv2, svd from ..base import BaseEstimator, RegressorMixin...
bsd-3-clause
pizzathief/scipy
scipy/stats/stats.py
1
280834
# Copyright 2002 Gary Strangman. All rights reserved # Copyright 2002-2016 The SciPy Developers # # The original code from Gary Strangman was heavily adapted for # use in SciPy by Travis Oliphant. The original code came with the # following disclaimer: # # This software is provided "as-is". There are no expressed or...
bsd-3-clause
TomAugspurger/pandas
pandas/tests/groupby/transform/test_transform.py
1
38364
""" test with the .transform """ from io import StringIO import numpy as np import pytest from pandas._libs import groupby from pandas.core.dtypes.common import ensure_platform_int, is_timedelta64_dtype import pandas as pd from pandas import ( Categorical, DataFrame, MultiIndex, Series, Timestam...
bsd-3-clause
Leguark/GeMpy
build/lib/pygeomod/build/lib/pygeomod/geogrid.py
1
49092
'''Module with classes and methods to analyse and process exported geomodel grids Created on 21/03/2014 @author: Florian Wellmann (some parts originally developed by Erik Schaeffer) ''' import numpy as np #import pynoddy import subprocess import os.path import platform try: import matplotlib.pyplot as plt except...
mit
michalsenkyr/spark
python/pyspark/sql/tests.py
1
286952
# -*- encoding: 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
YihaoLu/pyfolio
pyfolio/plotting.py
1
41802
# # Copyright 2015 Quantopian, 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 wr...
apache-2.0
albertfxwang/grizli
grizli/stack.py
1
52521
""" Utilities for fitting stacked (drizzled) spectra """ from collections import OrderedDict from imp import reload import astropy.io.fits as pyfits import astropy.units as u import numpy as np from . import utils from .utils import GRISM_COLORS, GRISM_MAJOR, GRISM_LIMITS, DEFAULT_LINE_LIST from .fitting import Gro...
mit
brainiak/brainiak
brainiak/reconstruct/iem.py
1
45193
# Copyright 2018 David Huberdeau & Peter Kok # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
google/makani
analysis/force_balance_loop/power_calcs/kite_path.py
1
33928
# Copyright 2020 Makani Technologies 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
ehsanfar/ofspy_v2
bin/ofs-exp-pp.py
1
41701
""" Copyright 2015 Paul T. Grogan, Massachusetts Institute of Technology 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 applicabl...
apache-2.0
rohit21122012/DCASE2013
runs/2013/dnngddelta/dnn6.py
1
33219
#!/usr/bin/env python # -*- coding: utf-8 -*- # # DCASE 2016::Acoustic Scene Classification / Baseline System #import sys #sys.path.insert(0, '../') from src.ui import * from src.general import * from src.files import * from src.features import * from src.dataset import * from src.evaluation import * import numpy im...
mit
rgommers/statsmodels
statsmodels/tsa/arima_model.py
1
70072
# Note: The information criteria add 1 to the number of parameters # whenever the model has an AR or MA term since, in principle, # the variance could be treated as a free parameter and restricted # This code does not allow this, but it adds consistency with other # packages such as gretl and X1...
bsd-3-clause
plotly/python-api
packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py
1
66366
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Caxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.ternary" _path_str = "layout.ternary.caxis" _valid_props = { "color", ...
mit
tapomayukh/projects_in_python
classification/Classification_with_HMM/Single_Contact_Classification/Variable_Stiffness_Variable_Velocity/HMM/with 2s/hmm_crossvalidation_force_motion_20_states_scaled_wrt_all_data.py
1
41623
# Hidden Markov Model Implementation import pylab as pyl import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy as scp import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu import hrl_lib.viz ...
mit
cbertinato/pandas
pandas/tests/io/test_sql.py
1
98718
"""SQL io tests The SQL tests are broken down in different classes: - `PandasSQLTest`: base class with common methods for all test classes - Tests for the public API (only tests with sqlite3) - `_TestSQLApi` base class - `TestSQLApi`: test the public API with sqlalchemy engine - `TestSQLiteFallbackApi`: t...
bsd-3-clause
equialgo/scikit-learn
sklearn/cross_validation.py
1
72107
""" 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 fro...
bsd-3-clause
Gjacquenot/PyRayTracer
raytracer/raytracer.py
1
36942
# -*- coding: utf-8 -*- """ Preliminary code for ray tracing with Python and VTK Thanks to https://pyscience.wordpress.com/2014/10/05/from-ray-casting-to-ray-tracing-with-python-and-vtk/ In order to proceed, you will have to exit the renderwindow, it is waiting for your input. @author: Adamos Kyriokou, Jaap Verhegge...
mit
lucapinello/CRISPResso
CRISPResso/CRISPRessoCORE.py
1
127566
#!/usr/bin/env python # -*- coding: utf8 -*- ''' CRISPResso - Luca Pinello 2015 Software pipeline for the analysis of CRISPR-Cas9 genome editing outcomes from deep sequencing data https://github.com/lucapinello/CRISPResso ''' __version__ = "1.0.13" import sys import errno import os import subprocess as sb import ar...
agpl-3.0
TomAugspurger/pandas
pandas/tests/io/formats/test_style.py
1
64277
import copy import re import textwrap import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame import pandas._testing as tm jinja2 = pytest.importorskip("jinja2") from pandas.io.formats.style import Styler, _get_level_lengths # noqa # isort:skip ...
bsd-3-clause
KarrLab/obj_model
obj_model/io.py
1
96862
""" Reading/writing schema objects to/from files * Comma separated values (.csv) * Excel (.xlsx) * JavaScript Object Notation (.json) * Tab separated values (.tsv) * Yet Another Markup Language (.yaml, .yml) :Author: Jonathan Karr <karr@mssm.edu> :Author: Arthur Goldberg <Arthur.Goldberg@mssm.edu> :Date: 2016-11-23 :...
mit
shoyer/numpy
numpy/lib/polynomial.py
1
40727
""" Functions to operate on polynomials. """ from __future__ import division, absolute_import, print_function __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d', 'polyfit', 'RankWarning'] import functools import re import warnings i...
bsd-3-clause
jaeilepp/mne-python
mne/report.py
1
68089
"""Generate self-contained HTML reports from MNE objects.""" # Authors: Alex Gramfort <alexandre.gramfort@telecom-paristech.fr> # Mainak Jas <mainak@neuro.hut.fi> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import os import os.path as op import fnmatch import re import codecs i...
bsd-3-clause
rabernat/xray
xarray/tests/test_dataarray.py
1
131057
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pandas as pd import pickle import pytest from copy import deepcopy from textwrap import dedent from distutils.version import LooseVersion import xarray as xr from xarray import (align...
apache-2.0
jbonaiuto/perceptual-choice-hysteresis
src/python/perceptchoice/experiment/analysis.py
1
52031
from datetime import datetime import os from matplotlib.mlab import normpdf from matplotlib.patches import Rectangle import numpy as np import pandas as pd import statsmodels.api as sm from scipy.stats import wilcoxon, norm, mannwhitneyu from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt ...
gpl-3.0
zhuangjun1981/retinotopic_mapping
retinotopic_mapping/tools/ImageAnalysis.py
1
49726
__author__ = 'junz' import matplotlib.pyplot as plt import numpy as np from scipy import interpolate import scipy.ndimage as ni import skimage.morphology as sm import FileTools as ft import PlottingTools as pt try: import cv2 except ImportError as e: print e def resample(t1, y1, interval, kind='linear', isP...
gpl-3.0
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py
1
98648
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class ZAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.zaxis" _valid_props = { "autorange", ...
mit
BigDataforYou/movie_recommendation_workshop_1
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/pandas/tseries/tdi.py
1
32550
""" 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 ...
mit
bjornsturmberg/NumBAT
backend/integration.py
1
38595
# mode_calcs.py is a subroutine of NumBAT that contains methods to # calculate the EM and Acoustic modes of a structure. # Copyright (C) 2017 Bjorn Sturmberg, Kokou Dossou, # NumBAT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
gpl-3.0
NICTA/revrand
revrand/basis_functions.py
1
60389
""" Various basis function objects specialised for parameter learning. To make a new basis object, see the documentation of the Basis class. """ from __future__ import division import sys import inspect from itertools import repeat from functools import reduce import numpy as np from six import wraps from decorato...
apache-2.0
asreimer/pyAMISR
visuamisr/analyze.py
1
43215
# -*- coding: utf-8 -*- # Copyright (C) 2013 Ashton S. Reimer # Full license can be found in LICENSE.txt """ .. module:: analyze :synopsis: Used for basic visualization of ISR data. accepts data in hdf5 format only. This module read data from the hdf5 in tp a dictionary with the followin...
gpl-3.0