repo_name
string
path
string
copies
string
size
string
content
string
license
string
runt18/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/lines.py
1
48241
""" This module contains all the 2D line class which can draw with a variety of line styles, markers and colors. """ # TODO: expose cap and join style attrs from __future__ import division import numpy as np from numpy import ma from matplotlib import verbose import artist from artist import Artist from cbook import ...
agpl-3.0
epfl-lts2/pygsp
pygsp/graphs/graph.py
1
33939
# -*- coding: utf-8 -*- from __future__ import division import os from collections import Counter import numpy as np from scipy import sparse from pygsp import utils from .fourier import FourierMixIn from .difference import DifferenceMixIn from ._io import IOMixIn from ._layout import LayoutMixIn class Graph(Four...
bsd-3-clause
MS047/XtraDataManager
XtraDataManager/FeaturesExtraction.py
1
57057
# -*- coding utf-8 -*- from __future__ import print_function # This script gathers the routines to extract kilosort/phy (kwikteam) generated units features, # stored in an instance of DataManager(): # - Sampling rate (30Khz) # - Spike times in sample units # - Spikes times in seconds # - Spikes units, unit correspondi...
gpl-3.0
bema-ligo/pycbc
pycbc/future.py
1
76491
# Copyright (C) 2012 Alex Nitz # # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in t...
gpl-3.0
ntbrewer/Pyspectr
build/lib/Pyspectr/pydamm.py
1
59209
#!/usr/bin/env python3 """K. Miernik 2012 k.a.miernik@gmail.com Distributed under GNU General Public Licence v3 This module is inteded to be loaded in an interactive interpreter session. The ipython is strongly recommended. The pydamm is a python replacement for DAMM programm. """ import math import numpy as np impo...
gpl-3.0
jamespeterschinner/async_v20
async_v20/definitions/primitives.py
1
58489
import logging import pandas as pd from .helpers import domain_check from ..exceptions import InvalidValue, InvalidFormatArguments logger = logging.getLogger(__name__) __all__ = ['AcceptDatetimeFormat', 'AccountFinancingMode', 'AccountID', 'AccountUnits', 'CancellableOrderType', 'CandlestickGranularity',...
mit
dhomeier/astropy
astropy/table/tests/test_table.py
1
101474
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from astropy.utils.tests.test_metadata import MetaBaseTest import gc import sys import copy from io import StringIO from collections import OrderedDict import pickle import pytest import numpy as np from numpy.testing import asser...
bsd-3-clause
zfrenchee/pandas
pandas/core/indexes/timedeltas.py
1
34462
""" implement the TimedeltaIndex """ from datetime import timedelta import numpy as np from pandas.core.dtypes.common import ( _TD_DTYPE, is_integer, is_float, is_bool_dtype, is_list_like, is_scalar, is_timedelta64_dtype, is_timedelta64_ns_dtype, pandas_dtype, _ensure_int64) fro...
bsd-3-clause
mattip/numpy
numpy/lib/npyio.py
1
90472
import sys import os import re import functools import itertools import warnings import weakref import contextlib from operator import itemgetter, index as opindex from collections.abc import Mapping import numpy as np from . import format from ._datasource import DataSource from numpy.core import overrides from numpy...
bsd-3-clause
MJuddBooth/pandas
pandas/io/formats/format.py
1
55267
# -*- 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 functools import partial import numpy as np from pandas._libs import lib from pandas._libs.tslib import format_array_fr...
bsd-3-clause
Transkribus/TranskribusDU
TranskribusDU/tasks/TablePrototypes/DU_ABPTableRCut1SIO.py
1
34506
# -*- coding: utf-8 -*- """ DU task for ABP Table: doing jointly row BIESO and horizontal cuts block2line edges do not cross another block. The cut are based on baselines of text blocks. - the labels of horizontal cuts are SIO (instead of SO in previous version) Copyright Naver Labs...
bsd-3-clause
ljwolf/spvcm
spvcm/abstracts.py
1
33984
import warnings from datetime import datetime as dt import numpy as np import copy import multiprocessing as mp import pandas as pd import os from .sqlite import head_to_sql, start_sql from .plotting import plot_trace from collections import OrderedDict try: from tqdm import tqdm import six if not six.PY3...
mit
wmvanvliet/mne-python
mne/utils/docs.py
1
102603
# -*- coding: utf-8 -*- """The documentation functions.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) from copy import deepcopy import inspect import os import os.path as op import sys import warnings import webbrowser from ..defaults import HEAD_SIZE_DEFAULT from ..externals.doccer ...
bsd-3-clause
queid7/hma
modules/util/ys_mat_plot_ex.py
1
47498
import pickle import matplotlib # matplotlib.interactive(True) # matplotlib.use('FltkAgg') matplotlib.use('agg') from pylab import * from matplotlib.widgets import * from matplotlib import collections from matplotlib.colors import color_converter import sys if '..' not in sys.path: sys.path.append('..') impor...
mit
ryanmdavis/BioTechTopics
BioTechTopics.py
1
33864
import os, json, string, nltk, sys, inspect from nltk.stem.porter import * from sklearn.feature_extraction.text import TfidfVectorizer,CountVectorizer from sklearn.decomposition import LatentDirichletAllocation from nltk.corpus import stopwords from sklearn.metrics.pairwise import linear_kernel from summa import keywor...
mit
FrederichCheng/incubator-superset
superset/viz.py
1
55055
"""This module contains the "Viz" objects These objects represent the backend of all the visualizations that Superset can render. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import hashlib import l...
apache-2.0
peraktong/Cannon-Experiment
0516_plot_jason_nick_aspcap_add_vsini.py
1
35028
import numpy as np from astropy.table import Table from astropy.io import fits import matplotlib.pyplot as plt import matplotlib import pickle from matplotlib import cm from numpy.random import randn # table path path = "/Users/caojunzhi/Downloads/upload_20170330_all/dr13.fits" star = fits.open(path) table = Table....
mit
phobson/statsmodels
statsmodels/discrete/discrete_model.py
1
116223
""" Limited dependent variable and qualitative variables. Includes binary outcomes, count data, (ordered) ordinal data and limited dependent variables. General References -------------------- A.C. Cameron and P.K. Trivedi. `Regression Analysis of Count Data`. Cambridge, 1998 G.S. Madalla. `Limited-Dependent an...
bsd-3-clause
parthea/pydatalab
solutionbox/structured_data/mltoolbox/_structured_data/_package.py
1
30767
# 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
darafferty/factor
factor/check_progress.py
1
38493
""" Module that checks and displays the progress of a run """ import sys import os import subprocess import shutil import numpy as np import pickle import logging import glob import ConfigParser import factor import factor.directions import factor.parset import casacore.images as pim import ast from astropy.coordinates...
gpl-2.0
josephcslater/scipy
scipy/optimize/nonlin.py
1
46688
r""" Nonlinear solvers ----------------- .. currentmodule:: scipy.optimize This is a collection of general-purpose nonlinear multidimensional solvers. These solvers find *x* for which *F(x) = 0*. Both *x* and *F* can be multidimensional. Routines ~~~~~~~~ Large-scale nonlinear solvers: .. autosummary:: newto...
bsd-3-clause
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/matplotlib/tri/triinterpolate.py
1
64375
""" Interpolation inside triangular grids. """ import numpy as np from matplotlib import cbook from matplotlib.tri import Triangulation from matplotlib.tri.trifinder import TriFinder from matplotlib.tri.tritools import TriAnalyzer __all__ = ('TriInterpolator', 'LinearTriInterpolator', 'CubicTriInterpolator') class...
gpl-2.0
Neurosim-lab/netpyne
netpyne/analysis/network.py
1
70340
""" Module for analyzing and plotting connectivity-related results """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import from builtins import open from builtins import next from builtins import range from builtins impo...
mit
krischer/wfdiff
src/wfdiff/wfdiff.py
1
35702
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Main wfdiff interfaces. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2015 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ # The following two lines are the main reason why the code works in Pytho...
gpl-3.0
zak-k/cartopy
lib/cartopy/io/ogc_clients.py
1
35074
# (C) British Crown Copyright 2014 - 2017, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option)...
lgpl-3.0
simion1232006/pyroms
pyroms/grid.py
1
33164
"grid.py" from numpy import * import pylab as pl import netCDF4 import os import warnings import pyroms from datetime import datetime, timedelta try: from matplotlib.toolkits.basemap import Basemap except: pass try: from scipy.sandbox import delaunay except: pass def extrapolate_mask(a, mask=None): ...
bsd-3-clause
plotly/plotly.py
packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py
1
77294
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class AngularAxis(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.angularaxis" _valid_props = { "autot...
mit
pyranges/pyrle
pyrle/rle.py
1
35267
"""Data structure for run length encoding representation and arithmetic.""" from pyrle.src.rle import sub_rles, add_rles, mul_rles, div_rles_zeroes, div_rles_nonzeroes from pyrle.src.coverage import _remove_dupes from pyrle.src.getitem import getitem, getlocs, getitems import pyrle as rle import pandas as pd import ...
mit
gplepage/lsqfit
src/lsqfit/_extras.py
1
71164
""" part of lsqfit module: extra functions """ # Created by G. Peter Lepage (Cornell University) on 2012-05-31. # Copyright (c) 2012-18 G. Peter Lepage. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
gpl-3.0
MiladHooshyar/DrainageNetworkExtraction
DrainageNetworkExtraction/Channel_Fun.py
1
47923
import arcpy from arcpy import env, mapping, Raster from arcpy.sa import * import numpy as np from numpy import arange, cos, linspace, pi, sin, random , array from scipy.interpolate import splprep, splev import matplotlib.pyplot as pl import os import sys from random import randrange arcpy.CheckOutExtension("Spatial")...
mit
rlabbe/filterpy
filterpy/kalman/kalman_filter.py
1
56499
# -*- coding: utf-8 -*- # pylint: disable=invalid-name, too-many-arguments, too-many-branches, # pylint: disable=too-many-locals, too-many-instance-attributes, too-many-lines """ This module implements the linear Kalman filter in both an object oriented and procedural form. The KalmanFilter class implements the filter...
mit
JossinetLab/CAAGLE
scripts/import_CGD.py
1
34455
#!/usr/bin/env python """ COMMAND-LINE ------------ You can run the program with this command-line: ./import_CGD.py For example: ./import_CGD.py -locus 1,10 ARGUMENTS --------- -locus: list of Integers. Each Integer corresponds to the position of the locus tag in the file named locus_tag.txt (by default: None ; all ...
mit
DailyActie/Surrogate-Model
01-codes/scikit-learn-master/sklearn/decomposition/nmf.py
1
47059
""" Non-negative matrix factorization """ # Author: Vlad Niculae # Lars Buitinck <L.J.Buitinck@uva.nl> # Mathieu Blondel <mathieu@mblondel.org> # Tom Dupre la Tour # Author: Chih-Jen Lin, National Taiwan University (original projected gradient # ...
mit
janelia-flyem/gala
gala/evaluate.py
1
49896
# coding=utf-8 import numpy as np import multiprocessing import itertools as it import collections as coll from functools import partial import logging import h5py import scipy.ndimage as nd import scipy.sparse as sparse from skimage.segmentation import relabel_sequential from scipy.ndimage.measurements import label f...
bsd-3-clause
tanghaibao/jcvi
jcvi/assembly/hic.py
1
57613
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Process Hi-C output into AGP for chromosomal-scale scaffolding. """ import array import json import logging import math import os import os.path as op import sys from collections import defaultdict from functools import partial from multiprocessing import Pool import ...
bsd-2-clause
antiface/audiolazy
audiolazy/lazy_filters.py
1
47749
# -*- coding: utf-8 -*- # This file is part of AudioLazy, the signal processing Python package. # Copyright (C) 2012-2014 Danilo de Jesus da Silva Bellini # # AudioLazy 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 Foun...
gpl-3.0
Sohojoe/damon
damon1/tests.py
1
44822
# -*- coding: utf-8 -*- # opts.py """tests.py unit tests for tools and methods related to Damon. Copyright (c) 2016, Mark H. Moulton """ #234567890123456789012345678901234567890123456789012345678901234567890123456789 import os import sys import numpy as np import numpy.random as npr import numpy.linalg as npla imp...
apache-2.0
jcmgray/xarray
xarray/tests/test_plot.py
1
53756
from __future__ import absolute_import, division, print_function import inspect from datetime import datetime import numpy as np import pandas as pd import pytest import xarray.plot as xplt from xarray import DataArray from xarray.coding.times import _import_cftime from xarray.plot.plot import _infer_interval_breaks...
apache-2.0
chaluemwut/fbserver
venv/lib/python2.7/site-packages/sklearn/tests/test_common.py
1
47590
""" General tests for all estimators in sklearn. """ # Authors: Andreas Mueller <amueller@ais.uni-bonn.de> # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause from __future__ import print_function import os import warnings import sys import traceback import inspect import pickle import pkg...
apache-2.0
luca-s/alphalens
alphalens/performance.py
1
52040
# # Copyright 2017 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
CamDavidsonPilon/lifelines
lifelines/fitters/coxph_fitter.py
1
135830
# -*- coding: utf-8 -*- from typing import Callable, Iterator, List, Optional, Tuple, Union, Any, Iterable from textwrap import dedent, fill from datetime import datetime import warnings import time from numpy import dot, einsum, log, exp, zeros, arange, multiply, ndarray import numpy as np from scipy.linalg import so...
mit
GuessWhoSamFoo/pandas
pandas/tests/io/test_packers.py
1
33322
import datetime from distutils.version import LooseVersion import glob import os from warnings import catch_warnings import numpy as np import pytest from pandas._libs.tslib import iNaT from pandas.compat import PY3, u from pandas.errors import PerformanceWarning import pandas from pandas import ( Categorical, D...
bsd-3-clause
BennettLandman/pyPheWAS
pyPheWAS/pyPhewasCorev2.py
1
34636
""" **pyPheWAS Core version 2 (main pyPheWAS code)** Contains all functions that drive the core PheWAS & ProWAS analysis tools. """ from collections import Counter import getopt import math import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import numpy as np import os import pandas ...
mit
cmorgan/pysystemtrade
syscore/optimisation.py
1
39785
''' Created on 21 Jan 2016 @author: rob ''' import pandas as pd import numpy as np import datetime from scipy.optimize import minimize from copy import copy import random from syscore.correlations import boring_corr_matrix, get_avg_corr from syscore.dateutils import generate_fitting_dates, BUSINESS_DAYS_IN_YEAR, WEE...
gpl-3.0
dwavesystems/dimod
tests/test_sampleset.py
1
45370
# Copyright 2018 D-Wave Systems 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...
apache-2.0
toobaz/pandas
pandas/core/arrays/sparse.py
1
71362
""" SparseArray data structure """ from collections import abc import numbers import operator import re from typing import Any, Callable import warnings import numpy as np from pandas._libs import index as libindex, lib import pandas._libs.sparse as splib from pandas._libs.sparse import BlockIndex, IntIndex, SparseIn...
bsd-3-clause
kevin-intel/scikit-learn
sklearn/linear_model/tests/test_coordinate_descent.py
2
55584
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import numpy as np import pytest from scipy import interpolate, sparse from copy import deepcopy import joblib from sklearn.base import is_classifier from sklearn.base import clone ...
bsd-3-clause
StochasticNumerics/mimclib
mimclib/plot.py
1
52098
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import matplotlib.pylab as plt from . import mimc from matplotlib.ticker import MaxNLocator __all__ = [] def public(sym): __all__.append(sym.__name__) return sym @public class Fun...
gpl-2.0
ratnania/pigasus
python/fem/field.py
1
35259
# -*- coding: UTF-8 -*- #! /usr/bin/python # To change this template, choose Tools | Templates # and open the template in the editor. __author__="ARA" __all__ = ['field'] __date__ ="$Jan 11, 2012 3:24:13 PM$" from . import common_obj as _com from . import constants as _cst import numpy as _np from numpy import zeros...
mit
samgale/ImageGui
ImageGui.py
1
193092
# -*- coding: utf-8 -*- """ Image visualization and analysis GUI Find Allen common coordinate framework data here: http://help.brain-map.org/display/mouseconnectivity/API http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/average_template/ http://download.alleninstitute.org/informatics-ar...
mit
ljwolf/pysal
pysal/weights/Distance.py
1
30290
from ..cg.kdtree import KDTree from .weights import W from .util import isKDTree, get_ids, get_points_array_from_shapefile, get_points_array import copy from warnings import warn as Warn import numpy as np __all__ = ["KNN", "Kernel", "DistanceBand"] __author__ = "Sergio J. Rey <srey@asu.edu>, Levi John Wolf <levi.john...
bsd-3-clause
jmmease/pandas
pandas/tests/frame/test_to_csv.py
1
44971
# -*- coding: utf-8 -*- from __future__ import print_function import csv import pytest from numpy import nan import numpy as np from pandas.compat import (lmap, range, lrange, StringIO, u) from pandas.errors import ParserError from pandas import (DataFrame, Index, Series, MultiIndex, Timestamp, ...
bsd-3-clause
bert9bert/statsmodels
statsmodels/tsa/statespace/mlemodel.py
1
111510
""" State Space Model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from statsmodels.compat.python import long import numpy as np import pandas as pd from scipy.stats import norm from .simulation_smoother import SimulationSmoother from .kalman_smooth...
bsd-3-clause
omki2005/influxdb-python
influxdb/tests/dataframe_client_test.py
1
30113
# -*- coding: utf-8 -*- """Unit tests for misc module.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from datetime import timedelta import json import unittest import warnings import requests_mock from influxdb...
mit
kklmn/xrt
xrt/backends/raycing/__init__.py
1
48305
# -*- coding: utf-8 -*- """ Package :mod:`~xrt.backends.raycing` provides the internal backend of xrt. It defines beam sources in the module :mod:`~xrt.backends.raycing.sources`, rectangular and round apertures in :mod:`~xrt.backends.raycing.apertures`, optical elements in :mod:`~xrt.backends.raycing.oes`, material pro...
mit
ruymanengithub/vison
vison/metatests/bf.py
1
35089
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Jul 22 17:01:36 2019 @author: raf """ # IMPORT STUFF from pdb import set_trace as stop import copy import numpy as np from collections import OrderedDict import string as st import os import matplotlib.cm as cm from vison.fpa import fpa as fpamod fro...
gpl-3.0
labase/eica
src/analisys/minutia.py
1
50913
# -*- coding: UTF8 -*- # import operator import os from csv import writer import matplotlib.pyplot as plt import matplotlib matplotlib.use('Agg') import pywt from tinydb import TinyDB, Query from matplotlib import collections as mc import numpy as np # import operator # from datetime import datetime as dt # from date...
gpl-2.0
nickgu/kvdict2
script/pydev.py
1
43821
#! /bin/env python # encoding=utf-8 # gusimiu@baidu.com # datemark: 20150428 # # V1.6: # add TempStorage. # # V1.5: # add png_to_array # # V1.4: # add zip_channel, index_to_one_hot # # V1.3: # add DimAnalysis # # V1.2: # add FileProgress # # V1.1: # add MailSender an...
mit
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/groupby/test_groupby.py
1
146594
# -*- coding: utf-8 -*- from __future__ import print_function import pytest from warnings import catch_warnings from string import ascii_lowercase from datetime import datetime from numpy import nan from pandas import (date_range, bdate_range, Timestamp, Index, MultiIndex, DataFrame, Series, ...
apache-2.0
rherault-insa/numpy
numpy/core/tests/test_multiarray.py
1
238195
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
tomevans/linvb
linvb/vbr_utilities.py
1
38579
import numpy as np import scipy.linalg import pdb import math import matplotlib.pyplot as plt def describe( vbr_object ): """ Prints some information about the VBR object to screen. """ print '--------------------------------------------------------------------------------' print 'VBR object descr...
gpl-2.0
zfrenchee/pandas
pandas/tests/frame/test_operators.py
1
45039
# -*- coding: utf-8 -*- from __future__ import print_function from collections import deque from datetime import datetime import operator import pytest from numpy import nan, random import numpy as np from pandas.compat import lrange, range from pandas import compat from pandas import (DataFrame, Series, MultiIndex...
bsd-3-clause
matthewpklein/battsimpy
tests/dae_genPart_T_distTest.py
1
71795
import numpy import numpy.linalg import scipy.linalg import scipy.interpolate from scipy.signal import wiener, filtfilt, butter, gaussian from scipy.ndimage import filters from matplotlib import pyplot as plt plt.style.use('classic') from assimulo.solvers import IDA from assimulo.problem import Implicit_Problem fro...
gpl-3.0
SanPen/GridCal
src/research/power_flow/newton_line_search.py
1
42687
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE_MATPOWER file. # Copyright 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. #...
gpl-3.0
itaiin/arrow
python/pyarrow/pandas_compat.py
1
32938
# 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
qiime2-plugins/normalize
q2_feature_table/tests/filter/test_filter_samples.py
1
33852
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, 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
materialsproject/pymatgen
pymatgen/analysis/phase_diagram.py
1
118213
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines tools to generate and analyze phase diagrams. """ import collections import itertools import json import logging import math import os import re from functools import lru_cache import ...
mit
Bleyddyn/malpi
exp/pg-pole.py
1
33115
""" Trains an agent with Deep Q Learning or Double DQN on Breakout. Uses OpenAI Gym. """ import sys import os sys.path.insert(0,os.path.expanduser('~/Library/Python/2.7/lib/python/site-packages/')) import numpy as np import cPickle as pickle import gym from optparse import OptionParser import itertools import random ...
mit
eost/wphase
bin/sacpy.py
1
33251
''' A simple class that deals with sac files Written by Z. Duputel, December 2013 available on GitHub: https://github.com/eost/sacpy.git ''' ############################################################################ # # W phase source inversion package # ...
gpl-3.0
cvjena/libmaxdiv
maxdiv/gui.py
1
58706
# coding=utf-8 """Graphical User Interface to the MDI algorithm. Provides a user interface for loading multivariate time-series from CSV files, setting the MDI parameters, running the algorithm and inspecting the detected intervals. Only non-spatial data is supported at the moment. """ try: # Python 3 impor...
lgpl-3.0
linebp/pandas
pandas/tests/series/test_operators.py
1
70480
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest import pytz from collections import Iterable from datetime import datetime, timedelta import operator from itertools import product, starmap from numpy import nan, inf import numpy as np import pandas as pd from pandas import (Index, Series, DataFrame, ...
bsd-3-clause
VoigtLab/dnaplotlib
dnaplotlib/dnaplotlib.py
1
135665
#!/usr/bin/env python """ DNAplotlib ========== This module is designed to allow for highly customisable visualisation of DNA fragments. Diagrams can be in the form of conceptual SBOL compliant icons or make use of icons whose width is scaled to allow for easier comparison of part locations to trace in...
mit
bloerg/aspect-tools
render_icons.py
1
40594
# -*- coding: utf-8 -*- #script that uses an input file similar to the full0_0.html files of an ASPECT run to make a mapping file from mjd-plateid-fiber-id to som_x,som_y #please install python-beautifulsoup4, python-lxml #in ubuntu do: sudo aptitude install python-bs4 python-lxml #in fedora do: dnf install python-be...
gpl-3.0
xuewei4d/scikit-learn
sklearn/utils/estimator_checks.py
4
118917
import types import warnings import pickle import re from copy import deepcopy from functools import partial, wraps from inspect import signature import numpy as np from scipy import sparse from scipy.stats import rankdata import joblib from . import IS_PYPY from .. import config_context from ._testing import _get_ar...
bsd-3-clause
winklerand/pandas
pandas/io/excel.py
1
64173
""" Module parse to/from Excel """ # --------------------------------------------------------------------- # ExcelFile class from datetime import datetime, date, time, MINYEAR import os import abc import warnings import numpy as np from pandas.core.dtypes.common import ( is_integer, is_float, is_bool, is_lis...
bsd-3-clause
infinnovation/piwall-cvtools
piwall.py
1
52153
#!/usr/bin/env python ''' Prototype .piwall generator to find monitor geometry from photograph of a piwall. Can operate sequentially on a set of photos to compare and contrast results. Commit Summary - Repeat test of the basic rectangle matching (c055d3a) against red backgrounds. - c055d3a Basic demonstra...
gpl-3.0
churchlab/phip-stat
gibbs.py
1
34200
#! /usr/bin/env python # Copyright 2014 Uri Laserson # # 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 o...
apache-2.0
tkarna/cofs
thetis/interpolation.py
1
31094
""" Methods for interpolating data from structured data sets on Thetis fields. Simple example of an atmospheric pressure interpolator: .. code-block:: python def to_latlon(x, y, positive_lon=False): # Converts mesh (x,y) points to coordinates used in the atm data lon, lat = coordsys_spcs.spcs2lo...
mit
iosonofabio/singlet
singlet/dataset/__init__.py
1
56056
# vim: fdm=indent # author: Fabio Zanini # date: 14/08/17 # content: Dataset that combines feature counts with metadata. # Modules import numpy as np import pandas as pd from ..samplesheet import SampleSheet from ..counts_table import CountsTable from ..featuresheet import FeatureSheet from .plugins impor...
mit
Rinoahu/POEM
lib/deprecate/deep_operon.py
1
42170
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # CreateTime: 2016-09-21 16:51:48 import numpy as np from Bio import SeqIO, Seq, SeqUtils #from Bio.SeqUtils.CodonUsage import CodonAdaptationIndex from Bio.SeqUtils import GC from Bio.SeqUtils.CodonUsage import SynonymousCodons import math from math impo...
gpl-3.0
ndingwall/scikit-learn
sklearn/metrics/tests/test_common.py
1
58074
from functools import partial from inspect import signature from itertools import product from itertools import chain from itertools import permutations import numpy as np import scipy.sparse as sp import pytest from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import LabelBinar...
bsd-3-clause
harisbal/pandas
pandas/tests/util/test_testing.py
1
34998
# -*- coding: utf-8 -*- import os import sys import textwrap import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Series, compat import pandas.util.testing as tm from pandas.util.testing import ( RNGContext, assert_almost_equal, assert_frame...
bsd-3-clause
Robozor-network/AROM
src/drivers/mount_old.py
1
40973
#!/usr/bin/env python import math import time import rospy import std_msgs import actionlib #import pandas import numpy as np from std_msgs.msg import String from std_msgs.msg import Float32 from arom.srv import * from arom.msg import * import arom import serial import json from astropy import units as u from astropy.c...
gpl-3.0
vdods/vorpy
vorpy/integration/adaptive.py
1
44528
""" Adaptive integrator(s) that control the error on specified quantities by varying the integration timestep. """ import abc import enum import itertools import numpy as np import typing import vorpy.integration.rungekutta """ Design notes - The goal is to keep the global error on each quantity within a certain ba...
mit
bobbymckinney/seebeck_measurement
program_hightemp/Seebeck_HighTemp_CMDLine.py
1
32012
#! /usr/bin/python # -*- coding: utf-8 -*- """ Created: 2016-02-09 @author: Bobby McKinney (bobbymckinney@gmail.com) """ import os import numpy as np import matplotlib.pyplot as plt import minimalmodbus as modbus # For communicating with the cn7500s import omegacn7500 # Driver for cn7500s under minimalmodbus, adds a fe...
gpl-3.0
EMS-TU-Ilmenau/fastmat
bee.py
1
41700
# -*- coding: utf-8 -*- # Copyright 2018 Sebastian Semper, Christoph Wagner # https://www.tu-ilmenau.de/it-ems/ # # 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/lice...
apache-2.0
bobbypaton/GoodVibes
goodvibes/pes.py
1
48976
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import math, os.path, sys import numpy as np # PHYSICAL CONSTANTS UNITS GAS_CONSTANT = 8.3144621 # J / K / mol J_TO_AU = 4.184 * 627.509541 * 1000.0 # UNIT CONVERSION KCAL_TO_AU = 627.509541 # UNIT C...
mit
johnmgregoire/NanoCalorimetry
PnSC_SCui.py
1
104591
import time import os, os.path import sys import numpy import h5py from PyQt4.QtCore import * from PyQt4.QtGui import * import operator import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationT...
bsd-3-clause
rubdos/npTDMS
nptdms/tdms.py
1
32500
"""Python module for reading TDMS files produced by LabView""" import itertools import logging import struct import sys from collections import namedtuple try: from collections import OrderedDict except ImportError: try: # ordereddict available on pypi for Python < 2.7 from ordereddict import O...
lgpl-3.0
bicv/SLIP
SLIP/SLIP.py
1
34612
# -*- coding: utf8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) """ SLIP: a Simple Library for Image Processing. See http://pythonhosted.org/SLIP """ import numpy as np def imread(URL, grayscale=True, rgb2gray=[0.2989, 0.5870, 0.1140]): """ Loads whatever image. Re...
gpl-2.0
LeeKamentsky/CellProfiler
cellprofiler/gui/cpfigure.py
1
91507
""" cpfigure.py - provides a frame with a figure inside CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All rights reserved. Please see the AUTHORS fi...
gpl-2.0
amaurywalbert/twitter
evaluation/without_ground_truth/chens_metrics/plot_metrics.py
2
37043
# -*- coding: latin1 -*- ################################################################################################ import datetime, sys, time, json, os, os.path, shutil, time, struct, random, math import matplotlib.pyplot as plt import matplotlib.mlab as mlab import pylab import numpy as np from math import* imp...
gpl-3.0
jucares/lisn_utils
lisn_utils/plotter.py
1
32708
# -*- coding: utf-8 -*- ''' Utilities to plot gps data @author: Juan C. Espinoza @contact: jucar.espinoza@gmail.com ''' __version__ = 1.0 import os, time import numpy as np from StringIO import StringIO from pkg_resources import resource_string import utility as utl import gps from gpsdatetime import GPSDateTime, t...
gpl-3.0
Leoniela/nipype
nipype/pipeline/utils.py
1
46554
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Utility routines for workflow graphs """ from copy import deepcopy from glob import glob from collections import defaultdict import os import pwd import re from uuid import uuid1 import numpy as np fro...
bsd-3-clause
bjackman/trappy
trappy/ftrace.py
1
32552
# Copyright 2015-2017 ARM Limited # # 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 w...
apache-2.0
fred3m/toyz
toyz/web/tasks.py
1
30883
# Job tasks sent from web client # Copyright 2015 by Fred Moolekamp # License: BSD 3-clause """ While each toy may contain a large number of functions, only the functions located in the ``tasks.py`` file will be callable from the job queue. """ from __future__ import print_function, division import importlib import os...
bsd-3-clause
jepegit/cellpy
cellpy/utils/helpers.py
1
32102
import os import logging import pathlib import warnings import collections from copy import deepcopy import numpy as np import pandas as pd from scipy import stats import cellpy from cellpy import prms from cellpy.parameters.internal_settings import ( get_headers_summary, get_headers_step_table, get_heade...
mit
b-carter/numpy
numpy/linalg/linalg.py
1
77776
"""Lite version of scipy.linalg. Notes ----- This module is a lite version of the linalg.py module in SciPy which contains high-level Python interface to the LAPACK library. The lite version only accesses the following LAPACK functions: dgesv, zgesv, dgeev, zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetr...
bsd-3-clause
zak-k/cis
cis/test/plot_tests/test_plotting.py
1
35398
""" Module to do integration tests of plots, checking that the outputs look right. """ from cis.cis_main import plot_cmd from cis.parse import parse_args from cis.test.integration_test_data import * from cis.test.integration.base_integration_test import BaseIntegrationTest from cis.data_io.products.AProduct import Prod...
gpl-3.0
omeed-maghzian/mtag
ldsc_mod/ldsc.py
1
30790
#!/usr/bin/env python ''' (c) 2014 Brendan Bulik-Sullivan and Hilary Finucane LDSC is a command line tool for estimating 1. LD Score 2. heritability / partitioned heritability 3. genetic covariance / correlation ''' from __future__ import division import ldscore.ldscore as ld import ldscore.parse as ps im...
gpl-3.0