repo_name
string
path
string
copies
string
size
string
content
string
license
string
guilgautier/DPPy
dppy/finite_dpps.py
1
44271
# coding: utf8 """ Implementation of :py:class:`FiniteDPP` object which has 6 main methods: - :py:meth:`~FiniteDPP.sample_exact`, see also :ref:`sampling DPPs exactly<finite_dpps_exact_sampling>` - :py:meth:`~FiniteDPP.sample_exact_k_dpp`, see also :ref:`sampling k-DPPs exactly<finite_dpps_exact_sampling>` - :py:meth:...
mit
rafiqsaleh/VERCE
verce-hpc-pe/src/pyflex/window_selector.py
2
39107
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Class managing the actual window selection process. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from __future__ import (absolute_import, divi...
mit
deapplegate/wtgpipeline
CRNitschke/special_cases/blocked_blender.2.2_wjb-190.py
1
114266
#! /usr/bin/env python from __future__ import division #3/2=1.5 and 3//2=1 #adam-does# blends cosmics and blocks them from being blended into stars #adam-use # use with CRNitschke cosmics masking pipeline import sys ; sys.path.append('/u/ki/awright/InstallingSoftware/pythons') from import_tools import * import astropy ...
mit
johnmgregoire/JCAPdatavis
echem_stacked_tern5.py
1
33699
import matplotlib.cm as cm import numpy import pylab import h5py, operator, copy, os, csv, sys from echem_plate_fcns import * from echem_plate_math import * PyCodePath=os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] sys.path.append(os.path.join(PyCodePath,'ternaryplot')) from myternaryutility import Ter...
bsd-3-clause
jakobworldpeace/scikit-learn
sklearn/linear_model/logistic.py
1
68761
""" Logistic Regression """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Fabian Pedregosa <f@bianp.net> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Manoj Kumar <manojkumarsivaraj334@gmail.com> # Lars Buitinck # Simon Wu <s8wu@uwaterloo.ca> # ...
bsd-3-clause
TuanjieNew/Indel-Finder
indel_finder.py
1
34134
#!/usr/bin/env python #fn: indel_finder.py import os, getopt,sys import re import gzip import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def usage(): print("\nUsage: python indel_finder.py -r ref.fa(5' to 3') -t target.fa(5' to 3' with PAM) -1 1_S1_L001_R1_001.fastq(or fa...
mit
agua/StarClusterDev
starcluster/balancers/sge/__init__.py
1
31707
#!/usr/bin/env python import os import time import datetime import traceback import xml.dom.minidom from starcluster import utils from starcluster import static from starcluster import exception from starcluster.balancers import LoadBalancer from starcluster.logger import log SGE_STATS_DIR = os.path.join(static.STAR...
gpl-3.0
bluemellophone/ibeis_cnn
ibeis_cnn/models/abstract_models.py
1
56038
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import functools import six import numpy as np import utool as ut from collections import namedtuple from os.path import join, exists, dirname, basename from six.moves import cPickle as pickle # NOQA import warnings import sklear...
apache-2.0
OpenDrift/opendrift
opendrift/models/basemodel.py
1
212550
# This file is part of OpenDrift. # # OpenDrift 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, version 2 # # OpenDrift is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without ev...
gpl-2.0
MarcoDalFarra/semseg
DataGenerators.py
1
48218
from __future__ import absolute_import from __future__ import print_function import numpy as np import IPython import os import threading import warnings import scipy.ndimage as ndi import cv2 import random try: from PIL import Image as pil_image except ImportError: pil_image = None from keras import backend...
mit
JudoWill/glue
glue/core/roi.py
1
34433
from __future__ import absolute_import, division, print_function from functools import wraps import numpy as np from matplotlib.patches import Polygon, Rectangle, Ellipse, PathPatch from matplotlib.patches import Path as mplPath from matplotlib.transforms import IdentityTransform, blended_transform_factory import cop...
bsd-3-clause
kklmn/xrt
xrt/backends/raycing/apertures.py
1
37386
# -*- coding: utf-8 -*- """ Apertures --------- Module :mod:`apertures` defines rectangular and round apertures and a set of coplanar rectangular apertures. Rectangular apertures may have one or more defining edges. For example, a simple obstacle, like a beam stop block would have one edge, a block of front-end slits ...
mit
dssg/wikienergy
disaggregator/build/pandas/pandas/tseries/tests/test_timedeltas.py
1
55479
# pylint: disable-msg=E1101,W0612 from __future__ import division from datetime import datetime, timedelta, time import nose from distutils.version import LooseVersion import numpy as np import pandas as pd from pandas import (Index, Series, DataFrame, Timestamp, Timedelta, TimedeltaIndex, isnull, notnull, ...
mit
yaukwankiu/armor
kmeans/clustering.py
1
41341
################################### # WORK IN PROGRESS # ADAPTED FROM OLD clustering.py BASED ON THE CLASS weatherPattern.pattern2d # NOTE: SINCE THIS CODE WAS INITIATED IN 2012, THE (i, j) are reversed # AS FROM OTHER MODULES OF THE armor PACKAGE: HERE (i,j)=(x,y) # AND WE USE ...
cc0-1.0
Quantipy/quantipy
quantipy/core/builds/excel/excel_painter.py
1
116277
# -*- coding: utf-8 -*- ''' Created on 19 Nov 2014 @author: alasdaire ''' import numpy as np import pandas as pd import quantipy as qp from quantipy.core.cluster import Cluster from quantipy.core.chain import Chain from quantipy.core.helpers import functions as helpers from quantipy.core.tools.dp.io import unicoder f...
mit
JeffHeard/terrapyn
geocms/drivers/spatialite.py
1
38538
# from ga_ows.views import wms, wfs from django.db.models.loading import get_model from django.utils.text import slugify from uuid import uuid4 from zipfile import ZipFile import json from django.contrib.gis.geos import Polygon, GEOSGeometry from django.core.files import File import numpy import os from osgeo import os...
apache-2.0
phobson/statsmodels
statsmodels/tsa/statespace/dynamic_factor.py
1
57954
""" Dynamic factor model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd from .kalman_filter import KalmanFilter, FilterResults from...
bsd-3-clause
ekostat/ekostat_calculator
core/quality_factors.py
1
33156
# -*- coding: utf-8 -*- """ Created on Wed Jul 12 14:43:35 2017 @author: a001985 """ import os import core import numpy as np import pandas as pd from functools import reduce import re ############################################################################### class ClassificationResult(dict): """ Class ...
mit
afronski/playground-notes
scalable-machine-learning/solutions/ML_lab3_linear_reg_student.py
1
43738
# coding: utf-8 # ![ML Logo](http://spark-mooc.github.io/web-assets/images/CS190.1x_Banner_300.png) # # **Linear Regression Lab** # #### This lab covers a common supervised learning pipeline, using a subset of the [Million Song Dataset](http://labrosa.ee.columbia.edu/millionsong/) from the [UCI Machine Learning Repos...
mit
rs2/pandas
pandas/tests/arrays/test_datetimelike.py
1
39389
from typing import Type, Union import numpy as np import pytest import pytz from pandas._libs import OutOfBoundsDatetime from pandas.compat.numpy import np_version_under1p18 import pandas as pd import pandas._testing as tm from pandas.core.arrays import DatetimeArray, PeriodArray, TimedeltaArray from pandas.core.ind...
bsd-3-clause
dssg/wikienergy
disaggregator/build/pandas/pandas/io/stata.py
1
72166
""" Module contains tools for processing Stata files into DataFrames The StataReader below was originally written by Joe Presbrey as part of PyDTA. It has been extended and improved by Skipper Seabold from the Statsmodels project who also developed the StataWriter and was finally added to pandas in an once again impro...
mit
geophysics/mtpy
mtpy/gui/occam1d_gui.py
1
55610
# -*- coding: utf-8 -*- """ Occam 1D ----------------- All encompassing ploting data, model and model response. JP 2015 """ # from PyQt4 import QtCore, QtGui import mtpy.modeling.occam1d as occam1d from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt...
gpl-3.0
GaloMALDONADO/motorg
motorog/dynTasks2.py
1
51861
import pinocchio as se3 import numpy as np import paths as lp import robot_config as rconf import mocap_config as mconf from hqp.wrapper import Wrapper from trajectory_extractor import References import ucm import plot_tools import csv import indexes import plotTasks from hqp.viewer_utils import Viewer import matplo...
gpl-3.0
cleinias/Homeo
src/Simulator/HomeoGeneralGUI.py
1
59437
''' Provides a general interface to control a Homeostat simulation including an unlimited number of units. It can start and stop a simulation from a GUI, as well as save and graph the simulation's data. Created on May 5, 2013 @author: stefano ''' from PyQt4.QtCore import * from PyQt4.QtGui import * from Core.Homeost...
gpl-3.0
jesserobertson/pynoddy
pynoddy/output.py
1
77926
'''Noddy output file analysis Created on 24/03/2014 @author: Florian Wellmann, Sam Thiele ''' import os import numpy as np import pynoddy class NoddyOutput(object): """Class definition for Noddy output analysis""" def __init__(self, output_name): """Noddy output analysis **Argum...
gpl-2.0
maheshakya/scikit-learn
sklearn/tree/tree.py
1
34714
""" 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
mikegraham/dask
dask/array/core.py
1
108393
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
jim-pansn/graph-tool
src/graph_tool/search/__init__.py
1
58109
#! /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
dsm054/pandas
pandas/core/arrays/period.py
1
36811
# -*- coding: utf-8 -*- from datetime import timedelta import operator import numpy as np from pandas import compat from pandas.compat.numpy import function as nv from pandas._libs.tslib import NaT, iNaT from pandas._libs.tslibs.period import ( Period, IncompatibleFrequency, DIFFERENT_FREQ_INDEX, get_period_f...
bsd-3-clause
geoscixyz/em_examples
em_examples/HarmonicVMDCylWidget.py
1
31628
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals from ipywidgets import * from SimPEG import Mesh, Maps, EM, Utils # from pymatsolver import PardisoSolver import matplotlib.pyplot as plt import numpy as np from PIL import Image from scipy.constants im...
mit
mguerrap/tydal
tydal/module1_fancy_graphs.py
1
30059
#module1_fancy_graphs create graphs with moon and text for module 1 #Written by: Amie Adams #Import relevant packages import os import numpy as np import pandas as pd from datetime import date from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, AnnotationBbox import matplotlib.image as IM import matplo...
mit
nixingyang/Kaggle-Face-Verification
Quora Question Pairs/solution_shallow_learning.py
1
31293
from __future__ import absolute_import, division, print_function import os import glob import numpy as np import pandas as pd import lightgbm as lgb from collections import Counter, defaultdict from difflib import SequenceMatcher from joblib import Parallel, delayed from nltk import pos_tag, word_tokenize f...
mit
saullocastro/pyNastran
pyNastran/converters/dev/abaqus/abaqus.py
1
34422
""" Defines the Abaqus class """ from __future__ import print_function import numpy as np from pyNastran.utils.log import get_logger2 from pyNastran.converters.dev.abaqus.abaqus_cards import Material, Part, SolidSection def read_abaqus(abaqus_inp_filename, log=None, debug=False): """reads an abaqus model""" mo...
lgpl-3.0
openego/dingo
ding0/grid/lv_grid/build_grid.py
1
30545
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The docume...
agpl-3.0
mvictor212/hmmlearn
hmmlearn/mixhmm.py
1
67910
# Mixtures of Hidden Markov Models # # Author: Mason Victors <mason.victors@gmail.com> """ The :mod:`hmmlearn.mixhmm` module implements mixtures of hidden Markov models. """ import string import cPickle import numpy as np import multiprocessing as mp from copy import deepcopy from sklearn.utils import check_random_...
bsd-3-clause
evanbiederstedt/RRBSfun
epiphen/total_chrX.py
2
32997
import glob import pandas as pd import numpy as np pd.set_option('display.max_columns', 50) # print all rows import os os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files") normalB = glob.glob("binary_position_RRBS_normal_B_cell*") mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27...
mit
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/io/sql.py
1
58681
# -*- coding: utf-8 -*- """ Collection of query wrappers / abstractions to both facilitate data retrieval and to reduce dependency on DB-specific API. """ from __future__ import print_function, division from datetime import datetime, date, time import warnings import re import numpy as np import pandas._libs.lib as ...
apache-2.0
sebp/scikit-survival
tests/test_survival_svm.py
1
32714
from functools import partial from os.path import dirname, join import warnings import numpy from numpy.testing import assert_array_almost_equal, assert_array_equal import pytest from sklearn.decomposition import KernelPCA from sklearn.exceptions import ConvergenceWarning from sklearn.metrics import mean_squared_error...
gpl-3.0
leggitta/mne-python
mne/io/base.py
1
90477
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # Marijn van Vliet <w.m.vanvli...
bsd-3-clause
Naereen/notebooks
Manual_implementation_of_the_Mersenne_twister_PseudoRandom_Number_Generator__PRNG_.py
1
60434
# coding: utf-8 # # Table of Contents # <p><div class="lev1 toc-item"><a href="#Manual-implementation-of-the-Mersenne-twister-PseudoRandom-Number-Generator-(PRNG)" data-toc-modified-id="Manual-implementation-of-the-Mersenne-twister-PseudoRandom-Number-Generator-(PRNG)-1"><span class="toc-item-num">1&nbsp;&nbsp;</spa...
mit
google/meterstick
metrics_test.py
1
57589
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
hoburg/gpkit
gpkit/solution_array.py
1
36007
"""Defines SolutionArray class""" import re import difflib from operator import sub import warnings as pywarnings import pickle import gzip import pickletools import numpy as np from .nomials import NomialArray from .small_classes import DictOfLists, Strings from .small_scripts import mag, try_str_without from .repr_co...
mit
bdestombe/flopy-1
flopy/mbase.py
1
47278
""" mbase module This module contains the base model class from which all of the other models inherit from. """ from __future__ import print_function import sys import os import subprocess as sp import shutil import threading if sys.version_info > (3, 0): import queue as Queue else: impo...
bsd-3-clause
NicovincX2/Battleship
naval_battle.py
1
73346
#! /usr/bin/ython # -*- coding: utf-8 -*- """naval_battle.py: Jeu de bataille navale. """ __version__='1.3.5' import sys import platform import os import time import argparse # Add command-line arguments support import ast # eval() import math import itertools import operator import string import functools # Vérifi...
gpl-3.0
mrlb05/Nifty4Gemini
nifty/pipeline/nifsUtils.py
2
49025
# MIT License # Copyright (c) 2015, 2017 Marie Lemoine-Busserolle # 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...
mit
alphaBenj/zipline
tests/test_assets.py
1
57794
# # 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
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/core/categorical.py
1
62243
# pylint: disable=E1101,W0232 import numpy as np from warnings import warn import types from pandas import compat, lib from pandas.compat import u from pandas.core.algorithms import factorize from pandas.core.base import PandasObject, PandasDelegate import pandas.core.common as com from pandas.util.decorators import...
mit
TissueMAPS/TmLibrary
tmlib/models/utils.py
1
36986
# TmLibrary - TissueMAPS library for distibuted image analysis routines. # Copyright (C) 2016 Markus D. Herrmann, University of Zurich and Robin Hafen # Copyright (C) 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 Publi...
agpl-3.0
gdementen/xlwings
xlwings/_xlwindows.py
1
40915
import os import sys # Hack to find pythoncom.dll - needed for some distribution/setups (includes seemingly unused import win32api) # E.g. if python is started with the full path outside of the python path, then it almost certainly fails cwd = os.getcwd() if not hasattr(sys, 'frozen'): # cx_Freeze etc. will fail h...
bsd-3-clause
ryandougherty/mwa-capstone
MWA_Tools/build/matplotlib/lib/matplotlib/cbook.py
1
59364
""" A collection of utility functions and classes. Many (but not all) from the Python Cookbook -- hence the name cbook """ from __future__ import generators import re, os, errno, sys, StringIO, traceback, locale, threading, types import time, datetime import warnings import numpy as np import numpy.ma as ma from weakr...
gpl-2.0
microsoft/EconML
econml/iv/dml/_dml.py
1
43123
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Orthogonal IV for Heterogeneous Treatment Effects. A Double/Orthogonal machine learning approach to estimation of heterogeneous treatment effect with an endogenous treatment and an instrument. It implements the DMLIV and ...
mit
jseabold/statsmodels
statsmodels/stats/power.py
4
52279
# -*- coding: utf-8 -*- #pylint: disable-msg=W0142 """Statistical power, solving for nobs, ... - trial version Created on Sat Jan 12 21:48:06 2013 Author: Josef Perktold Example roundtrip - root with respect to all variables calculated, desired nobs 33.367204205 33.367204205 effect 0.5 0.5 alpha 0.05 0.05...
bsd-3-clause
jseabold/statsmodels
statsmodels/graphics/regressionplots.py
5
43880
'''Partial Regression plot and residual plots to find misspecification Author: Josef Perktold License: BSD-3 Created: 2011-01-23 update 2011-06-05 : start to convert example to usable functions 2011-10-27 : docstrings ''' from statsmodels.compat.python import lrange, lzip from statsmodels.compat.pandas import Appen...
bsd-3-clause
Patrick-Cole/pygmi
pygmi/pfmod/iodefs.py
1
43296
# ----------------------------------------------------------------------------- # Name: iodefs.py (part of PyGMI) # # Author: Patrick Cole # E-Mail: pcole@geoscience.org.za # # Copyright: (c) 2013 Council for Geoscience # Licence: GPL-3.0 # # This file is part of PyGMI # # PyGMI is free software:...
gpl-3.0
tensorflow/estimator
tensorflow_estimator/python/estimator/canned/linear_testing_utils.py
1
84178
# Copyright 2017 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
Tobychev/tardis
tardis/gui/widgets.py
2
52048
import os if os.environ.get('QT_API', None)=='pyqt': from PyQt4 import QtGui, QtCore elif os.environ.get('QT_API', None)=='pyside': from PySide import QtGui, QtCore else: raise ImportError('QT_API was not set! Please exit the IPython console\n' ' and at the bash prompt use : \n\n export QT_API=pysid...
bsd-3-clause
tejasckulkarni/hydrology
weather/wind_speed_had_mcmc.py
1
38571
__author__ = 'kiruba' import numpy as np import matplotlib.pyplot as plt import pandas as pd import itertools import pymc as pm import scipy.stats as stats from datetime import timedelta from datetime import datetime from pymc import TruncatedNormal from pymc import Normal, Exponential import matplotlib # data = np.arr...
gpl-3.0
craffel/librosa
librosa/feature/spectral.py
1
39829
#!/usr/bin/env python # -*- coding: utf-8 -*- """Spectral feature extraction""" import numpy as np import scipy import scipy.signal from .. import util from .. import filters from ..util.exceptions import ParameterError from ..core.time_frequency import fft_frequencies from ..core.audio import zero_crossings from .....
isc
alexhege/Orbital-APSYNSIM
APSYNSIM_v1.3/SCRIPT/relicAPSYNSIM.py
1
118724
############################################################################# # # APSYNSIM: A real-time Aperture Synthesis Simulator # # Copyright (C) 2014 Ivan Marti-Vidal (Nordic ARC Node, OSO, Sweden) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
gpl-3.0
brianlorenz/COSMOS_IMACS_Redshifts
Emission_Fitting/FitEmission_MosaicByUsig.py
1
41785
#Fits an emission ine with a Gaussian and returns the amplitude, standard deviation, and continuum line #Usage: run FitEmission.py 'a6' 4861 to fit the lines at rest wavelengths 6563 (Ha) for the a6 mask. #Typing run FitEmission.py 'a6' 'HaNII' will fit all three lines around Ha simulaaneously import nump...
mit
chaubold/hytra
scripts/plot_probability_distribs.py
1
30965
# pythonpath modification to make hytra and empryonic available # for import without requiring it to be installed import os import sys sys.path.insert(0, os.path.abspath('..')) # standard imports import os.path as path import getpass import glob import optparse import socket import time import numpy as np import h5py ...
mit
zfrenchee/pandas
pandas/tests/reshape/merge/test_merge_asof.py
1
38206
import os import pytest import pytz import numpy as np import pandas as pd from pandas import (merge_asof, read_csv, to_datetime, Timedelta) from pandas.core.reshape.merge import MergeError from pandas.util import testing as tm from pandas.util.testing import assert_frame_equal class TestAsOfMerg...
bsd-3-clause
lucidfrontier45/scikit-learn
sklearn/decomposition/dict_learning.py
1
40383
""" Dictionary learning """ # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD import time import sys import itertools import warnings from math import sqrt, floor, ceil import numpy as np from scipy import linalg from numpy.lib.stride_tricks import as_strided from ..base import BaseEstimator...
bsd-3-clause
daniaki/Enrich2
enrich2/selection/selection.py
1
33123
# Copyright 2016-2017 Alan F Rubin # # This file is part of Enrich2. # # Enrich2 is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
shoyer/xray
xarray/core/computation.py
1
43339
""" Functions for applying functions that act on arrays to xarray's labeled data. """ import functools import itertools import operator from collections import Counter, OrderedDict from distutils.version import LooseVersion from typing import ( AbstractSet, Any, Callable, Iterable, List, Mapping, Optional, Sequence...
apache-2.0
ARudiuk/mne-python
mne/viz/utils.py
1
40089
"""Utility functions for plotting M/EEG data """ from __future__ import print_function # 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> # ...
bsd-3-clause
timothy-mcroy/mapper
draw_mapper_output.py
1
52373
# -*- coding: utf-8 -*- ''' This file is part of the Python Mapper package, an open source tool for exploration, analysis and visualization of data. Copyright 2011–2014 by the authors: Daniel Müllner, http://danifold.net Aravindakshan Babu, anounceofpractice@hotmail.com Python Mapper is distributed under the ...
gpl-2.0
aoifeboyle/tardis
tardis/io/config_reader.py
1
42178
# Module to read the rather complex config data import logging import os import pprint from astropy import constants, units as u import numpy as np import pandas as pd import yaml import tardis from tardis.io.model_reader import read_density_file, \ calculate_density_after_time, read_abundances_file from tardis....
bsd-3-clause
jhelie/cluster_lip
cluster_lip.py
1
89320
################################################################################################################################################ # IMPORT MODULES ################################################################################################################################################ #import gene...
gpl-2.0
hrashk/sympy
sympy/plotting/plot.py
1
62275
"""Plotting module for Sympy. A plot is represented by the ``Plot`` class that contains a reference to the backend and a list of the data series to be plotted. The data series are instances of classes meant to simplify getting points and meshes from sympy expressions. ``plot_backends`` is a dictionary with all the bac...
bsd-3-clause
MJuddBooth/pandas
pandas/core/indexes/multi.py
1
113651
# pylint: disable=E1101,E1103,W0232 from collections import OrderedDict import datetime from sys import getsizeof import warnings import numpy as np from pandas._libs import ( Timestamp, algos as libalgos, index as libindex, lib, tslibs) import pandas.compat as compat from pandas.compat import lrange, lzip, map, ...
bsd-3-clause
evgchz/scikit-learn
sklearn/linear_model/ridge.py
6
38630
""" Ridge regression """ # Author: Mathieu Blondel <mathieu@mblondel.org> # Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com> # Fabian Pedregosa <fabian@fseoane.net> # Michael Eickenberg <michael.eickenberg@nsup.org> # License: BSD 3 clause from abc import ABCMeta, abstractmethod impor...
bsd-3-clause
losonczylab/Zaremba_NatNeurosci_2017
losonczy_analysis_bundle/lab/figures/place_cell_figures.py
1
100251
"""Figure generating functions to accompany placeCellAnalysis, used heavily by analysis scripts All functions should return either a figure or list of figures. """ import matplotlib.pyplot as plt import numpy as np import datetime from copy import copy import pandas as pd import seaborn.apionly as sns import itertools...
mit
irap-omp/deconv3d
lib/run.py
1
42027
# coding=utf-8 # GENERAL PACKAGES ############################################################ import sys import math import numpy as np import logging from os.path import splitext from math import log from hyperspectral import HyperspectralCube as Cube from matplotlib import pyplot as plot logging.basicConfig(level=...
mit
alicx1/Sushi
sushi.py
1
36000
#!/usr/bin/env python import logging import sys from itertools import takewhile, izip import numpy as np import argparse import chapters import os from time import time import bisect from common import SushiError, get_extension, format_time, ensure_static_collection from demux import Timecodes, Demuxer from keyframes ...
mit
cajal/pipeline
python/pipeline/pupil.py
1
82981
""" This module is for pupil related tables and computation. Current version is at 1.0.0 as of 10/29/2019 What's changed in this version: 1. Got rid of filter_config table 2. Added a functionality of removing tracking directory and its sub-directories if the job was not done completely 3. Method name changed from DLC_...
lgpl-3.0
awhite40/pymks
pymks/tools.py
1
32188
import matplotlib.colors as colors import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.axes_grid1 import make_axes_locatable from sklearn.learning_curve import learning_curve from .stats import _auto_correlations from .stats import _cross_correlations import numpy as np import warn...
mit
iled/gsimcli
GSIMCLI/tools/grid.py
1
40370
# -*- coding: utf-8 -*- """ Class definitions to support grid and point-set objects, as defined in GSLIB_. .. _GSLIB: http://www.gslib.com Created on 12 de Out de 2013 @author: julio """ import os import time import bottleneck as bn import numpy as np import pandas as pd from tools.utils import skip_lines, filenam...
gpl-3.0
gmarkall/numba
numba/tests/test_extending.py
1
55333
import math import operator import sys import pickle import multiprocessing import ctypes import warnings from distutils.version import LooseVersion import re import numpy as np from numba import njit, jit, vectorize, guvectorize, objmode from numba.core import types, errors, typing, compiler, cgutils from numba.core...
bsd-2-clause
vidartf/hyperspy
hyperspy/signal.py
1
157155
# -*- 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
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/image.py
1
49347
""" The image module supports basic image loading, rescaling and display operations. """ import os import warnings import math import numpy as np from numpy import ma from matplotlib import rcParams import matplotlib.artist as martist from matplotlib.artist import allow_rasterization import matplotlib.colors as mco...
gpl-3.0
willgrass/pandas
pandas/core/panel.py
1
56830
""" Contains data structures designed for manipulating panel (3-dimensional) data """ # pylint: disable-msg=E1103 # pylint: disable-msg=W0231 # pylint: disable-msg=W0212 # pylint: disable-msg=W0621 import operator import sys import numpy as np from pandas.core.groupby import GroupBy from pandas.core.index import Ind...
bsd-3-clause
georgebv/PyEVA
AppCore/PyEVA.py
1
55099
# Import UI from MainWindow import Ui_MainWindow from ParseDialog import Ui_Dialog as Ui_ParseDialog from PlotSeriesDialog import Ui_Dialog as Ui_PlotSeriesDialog from BlockMaximaDialog import Ui_Dialog as Ui_BlockMaximaDialog from POTDialog import Ui_Dialog as Ui_POTDialog from PlotExtremesDialog import Ui_Dialog as U...
gpl-3.0
evanbiederstedt/RRBSfun
trees/chrom_scripts/total_chr15.py
2
32998
import glob import pandas as pd import numpy as np pd.set_option('display.max_columns', 50) # print all rows import os os.chdir("/gpfs/commons/home/biederstedte-934/evan_projects/correct_phylo_files") normalB = glob.glob("binary_position_RRBS_normal_B_cell*") mcell = glob.glob("binary_position_RRBS_NormalBCD19pCD27...
mit
lfairchild/PmagPy
pmagpy/pmag.py
1
477216
from past.utils import old_div import codecs import numpy as np import string import sys from numpy import random from numpy import linalg import os import time import math import pandas as pd from .mapping import map_magic from pmagpy import contribution_builder as cb from . import find_pmag_dir from pmag_env import s...
bsd-3-clause
simonsfoundation/CaImAn
caiman/source_extraction/cnmf/spatial.py
1
42586
#!/usr/bin/env python """ Created on Wed Aug 05 20:38:27 2015 # -*- coding: utf-8 -*- @author: agiovann """ # noinspection PyCompatibility from past.builtins import basestring from past.utils import old_div from builtins import zip from builtins import map from builtins import str from builtins import range import ...
gpl-2.0
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/dask/array/core.py
1
119688
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 ...
mit
wronk/mne-python
mne/surface.py
1
41238
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import os from os import path as op import sys from struct import pack from glob import glob import numpy as...
bsd-3-clause
gjermv/potato
sccs/gpx/gpxtricks.py
1
33116
# -*- coding: utf-8 -*- """ Created on Thu Nov 19 15:38:35 2015 @author: gjermund.vingerhagen """ from lxml import etree as etree import utmconverter as utm import algos as algos import dtmdata as dtm import pandas as pd from datetime import datetime as dt from timeit import default_timer as timer from da...
gpl-2.0
jcmgray/autoray
autoray/lazy/core.py
1
32177
import operator import threading import functools import itertools import contextlib import collections import numpy as np from ..autoray import ( get_lib_fn, infer_backend, get_dtype_name, register_function, astype, ) _EMPTY_DICT = {} class LazyArray: """A lazy array representing a shaped...
apache-2.0
rbharath/deepchem
examples/benchmark.py
1
37611
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 18 15:53:27 2016 @author: Michael Wu Benchmark test: Giving classification performances of: Random forest(rf), MultitaskDNN(tf), RobustMultitaskDNN(tf_robust), Logistic regression(logreg), IRV(irv) Graph convolution(graphconv), ...
mit
dimroc/tensorflow-mnist-tutorial
lib/python3.6/site-packages/matplotlib/tests/test_axes.py
3
153764
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import xrange from itertools import chain from distutils.version import LooseVersion import io from nose.tools import assert_equal, assert_raises, assert_false, assert_true from nose....
apache-2.0
pydata/xarray
xarray/core/accessor_str.py
1
86337
# The StringAccessor class defined below is an adaptation of the # pandas string methods source code (see pd.core.strings) # For reference, here is a copy of the pandas copyright notice: # (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team # All rights reserved. # Copyright (c) 2008-2011 AQR Capital Man...
apache-2.0
ver228/tierpsy-tracker
tierpsy/features/open_worm_analysis_toolbox/utils.py
1
37115
# -*- coding: utf-8 -*- """ Support functions used in other modules. Several, but not all, of the functions here are defined so we have functions that are the equivalent of the same-named functions in Matlab, e.g. gausswin """ from __future__ import division from itertools import groupby import os import sys import ...
mit
flohorovicic/pynoddy
pynoddy/experiment/topology_analysis.py
1
92483
# -*- coding: utf-8 -*- """ Created on Wed Jul 15 12:14:08 2015 @author: Sam Thiele """ import os import numpy as np import scipy as sp import math import pynoddy from pynoddy.experiment.monte_carlo import MonteCarlo from pynoddy.output import NoddyTopology from pynoddy.output import NoddyOutput from pynoddy.history ...
gpl-2.0
xuewei4d/scikit-learn
sklearn/model_selection/tests/test_search.py
4
80478
"""Test the search module""" from collections.abc import Iterable, Sized from io import StringIO from itertools import chain, product from functools import partial import pickle import sys from types import GeneratorType import re import numpy as np import scipy.sparse as sp import pytest from sklearn.utils._testing...
bsd-3-clause
nilsgrabbert/spark
python/pyspark/sql/dataframe.py
4
73207
# # 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
MIT-LCP/wfdb-python
wfdb/plot/plot.py
1
30588
import matplotlib.pyplot as plt import numpy as np import os import pdb from wfdb.io.record import Record, rdrecord from wfdb.io._header import float_types from wfdb.io._signal import downround, upround from wfdb.io.annotation import Annotation def plot_items(signal=None, ann_samp=None, ann_sym=None, fs=None, ...
mit
Acehaidrey/incubator-airflow
airflow/providers/google/cloud/hooks/bigquery.py
1
122955
# # 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
cojacoo/echoRD_model
echoRD/hydro_tools.py
1
49640
#hydro_plot - some python functions for hydrological visualisation #(cc) jackisch@kit.edu import numpy as np import pandas as pd import scipy as sp import matplotlib.pyplot as plt import matplotlib #TOOLS # a simple progress bar import sys, time try: from IPython.display import clear_output have_ipython = True...
gpl-3.0