repo_name string | path string | copies string | size string | content string | license string |
|---|---|---|---|---|---|
rth/PyKrige | pykrige/uk.py | 1 | 53525 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import scipy.linalg
from scipy.spatial.distance import cdist
import matplotlib.pyplot as plt
from . import variogram_models
from . import cor... | bsd-3-clause |
kevin-intel/scikit-learn | sklearn/linear_model/tests/test_logistic.py | 3 | 78639 | import os
import re
import warnings
import numpy as np
from numpy.testing import assert_allclose, assert_almost_equal
from numpy.testing import assert_array_almost_equal, assert_array_equal
import scipy.sparse as sp
from scipy import linalg, optimize, sparse
import pytest
from sklearn.base import clone
from sklearn.d... | bsd-3-clause |
semonte/intellij-community | python/helpers/pydev/pydevd.py | 2 | 64732 | '''
Entry point module (keep at root):
This module starts the debugger.
'''
from __future__ import nested_scopes # Jython 2.1 support
import atexit
import os
import sys
import traceback
from _pydevd_bundle.pydevd_constants import IS_JYTH_LESS25, IS_PY3K, IS_PY34_OLDER, get_thread_id, dict_keys, dict_contains, \
... | apache-2.0 |
prisae/empymod | tests/test_utils.py | 1 | 45461 | import pytest
import numpy as np
from numpy.testing import assert_allclose
# Optional import
try:
import scooby
except ImportError:
scooby = False
from empymod import utils, filters
def test_emarray():
out = utils.EMArray(3)
assert out.amp() == 3
assert out.pha() == 0
assert out.real == 3
... | apache-2.0 |
icexelloss/arrow | python/pyarrow/tests/test_convert_pandas.py | 1 | 79637 | # -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 |
TomAugspurger/pandas | pandas/tests/io/json/test_pandas.py | 1 | 59710 | from collections import OrderedDict
import datetime
from datetime import timedelta
from io import StringIO
import json
import os
import numpy as np
import pytest
from pandas.compat import is_platform_32bit, is_platform_windows
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame... | bsd-3-clause |
Diyago/Machine-Learning-scripts | DEEP LEARNING/segmentation/Severstal-Steel-Defect-Detection-master/inference.py | 1 | 36203 | #!/usr/bin/env python
# coding: utf-8
get_ipython().system(" python ../input/mlcomp/mlcomp/mlcomp/setup.py")
get_ipython().system(
"pip install ../input/../input/efficientnet-pytorch/efficientnet-pytorch/EfficientNet-PyTorch-master"
)
get_ipython().system(
"pip install ../input/pretrainedmodels/pretrainedmode... | apache-2.0 |
adykstra/mne-python | mne/io/base.py | 1 | 99975 | # -*- coding: utf-8 -*-
# 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>
# Mari... | bsd-3-clause |
lukebarnard1/bokeh | bokeh/crossfilter/models.py | 2 | 30379 | from __future__ import absolute_import
import logging
import six
import pandas as pd
import numpy as np
from ..plotting import curdoc
from ..models import ColumnDataSource, GridPlot, Panel, Tabs, Range
from ..models.widgets import Select, MultiSelect, InputWidget
# crossfilter plotting utilities
from .plotting impo... | bsd-3-clause |
civisanalytics/civis-python | civis/ml/tests/test_model.py | 1 | 44228 | from builtins import super
from collections import namedtuple
from concurrent.futures import CancelledError
from io import StringIO
import json
import os
import pickle
from tempfile import TemporaryDirectory
from unittest import mock
import joblib
try:
import pandas as pd
HAS_PANDAS = True
except ImportError:
... | bsd-3-clause |
aarchiba/scipy | scipy/special/_basic.py | 1 | 67907 | #
# Author: Travis Oliphant, 2002
#
from __future__ import division, print_function, absolute_import
import operator
import numpy as np
import math
from scipy._lib.six import xrange
from numpy import (pi, asarray, floor, isscalar, iscomplex, real,
imag, sqrt, where, mgrid, sin, place, issubdtype,
... | bsd-3-clause |
bnaul/scikit-learn | sklearn/linear_model/_least_angle.py | 1 | 69941 | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 clause
from math import log
import sys... | bsd-3-clause |
savvytruffle/cauldron | eb_fitting.py | 1 | 106527 | import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import lmfit
if lmfit.__version__[2] != '9':
print "Version >= 0.9 of lmfit required..."
sys.exit()
from lmfit import minimize, Parameters, report_fit
import scipy.optimize, scipy.special
import numpy as np
try:
from keb... | mit |
prisae/empymod | empymod/utils.py | 1 | 65658 | r"""
:mod:`empymod.utils` -- Utilites
================================
Utilities for :mod:`empymod.model` such as checking input parameters.
This module consists of four groups of functions:
0. General settings
1. Class EMArray
2. Input parameter checks for modelling
3. Internal utilities
"""
# Copyrigh... | apache-2.0 |
brandontrabucco/program-gan | experiment.py | 1 | 59393 | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import string as sn
from time import time
from datetime import datetime
# The location on the disk of project
PROJECT_BASEDIR = ("G:/My Drive/Academic/Research/" +
"Program Synthesis with Deep Learning/")
# The location on the disk of p... | mit |
simontorres/goodman | goodman_pipeline/core/tests/test_core.py | 1 | 92840 | from __future__ import absolute_import
from unittest import TestCase, skip
from ccdproc import CCDData
from astropy.convolution import convolve, Gaussian1DKernel, Box1DKernel
from astropy.io import fits
from astropy.modeling import Model
from astropy.modeling import (models,
fitting)
impo... | bsd-3-clause |
plotly/python-api | packages/python/plotly/plotly/graph_objs/_waterfall.py | 1 | 86575 | from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Waterfall(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "waterfall"
_valid_props = {
"alignmentgroup",
"base",
"cliponaxis",
"... | mit |
zak-k/cis | cis/plotting/generic_plot.py | 1 | 37493 | import logging
import numpy as np
from matplotlib.ticker import MaxNLocator, AutoMinorLocator
# Matplotlib at v1.5 keeps throwing warnings about building the font cache - these are INFO level at best.
from cis.utils import demote_warnings
with demote_warnings():
import matplotlib.pyplot as plt
from cis.exception... | gpl-3.0 |
dricciardelli/vae2vec | VAE_def3.py | 1 | 33360 | ''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html '''
import time
import numpy as np
import tensorflow as tf
from tensorflow.python.ops import rnn
import random
import matplotlib.pyplot as plt
import re, string
from sklearn.feature_extraction.text import CountVectorizer
from collections impo... | mit |
jcdoll/PiezoD | python/PiezoD/Cantilever.py | 1 | 104809 | import numpy as np
import math
import scipy as sp
from scipy import optimize
from scipy import interpolate
import numpy.random as rnd
import matplotlib.pyplot as plt
class Cantilever:
# Physical constants
k_b = 1.38e-23 # J/K
k_b_eV = 8.617343e-5 # eV/K
q = 1.60218e-19 ... | gpl-3.0 |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/site-packages/numpy/lib/recfunctions.py | 1 | 34825 | """
Collection of utilities to manipulate structured arrays.
Most of these functions were initially implemented by John Hunter for matplotlib.
They have been rewritten and extended for convenience.
"""
import sys
import itertools
import numpy as np
import numpy.ma as ma
from numpy import ndarray, recarray
from nump... | gpl-3.0 |
akuefler/fovea | fovea/graphics.py | 1 | 129719 | """
Graphical user interface and plotting tools for dynamical systems
Rob Clewley, 2015
based on work by:
Bryce Chung and Rob Clewley, 2012
==== Usage notes:
Plotting styles can be given either as a string or as a dictionary of
style kwargs suitable for plot command
"""
from __future__ import division, absolute_i... | bsd-3-clause |
BiaDarkia/scikit-learn | sklearn/naive_bayes.py | 9 | 36010 | # -*- coding: utf-8 -*-
"""
The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These
are supervised learning methods based on applying Bayes' theorem with strong
(naive) feature independence assumptions.
"""
# Author: Vincent Michel <vincent.michel@inria.fr>
# Minor fixes by Fabian Pedre... | bsd-3-clause |
yl565/statsmodels | statsmodels/base/model.py | 1 | 80304 | from __future__ import print_function
from statsmodels.compat.python import iterkeys, lzip, range, reduce
import numpy as np
from scipy import stats
from statsmodels.base.data import handle_data
from statsmodels.tools.data import _is_using_pandas
from statsmodels.tools.tools import recipr, nan_dot
from statsmodels.stat... | bsd-3-clause |
rodluger/planetplanet | planetplanet/photo/ppo.py | 1 | 66073 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
ppo.py |github|
---------------
The main Python interface to the C photodynamics code. Allows users to compute
and plot planet-planet occultation light curves, as well as transits, secondary
eclipses, phase curves, mutual transits, planet-moon events, and more.
.. ... | gpl-3.0 |
tmthydvnprt/compfipy | compfipy/market.py | 1 | 36130 | # pylint: disable=global-statement
"""
market.py
Operations that work on the whole market, either an index asset or a DataFrame of individual assets.
Symbol Lists are downloaded from NASDAQ's FTP
ftp://ftp.nasdaqtrader.com/SymbolDirectory/nasdaqlisted.txt
ftp://ftp.nasdaqtrader.com/SymbolDirectory/otherlisted... | mit |
amolkahat/pandas | pandas/tests/arrays/sparse/test_array.py | 1 | 41433 | from pandas.compat import range
import re
import operator
import pytest
import warnings
from numpy import nan
import numpy as np
import pandas as pd
from pandas.core.sparse.api import SparseArray, SparseSeries, SparseDtype
from pandas._libs.sparse import IntIndex
from pandas.util.testing import assert_almost_equal
i... | bsd-3-clause |
ANTsX/ANTsPy | ants/registration/interface.py | 1 | 62218 | """
ANTsPy Registration
"""
__all__ = ["registration", "motion_correction"]
import os
import numpy as np
from tempfile import mktemp
import glob
import re
import pandas as pd
import itertools
from . import apply_transforms_to_points
from .. import utils
from ..core import ants_image as iio
from .. import core
def r... | apache-2.0 |
asensar/python-opendaq | opendaq/EasyDAQ.py | 1 | 45845 | '''
Created on 01/03/2012
@author: Adrian
'''
import os
import sys
import wx
from daq import *
import threading
import fractions
import time
from wx.lib.agw.floatspin import FloatSpin
import numpy as np
import csv
import random
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.backends.backend_wxagg import ... | lgpl-3.0 |
dsm054/pandas | pandas/tests/reshape/test_concat.py | 1 | 101243 | from warnings import catch_warnings, simplefilter
from itertools import combinations
from collections import deque
from decimal import Decimal
import datetime as dt
import dateutil
import numpy as np
from numpy.random import randn
from datetime import datetime
from pandas.compat import Iterable, StringIO, iteritems, ... | bsd-3-clause |
ebrahimraeyat/civilTools | applications/section/analysis/cross_section.py | 1 | 170338 | import copy
import numpy as np
from scipy.sparse import csc_matrix, coo_matrix, linalg
from scipy.optimize import brentq
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import matplotlib.tri as tri
import matplotlib.cm as cm
import matplotlib.patches as mpatches
from matplotlib.colors import ... | gpl-3.0 |
agile-geoscience/striplog | striplog/defaults.py | 1 | 61979 | """
Defines some default values for parsing cuttings descriptions.
:copyright: 2015 Agile Geoscience
:license: Apache 2.0
"""
# This is the matplotlib colour table. I'm trying to avoid having to
# depend on matplotlib just for this. Goal is that matplotlib plotting
# will be optional.
COLOURS = {
'k': '#000000',
... | apache-2.0 |
KatonaLab/vividstorm | controllers/viewer/tifffile.py | 1 | 172974 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# tifffile.py
# Copyright (c) 2008-2014, Christoph Gohlke
# Copyright (c) 2008-2014, The Regents of the University of California
# Produced at the Laboratory for Fluorescence Dynamics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or wit... | lgpl-3.0 |
flennerhag/mlens | mlens/parallel/learner.py | 1 | 33234 | """ML-Ensemble
:author: Sebastian Flennerhag
:copyright: 2017-2018
:license: MIT
Computational graph nodes. Job generator classes spawning jobs and executing
estimation on cross-validation sub-graphs.
"""
# pylint: disable=too-few-public-methods
# pylint: disable=too-many-arguments
# pylint: disable=too-many-instance... | mit |
LJohnnes/iembdfa | ex3groupf/FA_GroupF_Final_A1A41A6_H1H5.py | 1 | 42860 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 14 08:53:54 2016
@author: jparker
"""
import pandas as pd
import numpy as np
import statsmodels.api as sm
import re
import requests
from requests.auth import HTTPBasicAuth
from sklearn.ensemble import RandomForestClassifier
from sklearn import svm, metrics
... | mit |
EFerriss/pynams | pynams/spectra.py | 1 | 64537 | """
Code for processing and plotting FTIR spectra.
The central concept is an object class called Spectrum, which contains
relevant attributes and methods.
A few defaults are set up that are geared toward H in nominally anhydrous
minerals (NAMs) such a plotting wavenumber range from 3000 to 4000 /cm and
creating basel... | mit |
AdaptivePELE/AdaptivePELE | AdaptivePELE/simulation/simulationrunner.py | 1 | 87095 | from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
import json
import time
import glob
import shutil
import string
import numbers
import itertools
from builtins import range
import multiprocessing as mp
import numpy as np
import mdtraj as md
import AdaptivePELE.const... | mit |
Foxfanmedium/python_training | OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/IPython/sphinxext/ipython_directive.py | 1 | 42151 | # -*- coding: utf-8 -*-
"""
Sphinx directive to support embedded IPython code.
This directive allows pasting of entire interactive IPython sessions, prompts
and all, and their code will actually get re-executed at doc build time, with
all prompts renumbered sequentially. It also allows you to input code as a pure
pyth... | apache-2.0 |
pizzathief/numpy | numpy/core/fromnumeric.py | 1 | 116273 | """Module containing non-deprecated functions borrowed from Numeric.
"""
from __future__ import division, absolute_import, print_function
import functools
import types
import warnings
import numpy as np
from .. import VisibleDeprecationWarning
from . import multiarray as mu
from . import overrides
from . import umat... | bsd-3-clause |
jaeilepp/eggie | mne/source_estimate.py | 1 | 103688 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Mads Jensen <mje.mads@gmail.com>
#
# License: BSD (3-clause)
from .externals.six import string_types
import os
import copy
from... | bsd-2-clause |
xuanyuanking/spark | python/pyspark/pandas/indexes/base.py | 1 | 84288 | #
# 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 |
kapteyn-astro/kapteyn | kapteyn/maputils.py | 1 | 601245 | #!/usr/bin/env python
#----------------------------------------------------------------------
# FILE: maputils.py
# PURPOSE: Provide methods to extract 2-dim image data from FITS file
# if dimension of data set is 2 or higher.
# A WCS map class allows a user to add wcs labels and
# wcs gr... | bsd-3-clause |
Doctor-love/kkross | playground/cli/ext/tabulate.py | 1 | 57295 | # -*- coding: utf-8 -*-
"""Pretty-print tabular data."""
from __future__ import print_function
from __future__ import unicode_literals
from collections import namedtuple, Iterable
from platform import python_version_tuple
from signal import signal, SIGPIPE, SIG_DFL
import re
import math
if python_version_tuple()[0]... | gpl-2.0 |
marcelo21/FE-MAS1000 | source/main.py | 1 | 45325 | import sys
import time
import manejo_cajas as mc
import numpy as np
import os
#import six
#import packaging
#import packaging.version
#import packaging.requirements
#import packaging.specifiers
from PyQt4 import QtCore, QtGui, uic
from openpyxl import Workbook, load_workbook
import matplotlib.pyplot as plt
from matp... | gpl-3.0 |
kdaily/altanalyze | Config/RemoteViewer.py | 1 | 255820 | from numpy import arange, sin, pi
import os.path, sys, shutil
import wx.lib.scrolledpanel
import wx.grid as gridlib
import os
import string, re
import wx
import subprocess
from wx import *
import __init__
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
matplotlib.use('WXAgg') #WXAgg
from matplotlib... | apache-2.0 |
GuessWhoSamFoo/pandas | pandas/tests/arithmetic/test_timedelta64.py | 1 | 75677 | # -*- coding: utf-8 -*-
# Arithmetc tests for DataFrame/Series/Index/Array classes that should
# behave identically.
from datetime import datetime, timedelta
import numpy as np
import pytest
from pandas.errors import NullFrequencyError, PerformanceWarning
import pandas as pd
from pandas import (
DataFrame, Datet... | bsd-3-clause |
waterponey/scikit-learn | sklearn/model_selection/_split.py | 1 | 63148 | """
The :mod:`sklearn.model_selection._split` module includes classes and
functions to split the data based on a preset strategy.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>,
# Olivier Grisel <olivier.grisel@ensta.org>
# Ragha... | bsd-3-clause |
KristoferHellman/gimli | python/pygimli/solver/solver.py | 1 | 32339 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygimli as pg
from pygimli.utils import unique
import numpy as np
def parseArgToArray(arg, ndof, mesh=None, userData=None):
"""
Parse array related arguments to create a valid value array.
Parameters
----------
arg : float | int | iterable | ... | gpl-3.0 |
MicrosoftGenomics/FaST-LMM | fastlmm/inference/lmm_cov.py | 1 | 49146 | import numpy as np
import numpy.linalg as la
import scipy.optimize as opt
import scipy.stats as st
import scipy.special as ss
from fastlmm.util.mingrid import *
from fastlmm.util.util import *
import time
class LMM(object):
'''
linear mixed model with up to two kernels
N(y | X*beta + covariates*alpha; sig... | apache-2.0 |
qsnake/gpaw | gpaw/test/parallel/ut_hsops.py | 1 | 31146 | #!/usr/bin/env python
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
... | gpl-3.0 |
arokem/seaborn | seaborn/tests/test_axisgrid.py | 2 | 56633 | import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import pytest
import numpy.testing as npt
from numpy.testing import assert_array_equal
try:
import pandas.testing as tm
except ImportError:
import pandas.util.testing as tm
from .._core import categorical_order
fro... | bsd-3-clause |
bobbymckinney/hall_measurement | program_roomtemp/HT_HallEffectGUIv1.py | 2 | 132320 | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""
Created: 2015-03-31
@author: Bobby McKinney (bobbymckinney@gmail.com)
__Title__ : voltagepanel
Description:
Comments:
"""
import os
import sys
import wx
from wx.lib.pubsub import pub # For communicating b/w the thread and the GUI
import matplotlib
matplotlib.interactive(... | gpl-3.0 |
waqasbhatti/astrobase | astrobase/checkplot/pkl_utils.py | 1 | 76752 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# pkl_utils.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Feb 2019
# License: MIT.
'''
This contains utility functions that support checkplot.pkl public functions.
'''
#############
## LOGGING ##
#############
import logging
from astrobase import log_sub, log_fmt, l... | mit |
DiCarloLab-Delft/PycQED_py3 | pycqed/simulations/cz_superoperator_simulation_functions_v2.py | 1 | 94448 | import numpy as np
import qutip as qtp
import scipy
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
import logging
log = logging.getLogger(__name__)
np.set_printoptions(threshold=np.inf)
# Hardcoded number of levels for the two transmons.
# Currently only 3,3 or 4,3 are supported. The bottle... | mit |
pravsripad/jumeg | pipelines/gdcnn/dcnn_base.py | 2 | 51715 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Authors:
- Frank Boers: f.boers@fz-juelich.de
- Jürgen Dammers: j.dammers@fz-juelich.de
"""
import yaml
from os import path as op
from copy import deepcopy
import numpy as np
import collections, pprint
import mne
from mne.viz import topomap
from dcnn_utils impor... | bsd-3-clause |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/pandas/tseries/index.py | 1 | 66377 | # pylint: disable=E1101
import operator
from datetime import time, datetime
from datetime import timedelta
import numpy as np
from pandas.core.common import (isnull, _NS_DTYPE, _INT64_DTYPE,
is_list_like,_values_from_object, _maybe_box,
notnull, ABCSeri... | gpl-3.0 |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/carpet/_baxis.py | 1 | 84390 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Baxis(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "carpet"
_path_str = "carpet.baxis"
_valid_props = {
"arraydtick",
"arraytick0... | mit |
ppuggioni/invivoinfer | invivoinfer/pyprocess.py | 1 | 73009 | from __future__ import division
"""
PyProcess
@author: Cameron Davidson-Pilon
"""
import numpy as np
import scipy as sp
import scipy.stats as stats
from scipy.special import gammainc
import warnings
import matplotlib.pyplot as plt
np.seterr( divide="raise")
#TODO change all generate_ to sample_
class Step_proces... | apache-2.0 |
imito/odin | odin/ml/decompositions.py | 1 | 39427 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import math
from multiprocessing import Array, Value
from numbers import Number
import numpy as np
from scipy import linalg
from six import string_types
from sklearn.decomposition import PCA, IncrementalPCA
from sklearn.utils imp... | mit |
willettk/decals | python/decals.py | 1 | 36470 | # Find entries in the NASA-Sloan Atlas (NSA) that have a brick with images in Dark Energy Camera Legacy Survey (DECaLS)
from __future__ import division
from astropy.io import fits
from astropy.table import Table
import numpy as np
from matplotlib import pyplot as plt
import requests
import random
import datetime
impo... | mit |
cbertinato/pandas | pandas/tests/io/json/test_pandas.py | 1 | 54614 | from collections import OrderedDict
from datetime import timedelta
from io import StringIO
import json
import os
import numpy as np
import pytest
from pandas.compat import is_platform_32bit
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, DatetimeIndex, Series, Timestamp, r... | bsd-3-clause |
bloyl/mne-python | mne/epochs.py | 1 | 147455 | # -*- coding: utf-8 -*-
"""Tools for working with epoched data."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Matti Hämäläinen <msh@nmr.mgh.harvard.edu>
# Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de>
# Denis Engemann <denis.engemann@gmail.com>
# Mainak Jas... | bsd-3-clause |
trichter/qopen | qopen/core.py | 1 | 82828 | # Copyright 2015-2020 Tom Eulenfeld, MIT license
"""
Qopen command line script and routines
:func:`run_cmdline` is started by the ``qopen`` command line script.
Import and call :func:`run` if you want to use *Qopen* inside Python code:
>>> from qopen import run
>>> run(conf='conf.json')
Qopen will run the following ... | mit |
cojacoo/echoRD_model | echoRD/partdyn_d2.py | 1 | 43305 | # coding=utf-8
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
import scipy.constants as const
import scipy.ndimage as spn
import dataread as dr
import vG_conv as vG
#particle dynamics
#macropore mc.soilmatrix interaction
def cellgrid(lat,z,mc):
'''Calculate cell number from given position o... | gpl-3.0 |
alperyeg/elephant | elephant/cell_assembly_detection.py | 1 | 49253 | """
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 |
blondegeek/pymatgen | pymatgen/analysis/adsorption.py | 3 | 30497 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module provides classes used to enumerate surface sites
and to find adsorption sites on slabs
"""
import numpy as np
from pymatgen import Structure, Lattice, vis
import itertools
import os
from monty... | mit |
rwgdrummer/maskgen | hp_tool/hp/CameraForm.py | 1 | 33662 | import csv
import tkSimpleDialog
import webbrowser
from Tkinter import *
import ttk
import pandas as pd
import os
import collections
import subprocess
import tkFileDialog, tkMessageBox
import json
import requests
from camera_handler import API_Camera_Handler
from hp_data import exts
import data_files
"""
Contains clas... | bsd-3-clause |
rkmaddox/expyfun | expyfun/stimuli/_tracker.py | 1 | 35451 | """Adaptive tracks for psychophysics (individual, or multiple randomly dealt)
"""
# Author: Ross Maddox <ross.maddox@rochester.edu>
#
# License: BSD (3-clause)
import numpy as np
import time
from scipy.stats import binom
import json
import warnings
from .. import ExperimentController
# =============================... | bsd-3-clause |
Ebag333/Pyfa | gui/mainFrame.py | 1 | 51878 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 ... | gpl-3.0 |
tylerjereddy/steric-conflict-resolution | docker_build/run_steric_resolution.py | 1 | 30823 | '''This script runs the iterative procedure that follows the workflow: steric assessment - alchembed - steric assessment, etc.'''
import glob
import argparse
import time
import sys
import subprocess
import cPickle as pickle
import numpy as np
import generate_mdp
import collections
import MDAnalysis
import matplotlib
m... | mit |
umuzungu/zipline | zipline/pipeline/factors/factor.py | 1 | 43449 | """
factor.py
"""
from functools import partial, wraps
from operator import attrgetter
from numbers import Number
from numpy import inf, where
from zipline.errors import UnknownRankMethod
from zipline.lib.normalize import naive_grouped_rowwise_apply
from zipline.lib.rank import masked_rankdata_2d
from zipline.pipelin... | apache-2.0 |
GroestlCoin/electrum-grs | electrum_grs/gui/qt/history_list.py | 1 | 31502 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | gpl-3.0 |
nyu-dl/QueryReformulator | run.py | 1 | 33453 | # -*- coding: utf-8 -*-
'''
Build and train the query reformulator model
'''
import cPickle as pkl
import time
import numpy as np
import theano
import theano.tensor as tensor
import utils
import corpus_hdf5
import dataset_hdf5
import parameters as prm
import nltk
import random
import sys
import h5py
from theano import ... | bsd-3-clause |
nmartensen/pandas | pandas/tests/test_window.py | 1 | 154031 | from itertools import product
import pytest
import sys
import warnings
from warnings import catch_warnings
from datetime import datetime, timedelta
from numpy.random import randn
import numpy as np
from distutils.version import LooseVersion
import pandas as pd
from pandas import (Series, DataFrame, bdate_range, isna,... | bsd-3-clause |
mdeff/ntds_2016 | project/reports/fake_news/lib/ntds_utils.py | 1 | 35895 | """
Credit to this utility module is given to Michaël Defferrard and Xavier Bresson
"""
import numpy as np
import scipy.sparse
from collections import defaultdict
from scipy import stats
import time
import matplotlib.pyplot as plt
import pandas as pd
import sklearn.metrics.pairwise
from . import ncut
def reindex_W_... | mit |
thomasorb/orb | orb/image.py | 1 | 64013 | #!/usr/bin/env python
# *-* coding: utf-8 *-*
# author : Thomas Martin (thomas.martin.1@ulaval.ca)
# File: image.py
## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca>
##
## This file is part of ORB
##
## ORB is free software: you can redistribute it and/or modify it
## under the terms of the GNU Gen... | gpl-3.0 |
d-meiser/ion-trapping-notes | mode_analysis_code.py | 1 | 34521 | from __future__ import division, with_statement
from scipy.constants import pi
import scipy.constants as cons
import numpy as np
import scipy.optimize as optimize
import matplotlib.pyplot as plt
import scipy.linalg
__author__ = 'sbt'
# -*- coding: utf-8 -*-
"""
Contains the ModeAnalysis class, which can simulate the ... | gpl-3.0 |
arokem/scipy | scipy/stats/_distn_infrastructure.py | 1 | 127554 | #
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
from __future__ import division, print_function, absolute_import
from scipy._lib._util import getfullargspec_no_self as _getfullargspec
import sys
import keyword
import re
import types
import warnings
from itertool... | bsd-3-clause |
datapythonista/pandas | pandas/tests/window/test_groupby.py | 3 | 34849 | import numpy as np
import pytest
from pandas import (
DataFrame,
Index,
MultiIndex,
Series,
Timestamp,
date_range,
to_datetime,
)
import pandas._testing as tm
from pandas.api.indexers import BaseIndexer
from pandas.core.groupby.groupby import get_groupby
class TestRolling:
def setup_m... | bsd-3-clause |
LaurencePeanuts/Music | beatbox/multiverse.py | 2 | 31376 | import os.path
import numpy as np
import matplotlib
import matplotlib.pylab as plt
import healpy as hp
import string
import yt
import os
import glob
from PIL import Image as PIL_Image
from scipy.stats import chi2
import time
#import beatbox.universe
import beatbox
# ==================================================... | mit |
pprett/statsmodels | statsmodels/tsa/ar_model.py | 1 | 32196 | from __future__ import division
import numpy as np
from numpy import (dot, identity, atleast_2d, atleast_1d, zeros)
from numpy.linalg import inv
from scipy import optimize
from scipy.stats import t, norm, ss as sumofsq
from statsmodels.regression.linear_model import OLS
from statsmodels.tsa.tsatools import (lagmat, add... | bsd-3-clause |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/signal/spectral.py | 4 | 66089 | """Tools for spectral analysis.
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy import fftpack
from . import signaltools
from .windows import get_window
from ._spectral import _lombscargle
from ._arraytools import const_ext, even_ext, odd_ext, zero_ext
import warning... | gpl-3.0 |
mfouesneau/tap | examples/figrc.py | 2 | 107856 | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function, unicode_literals)
import os
import sys
sys.path.append(os.getenv('HOME') + '/bin/python/libs')
# just in case notebook was not launched with the option
# %pylab inline
import pylab as plt
import numpy as np
from scipy import spa... | mit |
dagss/numpy_svn | numpy/lib/function_base.py | 1 | 107133 | __docformat__ = "restructuredtext en"
__all__ = ['select', 'piecewise', 'trim_zeros', 'copy', 'iterable',
'percentile', 'diff', 'gradient', 'angle', 'unwrap', 'sort_complex',
'disp', 'extract', 'place', 'nansum', 'nanmax', 'nanargmax',
'nanargmin', 'nanmin', 'vectorize', 'asarray_chkfinite', 'av... | bsd-3-clause |
carlthome/librosa | librosa/segment.py | 1 | 35217 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Temporal segmentation
=====================
Recurrence and self-similarity
------------------------------
.. autosummary::
:toctree: generated/
cross_similarity
recurrence_matrix
recurrence_to_lag
lag_to_recurrence
timelag_filter
path_enhan... | isc |
lupien/pyHegel | pyHegel/traces.py | 1 | 32402 | # -*- coding: utf-8 -*-
########################## Copyrights and license ############################
# #
# Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> #
# ... | lgpl-3.0 |
lioritan/Thesis | problems/alg10_ohsumed_flatten_depth.py | 1 | 40875 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 18 16:46:57 2015
@author: liorf
"""
from random import choice
from numpy import *
from matplotlib.mlab import find
from scipy.stats import mode, chisquare
from matplotlib.cbook import flatten
import time
def clean_tree_for_pickle(tree_node):
# tree_node.relations=N... | gpl-2.0 |
svebk/DeepSentiBank_memex | workflows/build-lopq-index/lopq/python/lopq/model.py | 1 | 40109 | # Copyright 2015, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
import numpy as np
from sklearn.cluster import KMeans
import logging
import sys
from collections import namedtuple
from .utils import iterate_splits, predict_cluster
l... | bsd-2-clause |
hvasbath/beat | beat/apps/beat.py | 1 | 80893 | #!/usr/bin/env python
import os
from os.path import join as pjoin
# disable internal blas parallelisation as we parallelise over chains
nthreads = "1"
os.environ["OMP_NUM_THREADS"] = nthreads
os.environ["NUMEXPR_NUM_THREADS"] = nthreads
os.environ["OPENBLAS_NUM_THREADS"] = nthreads
os.environ["MKL_NUM_THREADS"] = nthr... | gpl-3.0 |
biosustain/cameo | cameo/flux_analysis/analysis.py | 1 | 39670 | # coding=utf-8
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | apache-2.0 |
ThomasBrouwer/BNMTF | experiments/experiments_gdsc/convergence/nmf_np.py | 1 | 61642 | """
Run non-probabilistic NMF on the Sanger dataset.
We can plot the MSE, R2 and Rp as it converges, on the entire dataset.
We give flat priors (1/10).
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../"
sys.path.append(project_location)
from BNMTF.code.models.nmf_np import NMF
from BNMT... | apache-2.0 |
kevin-intel/scikit-learn | sklearn/metrics/_classification.py | 2 | 97913 | """Metrics to assess performance on classification task given class prediction.
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better.
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better.
"""
# Authors: Alexandre Gramfort <alexandre.gr... | bsd-3-clause |
pydata/xarray | xarray/tests/test_dataset.py | 1 | 245749 | import pickle
import sys
import warnings
from copy import copy, deepcopy
from io import StringIO
from textwrap import dedent
import numpy as np
import pandas as pd
import pytest
from pandas.core.computation.ops import UndefinedVariableError
from pandas.core.indexes.datetimes import DatetimeIndex
from pandas.tseries.fr... | apache-2.0 |
jreback/pandas | pandas/tests/dtypes/test_dtypes.py | 1 | 36491 | import re
import numpy as np
import pytest
import pytz
from pandas.core.dtypes.base import registry
from pandas.core.dtypes.common import (
is_bool_dtype,
is_categorical,
is_categorical_dtype,
is_datetime64_any_dtype,
is_datetime64_dtype,
is_datetime64_ns_dtype,
is_datetime64tz_dtype,
... | bsd-3-clause |
rbiswas4/simlib | opsimsummary/opsim_out.py | 1 | 42003 | """
This module deals with representing the data in an OpSim output (to the extent
we will care about it). A description of the OpSim output can be found at
(opsim description)[https://www.lsst.org/scientists/simulations/opsim/summary-table-column-descriptions-v335]
In brief, we will use two tables from the OpSim outp... | mit |
kevin-intel/scikit-learn | sklearn/linear_model/_stochastic_gradient.py | 2 | 82378 | # Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author)
# Mathieu Blondel (partial_fit support)
#
# License: BSD 3 clause
"""Classification, regression and One-Class SVM using Stochastic Gradient
Descent (SGD).
"""
import numpy as np
import warnings
from abc import ABCMeta, abstractmethod
... | bsd-3-clause |
armbrustlab/seaflowpy | src/seaflowpy/beads.py | 1 | 34349 | import logging
import os
import pathlib
import hdbscan
import matplotlib as mpl
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from kern_smooth import densCols
from matplotlib.collections import LineCollection
from scipy.spatial import ConvexHull # pylint: disa... | gpl-3.0 |
LabPy/lantz | lantz/drivers/legacy/andor/ccd.py | 3 | 75904 | # -*- coding: utf-8 -*-
# pylint: disable=E265
"""
lantz.drivers.legacy.andor.ccd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Low level driver wrapping library for CCD and Intensified CCD cameras.
Only functions for iXon EMCCD cameras were tested.
Only tested in Windows OS.
The driver was written for the ... | bsd-3-clause |
ledatelescope/bifrost | python/bifrost/block.py | 1 | 49805 |
# Copyright (c) 2016-2021, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | bsd-3-clause |
catalyst-cooperative/pudl | src/pudl/validate.py | 1 | 85317 | """
PUDL data validation functions and test case specifications.
What defines a data validation?
* What data are we checking?
* What table or output does it come from?
* What selection criteria do we apply to that table or output?
* What are we checking it against?
* Itself (helps validate that the tes... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.